Skip to content

draw.io is a JavaScript, client-side editor for general diagramming.

26.0.13 release

David Benson3bc80b8958c1
diff --git a/ChangeLog b/ChangeLog
index e974e670d..fda6ae91f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+12-FEB-2025: 26.0.13
+
+- Adds appearance option in publish and embed dialogs
+- Forces light export of diagrams with no adaptive colors
+- Skips light-dark function for same light and dark color
+- [conf cloud] Adds support for pagePin in Gliffy import
+- Adds enableLightDarkColors configuration
+
+07-FEB-2025: 26.0.12
+
+- [conf cloud] Fixes simple view of imported Gliffy diagrams [DID-14343]
+- [conf cloud] Disable direct editing if a page has unpublished changes [DID-14257]
+- Fixes handling of Ctrl+Enter on Windows [jgraph/drawio#4883]
+- Adds transparent background option in iframe embed dialog [jgraph/drawio#4884]
+- Handles Ctrl+S while editing labels [jgraph/drawio#4885]
+- Fixes editing toolbar alignment in embed mode [jgraph/drawio#4874]
+- Updates DOMPurify from 3.2.3 to 3.2.4
+- Handles subgroups in GitLab paths [jgraph/drawio#4870]
+
+04-FEB-2025: 26.0.11
+
+- [conf cloud] Show error when embed diagram page not found (deleted or restricted) [DID-14304]
+- [conf cloud] Fixed realtime collaboration [DID-12871]
+
+28-JAN-2025: 26.0.10
+
+- [conf cloud] Fixes Gliffy mass import of linked diagrams when done in separate runs [DID-14151]
+- Enhanced page links in vsdx import [DID-14276]
+
27-JAN-2025: 26.0.9
- Fixes possible split is not a function in StyleFormatPanel
diff --git a/VERSION b/VERSION
index 8f1448ebe..db67b2404 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-26.0.9
\ No newline at end of file
+26.0.13
\ No newline at end of file
diff --git a/etc/dependencies/package.json b/etc/dependencies/package.json
index 88a5adb15..b6ec5874f 100644
--- a/etc/dependencies/package.json
+++ b/etc/dependencies/package.json
@@ -15,7 +15,7 @@
"mermaid": "11.4.1",
"pako": "2.1.0",
"crypto-js": "3.1.2",
- "dompurify": "3.2.3",
+ "dompurify": "3.2.4",
"spin.js": "2.0.0",
"roughjs": "4.6.6",
"mathjax": "3.2.2"
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index c2158f900..ed6a0454d 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -1,7 +1,7 @@
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(S,t)});var S;function b(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function N(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function w(t){const n=l(null);for(const[o,r]of e(t)){E(t,o)&&(Array.isArray(r)?n[o]=R(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=w(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return b(n.get);if("function"==typeof n.value)return b(n.value)}e=o(e)}return function(){return null}}const D=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),v=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),I=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\$\{[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:q,ERB_EXPR:F,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,MUSTACHE_EXPR:H,TMPLIT_EXPR:B});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.2.3",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:S,Node:b,Element:R,NodeFilter:H,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=O(j,"cloneNode"),$=O(j,"remove"),ne=O(j,"nextSibling"),oe=O(j,"childNodes"),re=O(j,"parentNode");if("function"==typeof S){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Ae}=K;let{IS_ALLOWED_URI:_e}=K,Se=null;const be=N({},[...D,...L,...v,...x,...k]);let Ne=null;const Re=N({},[...I,...U,...z,...P]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,De=null,Le=!0,ve=!0,Ce=!1,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=N({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=N({},[Je,Qe,et],d);let it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["annotation-xml"]);const lt=N({},["title","style","font","a","script"]);let ct=null;const st=["application/xhtml+xml","text/html"];let ut=null,mt=null;const pt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=w(e),ct=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?d:f,Se=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,ut):be,Ne=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,ut):Re,ot=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?N(w(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?N(w(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,ut):qe,Oe=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,ut):{},De=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,ut):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ve=!1),He&&(Pe=!0),je&&(Se=N({},k),Ne=[],!0===je.html&&(N(Se,D),N(Ne,I)),!0===je.svg&&(N(Se,L),N(Ne,U),N(Ne,P)),!0===je.svgFilters&&(N(Se,v),N(Ne,U),N(Ne,P)),!0===je.mathMl&&(N(Se,x),N(Ne,z),N(Ne,P))),e.ADD_TAGS&&(Se===be&&(Se=w(Se)),N(Se,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ne===Re&&(Ne=w(Ne)),N(Ne,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&N(Ve,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),N(Xe,e.FORBID_CONTENTS,ut)),Ge&&(Se["#text"]=!0),Ie&&N(Se,["html","head","body"]),Se.table&&(N(Se,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),mt=e}},ht=N({},[...L,...v,...C]),gt=N({},[...x,...M]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(ze)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,ct)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},At=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof b&&e instanceof b};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,mt)}))}const Nt=function(e){let t=null;if(bt(pe.beforeSanitizeElements,e,null),_t(e))return Tt(e),!0;const n=ut(e.nodeName);if(bt(pe.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(ke&&e.nodeType===Q&&A(/<[/\w]/g,e.data))return Tt(e),!0;if(!Se[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[o])&&!(t.namespaceURI===Je&&!it[o])&&!gt[n]&&(lt[n]||!ht[n]):!("application/xhtml+xml"!==ct||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(pe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in pt))return!1;if(ve&&!De[t]&&A(ge,t));else if(Le&&A(Te,t));else if(!Ne[t]||De[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(A(_e,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Ce&&!A(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,Ae)},Ot=function(e){bt(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ut(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(pe.uponSanitizeAttribute,e,n),p=n.attrValue,!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ke&&A(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,p)){yt(a,e);continue}Me&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=ut(e.nodeName);if(Rt(f,s,p)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),_t(e)?Tt(e):m(o.removed)}catch(e){}}}bt(pe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=At(t);for(bt(pe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(pe.uponSanitizeShadowNode,n,null),Nt(n),Ot(n),n.content instanceof s&&e(n.content);bt(pe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||dt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Se[t]||Oe[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Pe&&!Me&&!Ie&&-1===e.indexOf("<"))return ie&&Fe?ie.createHTML(e):e;if(n=Et(e),!n)return Pe?null:Fe?ae:""}n&&ze&&Tt(n.firstChild);const c=At(Ye?e:n);for(;i=c.nextNode();)Nt(i),Ot(i),i.content instanceof s&&Dt(i.content);if(Ye)return e;if(Pe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Me&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&Fe?ie.createHTML(m):m},o.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){mt=null,Ue=!1},o.isValidAttribute=function(e,t,n){mt||dt({});const o=ut(e),r=ut(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&p(pe[e],t)},o.removeHook=function(e){return m(pe[e])},o.removeHooks=function(e){pe[e]=[]},o.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return ne}));
+/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...k,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,k),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...M]),yt=w({},[...k,...I]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Me&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!ke&&S(/\/>/i,m)){At(a,e);continue}Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Ie&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
@@ -64,7 +64,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.13",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -123,17 +123,17 @@ b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=
isRgbColor:function(a){return mxUtils.rgbaColorRegex.test(a)},isValidColor:function(a){if(null==a)return!1;a=String(a).replace(/\s/g,"");if(a.toLowerCase()==mxUtils.normalizedValidInvalidColor)return!0;mxUtils.canvasContext.fillStyle=mxUtils.validInvalidColor;mxUtils.canvasContext.fillStyle=a;return mxUtils.canvasContext.fillStyle!=mxUtils.validInvalidColor},isDarkColor:function(a){a=mxUtils.parseColor(a);return null!=a?128>.213*a.r+.715*a.g+.072*a.b:!1},parseLightDarkColor:function(a,b,c){var d=
a,e=null;null!=a&&(a=a.match(mxUtils.lightDarkColorRegex))&&3===a.length&&(d=mxUtils.trim(a[1]),e=mxUtils.trim(a[2]));null==e&&(c||mxUtils.isVarColor(d))&&(e=d);e=null!=e?e:null!=b?b:mxUtils.getInverseColor(d);return{light:d,dark:e}},getInverseColor:function(a,b,c){function d(m){return Math.round(b/100*(255-m)+m*(1-b/100))}function e(m){return Math.round(Math.max(0,Math.min(255,m)))}c=null!=c?c:180;b=null!=b?b:93;var f=0,g=0,k=0;if("transparent"==a.toLowerCase())return a;k=mxUtils.parseColor(a);if(null==
k)return a;f=k.r;g=k.g;k=k.b;f=d(f);g=d(g);k=d(k);a=[1,0,0,0,1,0,0,0,1];var l=Math.cos(c*Math.PI/180);c=Math.sin(c*Math.PI/180);a[0]=.2126+.7874*l-.2126*c;a[1]=.7152-.7152*l-.7152*c;a[2]=.0722-.0722*l+.9278*c;a[3]=.2126-.2126*l+.143*c;a[4]=.7152+(1-.7152)*l+.14*c;a[5]=.0722-.0722*l-.283*c;a[6]=.2126-.2126*l-.7874*c;a[7]=.7152-.7152*l+.7152*c;a[8]=.0722+.9278*l+.0722*c;c=e(a[0]*f+a[1]*g+a[2]*k);l=e(a[3]*f+a[4]*g+a[5]*k);f=e(a[6]*f+a[7]*g+a[8]*k);return"#"+(16777216|c<<16|l<<8|f).toString(16).slice(1)},
-addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?"light-dark("+e.light+", "+e.dark+")":mxUtils.preferDarkColor?
-e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText="light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===Element)d=a.cloneNode(null!=c?!c:!1);else{d=
-new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/
-180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
+addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?e.light==e.dark?e.light:"light-dark("+e.light+
+", "+e.dark+")":mxUtils.preferDarkColor?e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText=b.light==b.dark?b.light:"light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===
+Element)d=a.cloneNode(null!=c?!c:!1);else{d=new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);
+d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);
+d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
reversePortConstraints:function(a){var 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,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,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=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,
@@ -2003,12 +2003,12 @@ Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFi
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(f,h){b.undoableEditHappened(h.getProperty("edit"))};var e=mxUtils.bind(this,function(f,h){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(f,h){f=h.getProperty("edit").changes;f=a.getSelectionCellsForChanges(f);h=!1;if(0<f.length){for(var d=[],g=0;g<f.length;g++)null!=a.view.getState(f[g])&&(d.push(f[g]),
h||(a.scrollCellToVisible(f[g]),h=!0));a.setSelectionCells(d)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var x=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var I=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&
-(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;I+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",I+=a.embedViewport.y,D+=a.embedViewport.x);
-h&&document.body.appendChild(this.bg);var T=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,I,e,f);D=h.x;I=h.y;T.style.width=e+"px";T.style.height=f+"px";T.style.left=D+"px";T.style.top=I+"px";T.style.zIndex=this.zIndex;T.appendChild(b);document.body.appendChild(T);!m&&b.clientHeight>T.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),
-d.className="geDialogClose",d.style.top=I+14+"px",d.style.left=D+e+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){K=!0}),null,mxUtils.bind(this,function(U){K&&(a.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||
-null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);G=U.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(z,document.body.scrollWidth-E):z;f=Math.min(C,G-E);U=Math.max(1,Math.round((U.width-e-E)/2));var Y=Math.max(1,Math.round((G-f-a.footerHeight)/3));Y=this.getPosition(U,Y,e,f);U=Y.x;Y=Y.y;var Q=mxUtils.getDocumentScrollOrigin(document);U+=Q.x;Y+=Q.y;Editor.inlineFullscreen||
-null==a.embedViewport||(Y+=a.embedViewport.y,U+=a.embedViewport.x);T.style.left=U+"px";T.style.top=Y+"px";T.style.width=e+"px";T.style.height=f+"px";!m&&b.clientHeight>T.clientHeight-E&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Y+14+"px",this.dialogImg.style.left=U+e+38-x+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=g;this.container=T;a.editor.fireEvent(new mxEventObject("showDialog"))}
+function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var w=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var K=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&
+(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;K+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",K+=a.embedViewport.y,D+=a.embedViewport.x);
+h&&document.body.appendChild(this.bg);var Q=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,K,e,f);D=h.x;K=h.y;Q.style.width=e+"px";Q.style.height=f+"px";Q.style.left=D+"px";Q.style.top=K+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),
+d.className="geDialogClose",d.style.top=K+14+"px",d.style.left=D+e+38-w+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){N=!0}),null,mxUtils.bind(this,function(U){N&&(a.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||
+null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);G=U.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(z,document.body.scrollWidth-E):z;f=Math.min(C,G-E);U=Math.max(1,Math.round((U.width-e-E)/2));var Y=Math.max(1,Math.round((G-f-a.footerHeight)/3));Y=this.getPosition(U,Y,e,f);U=Y.x;Y=Y.y;var P=mxUtils.getDocumentScrollOrigin(document);U+=P.x;Y+=P.y;Editor.inlineFullscreen||
+null==a.embedViewport||(Y+=a.embedViewport.y,U+=a.embedViewport.x);Q.style.left=U+"px";Q.style.top=Y+"px";Q.style.width=e+"px";Q.style.height=f+"px";!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Y+14+"px",this.dialogImg.style.left=U+e+38-w+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=g;this.container=Q;a.editor.fireEvent(new mxEventObject("showDialog"))}
Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2016,91 +2016,92 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};
Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);x.appendChild(z)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);x.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
-var C=mxUtils.button(f,function(){p&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};x.appendChild(e);this.container=x},PrintDialog=function(a,b,e){this.create(a,b,e)};
-PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(x.value)/100;isNaN(D)&&(D=1,x.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(I=mxUtils.getScaleForPageCount(L,e,G))}var T=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);I*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,T-=D.y*G.height):
-E=!0;E=PrintDialog.createPrintPreview(e,I,G,0,L,T,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
+var ErrorDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);w.appendChild(z)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
+var C=mxUtils.button(f,function(){p&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e){this.create(a,b,e)};
+PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,K=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(K=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);K*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):
+E=!0;E=PrintDialog.createPrintPreview(e,K,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
m.appendChild(p);mxEvent.addListener(p,"click",function(C){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(C)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});d.appendChild(m);h.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,
"click",function(C){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(C)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);h.appendChild(d);mxEvent.addListener(k,"change",
-function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");g.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";m.appendChild(x);d.appendChild(m);h.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
+function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");g.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);h.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
m.style.paddingTop="20px";m.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);if(PrintDialog.previewEnabled){var z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});z.className="geBtn";m.appendChild(z)}z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});z.className="geBtn gePrimaryBtn";m.appendChild(z);a.editor.cancelFirst||
m.appendChild(p);d.appendChild(m);h.appendChild(d);f.appendChild(h);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}};
PrintDialog.createPrintPreview=function(a,b,e,f,h,d,g){b=new mxPrintPreview(a,b,e,f,h,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=g;g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;var m=b.isTextLabel;b.isTextLabel=function(k){return"geHint"==!k.className&&m.apply(this,arguments)};var p=b.getLinkForCellState;b.getLinkForCellState=function(k){return a.getAbsoluteUrl(p.apply(this,arguments))};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){var D=x;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(u.style.backgroundColor=z,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");
+var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(u.style.backgroundColor=z,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");
var d=document.createElement("tr");var g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("paperSize")+":");d.appendChild(g);g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";var m=PageSetupDialog.addPageFormatPanel(g,"pagesetupdialog",e.pageFormat);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("gridSize")+":");d.appendChild(g);
g=document.createElement("td");g.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();g.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("background")+":");
d.appendChild(g);g=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";
-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var x=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,I,L,T){I||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),x=G,C=T);z=L;b()},x,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
-g.colSpan=2;g.style.paddingTop="16px";g.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,x,m.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=x?x.src:null);null!=C&&
+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,K,L,Q){K||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=Q);z=L;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
+g.colSpan=2;g.style.paddingTop="16px";g.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,w,m.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=C&&
(D.shadowVisible=C);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";g.appendChild(E);a.editor.cancelFirst||g.appendChild(k);d.appendChild(g);h.appendChild(d);f.appendChild(h);this.container=f};
PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var h=document.createElement("input");h.setAttribute("name",b);h.setAttribute("type","radio");h.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="4px";g.style.borderRadius="4px";g.style.borderWidth="1px";g.style.borderStyle="solid";g.style.boxSizing="border-box";
g.style.padding="2px";g.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";h.style.marginRight="6px";m.appendChild(h);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,mxResources.get("landscape"));
-m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var x=document.createElement("input");x.setAttribute("size","7");x.setAttribute("title",mxResources.get("height"));x.style.textAlign="right";k.appendChild(x);
+m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign="right";k.appendChild(w);
var z=document.createElement("select");z.style.marginLeft="4px";z.style.maxWidth="78px";z.style.width="78px";for(var C=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<C.length;E++){var D=document.createElement("option");D.setAttribute("value",C[E].unit);mxUtils.write(D,C[E].label);z.appendChild(D)}z.value=Editor.pageSizeUnit;k.appendChild(z);m.style.display=
-"none";k.style.display="none";var G={},I=PageSetupDialog.getFormats();for(E=0;E<I.length;E++)C=I[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var K=0;K<I.length;K++){var U=I[K];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=
+"none";k.style.display="none";var G={},K=PageSetupDialog.getFormats();for(E=0;E<K.length;E++)C=K[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var N=0;N<K.length;N++){var U=K[N];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=
583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==U.format.width&&e.height==U.format.height?(g.value=U.key,h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==U.format.height&&e.height==U.format.width&&(g.value=U.key,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==g.value?
-(u.value=Editor.toUnit(e.width,z.value),x.value=Editor.toUnit(e.height,z.value),h.setAttribute("checked","checked"),g.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};L();a.appendChild(g);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var T=function(K,U){K=G[g.value];null!=K.format?(u.value=Editor.toUnit(d.checked?K.format.height:K.format.width,z.value),x.value=Editor.toUnit(d.checked?K.format.width:K.format.height,z.value),k.style.display="none",
-m.style.display=""):(m.style.display="none",k.style.display="");K=parseFloat(u.value);if(isNaN(K)||0>=K)u.value=Editor.toUnit(e.width,z.value);K=parseFloat(x.value);if(isNaN(K)||0>=K)x.value=Editor.toUnit(e.height,z.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(x.value),z.value)));U||K.width==e.width&&K.height==e.height||(e=K,null!=f&&f(e))};mxEvent.addListener(b,"click",function(K){h.checked=!0;T(K);mxEvent.consume(K)});
-mxEvent.addListener(p,"click",function(K){d.checked=!0;T(K);mxEvent.consume(K)});mxEvent.addListener(u,"blur",T);mxEvent.addListener(u,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(d,"change",T);mxEvent.addListener(h,"change",T);mxEvent.addListener(g,"change",function(K){T(K,"custom"==g.value);mxEvent.consume(K)});mxEvent.addListener(z,"change",function(K){u.value=Editor.toUnit(Editor.fromUnit(u.value,Editor.pageSizeUnit),z.value);x.value=Editor.toUnit(Editor.fromUnit(x.value,
-Editor.pageSizeUnit),z.value);Editor.pageSizeUnit=z.value;T(K,!0);mxEvent.consume(K)});T(null,!0);return{set:function(K){e=K;L(null,null,!0)},get:function(){return e},widthInput:u,heightInput:x}};
+(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),h.setAttribute("checked","checked"),g.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};L();a.appendChild(g);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var Q=function(N,U){N=G[g.value];null!=N.format?(u.value=Editor.toUnit(d.checked?N.format.height:N.format.width,z.value),w.value=Editor.toUnit(d.checked?N.format.width:N.format.height,z.value),k.style.display="none",
+m.style.display=""):(m.style.display="none",k.style.display="");N=parseFloat(u.value);if(isNaN(N)||0>=N)u.value=Editor.toUnit(e.width,z.value);N=parseFloat(w.value);if(isNaN(N)||0>=N)w.value=Editor.toUnit(e.height,z.value);N=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));U||N.width==e.width&&N.height==e.height||(e=N,null!=f&&f(e))};mxEvent.addListener(b,"click",function(N){h.checked=!0;Q(N);mxEvent.consume(N)});
+mxEvent.addListener(p,"click",function(N){d.checked=!0;Q(N);mxEvent.consume(N)});mxEvent.addListener(u,"blur",Q);mxEvent.addListener(u,"click",Q);mxEvent.addListener(w,"blur",Q);mxEvent.addListener(w,"click",Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(h,"change",Q);mxEvent.addListener(g,"change",function(N){Q(N,"custom"==g.value);mxEvent.consume(N)});mxEvent.addListener(z,"change",function(N){u.value=Editor.toUnit(Editor.fromUnit(u.value,Editor.pageSizeUnit),z.value);w.value=Editor.toUnit(Editor.fromUnit(w.value,
+Editor.pageSizeUnit),z.value);Editor.pageSizeUnit=z.value;Q(N,!0);mxEvent.consume(N)});Q(null,!0);return{set:function(N){e=N;L(null,null,!0)},get:function(){return e},widthInput:u,heightInput:w}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var x=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
+var FilenameDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",h||mxResources.get("filename"));mxUtils.write(E,(h||mxResources.get("filename"))+":");C.appendChild(E);z.appendChild(C);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var G=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var I=z.parentNode;if(null!=I){var L=null;mxEvent.addListener(I,"dragleave",function(T){null!=L&&(L.style.backgroundColor="",L=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(T){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=
-"#ebf2f9");T.stopPropagation();T.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(T){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(T.dataTransfer.getData("text/uri-list")),G.click());T.stopPropagation();T.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);
+h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var K=z.parentNode;if(null!=K){var L=null;mxEvent.addListener(K,"dragleave",function(Q){null!=L&&(L.style.backgroundColor="",L=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=
+"#ebf2f9");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Q.dataTransfer.getData("text/uri-list")),G.click());Q.stopPropagation();Q.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);
null==h&&null!=g||null==u||null==a.editor.diagramFileTypes||(C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.textOverflow="ellipsis",C.style.justifyContent="flex-end",C.style.fontSize="10pt",mxUtils.write(C,mxResources.get("type")+":"),z.appendChild(C),C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.whiteSpace="nowrap",z.appendChild(C),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),
b.style.width="100%",C.appendChild(b));null!=g&&z.appendChild(g);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});C.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));
-a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(I){13==I.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);x.appendChild(z);this.container=x};FilenameDialog.filenameHelpLink=null;
+a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(K){13==K.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);w.appendChild(z);this.container=w};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var h=document.createElement("option");h.setAttribute("value",a);mxUtils.write(h,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(h)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var g=b.value.lastIndexOf(".drawio.");g=0<g?g:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<g?b.value.substring(0,g+1)+d:b.value+"."+d;"createEvent"in
document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var g=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){g=m;break}}f.value=g};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};
var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);this.window=new mxWindow(b,m,e,f,h,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(p){null==p&&(p=window.event);return null!=p&&a.isSelectionAllowed(p)}))};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph;if(null!=g.container&&!g.transparentBackground){if(g.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=g.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(g.container),p.style.position="absolute",g.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){g.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=
g.tooltipHandler&&g.tooltipHandler.isHideOnHover()&&g.tooltipHandler.hide();g.isMouseDown&&!mxEvent.isConsumed(k)&&g.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,x=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
-10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,I=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
-this.scale-z+m,E)+I*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=x,k.view.backgroundPageShape.node.style.colorScheme=
-"none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=
-function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var x=u*p;k.push("M 0 "+x+" L "+m+" "+x+" M "+x+" 0 L "+x+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
-m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,x=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();
-m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,x.width*z,x.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,I=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?D:G,U=0;U<=K;U++){var Y=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
-Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(I),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=T[U]?(T[U].points=Y,T[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),T[U]=Y)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});g(this.horizontalPageBreaks);
-g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=
-e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
-u=this.graph.pageScale,x=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/x);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*x),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/x)-u)*x,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,x){var z=h.apply(this,arguments);null==x||x||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||
-this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var x=this.graph.isCellSelected(p);u=u||x;if(x||!u&&(this.graph.isTableCell(g)||this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var M=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var aa=this.view.translate,ia=this.view.scale;M=mxRectangle.fromRectangle(M);M.add(new mxRectangle((aa.x+V.x)*ia,(aa.y+V.y)*ia,V.width*ia,V.height*ia))}return M};h.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(M,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
-0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(M){for(var V=M.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(M.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(M){try{h.getModel().isEdge(M)?
-p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(M,!1),aa=[],ia=[],na;for(na in V)aa.push(V[na]),ia.push(na);h.getModel().isEdge(M)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",aa,"cells",[M],"force",!0));h.getModel().isEdge(M)?p=h.pasteEdgeStyle=!0:m=!0}catch(qa){this.handleError(qa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=
-p=h.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(M,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(M,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(M){null==M&&(M=window.event);return h.isEditing()||null!=M&&this.isSelectionAllowed(M)});this.container!=document.body||
-this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&
-(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var M=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{M=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(aa){}}return M}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",
-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(M){if(null!=M){var V=mxEvent.getSource(M);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(M)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||
-9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):h.panningHandler.usePopupTrigger=!1;h.init(this.diagramContainer);mxClient.IS_SVG&&null!=h.view.getDrawPane()&&(b=h.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=h.graphHandler){var u=h.graphHandler.start;h.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,
-"mousemove",mxUtils.bind(this,function(M){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(M)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(M)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var x=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(M,V){return f.isSpaceDown()||x.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,
-function(M){16==M.which?this.shiftDown=!0:32!=M.which||h.isEditing()?mxEvent.isConsumed(M)||27!=M.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(M)!=h.container||mxEvent.consume(M))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(M){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var z=h.panningHandler.isForcePanningEvent;h.panningHandler.isForcePanningEvent=function(M){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(M.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(M.getEvent()))&&(!mxEvent.isControlDown(M.getEvent())&&mxEvent.isRightMouseButton(M.getEvent())||mxEvent.isMiddleMouseButton(M.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(M){return C.apply(this,arguments)||13==M.keyCode&&(!mxClient.IS_SF&&
-mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M)||mxClient.IS_SF&&mxEvent.isShiftDown(M))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,I=null,L=null,T=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var M=this.toolbar.container.firstChild,V=[];null!=M;){var aa=M.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,M)&&(M.parentNode.removeChild(M),V.push(M));
-M=aa}M=this.toolbar.fontMenu;aa=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=I}D=h.cellEditor.isContentEditing();G=M;I=aa;L=V}}),K=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){K.apply(this,arguments);T();if(h.cellEditor.isContentEditing()){var M=!1,V=function(){M||(M=!0,window.setTimeout(function(){var aa=h.getSelectedEditingElement();null!=
-aa&&(aa=mxUtils.getCurrentStyle(aa),null!=aa&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(aa.fontFamily)),f.toolbar.setFontSize(parseInt(aa.fontSize))));M=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(M,V){try{U.apply(this,arguments),
-T()}catch(aa){f.handleError(aa)}};h.container.setAttribute("tabindex","0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(M){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(M,V,aa){try{M==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var Q=h.foldCells;h.foldCells=function(M,V,aa,ia,na){try{Q.apply(this,arguments)}catch(qa){f.handleError(qa)}};h.popupMenuHandler.autoExpand=
-!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(M,V,aa){this.menus.createPopupMenu(M,V,aa)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(M){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(M,V){var aa=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(aa.push(V.getProperty("terminal")),window.setTimeout(function(){null!=
-f.hoverIcons&&f.hoverIcons.update(h.view.getState(aa[aa.length-1]))},0));h.pasteCellStyles(aa)});this.addListener("styleChanged",mxUtils.bind(this,function(M,V){M=V.getProperty("force");(this.updateDefaultStyle||M)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||
-Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==h.currentEdgeStyle.edgeStyle&&"1"==h.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==h.currentEdgeStyle.edgeStyle||"none"==h.currentEdgeStyle.edgeStyle||
-null==h.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==h.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+
-")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==h.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==h.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+
-")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var M=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),aa=h.getView().getState(h.getSelectionCell());null!=aa&&(M=aa.style[mxConstants.STYLE_FONTFAMILY]||M,V=aa.style[mxConstants.STYLE_FONTSIZE]||V,10<M.length&&(M=M.substring(0,8)+"..."));this.toolbar.setFontName(M);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,
-a));h.addListener(mxEvent.CELLS_ADDED,function(M,V){M=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=M&&0<M.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var M=h.getLayerForCells(h.getSelectionCells());null!=M&&h.setDefaultParent(M)}});this.gestureHandler=mxUtils.bind(this,function(M){null!=this.currentMenu&&mxEvent.getSource(M)!=
-this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var P=null;this.resizeHandler=mxUtils.bind(this,function(){null!=P&&window.clearTimeout(P);P=window.setTimeout(mxUtils.bind(this,function(){P=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&
-!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));h.addListener("gridSizeChanged",
-mxUtils.bind(this,function(){h.isGridEnabled()&&h.view.validateBackground()}));this.editor.resetGraph()}this.init();h.standalone||this.open()};EditorUi.compactUi=!0;
+mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
+10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,K=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
+this.scale-z+m,E)+K*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
+"none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,"1"==urlParams.transparent?k.container.style.background="transparent":!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,
+k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+
+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;
+mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,w=
+this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,K=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(Q){if(null!=Q){for(var N=Q==this.horizontalPageBreaks?D:G,U=
+0;U<=N;U++){var Y=Q==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(K),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=Q[U]?(Q[U].points=Y,Q[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),Q[U]=Y)}for(U=N;U<
+Q.length;U++)null!=Q[U]&&Q[U].destroy();Q.splice(N,Q.length-N)}});g(this.horizontalPageBreaks);g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;
+mxConnectionHandler.prototype.createMarker=function(){var g=e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?
+g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==
+mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,w){var z=h.apply(this,arguments);null==w||w||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;
+mxGraphHandler.prototype.isPropagateSelectionCell=function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||
+this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(g)||
+this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var J=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Z=this.view.translate,ia=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((Z.x+V.x)*ia,(Z.y+V.y)*ia,V.width*ia,V.height*ia))}return J};h.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(J,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
+0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(J){for(var V=J.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(J.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(J){try{h.getModel().isEdge(J)?
+p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(J,!1),Z=[],ia=[],oa;for(oa in V)Z.push(V[oa]),ia.push(oa);h.getModel().isEdge(J)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",Z,"cells",[J],"force",!0));h.getModel().isEdge(J)?p=h.pasteEdgeStyle=!0:m=!0}catch(sa){this.handleError(sa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=p=h.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(J,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(J,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(J){null==J&&(J=window.event);return h.isEditing()||null!=J&&this.isSelectionAllowed(J)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=
+k),mxClient.IS_IOS&&(b=function(){var J=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{J=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(Z){}}return J}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,
+"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(J){if(null!=J){var V=mxEvent.getSource(J);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(J)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
+"contextmenu",b):this.diagramContainer.oncontextmenu=b):h.panningHandler.usePopupTrigger=!1;h.init(this.diagramContainer);mxClient.IS_SVG&&null!=h.view.getDrawPane()&&(b=h.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=h.graphHandler){var u=h.graphHandler.start;h.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+function(J){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(J)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(J)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(J,V){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(J){16==J.which?this.shiftDown=
+!0:32!=J.which||h.isEditing()?mxEvent.isConsumed(J)||27!=J.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(J)!=h.container||mxEvent.consume(J))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(J){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=h.panningHandler.isForcePanningEvent;
+h.panningHandler.isForcePanningEvent=function(J){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(J.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(J.getEvent()))&&(!mxEvent.isControlDown(J.getEvent())&&mxEvent.isRightMouseButton(J.getEvent())||mxEvent.isMiddleMouseButton(J.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(J){return C.apply(this,arguments)||13==J.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(J)||mxClient.IS_MAC&&
+mxEvent.isMetaDown(J)||mxClient.IS_SF&&mxEvent.isShiftDown(J))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,K=null,L=null,Q=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var J=this.toolbar.container.firstChild,V=[];null!=J;){var Z=J.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,J)&&(J.parentNode.removeChild(J),V.push(J));J=Z}J=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;
+if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=K}D=h.cellEditor.isContentEditing();G=J;K=Z;L=V}}),N=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){N.apply(this,arguments);Q();if(h.cellEditor.isContentEditing()){var J=!1,V=function(){J||(J=!0,window.setTimeout(function(){var Z=h.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=f.toolbar&&
+(f.toolbar.setFontName(mxUtils.getCssFontFamily(Z.fontFamily)),f.toolbar.setFontSize(parseInt(Z.fontSize))));J=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(J,V){try{U.apply(this,arguments),Q()}catch(Z){f.handleError(Z)}};h.container.setAttribute("tabindex",
+"0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(J){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(J,V,Z){try{J==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var P=h.foldCells;h.foldCells=function(J,V,Z,ia,oa){try{P.apply(this,arguments)}catch(sa){f.handleError(sa)}};h.popupMenuHandler.autoExpand=!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,
+function(J,V,Z){this.menus.createPopupMenu(J,V,Z)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(J){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(J,V){var Z=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(Z.push(V.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(h.view.getState(Z[Z.length-
+1]))},0));h.pasteCellStyles(Z)});this.addListener("styleChanged",mxUtils.bind(this,function(J,V){J=V.getProperty("force");(this.updateDefaultStyle||J)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&
+(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==h.currentEdgeStyle.edgeStyle&&"1"==h.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==h.currentEdgeStyle.edgeStyle||"none"==h.currentEdgeStyle.edgeStyle||null==h.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+
+")":"entityRelationEdgeStyle"==h.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&
+(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==h.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==h.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var J=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),Z=h.getView().getState(h.getSelectionCell());null!=Z&&(J=Z.style[mxConstants.STYLE_FONTFAMILY]||J,V=Z.style[mxConstants.STYLE_FONTSIZE]||V,10<J.length&&(J=J.substring(0,8)+"..."));this.toolbar.setFontName(J);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,a));h.addListener(mxEvent.CELLS_ADDED,function(J,
+V){J=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=J&&0<J.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var J=h.getLayerForCells(h.getSelectionCells());null!=J&&h.setDefaultParent(J)}});this.gestureHandler=mxUtils.bind(this,function(J){null!=this.currentMenu&&mxEvent.getSource(J)!=this.currentMenu.div&&this.hideCurrentMenu()});
+mxEvent.addGestureListeners(document,this.gestureHandler);var T=null;this.resizeHandler=mxUtils.bind(this,function(){null!=T&&window.clearTimeout(T);T=window.setTimeout(mxUtils.bind(this,function(){T=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==
+typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));h.addListener("gridSizeChanged",mxUtils.bind(this,function(){h.isGridEnabled()&&
+h.view.validateBackground()}));this.editor.resetGraph()}this.init();h.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(a,b,e){function f(m,p){var k=d;d+=p;return m.substring(k,d)}function h(m){m=f(m,4);return m.charCodeAt(3)+(m.charCodeAt(2)<<8)+(m.charCodeAt(1)<<16)+(m.charCodeAt(0)<<24)}var d=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);do{e=h(a);var g=f(a,4);if(null!=b&&b(d-8,g,e))break;value=f(a,e);f(a,4);if("IEND"==g)break}while(e)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?212:240);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;
EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
@@ -2109,30 +2110,30 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
arguments);e.updateActionStates()};a.showLinkDialog=mxUtils.bind(e,e.showLinkDialog);a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),e=this.initSelectionState(),f=!0,h=0;h<b.length;h++){var d=a.getCurrentCellStyle(b[h]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(e,b[h],b,f),f=!1)}this.updateSelectionStateForTableCells(e);return e};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),h=e.getParent(f);if(null!=f&&null!=h){for(var d=f.getIndex(b[0]),g=h.getIndex(f),m=null,p=1,k=1,u=0,x=g<h.getChildCount()-1?e.getChildAt(e.getChildAt(h,g+1),d):null;u<b.length-1;){var z=b[++u];null==x||x!=z||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(x),x=g+k<h.getChildCount()?e.getChildAt(e.getChildAt(h,g+k),d):null);var C=this.editor.graph.view.getState(z);
+EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),h=e.getParent(f);if(null!=f&&null!=h){for(var d=f.getIndex(b[0]),g=h.getIndex(f),m=null,p=1,k=1,u=0,w=g<h.getChildCount()-1?e.getChildAt(e.getChildAt(h,g+1),d):null;u<b.length-1;){var z=b[++u];null==w||w!=z||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(w),w=g+k<h.getChildCount()?e.getChildAt(e.getChildAt(h,g+k),d):null);var C=this.editor.graph.view.getState(z);
if(z==e.getChildAt(f,d+p)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))p++;else break}u==k*p-1&&(a.mergeCell=b[0],a.colspan=p,a.rowspan=k)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};
EditorUi.prototype.createTimeout=function(a,b,e){var f=!0,h=null,d=mxUtils.bind(this,function(m){h.clear()&&(f=!1,m=null!=m?m:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(a,b,e)})},null!=e?e(m):this.handleError(m))}),g=window.setTimeout(d,null!=a?a:this.timeout);h={clear:function(){window.clearTimeout(g);return f},isAlive:function(){return f}};null!=b&&this.tryAndHandle(mxUtils.bind(this,function(){b(h)}),d);return h};
EditorUi.prototype.tryAndHandle=function(a,b){try{a()}catch(e){null!=b?b(e):this.handleError(e)}};
EditorUi.prototype.removeUserDefinedDarkColors=function(a,b,e){var f=this.editor.graph;a=null!=a?a:f.getSelectionCells();var h=Graph.colorStyles,d=document.createElement("div");f.model.beginUpdate();try{for(var g=0;g<a.length;g++)if(f.model.isEdge(a[g])||f.model.isVertex(a[g])){var m=f.getCellStyle(a[g],!1);if(null!=m)for(var p=0;p<h.length;p++)try{var k=m[h[p]];if(mxUtils.isLightDarkColor(k)){var u=mxUtils.getLightDarkColor(k);f.setCellStyles(h[p],u.light,[a[g]])}}catch(z){}b&&f.isHtmlLabel(a[g])&&
-"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[g])),Graph.addLightDarkColors(d,null,null,function(z,C,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),z.style.setProperty(C,E.light),!0):!1})&&f.cellLabelChanged(a[g],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var x=new ChangePageSetup(this,u.light);x.ignoreImage=!0;f.model.execute(x)}}finally{f.model.endUpdate()}return a};
+"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[g])),Graph.addLightDarkColors(d,null,null,function(z,C,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),z.style.setProperty(C,E.light),!0):!1})&&f.cellLabelChanged(a[g],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
EditorUi.prototype.updateSelectionStateForCell=function(a,b,e,f){e=this.editor.graph;a.cells.push(b);if(e.getModel().isVertex(b)){a.connections=0<e.model.getEdgeCount(b);a.unlocked=a.unlocked&&!e.isCellLocked(b);a.resizable=a.resizable&&e.isCellResizable(b);a.rotatable=a.rotatable&&e.isCellRotatable(b);a.movable=a.movable&&e.isCellMovable(b)&&!e.isTableRow(b)&&!e.isTableCell(b);a.swimlane=a.swimlane||e.isSwimlane(b);a.table=a.table||e.isTable(b);a.cell=a.cell||e.isTableCell(b);a.row=a.row||e.isTableRow(b);
a.vertices.push(b);var h=e.getCellGeometry(b);if(null!=h&&(0<h.width?null==a.width?a.width=h.width:a.width!=h.width&&(a.width=""):a.containsLabel=!0,0<h.height?null==a.height?a.height=h.height:a.height!=h.height&&(a.height=""):a.containsLabel=!0,!h.relative||null!=h.offset)){var d=h.relative?h.offset.x:h.x;h=h.relative?h.offset.y:h.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=h:a.y!=h&&(a.y="")}}else e.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
!1);d=e.view.getState(b);null!=d&&(a.html=a.html&&e.isHtmlLabel(b),a.autoSize=a.autoSize||e.isAutoSizeState(d),a.glass=a.glass&&e.isGlassState(d),a.rounded=a.rounded&&e.isRoundedState(d),a.lineJumps=a.lineJumps&&e.isLineJumpState(d),a.image=a.image||e.isImageState(d),a.shadow=a.shadow&&e.isShadowState(d),a.fill=a.fill&&e.isFillState(d),a.gradient=a.fill&&e.isGradientState(d),a.stroke=a.stroke&&e.isStrokeState(d),b=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||
"image"==b,e.mergeStyle(d.style,a.style,f))};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(p,k){"mouseDown"==k.getProperty("eventName")&&b.hideShapePicker()}));var e=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",e);a.addListener(mxEvent.ESCAPE,e);a.view.addListener(mxEvent.SCALE,e);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);a.getSelectionModel().addListener(mxEvent.CHANGE,e);var f=a.popupMenuHandler.isMenuShowing;
a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var h=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))h.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var g=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var x=u.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?g.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(z,C,E){var D=a.getCompositeParent(p.cell);z=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=z&&z.relative;)cell=
-D,D=a.model.getParent(cell),z=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(G){E(G);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(G))}),k)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,x,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
-k.getProperty("arrow"),x=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(I){null!=I&&a.connectVertex(D,x,a.defaultEdgeLength,z,!0,!1,function(L,T,K){K(I);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(I))},
-function(L){a.selectCellsForConnectVertex(L)},z,this.hoverIcons)}),x,!0);null!=G&&(this.centerShapePicker(G,u,E,C,x),mxUtils.setOpacity(G,30),mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)}),mxEvent.addListener(G,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
+e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var g=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?g.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(z,C,E){var D=a.getCompositeParent(p.cell);z=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=z&&z.relative;)cell=
+D,D=a.model.getParent(cell),z=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(G){E(G);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(G))}),k)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
+k.getProperty("arrow"),w=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(K){null!=K&&a.connectVertex(D,w,a.defaultEdgeLength,z,!0,!1,function(L,Q,N){N(K);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(K))},
+function(L){a.selectCellsForConnectVertex(L)},z,this.hoverIcons)}),w,!0);null!=G&&(this.centerShapePicker(G,u,E,C,w),mxUtils.setOpacity(G,30),mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)}),mxEvent.addListener(G,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
EditorUi.prototype.centerShapePicker=function(a,b,e,f,h){if(h==mxConstants.DIRECTION_EAST||h==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();h==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):h==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):h==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):h==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};
EditorUi.prototype.showShapePicker=function(a,b,e,f,h,d,g,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,h,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,g,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};
-EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var x=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,I=0,L=D.geometry;null!=L&&(x.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,I=L.height/2);return new mxPoint(x.snap(Math.round(a/x.view.scale)-x.view.translate.x-G),x.snap(Math.round(b/x.view.scale)-x.view.translate.y-I))};if(null!=g&&0<g.length){var C=this;x=this.editor.graph;z=document.createElement("div");
-h=x.view.getState(e);var E=null==e||null!=h&&x.isTransparentState(h)?null:x.copyStyle(e);h=6>g.length?35*g.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=Math.round(a)+"px";z.style.top=Math.round(b)+"px";z.style.width=h+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");m||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");x.container.appendChild(z);h=mxUtils.bind(this,function(D){var G=
-document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],x.currentVertexStyle,x.currentEdgeStyle);var I=D.geometry;x.model.isEdge(D)&&(I=I.getTerminalPoint(!1),I=new mxRectangle(0,0,I.x,I.y));null!=I&&
-G.appendChild(this.sidebar.createVertexTemplateFromCells([D],I.width,I.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&x.isSelectionEmpty()){var T=x.cloneCell(D);if(null!=f)f(T);else{var K=p([T]);x.model.isEdge(T)?T.geometry.translate(K.x,K.y):(T.geometry.x=K.x,T.geometry.y=K.y);x.model.beginUpdate();try{x.addCell(T),x.model.isVertex(T)&&x.isAutoSizeCell(T)&&x.updateCellSize(T)}finally{x.model.endUpdate()}x.setSelectionCell(T);x.scrollCellToVisible(T);u&&
-x.startEditing(T);null!=C.hoverIcons&&C.hoverIcons.update(x.view.getState(T))}}else T=x.getEditableCells(null!=e?[e]:x.getSelectionCells()),x.updateShapes(D,T);null!=d&&d(L);mxEvent.consume(L)}),25,25,null,null,e))});for(k=0;k<(m?Math.min(g.length,4):g.length);k++)h(g[k]);g=z.offsetTop+z.clientHeight-(x.container.scrollTop+x.container.offsetHeight);0<g&&(z.style.top=Math.max(x.container.scrollTop+22,b-g)+"px");g=z.offsetLeft+z.clientWidth-(x.container.scrollLeft+x.container.offsetWidth);0<g&&(z.style.left=
-Math.max(x.container.scrollLeft+22,a-g)+"px")}return z};
+EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,K=0,L=D.geometry;null!=L&&(w.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,K=L.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-G),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-K))};if(null!=g&&0<g.length){var C=this;w=this.editor.graph;z=document.createElement("div");
+h=w.view.getState(e);var E=null==e||null!=h&&w.isTransparentState(h)?null:w.copyStyle(e);h=6>g.length?35*g.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=Math.round(a)+"px";z.style.top=Math.round(b)+"px";z.style.width=h+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");m||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");w.container.appendChild(z);h=mxUtils.bind(this,function(D){var G=
+document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var K=D.geometry;w.model.isEdge(D)&&(K=K.getTerminalPoint(!1),K=new mxRectangle(0,0,K.x,K.y));null!=K&&
+G.appendChild(this.sidebar.createVertexTemplateFromCells([D],K.width,K.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&w.isSelectionEmpty()){var Q=w.cloneCell(D);if(null!=f)f(Q);else{var N=p([Q]);w.model.isEdge(Q)?Q.geometry.translate(N.x,N.y):(Q.geometry.x=N.x,Q.geometry.y=N.y);w.model.beginUpdate();try{w.addCell(Q),w.model.isVertex(Q)&&w.isAutoSizeCell(Q)&&w.updateCellSize(Q)}finally{w.model.endUpdate()}w.setSelectionCell(Q);w.scrollCellToVisible(Q);u&&
+w.startEditing(Q);null!=C.hoverIcons&&C.hoverIcons.update(w.view.getState(Q))}}else Q=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,Q);null!=d&&d(L);mxEvent.consume(L)}),25,25,null,null,e))});for(k=0;k<(m?Math.min(g.length,4):g.length);k++)h(g[k]);g=z.offsetTop+z.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<g&&(z.style.top=Math.max(w.container.scrollTop+22,b-g)+"px");g=z.offsetLeft+z.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<g&&(z.style.left=
+Math.max(w.container.scrollLeft+22,a-g)+"px")}return z};
EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,h=mxUtils.bind(this,function(d,g,m,p){return f.createVertex(null,null,p||"",0,0,g||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,g,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=g?g:0),!1);d.geometry.points=null!=g?[new mxPoint(d.geometry.width/2,g)]:[];d.geometry.relative=!0;d.edge=
!0;return d});if(null!=a)try{a=f.cloneCell(a),f.model.isVertex(a)&&null!=a.geometry&&(a.geometry.x=0,a.geometry.y=0)}catch(d){a=null}null==a&&(a=h(f.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",f.vertexFontSize),40,20,"Text"),f.model.isVertex(a)&&f.isAutoSizeCell(a)&&Graph.createOffscreenGraph(f.getStylesheet()).updateCellSize(a));a=[a,h("whiteSpace=wrap;html=1;"),h("ellipse;whiteSpace=wrap;html=1;",80,80),h("rhombus;whiteSpace=wrap;html=1;",
80,80),h("rounded=1;whiteSpace=wrap;html=1;"),h("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),h("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),h("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),h("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),h("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),h("triangle;whiteSpace=wrap;html=1;",
@@ -2149,47 +2150,47 @@ b?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:a==mxConstants.A
b?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==a?Format.boxMarkerImage.src:"halfCircle"==a?Format.halfCircleMarkerImage.src:"openAsync"==a?Format.openAsyncFilledMarkerImage.src:"async"==a?"1"!=b?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==a?Format.dashMarkerImage.src:"baseDash"==a?Format.baseDashMarkerImage.src:"cross"==a?Format.crossMarkerImage.src:"circle"==a?Format.circleMarkerImage.src:"circlePlus"==a?Format.circlePlusMarkerImage.src:
"ERone"==a?Format.EROneMarkerImage.src:"ERmandOne"==a?Format.ERmandOneMarkerImage.src:"ERmany"==a?Format.ERmanyMarkerImage.src:"ERoneToMany"==a?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==a?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==a?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var g=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{g=g||d.getSelectionCells();g=d.getExportableCells(d.model.getTopmostCells(g));for(var m={},p=d.createCellLookup(g),k=d.cloneCells(g,null,m),u=new mxGraphModel,x=u.getChildAt(u.getRoot(),
-0),z=0;z<k.length;z++){u.add(x,k[z]);var C=d.view.getState(g[z]);if(null!=C){var E=d.getCellGeometry(k[z]);null!=E&&E.relative&&!u.isEdge(g[z])&&null==p[mxObjectIdentity.get(u.getParent(g[z]))]&&(E.offset=null,E.relative=!1,E.x=C.x/C.view.scale-C.view.translate.x,E.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return g};var e=mxClipboard.paste;mxClipboard.paste=function(d){var g=
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var g=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{g=g||d.getSelectionCells();g=d.getExportableCells(d.model.getTopmostCells(g));for(var m={},p=d.createCellLookup(g),k=d.cloneCells(g,null,m),u=new mxGraphModel,w=u.getChildAt(u.getRoot(),
+0),z=0;z<k.length;z++){u.add(w,k[z]);var C=d.view.getState(g[z]);if(null!=C){var E=d.getCellGeometry(k[z]);null!=E&&E.relative&&!u.isEdge(g[z])&&null==p[mxObjectIdentity.get(u.getParent(g[z]))]&&(E.offset=null,E.relative=!1,E.x=C.x/C.view.scale-C.view.translate.x,E.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return g};var e=mxClipboard.paste;mxClipboard.paste=function(d){var g=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);a.updatePasteActionStates();return g};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var h=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,g){h.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var H=this.graph.getPageLayout(),ea=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+H.x*ea.width),this.scale*(this.translate.y+H.y*ea.height),this.scale*H.width*ea.width,
-this.scale*H.height*ea.height)};a.getPreferredPageSize=function(H,ea,oa){H=this.getPageLayout();ea=this.getPageSize();return new mxRectangle(0,0,H.width*ea.width,H.height*ea.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(H,ea,oa,sa){if(null!=a.container&&!a.isViewer()){oa=null!=oa?oa:0;sa=null!=sa?sa:0;var Pa=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),la=mxUtils.hasScrollbars(a.container),Ba=a.view.translate,
-Ca=a.view.scale,Fa=mxRectangle.fromRectangle(Pa);Fa.x=Fa.x/Ca-Ba.x;Fa.y=Fa.y/Ca-Ba.y;Fa.width/=Ca;Fa.height/=Ca;Ba=a.container.scrollTop;var Ia=a.container.scrollLeft,Ha=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ha+=3;var Ja=a.container.offsetWidth-Ha;Ha=a.container.offsetHeight-Ha;H=H?Math.max(.3,Math.min(ea||1,Ja/Fa.width)):Ca;ea=(Ja-H*Fa.width)/2/H;var ta=0==this.lightboxVerticalDivider?0:(Ha-H*Fa.height)/this.lightboxVerticalDivider/H;la&&(ea=Math.max(ea,
-0),ta=Math.max(ta,0));if(la||Pa.width<Ja||Pa.height<Ha)a.view.scaleAndTranslate(H,Math.floor(ea-Fa.x),Math.floor(ta-Fa.y)),a.container.scrollTop=Ba*H/Ca,a.container.scrollLeft=Ia*H/Ca;else if(0!=oa||0!=sa)Pa=a.view.translate,a.view.setTranslate(Math.floor(Pa.x+oa/Ca),Math.floor(Pa.y+sa/Ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+this.scale*H.height*ea.height)};a.getPreferredPageSize=function(H,ea,ra){H=this.getPageLayout();ea=this.getPageSize();return new mxRectangle(0,0,H.width*ea.width,H.height*ea.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(H,ea,ra,qa){if(null!=a.container&&!a.isViewer()){ra=null!=ra?ra:0;qa=null!=qa?qa:0;var Pa=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ma=mxUtils.hasScrollbars(a.container),Ba=a.view.translate,
+Ca=a.view.scale,Ja=mxRectangle.fromRectangle(Pa);Ja.x=Ja.x/Ca-Ba.x;Ja.y=Ja.y/Ca-Ba.y;Ja.width/=Ca;Ja.height/=Ca;Ba=a.container.scrollTop;var Ia=a.container.scrollLeft,Da=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Da+=3;var Ga=a.container.offsetWidth-Da;Da=a.container.offsetHeight-Da;H=H?Math.max(.3,Math.min(ea||1,Ga/Ja.width)):Ca;ea=(Ga-H*Ja.width)/2/H;var ta=0==this.lightboxVerticalDivider?0:(Da-H*Ja.height)/this.lightboxVerticalDivider/H;ma&&(ea=Math.max(ea,
+0),ta=Math.max(ta,0));if(ma||Pa.width<Ga||Pa.height<Da)a.view.scaleAndTranslate(H,Math.floor(ea-Ja.x),Math.floor(ta-Ja.y)),a.container.scrollTop=Ba*H/Ca,a.container.scrollLeft=Ia*H/Ca;else if(0!=ra||0!=qa)Pa=a.view.translate,a.view.setTranslate(Math.floor(Pa.x+ra/Ca),Math.floor(Pa.y+qa/Ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(H){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(H){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var h=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var H=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=H?parseInt(H["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var g=0;d=mxUtils.bind(this,function(H,ea,oa){g++;
-var sa=document.createElement("span");sa.style.paddingLeft="8px";sa.style.paddingRight="8px";sa.style.cursor="pointer";mxEvent.addListener(sa,"click",H);null!=oa&&sa.setAttribute("title",oa);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",ea);H.style.width="36px";H.style.filter="invert(100%)";sa.appendChild(H);this.chromelessToolbar.appendChild(sa);return sa});if(null!=h.backBtn){var m=Graph.sanitizeLink(h.backBtn.url);null!=m&&d(mxUtils.bind(this,function(H){window.location.href=
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var H=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=H?parseInt(H["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var g=0;d=mxUtils.bind(this,function(H,ea,ra){g++;
+var qa=document.createElement("span");qa.style.paddingLeft="8px";qa.style.paddingRight="8px";qa.style.cursor="pointer";mxEvent.addListener(qa,"click",H);null!=ra&&qa.setAttribute("title",ra);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",ea);H.style.width="36px";H.style.filter="invert(100%)";qa.appendChild(H);this.chromelessToolbar.appendChild(qa);return qa});if(null!=h.backBtn){var m=Graph.sanitizeLink(h.backBtn.url);null!=m&&d(mxUtils.bind(this,function(H){window.location.href=
m;mxEvent.consume(H)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var p=d(mxUtils.bind(this,function(H){this.actions.get("previousPage").funct();mxEvent.consume(H)}),Editor.previousImage,mxResources.get("previousPage")),k=document.createElement("div");k.style.fontFamily=Editor.defaultHtmlFont;k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontWeight="bold";k.style.marginTop="8px";k.style.fontSize="14px";k.style.cursor="default";k.style.color=
-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var H=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,H+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());
+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),w=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var H=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,H+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());
p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(H-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(H+1,this.pages.length)].getName())}});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var z=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",k.style.display="inline-block"):
-(u.style.display="none",p.style.display="none",k.style.display="none");x()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(H){var ea=new mxPopupMenu(C.funct);ea.div.className+=" geMenubarMenu";ea.smartSeparators=!0;ea.showDisabled=!0;ea.autoExpand=!0;ea.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(ea,arguments);ea.destroy()});var oa=mxUtils.getOffset(k);ea.popup(oa.x,oa.y+k.offsetHeight,null,H);mxEvent.addListener(ea.div,
-"mouseleave",mxUtils.bind(this,function(){ea.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",x)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?
+(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(H){var ea=new mxPopupMenu(C.funct);ea.div.className+=" geMenubarMenu";ea.smartSeparators=!0;ea.showDisabled=!0;ea.autoExpand=!0;ea.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(ea,arguments);ea.destroy()});var ra=mxUtils.getOffset(k);ea.popup(ra.x,ra.y+k.offsetHeight,null,H);mxEvent.addListener(ea.div,
+"mouseleave",mxUtils.bind(this,function(){ea.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?
(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,G=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),
-600)}),H||200)}),I=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ea=L.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
ea.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ea=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-ea.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),T=a.getModel();T.addListener(mxEvent.CHANGE,function(){L.style.display=1<T.getChildCount(T.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var K=this.lightboxToolbarActions[z];K.elem=d(K.fn,K.icon,K.tooltip)}if(null!=h.refreshBtn){var U=null==h.refreshBtn.url?null:Graph.sanitizeLink(h.refreshBtn.url);d(mxUtils.bind(this,function(H){null!=
+ea.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){L.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var N=this.lightboxToolbarActions[z];N.elem=d(N.fn,N.icon,N.tooltip)}if(null!=h.refreshBtn){var U=null==h.refreshBtn.url?null:Graph.sanitizeLink(h.refreshBtn.url);d(mxUtils.bind(this,function(H){null!=
U?window.location.href=U:window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=h.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(H){h.fullscreenBtn.url?a.openLink(h.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!h.noCloseBtn&&(h.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=
document.body))&&d(mxUtils.bind(this,function(H){"1"==urlParams.close||h.closeBtn?window.close():(this.destroy(),mxEvent.consume(H))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||
-(mxEvent.isShiftDown(H)||I(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():I(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||I(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<
-Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Q=a.view.validate,P=new mxPoint,M=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;M=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
-H&&(H=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));H=a.getPageLayout(H,P,1);var ea=a.getDefaultTranslate(H);this.x0=H.x;this.y0=H.y;if(ea.x!=this.translate.x||ea.y!=this.translate.y)this.invalidate(),this.translate.x=ea.x,this.translate.y=ea.y}ea=a.getPagePadding();var oa=a.getPageSize();H=ea.x-(this.x0||0)*oa.width;ea=ea.y-(this.y0||0)*oa.height;if(this.translate.x!=H||this.translate.y!=ea)this.invalidate(),this.translate.x=H,this.translate.y=ea}Q.apply(this,
-arguments)};if(!a.isViewer()){var aa=a.sizeDidChange;a.sizeDidChange=function(){var H=M;M=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),oa=this.getDefaultTranslate(ea),sa=this.view.translate.x,Pa=this.view.translate.y;if(oa.x!=sa||oa.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(oa.x,oa.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((oa.x-
-sa)*this.view.scale),this.container.scrollTop+=Math.round((oa.y-Pa)*this.view.scale));return}}aa.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ia=a.view.getBackgroundPane(),na=a.view.getDrawPane();a.cumulativeZoomFactor=1;var qa=null,O=null,Z=null,ca=null,W=null,ja=function(H){null!=qa&&window.clearTimeout(qa);0<=H&&window.setTimeout(function(){if(!a.isMouseDown||ca)qa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&
-(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),na.style.transformOrigin="",ia.style.transformOrigin="",mxClient.IS_SF?(na.style.transform="scale(1)",ia.style.transform="scale(1)",window.setTimeout(function(){na.style.transform="";ia.style.transform=""},0)):(na.style.transform="",ia.style.transform=""),
-a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),oa=mxUtils.getOffset(a.container),sa=a.view.scale,Pa=0,la=0;null!=O&&(Pa=a.container.offsetWidth/2-O.x+oa.x,la=a.container.offsetHeight/2-O.y+oa.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=sa&&(null!=Z&&(Pa+=ea.x-Z.x,la+=ea.y-Z.y),null!=b&&e.chromelessResize(!1,null,Pa*(a.cumulativeZoomFactor-1),la*(a.cumulativeZoomFactor-
-1)),!mxUtils.hasScrollbars(a.container)||0==Pa&&0==la||(a.container.scrollLeft-=Pa*(a.cumulativeZoomFactor-1),a.container.scrollTop-=la*(a.cumulativeZoomFactor-1)));null!=W&&na.setAttribute("filter",W);a.cumulativeZoomFactor=1;W=ca=O=Z=qa=null}),null!=H?H:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(H,ea,oa,sa){sa=null!=sa?sa:this.zoomFactor;(ea=ea||!a.scrollbars)&&(O=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/
-2));H?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=sa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=sa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);
-this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==W&&""!=na.getAttribute("filter")&&(W=na.getAttribute("filter"),na.removeAttribute("filter"));Z=new mxPoint(a.container.scrollLeft,a.container.scrollTop);H=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);sa=ea||null==O?a.container.scrollLeft+a.container.clientWidth/2:O.x+a.container.scrollLeft-a.container.offsetLeft;
-var Pa=ea||null==O?a.container.scrollTop+a.container.clientHeight/2:O.y+a.container.scrollTop-a.container.offsetTop;na.style.transformOrigin=sa+"px "+Pa+"px";na.style.transform="scale("+H+")";ia.style.transformOrigin=sa+"px "+Pa+"px";ia.style.transform="scale("+H+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(sa=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(sa.style,"transform-origin",(ea||null==O?a.container.clientWidth/2+a.container.scrollLeft-sa.offsetLeft+
-"px":O.x+a.container.scrollLeft-sa.offsetLeft-a.container.offsetLeft+"px")+" "+(ea||null==O?a.container.clientHeight/2+a.container.scrollTop-sa.offsetTop+"px":O.y+a.container.scrollTop-sa.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(sa.style,"transform","scale("+H+")")):a.view.validateBackgroundStyles(H,sa,Pa);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",
-"factor",H))}ja(a.isFastZoomEnabled()?oa:0)};mxEvent.addGestureListeners(a.container,function(H){null!=qa&&window.clearTimeout(qa)},null,function(H){1!=a.cumulativeZoomFactor&&ja(0)});mxEvent.addListener(a.container,"scroll",function(H){null==qa||a.isMouseDown||1==a.cumulativeZoomFactor||ja(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(H,ea,oa,sa,Pa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!oa&&a.isScrollWheelEvent(H))oa=
-a.view.getTranslate(),sa=40/a.view.scale,mxEvent.isShiftDown(H)?a.view.setTranslate(oa.x+(ea?-sa:sa),oa.y):a.view.setTranslate(oa.x,oa.y+(ea?sa:-sa));else if(oa||a.isZoomWheelEvent(H))for(var la=mxEvent.getSource(H);null!=la;){if(la==a.container)return a.tooltipHandler.hideTooltip(),O=null!=sa&&null!=Pa?new mxPoint(sa,Pa):new mxPoint(mxEvent.getClientX(H),mxEvent.getClientY(H)),ca=oa,oa=a.zoomFactor,sa=null,H.ctrlKey&&null!=H.deltaY&&40>Math.abs(H.deltaY)&&Math.round(H.deltaY)!=H.deltaY?oa=1+Math.abs(H.deltaY)/
-20*(oa-1):null!=H.movementY&&"pointermove"==H.type&&(oa=1+Math.max(1,Math.abs(H.movementY))/20*(oa-1),sa=-1),a.lazyZoom(ea,null,sa,oa),mxEvent.consume(H),!1;la=la.parentNode}}),a.container);a.panningHandler.zoomGraph=function(H){a.cumulativeZoomFactor=H.scale;a.lazyZoom(0<H.scale,!0);mxEvent.consume(H)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
+(mxEvent.isShiftDown(H)||K(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():K(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():K(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||K(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<
+Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():K(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate,T=new mxPoint,J=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;J=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
+H&&(H=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));H=a.getPageLayout(H,T,1);var ea=a.getDefaultTranslate(H);this.x0=H.x;this.y0=H.y;if(ea.x!=this.translate.x||ea.y!=this.translate.y)this.invalidate(),this.translate.x=ea.x,this.translate.y=ea.y}ea=a.getPagePadding();var ra=a.getPageSize();H=ea.x-(this.x0||0)*ra.width;ea=ea.y-(this.y0||0)*ra.height;if(this.translate.x!=H||this.translate.y!=ea)this.invalidate(),this.translate.x=H,this.translate.y=ea}P.apply(this,
+arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){var H=J;J=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),ra=this.getDefaultTranslate(ea),qa=this.view.translate.x,Pa=this.view.translate.y;if(ra.x!=qa||ra.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(ra.x,ra.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((ra.x-qa)*
+this.view.scale),this.container.scrollTop+=Math.round((ra.y-Pa)*this.view.scale));return}}Z.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ia=a.view.getBackgroundPane(),oa=a.view.getDrawPane();a.cumulativeZoomFactor=1;var sa=null,O=null,X=null,ba=null,da=null,ca=function(H){null!=sa&&window.clearTimeout(sa);0<=H&&window.setTimeout(function(){if(!a.isMouseDown||ba)sa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&
+(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),oa.style.transformOrigin="",ia.style.transformOrigin="",mxClient.IS_SF?(oa.style.transform="scale(1)",ia.style.transform="scale(1)",window.setTimeout(function(){oa.style.transform="";ia.style.transform=""},0)):(oa.style.transform="",ia.style.transform=""),
+a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ra=mxUtils.getOffset(a.container),qa=a.view.scale,Pa=0,ma=0;null!=O&&(Pa=a.container.offsetWidth/2-O.x+ra.x,ma=a.container.offsetHeight/2-O.y+ra.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=qa&&(null!=X&&(Pa+=ea.x-X.x,ma+=ea.y-X.y),null!=b&&e.chromelessResize(!1,null,Pa*(a.cumulativeZoomFactor-1),ma*(a.cumulativeZoomFactor-
+1)),!mxUtils.hasScrollbars(a.container)||0==Pa&&0==ma||(a.container.scrollLeft-=Pa*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ma*(a.cumulativeZoomFactor-1)));null!=da&&oa.setAttribute("filter",da);a.cumulativeZoomFactor=1;da=ba=O=X=sa=null}),null!=H?H:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(H,ea,ra,qa){qa=null!=qa?qa:this.zoomFactor;(ea=ea||!a.scrollbars)&&(O=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/
+2));H?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=qa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=qa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);
+this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==da&&""!=oa.getAttribute("filter")&&(da=oa.getAttribute("filter"),oa.removeAttribute("filter"));X=new mxPoint(a.container.scrollLeft,a.container.scrollTop);H=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);qa=ea||null==O?a.container.scrollLeft+a.container.clientWidth/2:O.x+a.container.scrollLeft-a.container.offsetLeft;
+var Pa=ea||null==O?a.container.scrollTop+a.container.clientHeight/2:O.y+a.container.scrollTop-a.container.offsetTop;oa.style.transformOrigin=qa+"px "+Pa+"px";oa.style.transform="scale("+H+")";ia.style.transformOrigin=qa+"px "+Pa+"px";ia.style.transform="scale("+H+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(qa=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(qa.style,"transform-origin",(ea||null==O?a.container.clientWidth/2+a.container.scrollLeft-qa.offsetLeft+
+"px":O.x+a.container.scrollLeft-qa.offsetLeft-a.container.offsetLeft+"px")+" "+(ea||null==O?a.container.clientHeight/2+a.container.scrollTop-qa.offsetTop+"px":O.y+a.container.scrollTop-qa.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(qa.style,"transform","scale("+H+")")):a.view.validateBackgroundStyles(H,qa,Pa);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",
+"factor",H))}ca(a.isFastZoomEnabled()?ra:0)};mxEvent.addGestureListeners(a.container,function(H){null!=sa&&window.clearTimeout(sa)},null,function(H){1!=a.cumulativeZoomFactor&&ca(0)});mxEvent.addListener(a.container,"scroll",function(H){null==sa||a.isMouseDown||1==a.cumulativeZoomFactor||ca(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(H,ea,ra,qa,Pa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ra&&a.isScrollWheelEvent(H))ra=
+a.view.getTranslate(),qa=40/a.view.scale,mxEvent.isShiftDown(H)?a.view.setTranslate(ra.x+(ea?-qa:qa),ra.y):a.view.setTranslate(ra.x,ra.y+(ea?qa:-qa));else if(ra||a.isZoomWheelEvent(H))for(var ma=mxEvent.getSource(H);null!=ma;){if(ma==a.container)return a.tooltipHandler.hideTooltip(),O=null!=qa&&null!=Pa?new mxPoint(qa,Pa):new mxPoint(mxEvent.getClientX(H),mxEvent.getClientY(H)),ba=ra,ra=a.zoomFactor,qa=null,H.ctrlKey&&null!=H.deltaY&&40>Math.abs(H.deltaY)&&Math.round(H.deltaY)!=H.deltaY?ra=1+Math.abs(H.deltaY)/
+20*(ra-1):null!=H.movementY&&"pointermove"==H.type&&(ra=1+Math.max(1,Math.abs(H.movementY))/20*(ra-1),qa=-1),a.lazyZoom(ea,null,qa,ra),mxEvent.consume(H),!1;ma=ma.parentNode}}),a.container);a.panningHandler.zoomGraph=function(H){a.cumulativeZoomFactor=H.scale;a.lazyZoom(0<H.scale,!0);mxEvent.consume(H)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2246,11 +2247,11 @@ EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=Grap
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,100);mxUtils.setPrefixedStyle(e.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","scaleX(0)");mxUtils.setOpacity(e,0);window.setTimeout(mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(a[b])};
EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.style.textOverflow="ellipsis";b.style.display="inline-block";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.minWidth="0";b.setAttribute("title",a);b.innerHTML=Graph.sanitizeHtml(a);return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};
EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,f){function h(x){if(null!=g){var z=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));f(Math.max(0,m+(b?z.x-g.x:g.y-z.y)-e));mxEvent.consume(x);m!=u()&&(p=!0,k=null)}}function d(x){h(x);g=m=null}var g=null,m=null,p=!0,k=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var u=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+e-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){g=new mxPoint(mxEvent.getClientX(x),
-mxEvent.getClientY(x));m=u();p=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!p&&this.hsplitClickEnabled){var z=null!=k?k-e:0;k=u();f(z);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,h,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,d)})};
+EditorUi.prototype.addSplitHandler=function(a,b,e,f){function h(w){if(null!=g){var z=new mxPoint(mxEvent.getClientX(w),mxEvent.getClientY(w));f(Math.max(0,m+(b?z.x-g.x:g.y-z.y)-e));mxEvent.consume(w);m!=u()&&(p=!0,k=null)}}function d(w){h(w);g=m=null}var g=null,m=null,p=!0,k=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var u=mxUtils.bind(this,function(){var w=parseInt(b?a.style.left:a.style.bottom);b||(w=w+e-this.footerHeight);return w});mxEvent.addGestureListeners(a,function(w){g=new mxPoint(mxEvent.getClientX(w),
+mxEvent.getClientY(w));m=u();p=!1;mxEvent.consume(w)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(w){if(!p&&this.hsplitClickEnabled){var z=null!=k?k-e:0;k=u();f(z);mxEvent.consume(w)}}));mxEvent.addGestureListeners(document,null,h,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,d)})};
EditorUi.prototype.prompt=function(a,b,e){a=new FilenameDialog(this,b,mxResources.get("apply"),function(f){e(parseFloat(f))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
EditorUi.prototype.handleError=function(a,b,e,f,h){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){h=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(h=mxUtils.htmlEntities(a.message));this.showError(b,h,d,e,null,null,null,null,null,null,null,null,f?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(a,b,e,f,h,d,g,m,p,k,u,x,z){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),f,h,d,g,x,m,p);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,k||340,u||100+20*b,!0,!1,z);a.init()};EditorUi.prototype.showDialog=function(a,b,e,f,h,d,g,m,p,k){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,f,h,d,g,m,p,k);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(a,b,e,f,h,d,g,m,p,k,u,w,z){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),f,h,d,g,w,m,p);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,k||340,u||100+20*b,!0,!1,z);a.init()};EditorUi.prototype.showDialog=function(a,b,e,f,h,d,g,m,p,k){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,f,h,d,g,m,p,k);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,e){var f=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var h=this.dialogs.length-1;0<=h;h--)if(!this.dialogs[h].closing){f=this.dialogs[h];break}null==f||null!=e&&e!=this.dialog.container.firstChild||(f.closing=!0,0==f.close(a,b)?delete f.closing:(delete f.closing,a=mxUtils.lastIndexOf(this.dialogs,f),0<=a&&this.dialogs.splice(a,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
"dialog",f)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),e=new mxDictionary,f=[],h=0;h<b.length;h++){var d=a.isTableCell(b[h])?a.model.getParent(b[h]):b[h];null==d||e.get(d)||(e.put(d,!0),f.push(d))}a.setSelectionCells(a.duplicateCells(f,!1))}catch(g){this.handleError(g)}};
@@ -2277,14 +2278,14 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&"undefined"!==typeof wind
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(f){f=new ChangePageSetup(this,null,f);f.ignoreColor=!0;this.editor.graph.model.execute(f)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(a){function b(x,z,C){if(!f.isSelectionEmpty()&&f.isEnabled()){z=null!=z?z:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(C){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var G=f.getCellGeometry(E[D]);null!=G&&(G=G.clone(),37==x?G.width=Math.max(0,G.width-z):38==x?G.height=Math.max(0,G.height-z):39==x?G.width+=z:40==x&&(G.height+=z),f.getModel().setGeometry(E[D],
-G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var I=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==x||38==x?f.model.add(G,D,Math.max(0,z-1)):(39==x||40==x)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=
-E=0,37==x?E=-z:38==x?D=-z:39==x?E=z:40==x&&(D=z),L.currentDx+=E*I,L.currentDy+=D*I,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var T=L.roundLength(L.currentDx/I),K=L.roundLength(L.currentDy/I);L.moveCells(L.cells,T,K);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||
-90!=x.keyCode&&89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=x.keyCode&&107!=x.keyCode||!this.isControlDown(x)&&!mxEvent.isShiftDown(x)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};h.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==
-e.dialogs||0==e.dialogs.length)};h.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var g=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=h.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(f.isEnabled()){var z=null;mxEvent.isShiftDown(x)&&this.isControlDown(x)&&mxEvent.isAltDown(x)?z=e.actions.get(e.ctrlAltShiftActions[x.keyCode]):mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)?
-z=e.actions.get(e.altShiftActions[x.keyCode]):this.isControlDown(x)&&mxEvent.isAltDown(x)&&(z=e.actions.get(e.ctrlAltActions[x.keyCode]));if(null!=z)return z.funct;if(null!=m[x.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(f.model.isVertex(f.getSelectionCell()))return function(){var C=f.connectVertex(f.getSelectionCell(),m[x.keyCode],f.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&f.model.isEdge(C[0])?f.setSelectionCell(f.model.getTerminal(C[0],
-!1)):f.setSelectionCell(C[C.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?f.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?f.gridSize:null)}}return p.apply(this,arguments)};h.bindAction=mxUtils.bind(this,function(x,z,C,E){var D=this.actions.get(C);null!=D&&(C=function(){D.isEnabled()&&D.funct.apply(this,arguments)},
-z?E?h.bindControlShiftKey(x,C):h.bindControlKey(x,C):E?h.bindShiftKey(x,C):h.bindKey(x,C))});var k=this,u=h.escape;h.escape=function(x){u.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){f.exitGroup()});h.bindControlShiftKey(35,function(){f.enterGroup()});h.bindShiftKey(36,function(){f.home()});h.bindKey(35,function(){f.refresh()});h.bindAction(80,!0,"print");h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(61,!0,"zoomIn");h.bindAction(187,!0,
+EditorUi.prototype.createKeyHandler=function(a){function b(w,z,C){if(!f.isSelectionEmpty()&&f.isEnabled()){z=null!=z?z:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(C){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var G=f.getCellGeometry(E[D]);null!=G&&(G=G.clone(),37==w?G.width=Math.max(0,G.width-z):38==w?G.height=Math.max(0,G.height-z):39==w?G.width+=z:40==w&&(G.height+=z),f.getModel().setGeometry(E[D],
+G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var K=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==w||38==w?f.model.add(G,D,Math.max(0,z-1)):(39==w||40==w)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=
+E=0,37==w?E=-z:38==w?D=-z:39==w?E=z:40==w&&(D=z),L.currentDx+=E*K,L.currentDy+=D*K,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var Q=L.roundLength(L.currentDx/K),N=L.roundLength(L.currentDy/K);L.moveCells(L.cells,Q,N);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
+90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};h.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&
+(null==e.dialogs||0==e.dialogs.length)};h.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var g=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=h.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var z=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?z=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?
+z=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(z=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=z)return z.funct;if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var C=f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=C&&0<C.length&&(1==C.length&&f.model.isEdge(C[0])?f.setSelectionCell(f.model.getTerminal(C[0],
+!1)):f.setSelectionCell(C[C.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(w)?function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null,!0)}:function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null)}}return p.apply(this,arguments)};h.bindAction=mxUtils.bind(this,function(w,z,C,E){var D=this.actions.get(C);null!=D&&(C=function(){D.isEnabled()&&D.funct.apply(this,arguments)},
+z?E?h.bindControlShiftKey(w,C):h.bindControlKey(w,C):E?h.bindShiftKey(w,C):h.bindKey(w,C))});var k=this,u=h.escape;h.escape=function(w){u.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){f.exitGroup()});h.bindControlShiftKey(35,function(){f.enterGroup()});h.bindShiftKey(36,function(){f.home()});h.bindKey(35,function(){f.refresh()});h.bindAction(80,!0,"print");h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(61,!0,"zoomIn");h.bindAction(187,!0,
"zoomIn");h.bindAction(222,!0,"zoomIn");h.bindAction(173,!0,"zoomOut");h.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)h.bindAction(79,!0,"outline",!0),h.bindControlKey(36,function(){f.isEnabled()&&f.foldCells(!0)}),h.bindControlKey(35,function(){f.isEnabled()&&f.foldCells(!1)}),h.bindControlKey(13,function(){k.ctrlEnter()}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(8,!1,"deleteLabels",!0),h.bindAction(46,!1,"delete"),h.bindAction(46,!0,
"deleteAll"),h.bindAction(46,!1,"deleteLabels",!0),h.bindAction(36,!1,"resetView"),h.bindAction(72,!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,
!0,"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,"toBack",!0),h.bindAction(70,!0,"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(90,!0,"redo",!0),h.bindAction(89,!0,"redo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,
@@ -2314,9 +2315,9 @@ Sidebar.prototype.getTooltipOffset=function(a,b){if(mxUtils.isAncestorNode(this.
Sidebar.prototype.createMoreShapes=function(){var a=this.editorUi.createDiv("geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";a.style.display="inline-flex";a.style.alignItems="center";a.style.justifyContent="center";a.style.width="100%";a.style.marginTop="-1px";a.style.height=this.moreShapesHeight+"px";var b=document.createElement("button");b.className="geBtn gePrimaryBtn";b.style.display="inline-flex";b.style.alignItems="center";b.style.whiteSpace="nowrap";b.style.padding=
"8px";b.style.margin="0px";b.innerHTML="<span>+</span>";var e=b.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(b,mxResources.get("moreShapes"));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.editorUi.actions.get("shapes").funct();mxEvent.consume(f)}));a.appendChild(b);return a};
Sidebar.prototype.createTooltip=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;this.tooltipMouseDown=p;p=this.editorUi.editor.graph;if(null==this.tooltip){this.tooltip=document.createElement("div");this.tooltip.className="geSidebarTooltip";this.tooltip.style.userSelect="none";this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1;document.body.appendChild(this.tooltip);mxEvent.addMouseWheelListener(mxUtils.bind(this,function(z){this.hideTooltip()}),this.tooltip);this.graph2=new Graph(this.tooltip,
-null,null,this.editorUi.editor.graph.getStylesheet());this.graph2.shapeBackgroundColor=this.graph.shapeBackgroundColor;this.graph2.resetViewOnRootChange=!1;this.graph2.foldingEnabled=!1;this.graph2.gridEnabled=!1;this.graph2.autoScroll=!1;this.graph2.setTooltips(!1);this.graph2.setConnectable(!1);this.graph2.setPanning(!1);this.graph2.setEnabled(!1);if(this.graph2.dialect==mxConstants.DIALECT_SVG){var x=this.graph2.view.getDrawPane().ownerSVGElement;null!=x&&(x.style.overflow="visible")}else this.graph2.view.canvas.style.overflow=
-"visible";this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()});mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(z){null!=this.tooltipMouseDown&&this.tooltipMouseDown(z);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(z){this.hideTooltip()}));mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative");x=document.createElement("img");
-x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get("close"));x.style.position="absolute";x.style.cursor="default";x.style.padding="8px";x.style.right="2px";x.style.top="2px";this.tooltip.appendChild(x);this.tooltipCloseImage=x;mxEvent.addListener(x,"click",mxUtils.bind(this,function(z){this.hideTooltip();mxEvent.consume(z)}))}this.tooltipCloseImage.style.display=k?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);
+null,null,this.editorUi.editor.graph.getStylesheet());this.graph2.shapeBackgroundColor=this.graph.shapeBackgroundColor;this.graph2.resetViewOnRootChange=!1;this.graph2.foldingEnabled=!1;this.graph2.gridEnabled=!1;this.graph2.autoScroll=!1;this.graph2.setTooltips(!1);this.graph2.setConnectable(!1);this.graph2.setPanning(!1);this.graph2.setEnabled(!1);if(this.graph2.dialect==mxConstants.DIALECT_SVG){var w=this.graph2.view.getDrawPane().ownerSVGElement;null!=w&&(w.style.overflow="visible")}else this.graph2.view.canvas.style.overflow=
+"visible";this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()});mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(z){null!=this.tooltipMouseDown&&this.tooltipMouseDown(z);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(z){this.hideTooltip()}));mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative");w=document.createElement("img");
+w.setAttribute("src",Dialog.prototype.closeImage);w.setAttribute("title",mxResources.get("close"));w.style.position="absolute";w.style.cursor="default";w.style.padding="8px";w.style.right="2px";w.style.top="2px";this.tooltip.appendChild(w);this.tooltipCloseImage=w;mxEvent.addListener(w,"click",mxUtils.bind(this,function(z){this.hideTooltip();mxEvent.consume(z)}))}this.tooltipCloseImage.style.display=k?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);
this.graph2.view.scale=!m&&(e>this.maxTooltipWidth||f>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/e,this.maxTooltipHeight/f))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;null!=b&&(b=this.graph2.cloneCells(b),this.graph2.pasteCellStyles(p.includeDescendants(b),u?p.currentVertexStyle:p.defaultVertexStyle,u?p.currentEdgeStyle:p.defaultEdgeStyle,null,p.pasteEdgeStyle),this.graph2.addCells(b));
mxClient.NO_FO=d;u=this.graph2.getGraphBounds();m&&0<e&&0<f&&(u.width>e||u.height>f)?(e=Math.round(100*Math.min(e/u.width,f/u.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/u.width,this.maxTooltipHeight/u.height))/100),u=this.graph2.getGraphBounds()):(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+e+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",u.width*=e,u.height*=e)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform=
"");e=u.width+2*this.tooltipBorder+4;f=u.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=e+"px";m=e;this.tooltipTitles&&null!=h&&0<h.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTopStyle="solid",this.tooltipTitle.style.borderTopWidth="1px",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position=
@@ -2329,20 +2330,20 @@ Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind
mxUtils.bind(this,function(){var d=this.editorUi.stringToCells("<"==e.xml.charAt(0)?e.xml:Graph.decompress(e.xml));return this.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
Sidebar.prototype.getKeyStyle=function(a){var b=[];if(null!=a){a=a.split(";");for(var e=0;e<a.length;e++){var f=a[e].split("=");1<f.length&&0>mxUtils.indexOf(this.ignoredStyles,f[0])&&b.push(f[0]+"="+f[1])}}return b.join(";")};Sidebar.prototype.addLibForStyle=function(a,b){""!=a&&(null==this.styleToLibs&&(this.styleToLibs={}),null==this.styleToLibs[a]&&(this.styleToLibs[a]=[]),this.styleToLibs[a].push(b))};
Sidebar.prototype.getLibsForStyle=function(a){return null!=this.styleToLibs?this.styleToLibs[a]:null};
-Sidebar.prototype.addEntry=function(a,b){if(null!=this.currentSearchEntryLibrary){var e=this,f=this.createVertexTemplateFromCells;this.createVertexTemplateFromCells=function(m,p,k,u,x){if(null!=m)for(p=0;p<m.length;p++)e.addLibForStyle(e.getKeyStyle(m[p].style),this.currentSearchEntryLibrary)};b();this.createVertexTemplateFromCells=f}if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g,
+Sidebar.prototype.addEntry=function(a,b){if(null!=this.currentSearchEntryLibrary){var e=this,f=this.createVertexTemplateFromCells;this.createVertexTemplateFromCells=function(m,p,k,u,w){if(null!=m)for(p=0;p<m.length;p++)e.addLibForStyle(e.getKeyStyle(m[p].style),this.currentSearchEntryLibrary)};b();this.createVertexTemplateFromCells=f}if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g,
" ").split(" ");f=[];for(var h={},d=0;d<a.length;d++){null==h[a[d]]&&(h[a[d]]=!0,f.push(a[d]));var g=Editor.soundex(a[d].replace(/\.*\d*$/,""));g!=a[d]&&null==h[g]&&(h[g]=!0,f.push(g))}for(d=0;d<f.length;d++)this.addEntryForTag(f[d],b)}return b};Sidebar.prototype.addEntryForTag=function(a,b){if(null!=a&&1<a.length){var e=this.taglist[a];"object"!==typeof e&&(e={entries:[]},this.taglist[a]=e);e.entries.push(b)}};
Sidebar.prototype.isEntryIgnored=function(a,b){b=!b;if(null!=a.parentLibraries&&b)for(var e=0;e<a.parentLibraries.length;e++)if(this.isEntryVisible(a.parentLibraries[e].id)){b=!1;break}return b};
-Sidebar.prototype.searchEntries=function(a,b,e,f,h,d){if(null!=this.taglist&&null!=a){var g=a.toLowerCase().split(" ");a=new mxDictionary;h=(e+1)*b;for(var m=[],p=0,k=0;k<g.length;k++){var u=Editor.soundex(g[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[g[k]];var x=null!=m?m.entries.slice():[];m=this.taglist[u];x=null!=m?x.concat(m.entries):x;u=new mxDictionary;if(0<x.length){m=[];for(var z=0;z<x.length;z++){var C=x[z];if(0==p==(null==a.get(C))&&null==u.get(C)&&(u.put(C,C),!this.isEntryIgnored(C,
+Sidebar.prototype.searchEntries=function(a,b,e,f,h,d){if(null!=this.taglist&&null!=a){var g=a.toLowerCase().split(" ");a=new mxDictionary;h=(e+1)*b;for(var m=[],p=0,k=0;k<g.length;k++){var u=Editor.soundex(g[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[g[k]];var w=null!=m?m.entries.slice():[];m=this.taglist[u];w=null!=m?w.concat(m.entries):w;u=new mxDictionary;if(0<w.length){m=[];for(var z=0;z<w.length;z++){var C=w[z];if(0==p==(null==a.get(C))&&null==u.get(C)&&(u.put(C,C),!this.isEntryIgnored(C,
d)&&(m.push(C),k==g.length-1&&m.length==h))){f(m.slice(e*b,h),h,!0,g);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,g)}else f([],null,null,g)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};
Sidebar.prototype.addSearchPalette=function(a){function b(){g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));p.style.display="none";k=d.value="";D()}var e=document.createElement("div");e.style.visibility="hidden";this.appendChild(e);var f=document.createElement("div");f.className="geSidebar geSearchSidebar";a||(f.style.display="none");var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.textOverflow="clip";h.style.paddingBottom="8px";h.style.cursor=
"default";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");h.appendChild(d);var g=document.createElement("img");g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));g.className="geAdaptiveAsset";g.style.position="relative";g.style.cursor="pointer";g.style.opacity="0.5";g.style.height="16px";g.style.left="-20px";g.style.top="4px";g.style.background="url('"+this.editorUi.editor.transparentImage+
-"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,x=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var I=f.firstChild;null!=
-I;){var L=I.nextSibling;I!=h&&I!=m&&I.parentNode.removeChild(I);I=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},x=!1,z=0),!u&&!x)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")+
-"...";u=!0;var I={};this.currentSearch=I;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,T,K,U){if(this.currentSearch==I){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,T,K,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(T=0;T<L.length;T++)mxUtils.bind(this,function(Y){try{var Q=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(Q.style.opacity=this.closedLibraryOpacity);null==C[Q.innerHTML]?(C[Q.innerHTML]=
-null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(Q)):null!=Y.parentLibraries&&(C[Q.innerHTML]=C[Q.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(Q,null,null,mxUtils.bind(this,function(P){var M=C[Q.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(Q,M,P)}));mxEvent.disableContextMenu(Q)}catch(P){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(P.stack)):console.error(P))}})(L[T]);K?(p.removeAttribute("disabled"),
-p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",x=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",x=!1,d.focus()});this.searchShapes=function(I){d.value=I;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(I){13==I.keyCode?(G(),mxEvent.consume(I)):27==I.keyCode&&b()}));
-a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==d.value?(g.setAttribute("src",Editor.magnifyImage),g.setAttribute("title",mxResources.get("search"))):(g.setAttribute("src",Editor.crossImage),g.setAttribute("title",mxResources.get("reset")));""==d.value?(x=!0,p.style.display="none"):d.value!=k?(p.style.display="none",x=!1):u||(p.style.display=x?"none":"")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,
-"mousedown",function(I){I.stopPropagation&&I.stopPropagation();I.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(I){I.stopPropagation&&I.stopPropagation();I.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};
+"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var K=f.firstChild;null!=
+K;){var L=K.nextSibling;K!=h&&K!=m&&K.parentNode.removeChild(K);K=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},w=!1,z=0),!u&&!w)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")+
+"...";u=!0;var K={};this.currentSearch=K;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,Q,N,U){if(this.currentSearch==K){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,Q,N,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(Q=0;Q<L.length;Q++)mxUtils.bind(this,function(Y){try{var P=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(P.style.opacity=this.closedLibraryOpacity);null==C[P.innerHTML]?(C[P.innerHTML]=
+null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(P)):null!=Y.parentLibraries&&(C[P.innerHTML]=C[P.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(P,null,null,mxUtils.bind(this,function(T){var J=C[P.innerHTML];mxEvent.isPopupTrigger(T)&&this.showPopupMenuForEntry(P,J,T)}));mxEvent.disableContextMenu(P)}catch(T){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(T.stack)):console.error(T))}})(L[Q]);N?(p.removeAttribute("disabled"),
+p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",w=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",w=!1,d.focus()});this.searchShapes=function(K){d.value=K;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(K){13==K.keyCode?(G(),mxEvent.consume(K)):27==K.keyCode&&b()}));
+a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==d.value?(g.setAttribute("src",Editor.magnifyImage),g.setAttribute("title",mxResources.get("search"))):(g.setAttribute("src",Editor.crossImage),g.setAttribute("title",mxResources.get("reset")));""==d.value?(w=!0,p.style.display="none"):d.value!=k?(p.style.display="none",w=!1):u||(p.style.display=w?"none":"")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,
+"mousedown",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};
Sidebar.prototype.insertSearchHint=function(a,b,e,f,h,d,g,m){0==h.length&&1==f&&(e=document.createElement("div"),e.className="geTitle",e.style.cssText="background-color:transparent;border-color:transparent;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important;font-size:11px;font-weight:normal;",mxUtils.write(e,mxResources.get("noResultsFor",[b])),a.appendChild(e))};
Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this.editorUi.editor.graph,e=this,f=parseInt(this.initialDefaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var h=b.appendFontSize("edgeLabel;resizable=0;html=1;",b.edgeFontSize),d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;"+
f);d.vertex=!0;b=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry(b.appendFontSize("text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",b.vertexFontSize),60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;",
@@ -2448,62 +2449,62 @@ d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new
0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,h);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";var e=document.createElement("span");mxUtils.write(e,a);b.appendChild(e);return b};
-Sidebar.prototype.createThumb=function(a,b,e,f,h,d,g,m,p,k,u,x){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.shapeForegroundColor="light-dark(#000000, #c0c0c0)";this.graph.shapeBackgroundColor=null!=k?k:"light-dark(#f1f3f4, #1b1d1e)";this.graph.view.scaleAndTranslate(null!=x?x:1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();null==x&&(k=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(e-2*this.thumbBorder)/
+Sidebar.prototype.createThumb=function(a,b,e,f,h,d,g,m,p,k,u,w){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.shapeForegroundColor="light-dark(#000000, #c0c0c0)";this.graph.shapeBackgroundColor=null!=k?k:"light-dark(#f1f3f4, #1b1d1e)";this.graph.view.scaleAndTranslate(null!=w?w:1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();null==w&&(k=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(e-2*this.thumbBorder)/
a.height))/100,this.graph.view.scaleAndTranslate(k,(b-a.width*k)/2/k-a.x,(e-a.height*k)/2/k-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(k=this.graph.container.cloneNode(!1),k.innerHTML=this.graph.container.innerHTML):k=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();this.graph.view.scaleAndTranslate(1,0,0);this.graph.shapeBackgroundColor="#f1f3f4";mxClient.NO_FO=d;k.style.position="relative";
-k.style.overflow=null!=x?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=h&&0!=g&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign=
+k.style.overflow=null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=h&&0!=g&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign=
"center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,h),f.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(I){mxEvent.consume(I)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),
-this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),null!=x?(E.style.backgroundImage="url("+x+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):this.createThumb(D,k,u,E,b,e,f,h,d),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p,z),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
-null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(I){mxEvent.isMouseEvent(I)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};
-Sidebar.prototype.createDropHandler=function(a,b,e,f,h,d){e=null!=e?e:!0;return mxUtils.bind(this,function(g,m,p,k,u,x){for(x=x?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=x&&x!=this.container;)x=x.parentNode;if(null==x&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();x=null==p||mxEvent.isAltDown(m)?!1:g.isValidDropTarget(p,a,m);var z=null;null==p||x||(p=null);if(!g.isCellLocked(p||
-g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,I=g.cloneCells(a);g.splitEdge(p,I,null,k-f.width/2,u-f.height/2,D,G);z=I}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&
-g.insertEdgeBeforeCell(L,d)}if(null!=g.layoutManager){var T=g.layoutManager.getLayout(p);if(null!=T){C=g.view.scale;E=g.view.translate;D=(k+E.x)*C;G=(u+E.y)*C;for(var K=0;K<z.length;K++)T.moveCell(z[K],D,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||g.fireEvent(new mxEventObject("cellsInserted","cells",z));for(K=0;K<z.length;K++)g.model.isVertex(z[K])&&g.isAutoSizeCell(z[K])&&g.updateCellSize(z[K])}catch(U){this.editorUi.handleError(U)}finally{g.model.endUpdate()}null!=z&&0<z.length&&(g.scrollCellToVisible(z[0]),
+Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(K){mxEvent.consume(K)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),
+this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),null!=w?(E.style.backgroundImage="url("+w+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):this.createThumb(D,k,u,E,b,e,f,h,d),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p,z),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
+null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(K){mxEvent.isMouseEvent(K)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};
+Sidebar.prototype.createDropHandler=function(a,b,e,f,h,d){e=null!=e?e:!0;return mxUtils.bind(this,function(g,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:g.isValidDropTarget(p,a,m);var z=null;null==p||w||(p=null);if(!g.isCellLocked(p||
+g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,K=g.cloneCells(a);g.splitEdge(p,K,null,k-f.width/2,u-f.height/2,D,G);z=K}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&
+g.insertEdgeBeforeCell(L,d)}if(null!=g.layoutManager){var Q=g.layoutManager.getLayout(p);if(null!=Q){C=g.view.scale;E=g.view.translate;D=(k+E.x)*C;G=(u+E.y)*C;for(var N=0;N<z.length;N++)Q.moveCell(z[N],D,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||g.fireEvent(new mxEventObject("cellsInserted","cells",z));for(N=0;N<z.length;N++)g.model.isVertex(z[N])&&g.isAutoSizeCell(z[N])&&g.updateCellSize(z[N])}catch(U){this.editorUi.handleError(U)}finally{g.model.endUpdate()}null!=z&&0<z.length&&(g.scrollCellToVisible(z[0]),
g.setSelectionCells(z));(h||g.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=z&&1==z.length)&&window.setTimeout(function(){g.startEditing(z[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
-Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var x=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var I=k.origin;D=I.x;
-G=I.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=x&&!x.relative&&E),T=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(M,V,aa){return!m.isContainer(M.cell)});if(null!=T&&T!=C)k=m.view.getState(T),null!=k&&(I=k.origin,C=T,L=!0,m.model.isEdge(a)||(p.x-=I.x-D,p.y-=I.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-
-(L?G:0),L?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=g&&null!=d&&(m.model.remove(b[g]),m.updateShapes(b[g],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var K=m.getCellGeometry(b[f]),U=null!=K?K.getTerminalPoint(!0):null;K.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var Y=m.getCellGeometry(b[e]),Q=null!=Y?Y.getTerminalPoint(!0):null;null!=Q&&Q.x==U.x&&Q.y==U.y&&m.model.setTerminal(b[e],
-a,!0)}if(null!=K.getTerminalPoint(!1))K.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var P=m.view.getState(C);I=P.cell!=m.view.currentRoot?P.origin:new mxPoint(0,0);m.cellsMoved(b,I.x,I.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,
-null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(M){this.editorUi.handleError(M)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};
+Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var K=k.origin;D=K.x;
+G=K.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),Q=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(J,V,Z){return!m.isContainer(J.cell)});if(null!=Q&&Q!=C)k=m.view.getState(Q),null!=k&&(K=k.origin,C=Q,L=!0,m.model.isEdge(a)||(p.x-=K.x-D,p.y-=K.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-(L?
+G:0),L?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=g&&null!=d&&(m.model.remove(b[g]),m.updateShapes(b[g],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var N=m.getCellGeometry(b[f]),U=null!=N?N.getTerminalPoint(!0):null;N.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var Y=m.getCellGeometry(b[e]),P=null!=Y?Y.getTerminalPoint(!0):null;null!=P&&P.x==U.x&&P.y==U.y&&m.model.setTerminal(b[e],a,
+!0)}if(null!=N.getTerminalPoint(!1))N.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var T=m.view.getState(C);K=T.cell!=m.view.currentRoot?T.origin:new mxPoint(0,0);m.cellsMoved(b,K.x,K.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,
+null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(J){this.editorUi.handleError(J)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var h=this.editorUi.editor.graph,d=h.view,g=1<f.length,m=h.view.getState(a),p=h.getCellGeometry(a);f=h.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),h.model.isEdge(a)?(p=m.absolutePoints,b=p[0],h=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=h.x/d.scale-d.translate.x-f.width/2,f.y=h.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),
p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=h.defaultEdgeLength,h.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),h=f.getTerminalPoint(!1),d=h.x-b.x,b=h.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+
f.width,f.y),!1)):e==mxConstants.DIRECTION_SOUTH?(f.height=d,f.y=p.y+p.height,f.setTerminalPoint(new mxPoint(f.x,f.y+f.height),!1)):e==mxConstants.DIRECTION_WEST&&(f.width=d,f.x=p.x-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1))):(!g&&45<f.width&&45<f.height&&45<p.width&&45<p.height&&(f.width*=p.height/f.height,f.height=p.height),f.x=p.x+p.width/2-f.width/2,f.y=p.y+p.height/2-f.height/2,e==mxConstants.DIRECTION_NORTH?f.y=f.y-p.height/2-f.height/2-d:e==mxConstants.DIRECTION_EAST?f.x=f.x+p.width/2+
f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+p.height/2+f.height/2+d:e==mxConstants.DIRECTION_WEST&&(f.x=f.x-p.width/2-f.width/2-d),h.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(p=h.getCellGeometry(b.getTerminal(!1)),null!=p&&(e==mxConstants.DIRECTION_NORTH?(f.x-=p.getCenterX(),f.y-=p.getCenterY()+p.height/2):e==mxConstants.DIRECTION_EAST?(f.x-=p.getCenterX()-p.width/2,f.y-=p.getCenterY()):e==mxConstants.DIRECTION_SOUTH?(f.x-=p.getCenterX(),f.y-=p.getCenterY()-p.height/
2):e==mxConstants.DIRECTION_WEST&&(f.x-=p.getCenterX()+p.width/2,f.y-=p.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
-Sidebar.prototype.createDragSource=function(a,b,e,f,h,d){function g(la,Ba){var Ca=mxUtils.createImage(la.src);Ca.style.width=la.width+"px";Ca.style.height=la.height+"px";null!=Ba&&Ca.setAttribute("title",Ba);mxUtils.setOpacity(Ca,la==this.refreshTarget?30:20);Ca.style.position="absolute";Ca.style.cursor="crosshair";return Ca}function m(la,Ba,Ca,Fa){null!=Fa.parentNode&&(mxUtils.contains(Ca,la,Ba)?(mxUtils.setOpacity(Fa,100),O=Fa):mxUtils.setOpacity(Fa,Fa==V?30:20));return Ca}var p=this.editorUi,k=
-p.editor.graph,u=null,x=null,z=this;d=0;for(var C=this.livePreview,E=0;E<f.length&&C;E++)d+=k.model.getDescendants(f[E]).length,C=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==x&&k.model.isVertex(f[E])?x=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==x||null==u);E++);var D=this.isDropStyleEnabled(f,x),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(la,Ba,Ca,Fa,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
-K&&O==V){var Ha=la.isCellSelected(K.cell)?la.getSelectionCells():[K.cell];la.updateShapes(la.model.isEdge(K.cell)?f[0]:f[x],Ha,!0);la.setSelectionCells(Ha)}else null!=f&&null!=O&&null!=L&&O!=V?(Ha=la.model.isEdge(L.cell)||null==u?x:u,la.setSelectionCells(this.dropAndConnect(L.cell,f,qa,Ha,Ba,x,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(la.view.getState(la.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
-G.createPreviewElement=mxUtils.bind(this,function(la){var Ba=document.createElement("a");Ba.className="geItem";Ba.style.overflow="visible";la=la.view.scale;Ba.style.width=la*Math.max(1,h.width)+"px";Ba.style.height=la*Math.max(1,h.height)+"px";mxUtils.setOpacity(Ba,50);var Ca=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Ca),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(Ca,la*Math.max(1,h.width),la*Math.max(1,h.height),Ba,null,null,null,null,null,k.shapeBackgroundColor,
-0,la);return Ba}));var I=G.mouseDown;G.mouseDown=function(la){mxEvent.isPopupTrigger(la)||mxEvent.isMultiTouchEvent(la)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),I.apply(this,arguments))};var L=null,T=null,K=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),Q=g(this.triangleRight,mxResources.get("connect")),P=g(this.triangleDown,mxResources.get("connect")),M=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),aa=null,ia=g(this.roundDrop),
-na=g(this.roundDrop),qa=mxConstants.DIRECTION_NORTH,O=null,Z=G.createPreviewElement;G.createPreviewElement=function(la){var Ba=Z.apply(this,arguments);mxClient.IS_SVG&&(Ba.style.pointerEvents="none");this.previewElementWidth=Ba.style.width;this.previewElementHeight=Ba.style.height;return Ba};var ca=G.dragEnter;G.dragEnter=function(la,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ca.apply(this,arguments)};var W=G.dragExit;G.dragExit=function(la,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");
-W.apply(this,arguments)};G.dragOver=function(la,Ba){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=O&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Ca=la.view;if(null!=K&&O==V)this.previewElement.style.display="none";else if(null!=L&&null!=O){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Fa=la.model.isEdge(L.cell)||null!=x?x:u,Ia=z.getDropAndConnectGeometry(L.cell,f[Fa],qa,f),Ha=la.model.isEdge(L.cell)?
-null:la.getCellGeometry(L.cell),Ja=la.getCellGeometry(f[Fa]),ta=la.model.getParent(L.cell),La=Ca.translate.x*Ca.scale,Xa=Ca.translate.y*Ca.scale;null!=Ha&&!Ha.relative&&la.model.isVertex(ta)&&ta!=Ca.currentRoot&&(Xa=Ca.getState(ta),La=Xa.x,Xa=Xa.y);Ha=Ja.x;Ja=Ja.y;la.model.isEdge(f[Fa])&&(Ja=Ha=0);this.previewElement.style.left=(Ia.x-Ha)*Ca.scale+La+"px";this.previewElement.style.top=(Ia.y-Ja)*Ca.scale+Xa+"px";1==f.length&&(this.previewElement.style.width=Ia.width*Ca.scale+"px",this.previewElement.style.height=
-Ia.height*Ca.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&la.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-h.width*Ca.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
-h.height*Ca.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ja=(new Date).getTime(),H=0,ea=null,oa=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(la,Ba,Ca,Fa){var Ia=mxEvent.isAltDown(Fa)||
-null==f?null:la.getCellAt(Ba,Ca,null,null,null,function(Xa,Ya,cb){return la.isContainer(Xa.cell)&&"0"!=mxUtils.getValue(Xa.style,"dropTarget","1")});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var Ha=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(Ha)&&this.graph.isCellConnectable(Ha)&&(Ia=Ha)}la.isCellLocked(Ia)&&(Ia=null);var Ja=la.view.getState(Ia);Ha=O=null;ea!=Ja?(ja=(new Date).getTime(),H=0,ea=Ja,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ja&&(this.updateThread=window.setTimeout(function(){null==O&&(ea=Ja,G.getDropTarget(la,Ba,Ca,Fa))},this.dropTargetDelay+10))):H=(new Date).getTime()-ja;if(D&&2500>H&&null!=Ja&&!mxEvent.isShiftDown(Fa)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(oa,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
-mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(oa,mxConstants.STYLE_SHAPE)||1500<H||la.model.isEdge(Ja.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ja)&&(la.model.isVertex(Ja.cell)&&null!=x||la.model.isEdge(Ja.cell)&&la.model.isEdge(f[0]))){if(la.isCellEditable(Ja.cell)){K=Ja;var ta=la.model.isEdge(Ja.cell)?la.view.getPoint(Ja):new mxPoint(Ja.getCenterX(),Ja.getCenterY());ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height);V.style.left=Math.floor(ta.x)+"px";V.style.top=Math.floor(ta.y)+"px";null==aa&&(la.container.appendChild(V),aa=V.parentNode);m(Ba,Ca,ta,V)}}else null==K||!mxUtils.contains(K,Ba,Ca)||1500<H&&!mxEvent.isShiftDown(Fa)?(K=null,null!=aa&&(V.parentNode.removeChild(V),aa=null)):null!=K&&null!=aa&&(ta=la.model.isEdge(K.cell)?la.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height),m(Ba,Ca,ta,V));if(U&&null!=L&&!mxEvent.isAltDown(Fa)&&null==O){Ha=mxRectangle.fromRectangle(L);if(la.model.isEdge(L.cell)){var La=L.absolutePoints;null!=ia.parentNode&&(ta=La[0],Ha.add(m(Ba,Ca,new mxRectangle(ta.x-this.roundDrop.width/2,ta.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ia)));null!=na.parentNode&&(La=La[La.length-1],Ha.add(m(Ba,Ca,new mxRectangle(La.x-this.roundDrop.width/2,La.y-this.roundDrop.height/2,this.roundDrop.width,
-this.roundDrop.height),na)))}else ta=mxRectangle.fromRectangle(L),null!=L.shape&&null!=L.shape.boundingBox&&(ta=mxRectangle.fromRectangle(L.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(L.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&
-"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Ha.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleUp.width/2,ta.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Y)),Ha.add(m(Ba,Ca,new mxRectangle(ta.x+ta.width,L.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Q)),Ha.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleDown.width/2,ta.y+ta.height,this.triangleDown.width,
-this.triangleDown.height),P)),Ha.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),M));null!=Ha&&Ha.grow(10)}qa=mxConstants.DIRECTION_NORTH;O==Q?qa=mxConstants.DIRECTION_EAST:O==P||O==na?qa=mxConstants.DIRECTION_SOUTH:O==M&&(qa=mxConstants.DIRECTION_WEST);null!=K&&O==V&&(Ja=K);ta=(null==x||la.isCellConnectable(f[x]))&&(la.model.isEdge(Ia)&&null!=x||la.model.isVertex(Ia)&&la.isCellConnectable(Ia));if(null!=
-L&&5E3<=H||L!=Ja&&(null==Ha||!mxUtils.contains(Ha,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||la.model.isEdge(Ia)?Ja:null,null!=L&&ta){Ha=[ia,na,Y,Q,P,M];for(ta=0;ta<Ha.length;ta++)null!=Ha[ta].parentNode&&Ha[ta].parentNode.removeChild(Ha[ta]);la.model.isEdge(Ia)?(La=Ja.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",na.style.left=Math.floor(La.x-this.roundDrop.width/
-2)+"px",na.style.top=Math.floor(La.y-this.roundDrop.height/2)+"px",null==la.model.getTerminal(Ia,!0)&&la.container.appendChild(ia),null==la.model.getTerminal(Ia,!1)&&la.container.appendChild(na))):(ta=mxRectangle.fromRectangle(Ja),null!=Ja.shape&&null!=Ja.shape.boundingBox&&(ta=mxRectangle.fromRectangle(Ja.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(Ja.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=
-La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Y.style.left=Math.floor(Ja.getCenterX()-this.triangleUp.width/2)+"px",Y.style.top=Math.floor(ta.y-this.triangleUp.height)+"px",Q.style.left=Math.floor(ta.x+ta.width)+"px",Q.style.top=Math.floor(Ja.getCenterY()-
-this.triangleRight.height/2)+"px",P.style.left=Y.style.left,P.style.top=Math.floor(ta.y+ta.height)+"px",M.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",M.style.top=Q.style.top,"eastwest"!=Ja.style.portConstraint&&(la.container.appendChild(Y),la.container.appendChild(P)),la.container.appendChild(Q),la.container.appendChild(M));null!=Ja&&(T=la.selectionCellsHandler.getHandler(Ja.cell),null!=T&&null!=T.setHandlesVisible&&T.setHandlesVisible(!1));U=!0}else for(Ha=[ia,na,Y,Q,P,M],ta=0;ta<Ha.length;ta++)null!=
-Ha[ta].parentNode&&Ha[ta].parentNode.removeChild(Ha[ta]);U||null==T||T.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Fa)&&!mxEvent.isShiftDown(Fa)||null!=K&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&la.isSplitTarget(Ia,f,Fa)||(Ia=la.getDropTarget(f,Fa,Ia,!0));return Ia});var sa=G.startDrag;G.startDrag=function(la){z.activeDragSource=this;sa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var la=[ia,na,V,Y,Q,P,M],
-Ba=0;Ba<la.length;Ba++)null!=la[Ba].parentNode&&la[Ba].parentNode.removeChild(la[Ba]);null!=L&&null!=T&&T.reset();O=aa=K=L=T=z.activeDragSource=null};return G};
+Sidebar.prototype.createDragSource=function(a,b,e,f,h,d){function g(ma,Ba){var Ca=mxUtils.createImage(ma.src);Ca.style.width=ma.width+"px";Ca.style.height=ma.height+"px";null!=Ba&&Ca.setAttribute("title",Ba);mxUtils.setOpacity(Ca,ma==this.refreshTarget?30:20);Ca.style.position="absolute";Ca.style.cursor="crosshair";return Ca}function m(ma,Ba,Ca,Ja){null!=Ja.parentNode&&(mxUtils.contains(Ca,ma,Ba)?(mxUtils.setOpacity(Ja,100),O=Ja):mxUtils.setOpacity(Ja,Ja==V?30:20));return Ca}var p=this.editorUi,k=
+p.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,E=0;E<f.length&&C;E++)d+=k.model.getDescendants(f[E]).length,C=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(ma,Ba,Ca,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+N&&O==V){var Da=ma.isCellSelected(N.cell)?ma.getSelectionCells():[N.cell];ma.updateShapes(ma.model.isEdge(N.cell)?f[0]:f[w],Da,!0);ma.setSelectionCells(Da)}else null!=f&&null!=O&&null!=L&&O!=V?(Da=ma.model.isEdge(L.cell)||null==u?w:u,ma.setSelectionCells(this.dropAndConnect(L.cell,f,sa,Da,Ba,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ma.view.getState(ma.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
+G.createPreviewElement=mxUtils.bind(this,function(ma){var Ba=document.createElement("a");Ba.className="geItem";Ba.style.overflow="visible";ma=ma.view.scale;Ba.style.width=ma*Math.max(1,h.width)+"px";Ba.style.height=ma*Math.max(1,h.height)+"px";mxUtils.setOpacity(Ba,50);var Ca=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Ca),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(Ca,ma*Math.max(1,h.width),ma*Math.max(1,h.height),Ba,null,null,null,null,null,k.shapeBackgroundColor,
+0,ma);return Ba}));var K=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),K.apply(this,arguments))};var L=null,Q=null,N=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),P=g(this.triangleRight,mxResources.get("connect")),T=g(this.triangleDown,mxResources.get("connect")),J=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),Z=null,ia=g(this.roundDrop),
+oa=g(this.roundDrop),sa=mxConstants.DIRECTION_NORTH,O=null,X=G.createPreviewElement;G.createPreviewElement=function(ma){var Ba=X.apply(this,arguments);mxClient.IS_SVG&&(Ba.style.pointerEvents="none");this.previewElementWidth=Ba.style.width;this.previewElementHeight=Ba.style.height;return Ba};var ba=G.dragEnter;G.dragEnter=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ba.apply(this,arguments)};var da=G.dragExit;G.dragExit=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");
+da.apply(this,arguments)};G.dragOver=function(ma,Ba){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=O&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Ca=ma.view;if(null!=N&&O==V)this.previewElement.style.display="none";else if(null!=L&&null!=O){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ja=ma.model.isEdge(L.cell)||null!=w?w:u,Ia=z.getDropAndConnectGeometry(L.cell,f[Ja],sa,f),Da=ma.model.isEdge(L.cell)?
+null:ma.getCellGeometry(L.cell),Ga=ma.getCellGeometry(f[Ja]),ta=ma.model.getParent(L.cell),La=Ca.translate.x*Ca.scale,Xa=Ca.translate.y*Ca.scale;null!=Da&&!Da.relative&&ma.model.isVertex(ta)&&ta!=Ca.currentRoot&&(Xa=Ca.getState(ta),La=Xa.x,Xa=Xa.y);Da=Ga.x;Ga=Ga.y;ma.model.isEdge(f[Ja])&&(Ga=Da=0);this.previewElement.style.left=(Ia.x-Da)*Ca.scale+La+"px";this.previewElement.style.top=(Ia.y-Ga)*Ca.scale+Xa+"px";1==f.length&&(this.previewElement.style.width=Ia.width*Ca.scale+"px",this.previewElement.style.height=
+Ia.height*Ca.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&ma.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-h.width*Ca.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
+h.height*Ca.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ca=(new Date).getTime(),H=0,ea=null,ra=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(ma,Ba,Ca,Ja){var Ia=mxEvent.isAltDown(Ja)||
+null==f?null:ma.getCellAt(Ba,Ca,null,null,null,function(Xa,Ya,cb){return ma.isContainer(Xa.cell)&&"0"!=mxUtils.getValue(Xa.style,"dropTarget","1")});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var Da=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(Da)&&this.graph.isCellConnectable(Da)&&(Ia=Da)}ma.isCellLocked(Ia)&&(Ia=null);var Ga=ma.view.getState(Ia);Da=O=null;ea!=Ga?(ca=(new Date).getTime(),H=0,ea=Ga,null!=this.updateThread&&window.clearTimeout(this.updateThread),
+null!=Ga&&(this.updateThread=window.setTimeout(function(){null==O&&(ea=Ga,G.getDropTarget(ma,Ba,Ca,Ja))},this.dropTargetDelay+10))):H=(new Date).getTime()-ca;if(D&&2500>H&&null!=Ga&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Ga.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ga.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ga.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ga.style,
+mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)||1500<H||ma.model.isEdge(Ga.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ga)&&(ma.model.isVertex(Ga.cell)&&null!=w||ma.model.isEdge(Ga.cell)&&ma.model.isEdge(f[0]))){if(ma.isCellEditable(Ga.cell)){N=Ga;var ta=ma.model.isEdge(Ga.cell)?ma.view.getPoint(Ga):new mxPoint(Ga.getCenterX(),Ga.getCenterY());ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height);V.style.left=Math.floor(ta.x)+"px";V.style.top=Math.floor(ta.y)+"px";null==Z&&(ma.container.appendChild(V),Z=V.parentNode);m(Ba,Ca,ta,V)}}else null==N||!mxUtils.contains(N,Ba,Ca)||1500<H&&!mxEvent.isShiftDown(Ja)?(N=null,null!=Z&&(V.parentNode.removeChild(V),Z=null)):null!=N&&null!=Z&&(ta=ma.model.isEdge(N.cell)?ma.view.getPoint(N):new mxPoint(N.getCenterX(),N.getCenterY()),ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height),m(Ba,Ca,ta,V));if(U&&null!=L&&!mxEvent.isAltDown(Ja)&&null==O){Da=mxRectangle.fromRectangle(L);if(ma.model.isEdge(L.cell)){var La=L.absolutePoints;null!=ia.parentNode&&(ta=La[0],Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.roundDrop.width/2,ta.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ia)));null!=oa.parentNode&&(La=La[La.length-1],Da.add(m(Ba,Ca,new mxRectangle(La.x-this.roundDrop.width/2,La.y-this.roundDrop.height/2,this.roundDrop.width,
+this.roundDrop.height),oa)))}else ta=mxRectangle.fromRectangle(L),null!=L.shape&&null!=L.shape.boundingBox&&(ta=mxRectangle.fromRectangle(L.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(L.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&
+"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleUp.width/2,ta.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Y)),Da.add(m(Ba,Ca,new mxRectangle(ta.x+ta.width,L.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),P)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleDown.width/2,ta.y+ta.height,this.triangleDown.width,
+this.triangleDown.height),T)),Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),J));null!=Da&&Da.grow(10)}sa=mxConstants.DIRECTION_NORTH;O==P?sa=mxConstants.DIRECTION_EAST:O==T||O==oa?sa=mxConstants.DIRECTION_SOUTH:O==J&&(sa=mxConstants.DIRECTION_WEST);null!=N&&O==V&&(Ga=N);ta=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Ia)&&null!=w||ma.model.isVertex(Ia)&&ma.isCellConnectable(Ia));if(null!=
+L&&5E3<=H||L!=Ga&&(null==Da||!mxUtils.contains(Da,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||ma.model.isEdge(Ia)?Ga:null,null!=L&&ta){Da=[ia,oa,Y,P,T,J];for(ta=0;ta<Da.length;ta++)null!=Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);ma.model.isEdge(Ia)?(La=Ga.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",oa.style.left=Math.floor(La.x-this.roundDrop.width/
+2)+"px",oa.style.top=Math.floor(La.y-this.roundDrop.height/2)+"px",null==ma.model.getTerminal(Ia,!0)&&ma.container.appendChild(ia),null==ma.model.getTerminal(Ia,!1)&&ma.container.appendChild(oa))):(ta=mxRectangle.fromRectangle(Ga),null!=Ga.shape&&null!=Ga.shape.boundingBox&&(ta=mxRectangle.fromRectangle(Ga.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(Ga.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=
+La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Y.style.left=Math.floor(Ga.getCenterX()-this.triangleUp.width/2)+"px",Y.style.top=Math.floor(ta.y-this.triangleUp.height)+"px",P.style.left=Math.floor(ta.x+ta.width)+"px",P.style.top=Math.floor(Ga.getCenterY()-
+this.triangleRight.height/2)+"px",T.style.left=Y.style.left,T.style.top=Math.floor(ta.y+ta.height)+"px",J.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",J.style.top=P.style.top,"eastwest"!=Ga.style.portConstraint&&(ma.container.appendChild(Y),ma.container.appendChild(T)),ma.container.appendChild(P),ma.container.appendChild(J));null!=Ga&&(Q=ma.selectionCellsHandler.getHandler(Ga.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));U=!0}else for(Da=[ia,oa,Y,P,T,J],ta=0;ta<Da.length;ta++)null!=
+Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);U||null==Q||Q.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=N&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&ma.isSplitTarget(Ia,f,Ja)||(Ia=ma.getDropTarget(f,Ja,Ia,!0));return Ia});var qa=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;qa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var ma=[ia,oa,V,Y,P,T,J],
+Ba=0;Ba<ma.length;Ba++)null!=ma[Ba].parentNode&&ma[Ba].parentNode.removeChild(ma[Ba]);null!=L&&null!=Q&&Q.reset();O=Z=N=L=Q=z.activeDragSource=null};return G};
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()&&f.model.isVertex(f.getSelectionCell())){b=null;for(var h=0;h<a.length&&null==b;h++)f.model.isVertex(a[h])&&(b=h);null!=b&&(f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,b,e)),f.scrollCellToVisible(f.getSelectionCell()))}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,b,e,f){var h=b.getGraphForEvent,d=b.mouseDown,g=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,x=this,z=null;b.getGraphForEvent=function(C){return k?h.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));z=a.style.opacity;k=!1;""==z&&(z="1");null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(C){(k=
-null!=u&&(Math.abs(u.x-mxEvent.getClientX(C))>p||Math.abs(u.y-mxEvent.getClientY(C))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100*z));g.apply(this,arguments)};b.mouseUp=function(C){try{mxEvent.isPopupTrigger(C)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(C),mxEvent.isConsumed(C)||x.itemClicked(e,b,C,a)),m.apply(b,arguments),mxUtils.setOpacity(a,100*z),u=null,
-x.currentElt=a}catch(E){b.reset(),x.editorUi.handleError(E)}}};Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,h,d,g,m){null!=m&&null!=h&&(m+=" "+h);m=null!=m&&0<m.length?m:null!=h?h.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,h,d,g)}))};
-Sidebar.prototype.createVertexTemplate=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,h,d,g,m,p,k,u,x,z,C)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,h,d,g,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),x=new mxGraphModel;u.decode(k.documentElement,x);p=this.graph.cloneCells(x.root.getChildAt(0).children)}catch(z){f=mxResources.get("error")+": "+z.message}return this.createVertexTemplateFromCells(p,b,e,f,h,d,g,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C){return this.createItem(a,f,h,d,b,e,g,m,p,k,u,x,z,C)};
+Sidebar.prototype.addClickHandler=function(a,b,e,f){var h=b.getGraphForEvent,d=b.mouseDown,g=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,z=null;b.getGraphForEvent=function(C){return k?h.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));z=a.style.opacity;k=!1;""==z&&(z="1");null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(C){(k=
+null!=u&&(Math.abs(u.x-mxEvent.getClientX(C))>p||Math.abs(u.y-mxEvent.getClientY(C))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100*z));g.apply(this,arguments)};b.mouseUp=function(C){try{mxEvent.isPopupTrigger(C)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(C),mxEvent.isConsumed(C)||w.itemClicked(e,b,C,a)),m.apply(b,arguments),mxUtils.setOpacity(a,100*z),u=null,
+w.currentElt=a}catch(E){b.reset(),w.editorUi.handleError(E)}}};Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,h,d,g,m){null!=m&&null!=h&&(m+=" "+h);m=null!=m&&0<m.length?m:null!=h?h.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,h,d,g)}))};
+Sidebar.prototype.createVertexTemplate=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,h,d,g,m,p,k,u,w,z,C)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,h,d,g,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),w=new mxGraphModel;u.decode(k.documentElement,w);p=this.graph.cloneCells(w.root.getChildAt(0).children)}catch(z){f=mxResources.get("error")+": "+z.message}return this.createVertexTemplateFromCells(p,b,e,f,h,d,g,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){return this.createItem(a,f,h,d,b,e,g,m,p,k,u,w,z,C)};
Sidebar.prototype.createEdgeTemplateEntry=function(a,b,e,f,h,d,g,m,p){g=null!=g&&0<g.length?g:h.toLowerCase();return this.addEntry(g,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,e,f,h,d,m,p)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,b,e,f,h,d,g,m){a=new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a);a.geometry.setTerminalPoint(new mxPoint(0,e),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,e,h,d,g,m)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,x){return this.createItem(a,f,h,null!=m?m:!0,b,e,d,g,p,k,u,x)};
+Sidebar.prototype.createEdgeTemplate=function(a,b,e,f,h,d,g,m){a=new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a);a.geometry.setTerminalPoint(new mxPoint(0,e),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,e,h,d,g,m)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,w){return this.createItem(a,f,h,null!=m?m:!0,b,e,d,g,p,k,u,w)};
Sidebar.prototype.addPaletteFunctions=function(a,b,e,f){this.addPalette(a,b,e,mxUtils.bind(this,function(h){for(var d=0;d<f.length;d++)h.appendChild(f[d](h))}))};
Sidebar.prototype.addPalette=function(a,b,e,f){b=this.createTitle(b);this.appendChild(b);var h=document.createElement("div");h.className="geSidebar";mxClient.IS_POINTER&&(h.style.touchAction="none");e&&this.expandLibraries?(f(h),f=null):h.style.display="none";this.addFoldingHandler(b,h,f);e=document.createElement("div");e.appendChild(h);this.appendChild(e);null!=a&&(this.palettes[a]=[b,e]);return h};
Sidebar.prototype.addFoldingHandler=function(a,b,e){var f=!1;a.style.backgroundImage="none"==b.style.display?"url('"+Editor.arrowRightImage+"')":"url('"+Editor.arrowDownImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0px 50%";a.style.backgroundSize="20px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(h){if(a.contains(mxEvent.getSource(h))){if("none"==b.style.display){if(f)this.setContentVisible(b,!0);else if(f=!0,null!=e){a.style.cursor="wait";for(var d=[],g=
@@ -2511,10 +2512,10 @@ Sidebar.prototype.addFoldingHandler=function(a,b,e){var f=!1;a.style.backgroundI
"')",this.setContentVisible(b,!1);mxEvent.consume(h)}}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(h){h.preventDefault()}))};
Sidebar.prototype.setContentVisible=function(a,b){mxUtils.setPrefixedStyle(a.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(a.style,"transform-origin","top left");b?(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),a.style.display="block",window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform","scaleY(1)");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",
null)}),200)}),0)):(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",null);a.style.display="none"}),200))};Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,b,e,f,h,d,g){for(var m=[],p=0;p<h.length;p++)mxUtils.bind(this,function(k,u,x){if(null==x&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){x=k.lastIndexOf("/");var z=k.lastIndexOf(".");x=k.substring(0<=x?x+1:0,0<=z?z:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(x)))})(h[p],null!=d?d[p]:null,null!=g?g[h[p]]:null);this.addPaletteFunctions(a,
+Sidebar.prototype.addImagePalette=function(a,b,e,f,h,d,g){for(var m=[],p=0;p<h.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var z=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=z?z:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(h[p],null!=d?d[p]:null,null!=g?g[h[p]]:null);this.addPaletteFunctions(a,
b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,e,f,h,d,g,m,p,k){g=null!=g?g:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(x,z,C,E,D){if(null==h||0>mxUtils.indexOf(h,z)){C=this.getTagsForStencil(x,z);var G=null!=m?m[z]:null;null!=G&&C.push(G);u.push(this.createVertexTemplateEntry("shape="+x+z.toLowerCase()+f,Math.round(E*g),Math.round(D*g),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==f&&(f="");null!=d&&d.call(this,x);if(null!=p)for(var z=0;z<p.length;z++)p[z](x);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,I){(null==h||0>mxUtils.indexOf(h,E))&&x.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(I*g),"",E.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,b,e,f,h,d,g,m,p,k){g=null!=g?g:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,z,C,E,D){if(null==h||0>mxUtils.indexOf(h,z)){C=this.getTagsForStencil(w,z);var G=null!=m?m[z]:null;null!=G&&C.push(G);u.push(this.createVertexTemplateEntry("shape="+w+z.toLowerCase()+f,Math.round(E*g),Math.round(D*g),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var z=0;z<p.length;z++)p[z](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,K){(null==h||0>mxUtils.indexOf(h,E))&&w.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(K*g),"",E.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=
this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var h=0;h<a.length;h++)f=f.replace(new RegExp("&"+a[h][0]+";","g"),"&#"+a[h][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,h,d,g){return e(Graph.sanitizeHtml(f),h,d,g)}})();
Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
@@ -2527,39 +2528,39 @@ mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("d
(function(){var a=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(b,e,f,h,d){return"default"==h&&null!=d?"fillcolor"==f.nodeName?d.shapeBackgroundColor:d.shapeForegroundColor:a.apply(this,arguments)}})();(function(){var a=mxResources.get;mxResources.get=function(b,e,f){null==f&&(f=b);return a.apply(this,[b,e,f])}})();
(function(){var a=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,e,f,h,d,g,m,p){var k=a.apply(this,arguments);if(null!=e){var u=k.getElementsByTagName("img");0<u.length&&(u[0].className="geToolbarButton geAdaptiveAsset",u[0].style.margin="4px",u[0].style.width="18px")}return k}})();
Graph=function(a,b,e,f,h,d){mxGraph.call(this,a,b,e,f);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);
-return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var g=null,m=null,p=null,k=null,u=!1,x=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){O=Z.getProperty("event");var ca=O.getState();Z=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=ca&&(x=this.isCellSelected(ca.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent()))){var W=this.selectionCellsHandler.getHandler(ca.cell);
-if(null==W||null==W.getHandleForEvent(O)){var ja=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),H=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;W=H+2;ja.grow(H);if(this.isTableCell(ca.cell)&&this.isCellMovable(ca.cell)&&!this.isCellSelected(ca.cell)&&!(mxUtils.contains(ca,O.getGraphX()-W,O.getGraphY()-W)&&mxUtils.contains(ca,O.getGraphX()-W,O.getGraphY()+W)&&mxUtils.contains(ca,O.getGraphX()+W,O.getGraphY()+W)&&mxUtils.contains(ca,
-O.getGraphX()+W,O.getGraphY()-W))){var ea=this.model.getParent(ca.cell);W=this.model.getParent(ea);if(!this.isCellSelected(W)){H*=Z;var oa=2*H;if(this.model.getChildAt(W,0)!=ea&&mxUtils.intersects(ja,new mxRectangle(ca.x,ca.y-H,ca.width,oa))||this.model.getChildAt(ea,0)!=ca.cell&&mxUtils.intersects(ja,new mxRectangle(ca.x-H,ca.y,oa,ca.height))||mxUtils.intersects(ja,new mxRectangle(ca.x,ca.y+ca.height-H,ca.width,oa))||mxUtils.intersects(ja,new mxRectangle(ca.x+ca.width-H,ca.y,oa,ca.height)))ea=this.selectionCellsHandler.isHandled(W),
-this.selectCellForEvent(W,O.getEvent()),W=this.selectionCellsHandler.getHandler(W),null!=W&&(H=W.getHandleForEvent(O),null!=H&&(W.start(O.getGraphX(),O.getGraphY(),H),W.blockDelayedSelection=!ea,O.consume()))}}for(;!O.isConsumed()&&null!=ca&&(this.isTableCell(ca.cell)||this.isTableRow(ca.cell)||this.isTable(ca.cell));)this.isSwimlane(ca.cell)&&this.isCellMovable(ca.cell)&&(W=this.getActualStartSize(ca.cell),(0<W.x||0<W.width)&&mxUtils.intersects(ja,new mxRectangle(ca.x+(W.x-W.width-1)*Z+(0==W.x?ca.width:
-0),ca.y,1,ca.height))||(0<W.y||0<W.height)&&mxUtils.intersects(ja,new mxRectangle(ca.x,ca.y+(W.y-W.height-1)*Z+(0==W.y?ca.height:0),ca.width,1)))&&(this.selectCellForEvent(ca.cell,O.getEvent()),W=this.selectionCellsHandler.getHandler(ca.cell),null!=W&&null!=W.customHandles&&(H=mxEvent.CUSTOM_HANDLE-W.customHandles.length+1,W.start(O.getGraphX(),O.getGraphY(),H),O.consume())),ca=this.view.getState(this.model.getParent(ca.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(O,
-Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){O=Z.getProperty("event");var ca=O.getState();mxEvent.isAltDown(O.getEvent())||mxEvent.isControlDown(Z)||mxEvent.isShiftDown(Z)||x||null==ca||!this.model.isEdge(ca.cell)||(g=new mxPoint(O.getGraphX(),O.getGraphY()),u=this.isCellSelected(ca.cell),p=ca,m=O,null!=ca.text&&null!=ca.text.boundingBox&&mxUtils.contains(ca.text.boundingBox,O.getGraphX(),O.getGraphY())?k=mxEvent.LABEL_HANDLE:(Z=this.selectionCellsHandler.getHandler(ca.cell),null!=
-Z&&null!=Z.bends&&0<Z.bends.length&&(k=Z.getHandleForEvent(O))))}}));this.addMouseListener({mouseDown:function(O,Z){},mouseMove:mxUtils.bind(this,function(O,Z){O=this.selectionCellsHandler.handlers.map;for(var ca in O)if(null!=O[ca].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(Z.getEvent())){var W=this.tolerance;if(null!=g&&null!=p&&null!=m){if(ca=p,null!=k||Math.abs(g.x-Z.getGraphX())>W||Math.abs(g.y-Z.getGraphY())>W){var ja=null;mxEvent.isShiftDown(Z.getEvent())||
-(ja=this.selectionCellsHandler.getHandler(ca.cell));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){ja.redrawHandles();var H=null!=k?k:ja.getHandleForEvent(m),ea=this.view.getEdgeStyle(ca),oa=ea==mxEdgeStyle.EntityRelation;W=ca.absolutePoints;u||(H=k);H!=mxEvent.LABEL_HANDLE&&null!=W&&(H=k,null==H&&(O=new mxRectangle(g.x,g.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,W[0].x,W[0].y)?H=0:mxUtils.contains(O,W[W.length-1].x,W[W.length-1].y)?H=ja.bends.length-1:null!=W&&(null==
-ea&&null==H||ea==mxEdgeStyle.SegmentConnector||ea==mxEdgeStyle.OrthConnector)&&(null!=ea&&(2==W.length||3==W.length&&(0==Math.round(W[0].x-W[1].x)&&0==Math.round(W[1].x-W[2].x)||0==Math.round(W[0].y-W[1].y)&&0==Math.round(W[1].y-W[2].y)))?H=2:(H=mxUtils.findNearestSegment(ca,g.x,g.y),H=null==ea?mxEvent.VIRTUAL_HANDLE-H:H+1))),null==H&&(H=mxEvent.VIRTUAL_HANDLE));O=H==mxEvent.LABEL_HANDLE||0==H||H==ja.bends.length-1;if(!oa&&(null!=ca.visibleSourceState||null!=ca.visibleTargetState)||O)ja.start(Z.getGraphX(),
-Z.getGraphX(),H),Z.consume(),this.graphHandler.reset()}null!=ja&&(this.selectionCellsHandler.isHandlerActive(ja)?this.isCellSelected(ca.cell)||(this.selectionCellsHandler.handlers.put(ca.cell,ja),this.selectCellForEvent(ca.cell,Z.getEvent())):this.isCellSelected(ca.cell)||ja.destroy());u=!1;g=m=p=k=null}}else if(ca=Z.getState(),null!=ca&&this.isCellEditable(ca.cell)){O=this.model.getParent(ca.cell);ja=null;if(this.model.isEdge(ca.cell)&&!this.isCellSelected(ca.cell)&&!mxEvent.isAltDown(Z.getEvent())&&
-!mxEvent.isShiftDown(Z.getEvent())&&!this.isAncestorSelected(ca.cell)&&(this.isSwimlane(O)||this.model.isLayer(O)||this.getCurrentRoot()==O)){if(O=new mxRectangle(Z.getGraphX(),Z.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),W=ca.absolutePoints,null!=W)null!=ca.text&&null!=ca.text.boundingBox&&mxUtils.contains(ca.text.boundingBox,Z.getGraphX(),Z.getGraphY())?ja="move":mxUtils.contains(O,W[0].x,W[0].y)||mxUtils.contains(O,W[W.length-1].x,W[W.length-1].y)?ja="pointer":(ea=this.view.getEdgeStyle(ca),
-ea==mxEdgeStyle.EntityRelation||null==ca.visibleSourceState&&null==ca.visibleTargetState||(ja="crosshair",ea!=mxEdgeStyle.SegmentConnector&&ea!=mxEdgeStyle.OrthConnector))||(Z=mxUtils.findNearestSegment(ca,Z.getGraphX(),Z.getGraphY()),Z<W.length-1&&0<=Z&&(ja=0==Math.round(W[Z].x-W[Z+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(Z.getEvent())){W=mxShape.prototype.svgStrokeTolerance/2;O=new mxRectangle(Z.getGraphX(),Z.getGraphY());O.grow(W);if(this.isTableCell(ca.cell)&&this.isCellMovable(ca.cell)&&
-(Z=this.model.getParent(ca.cell),W=this.model.getParent(Z),!this.isCellSelected(W)))if(mxUtils.intersects(O,new mxRectangle(ca.x,ca.y-2,ca.width,4))&&this.model.getChildAt(W,0)!=Z||mxUtils.intersects(O,new mxRectangle(ca.x,ca.y+ca.height-2,ca.width,4)))ja="row-resize";else if(mxUtils.intersects(O,new mxRectangle(ca.x-2,ca.y,4,ca.height))&&this.model.getChildAt(Z,0)!=ca.cell||mxUtils.intersects(O,new mxRectangle(ca.x+ca.width-2,ca.y,4,ca.height)))ja="col-resize";for(Z=ca;null==ja&&null!=Z&&(this.isTableCell(Z.cell)||
-this.isTableRow(Z.cell)||this.isTable(Z.cell));)this.isSwimlane(Z.cell)&&this.isCellMovable(Z.cell)&&(W=this.getActualStartSize(Z.cell),H=this.view.scale,(0<W.x||0<W.width)&&mxUtils.intersects(O,new mxRectangle(Z.x+(W.x-W.width-1)*H+(0==W.x?Z.width*H:0),Z.y,1,Z.height))?ja="col-resize":(0<W.y||0<W.height)&&mxUtils.intersects(O,new mxRectangle(Z.x,Z.y+(W.y-W.height-1)*H+(0==W.y?Z.height:0),Z.width,1))&&(ja="row-resize")),Z=this.view.getState(this.model.getParent(Z.cell))}null!=ja&&ca.setCursor(ja)}}}),
-mouseUp:mxUtils.bind(this,function(O,Z){k=g=m=p=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(O){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&("0"==mxUtils.getValue(O.style,"html","0")?Z=mxUtils.htmlEntities(Z,!1):(O.lastLabelValue!=Z&&(O.lastLabelValue=Z,O.lastSanitizedLabelValue=Graph.sanitizeHtml(Z),z.innerHTML=O.lastSanitizedLabelValue,Graph.addLightDarkColors(z,
-null,"simple"==O.view.graph.getAdaptiveColors())&&(O.lastSanitizedLabelValue=z.innerHTML)),Z=O.lastSanitizedLabelValue));return Z};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);
-this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(O,Z){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=C.apply(this,arguments);if(this.graph.pageVisible){var Z=[],ca=this.graph.pageFormat,W=this.graph.pageScale,ja=ca.width*W;ca=ca.height*W;W=this.graph.view.translate;for(var H=this.graph.view.scale,ea=this.graph.getPageLayout(),oa=0;oa<ea.width;oa++)Z.push(new mxRectangle(((ea.x+
-oa)*ja+W.x)*H,(ea.y*ca+W.y)*H,ja*H,ca*H));for(oa=1;oa<ea.height;oa++)Z.push(new mxRectangle((ea.x*ja+W.x)*H,((ea.y+oa)*ca+W.y)*H,ja*H,ca*H));O=Z.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,Z){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var Z=E.apply(this,arguments),ca=new mxDictionary,W=[],ja=0;ja<Z.length;ja++){var H=this.graph.isTableCell(O)&&this.graph.isTableCell(Z[ja])&&this.graph.isCellSelected(Z[ja])?this.graph.model.getParent(Z[ja]):this.graph.isTableRow(O)&&this.graph.isTableRow(Z[ja])&&this.graph.isCellSelected(Z[ja])?Z[ja]:this.graph.getCompositeParent(Z[ja]);null==H||ca.get(H)||(ca.put(H,!0),W.push(H))}return W};var D=this.graphHandler.start;
-this.graphHandler.start=function(O,Z,ca,W){var ja=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?ja=!0:O=this.graph.model.getParent(O));ja||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,Z,ca,W,ja,H){var ea=
-mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=W&&this.graph.applyNewEdgeStyle(W,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var I=(new Date).getTime(),L=0,T=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;T.apply(this,arguments);O!=this.currentState?(I=(new Date).getTime(),L=0):L=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
-function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var Y=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return Y.apply(this,arguments)||
-mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var Q=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Q=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Q)}));this.popupMenuHandler.autoExpand=
-!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};var P=this.click;this.click=function(O){var Z=null==O.state&&null!=O.sourceState&&this.isCellLocked(this.getLayerForCell(O.sourceState.cell));if(this.isEnabled()&&!Z||O.isConsumed())return P.apply(this,arguments);var ca=Z?O.sourceState.cell:O.getCell();if(null!=ca){var W=this.getClickableLinkForCell(ca);null!=W?this.isCustomLink(W)?this.customLinkClicked(W,ca):this.openLink(W):Z&&this.clearSelection()}};
-this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var M=this.tooltipHandler.show;this.tooltipHandler.show=function(){M.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),Z=0;Z<O.length;Z++)null!=O[Z].getAttribute("href")&&null==O[Z].getAttribute("target")&&O[Z].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var Z=null==O.state&&null!=O.sourceState&&
-this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(Z?O.sourceState.cell:O.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return V.apply(this,arguments)};this.selectRegion=function(O,Z){var ca=mxEvent.isAltDown(Z)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,ca,null,!0);if(this.isToggleEvent(Z))for(ca=0;ca<
-O.length;ca++)this.selectCellForEvent(O[ca],Z);else this.selectCellsForEvent(O,Z);return O};var aa=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,Z,ca){return this.graph.isCellSelected(O)?!1:aa.apply(this,arguments)};var ia=this.updateMouseEvent;this.updateMouseEvent=function(O){O=ia.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),
-O.getGraphY(),null,null,null,mxUtils.bind(this,function(Z,ca,W){return O.state==Z||this.isCellLocked(this.getLayerForCell(Z.cell))&&null==this.getLinkForCell(Z.cell)}))):O.state=null);return O};var na=this.isCellSelectable;this.isCellSelectable=function(O){return na.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var qa=null;
-this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,Z){"mouseDown"==Z.getProperty("eventName")&&(O=Z.getProperty("event").getState(),qa=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,Z){if(!mxEvent.isMultiTouchEvent(Z)){O=Z.getProperty("event");var ca=Z.getProperty("cell");null==ca?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),
-G.start(O.x,O.y)):null!=qa?this.addSelectionCells(qa):1<this.getSelectionCount()&&this.isCellSelected(ca)&&this.removeSelectionCell(ca);qa=null;Z.consume()}}));this.connectionHandler.selectCells=function(O,Z){this.graph.setSelectionCell(Z||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,Z){var ca=O.view.graph;return Z&&(ca.isCellSelected(O.cell)||ca.isTableRow(O.cell)&&ca.selectionCellsHandler.isHandled(ca.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
-Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
-Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";
+return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var g=null,m=null,p=null,k=null,u=!1,w=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,X){if("mouseDown"==X.getProperty("eventName")&&this.isEnabled()){O=X.getProperty("event");var ba=O.getState();X=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=ba&&(w=this.isCellSelected(ba.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent()))){var da=this.selectionCellsHandler.getHandler(ba.cell);
+if(null==da||null==da.getHandleForEvent(O)){var ca=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),H=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;da=H+2;ca.grow(H);if(this.isTableCell(ba.cell)&&this.isCellMovable(ba.cell)&&!this.isCellSelected(ba.cell)&&!(mxUtils.contains(ba,O.getGraphX()-da,O.getGraphY()-da)&&mxUtils.contains(ba,O.getGraphX()-da,O.getGraphY()+da)&&mxUtils.contains(ba,O.getGraphX()+da,O.getGraphY()+da)&&mxUtils.contains(ba,
+O.getGraphX()+da,O.getGraphY()-da))){var ea=this.model.getParent(ba.cell);da=this.model.getParent(ea);if(!this.isCellSelected(da)){H*=X;var ra=2*H;if(this.model.getChildAt(da,0)!=ea&&mxUtils.intersects(ca,new mxRectangle(ba.x,ba.y-H,ba.width,ra))||this.model.getChildAt(ea,0)!=ba.cell&&mxUtils.intersects(ca,new mxRectangle(ba.x-H,ba.y,ra,ba.height))||mxUtils.intersects(ca,new mxRectangle(ba.x,ba.y+ba.height-H,ba.width,ra))||mxUtils.intersects(ca,new mxRectangle(ba.x+ba.width-H,ba.y,ra,ba.height)))ea=
+this.selectionCellsHandler.isHandled(da),this.selectCellForEvent(da,O.getEvent()),da=this.selectionCellsHandler.getHandler(da),null!=da&&(H=da.getHandleForEvent(O),null!=H&&(da.start(O.getGraphX(),O.getGraphY(),H),da.blockDelayedSelection=!ea,O.consume()))}}for(;!O.isConsumed()&&null!=ba&&(this.isTableCell(ba.cell)||this.isTableRow(ba.cell)||this.isTable(ba.cell));)this.isSwimlane(ba.cell)&&this.isCellMovable(ba.cell)&&(da=this.getActualStartSize(ba.cell),(0<da.x||0<da.width)&&mxUtils.intersects(ca,
+new mxRectangle(ba.x+(da.x-da.width-1)*X+(0==da.x?ba.width:0),ba.y,1,ba.height))||(0<da.y||0<da.height)&&mxUtils.intersects(ca,new mxRectangle(ba.x,ba.y+(da.y-da.height-1)*X+(0==da.y?ba.height:0),ba.width,1)))&&(this.selectCellForEvent(ba.cell,O.getEvent()),da=this.selectionCellsHandler.getHandler(ba.cell),null!=da&&null!=da.customHandles&&(H=mxEvent.CUSTOM_HANDLE-da.customHandles.length+1,da.start(O.getGraphX(),O.getGraphY(),H),O.consume())),ba=this.view.getState(this.model.getParent(ba.cell))}}}}));
+this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(O,X){if("mouseDown"==X.getProperty("eventName")&&this.isEnabled()){O=X.getProperty("event");var ba=O.getState();mxEvent.isAltDown(O.getEvent())||mxEvent.isControlDown(X)||mxEvent.isShiftDown(X)||w||null==ba||!this.model.isEdge(ba.cell)||(g=new mxPoint(O.getGraphX(),O.getGraphY()),u=this.isCellSelected(ba.cell),p=ba,m=O,null!=ba.text&&null!=ba.text.boundingBox&&mxUtils.contains(ba.text.boundingBox,O.getGraphX(),O.getGraphY())?
+k=mxEvent.LABEL_HANDLE:(X=this.selectionCellsHandler.getHandler(ba.cell),null!=X&&null!=X.bends&&0<X.bends.length&&(k=X.getHandleForEvent(O))))}}));this.addMouseListener({mouseDown:function(O,X){},mouseMove:mxUtils.bind(this,function(O,X){O=this.selectionCellsHandler.handlers.map;for(var ba in O)if(null!=O[ba].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(X.getEvent())){var da=this.tolerance;if(null!=g&&null!=p&&null!=m){if(ba=p,null!=k||Math.abs(g.x-X.getGraphX())>
+da||Math.abs(g.y-X.getGraphY())>da){var ca=null;mxEvent.isShiftDown(X.getEvent())||(ca=this.selectionCellsHandler.getHandler(ba.cell));if(null!=ca&&null!=ca.bends&&0<ca.bends.length){ca.redrawHandles();var H=null!=k?k:ca.getHandleForEvent(m),ea=this.view.getEdgeStyle(ba),ra=ea==mxEdgeStyle.EntityRelation;da=ba.absolutePoints;u||(H=k);H!=mxEvent.LABEL_HANDLE&&null!=da&&(H=k,null==H&&(O=new mxRectangle(g.x,g.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,da[0].x,da[0].y)?
+H=0:mxUtils.contains(O,da[da.length-1].x,da[da.length-1].y)?H=ca.bends.length-1:null!=da&&(null==ea&&null==H||ea==mxEdgeStyle.SegmentConnector||ea==mxEdgeStyle.OrthConnector)&&(null!=ea&&(2==da.length||3==da.length&&(0==Math.round(da[0].x-da[1].x)&&0==Math.round(da[1].x-da[2].x)||0==Math.round(da[0].y-da[1].y)&&0==Math.round(da[1].y-da[2].y)))?H=2:(H=mxUtils.findNearestSegment(ba,g.x,g.y),H=null==ea?mxEvent.VIRTUAL_HANDLE-H:H+1))),null==H&&(H=mxEvent.VIRTUAL_HANDLE));O=H==mxEvent.LABEL_HANDLE||0==
+H||H==ca.bends.length-1;if(!ra&&(null!=ba.visibleSourceState||null!=ba.visibleTargetState)||O)ca.start(X.getGraphX(),X.getGraphX(),H),X.consume(),this.graphHandler.reset()}null!=ca&&(this.selectionCellsHandler.isHandlerActive(ca)?this.isCellSelected(ba.cell)||(this.selectionCellsHandler.handlers.put(ba.cell,ca),this.selectCellForEvent(ba.cell,X.getEvent())):this.isCellSelected(ba.cell)||ca.destroy());u=!1;g=m=p=k=null}}else if(ba=X.getState(),null!=ba&&this.isCellEditable(ba.cell)){O=this.model.getParent(ba.cell);
+ca=null;if(this.model.isEdge(ba.cell)&&!this.isCellSelected(ba.cell)&&!mxEvent.isAltDown(X.getEvent())&&!mxEvent.isShiftDown(X.getEvent())&&!this.isAncestorSelected(ba.cell)&&(this.isSwimlane(O)||this.model.isLayer(O)||this.getCurrentRoot()==O)){if(O=new mxRectangle(X.getGraphX(),X.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),da=ba.absolutePoints,null!=da)null!=ba.text&&null!=ba.text.boundingBox&&mxUtils.contains(ba.text.boundingBox,X.getGraphX(),X.getGraphY())?ca="move":mxUtils.contains(O,
+da[0].x,da[0].y)||mxUtils.contains(O,da[da.length-1].x,da[da.length-1].y)?ca="pointer":(ea=this.view.getEdgeStyle(ba),ea==mxEdgeStyle.EntityRelation||null==ba.visibleSourceState&&null==ba.visibleTargetState||(ca="crosshair",ea!=mxEdgeStyle.SegmentConnector&&ea!=mxEdgeStyle.OrthConnector))||(X=mxUtils.findNearestSegment(ba,X.getGraphX(),X.getGraphY()),X<da.length-1&&0<=X&&(ca=0==Math.round(da[X].x-da[X+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(X.getEvent())){da=mxShape.prototype.svgStrokeTolerance/
+2;O=new mxRectangle(X.getGraphX(),X.getGraphY());O.grow(da);if(this.isTableCell(ba.cell)&&this.isCellMovable(ba.cell)&&(X=this.model.getParent(ba.cell),da=this.model.getParent(X),!this.isCellSelected(da)))if(mxUtils.intersects(O,new mxRectangle(ba.x,ba.y-2,ba.width,4))&&this.model.getChildAt(da,0)!=X||mxUtils.intersects(O,new mxRectangle(ba.x,ba.y+ba.height-2,ba.width,4)))ca="row-resize";else if(mxUtils.intersects(O,new mxRectangle(ba.x-2,ba.y,4,ba.height))&&this.model.getChildAt(X,0)!=ba.cell||mxUtils.intersects(O,
+new mxRectangle(ba.x+ba.width-2,ba.y,4,ba.height)))ca="col-resize";for(X=ba;null==ca&&null!=X&&(this.isTableCell(X.cell)||this.isTableRow(X.cell)||this.isTable(X.cell));)this.isSwimlane(X.cell)&&this.isCellMovable(X.cell)&&(da=this.getActualStartSize(X.cell),H=this.view.scale,(0<da.x||0<da.width)&&mxUtils.intersects(O,new mxRectangle(X.x+(da.x-da.width-1)*H+(0==da.x?X.width*H:0),X.y,1,X.height))?ca="col-resize":(0<da.y||0<da.height)&&mxUtils.intersects(O,new mxRectangle(X.x,X.y+(da.y-da.height-1)*
+H+(0==da.y?X.height:0),X.width,1))&&(ca="row-resize")),X=this.view.getState(this.model.getParent(X.cell))}null!=ca&&ba.setCursor(ca)}}}),mouseUp:mxUtils.bind(this,function(O,X){k=g=m=p=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(O){var X=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&("0"==mxUtils.getValue(O.style,"html","0")?X=mxUtils.htmlEntities(X,!1):(O.lastLabelValue!=
+X&&(O.lastLabelValue=X,O.lastSanitizedLabelValue=Graph.sanitizeHtml(X),z.innerHTML=O.lastSanitizedLabelValue,Graph.addLightDarkColors(z,null,"simple"==O.view.graph.getAdaptiveColors())&&(O.lastSanitizedLabelValue=z.innerHTML)),X=O.lastSanitizedLabelValue));return X};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=
+!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(O,X){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=C.apply(this,arguments);if(this.graph.pageVisible){var X=[],ba=this.graph.pageFormat,da=this.graph.pageScale,ca=ba.width*da;ba=ba.height*
+da;da=this.graph.view.translate;for(var H=this.graph.view.scale,ea=this.graph.getPageLayout(),ra=0;ra<ea.width;ra++)X.push(new mxRectangle(((ea.x+ra)*ca+da.x)*H,(ea.y*ba+da.y)*H,ca*H,ba*H));for(ra=1;ra<ea.height;ra++)X.push(new mxRectangle((ea.x*ca+da.x)*H,((ea.y+ra)*ba+da.y)*H,ca*H,ba*H));O=X.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,X){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(O){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var X=E.apply(this,arguments),ba=new mxDictionary,da=[],ca=0;ca<X.length;ca++){var H=this.graph.isTableCell(O)&&this.graph.isTableCell(X[ca])&&this.graph.isCellSelected(X[ca])?this.graph.model.getParent(X[ca]):this.graph.isTableRow(O)&&this.graph.isTableRow(X[ca])&&
+this.graph.isCellSelected(X[ca])?X[ca]:this.graph.getCompositeParent(X[ca]);null==H||ba.get(H)||(ba.put(H,!0),da.push(H))}return da};var D=this.graphHandler.start;this.graphHandler.start=function(O,X,ba,da){var ca=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?ca=!0:O=this.graph.model.getParent(O));ca||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,X){X=this.graph.getCompositeParent(X);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,X,ba,da,ca,H){var ea=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var K=(new Date).getTime(),L=0,Q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;Q.apply(this,arguments);O!=this.currentState?
+(K=(new Date).getTime(),L=0):L=(new Date).getTime()-K};var N=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&N.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,
+arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var Y=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var P=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(P=this.container.style.cursor,this.container.style.cursor=
+"move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=P)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};var T=this.click;this.click=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(this.getLayerForCell(O.sourceState.cell));if(this.isEnabled()&&!X||O.isConsumed())return T.apply(this,arguments);var ba=X?O.sourceState.cell:
+O.getCell();if(null!=ba){var da=this.getClickableLinkForCell(ba);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ba):this.openLink(da):X&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),X=0;X<O.length;X++)null!=O[X].getAttribute("href")&&null==O[X].getAttribute("target")&&O[X].setAttribute("target",
+"_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(X?O.sourceState.cell:O.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return V.apply(this,arguments)};
+this.selectRegion=function(O,X){var ba=mxEvent.isAltDown(X)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,ba,null,!0);if(this.isToggleEvent(X))for(ba=0;ba<O.length;ba++)this.selectCellForEvent(O[ba],X);else this.selectCellsForEvent(O,X);return O};var Z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,X,ba){return this.graph.isCellSelected(O)?!1:Z.apply(this,arguments)};var ia=this.updateMouseEvent;this.updateMouseEvent=function(O){O=
+ia.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(X,ba,da){return O.state==X||this.isCellLocked(this.getLayerForCell(X.cell))&&null==this.getLinkForCell(X.cell)}))):O.state=null);return O};var oa=this.isCellSelectable;this.isCellSelectable=function(O){return oa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};
+this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var sa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,X){"mouseDown"==X.getProperty("eventName")&&(O=X.getProperty("event").getState(),sa=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,X){if(!mxEvent.isMultiTouchEvent(X)){O=
+X.getProperty("event");var ba=X.getProperty("cell");null==ba?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),G.start(O.x,O.y)):null!=sa?this.addSelectionCells(sa):1<this.getSelectionCount()&&this.isCellSelected(ba)&&this.removeSelectionCell(ba);sa=null;X.consume()}}));this.connectionHandler.selectCells=function(O,X){this.graph.setSelectionCell(X||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,X){var ba=O.view.graph;return X&&(ba.isCellSelected(O.cell)||
+ba.isTableRow(O.cell)&&ba.selectionCellsHandler.isHandled(ba.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};
+Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
+Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";
Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable".split(" ");Graph.edgeStyles="edgeStyle elbow jumpStyle jumpSize startArrow startFill startSize endArrow endFill endSize flowAnimation flowAnimationDirection flowAnimationTimingFunction flowAnimationDuration sourcePerimeterSpacing targetPerimeterSpacing curved".split(" ");
Graph.cellStyleGroups=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"]];
Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded shadow glass dashed dashPattern comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents opacity strokeColor strokeWidth align verticalAlign spacingLeft spacingRight spacingTop spacingBottom spacing arcSize comicStyle swimlaneFillColor shadowOffsetX shadowOffsetY shadowBlur shadowColor shadowOpacity".split(" "),Graph.textStyles),
@@ -2572,8 +2573,8 @@ Graph.createSvgNode=function(a,b,e,f,h){var d=mxUtils.createXmlDocument(),g=null
e+"px");g.setAttribute("height",f+"px");g.setAttribute("viewBox",a+" "+b+" "+e+" "+f);d.appendChild(g);return g};
Graph.htmlToPng=function(a,b,e,f,h,d){h=null!=h?h:"";d=null!=d?d:Editor.htmlRasterScale;var g=document.createElement("canvas");g.width=b*d;g.height=e*d;var m=document.createElement("img");m.onload=mxUtils.bind(this,function(){try{var k=g.getContext("2d");k.scale(d,d);k.drawImage(m,0,0);f(g.toDataURL())}catch(u){f(null)}});var p=mxUtils.createXmlDocument();p=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");a=(new mxSvgCanvas2D(p)).convertHtml(a);m.onerror=
function(k){f(null)};m.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+b+'" height="'+e+'">'+(""!=h?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+h+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+a+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(a,b,e,f){function h(z,C,E){return null!=f?f(z,C,E):mxUtils.isValidColor(E)?(null==g&&null!=b&&(g={}),null!=g&&(g[C]=z.style.getPropertyValue(C)),E=mxUtils.getLightDarkColor(E,null,null,e),z.style.setProperty(C,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),g=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){g=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),x=d[p].style.getPropertyValue(u);m=h(d[p],u,x)||m}"FONT"==d[p].nodeName&&
-""==d[p].style.getPropertyValue("color")&&(x=d[p].getAttribute("color"),m=h(d[p],"color",x)||m);null!=b&&null!=g&&d[p].setAttribute(b,JSON.stringify(g))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var h=a[f].getAttribute(b);if(null!=h){a[f].removeAttribute(b);var d=JSON.parse(h),g;for(g in d){var m=d[g];""==m?(a[f].style[g]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[g]=m;e=!0}}}catch(p){}return e};
+Graph.addLightDarkColors=function(a,b,e,f){function h(z,C,E){return null!=f?f(z,C,E):mxUtils.isValidColor(E)?(null==g&&null!=b&&(g={}),null!=g&&(g[C]=z.style.getPropertyValue(C)),E=mxUtils.getLightDarkColor(E,null,null,e),z.style.setProperty(C,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),g=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){g=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=h(d[p],u,w)||m}"FONT"==d[p].nodeName&&
+""==d[p].style.getPropertyValue("color")&&(w=d[p].getAttribute("color"),m=h(d[p],"color",w)||m);null!=b&&null!=g&&d[p].setAttribute(b,JSON.stringify(g))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var h=a[f].getAttribute(b);if(null!=h){a[f].removeAttribute(b);var d=JSON.parse(h),g;for(g in d){var m=d[g];""==m?(a[f].style[g]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[g]=m;e=!0}}}catch(p){}return e};
Graph.getGivenColor=function(a,b){var e=null;if(a.nodeType==mxConstants.NODETYPE_ELEMENT){try{var f=a.getAttribute(Graph.backupStyleAttribute);if(null!=f){var h=JSON.parse(f);null!=h&&null!=h[b]&&("color"==b&&"FONT"==a.nodeName&&""==h[b]&&null!=a.getAttribute("color")?e=a.getAttribute("color"):""!=h[b]&&(e=h[b]))}}catch(d){}null==e&&""!=a.style[b]&&(e=a.style[b])}return e};
Graph.setTextColor=function(a,b,e){for(var f=e?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,h=e?"color":"background-color",d=a.getElementsByTagName("*"),g=[],m=0;m<d.length;m++)g.push({node:d[m],value:d[m].style[h]});document.execCommand(e?"forecolor":"backcolor",!1,f);a=a.getElementsByTagName("*");for(m=0;m<a.length;m++){if(m<g.length&&g[m].node==a[m]&&g[m].value!=a[m].style[h]&&""==a[m].style[h])try{if(d=a[m].getAttribute(Graph.backupStyleAttribute),null!=d){var p=JSON.parse(d);p[h]=
"";a[m].setAttribute(Graph.backupStyleAttribute,JSON.stringify(p))}}catch(k){}if(e&&a[m].getAttribute("color")==f||a[m].style[h]==f){e&&a[m].getAttribute("color")==f&&a[m].removeAttribute("color");a[m].style[h]=b!=mxConstants.NONE?mxUtils.getLightDarkColor(b).cssText:null;try{d=a[m].getAttribute(Graph.backupStyleAttribute),p=null!=d?JSON.parse(d):{},p[h]=b!=mxConstants.NONE?b:"",a[m].setAttribute(Graph.backupStyleAttribute,JSON.stringify(p))}catch(k){}if(e&&mxClient.IS_FF){b=a[m];e=b.firstChild;if(null!=
@@ -2583,24 +2584,24 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.b
Graph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),h=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(h))return Graph.arrayBufferIndexOfString(a,b,d+1);h++}return h==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,e,f,h){h=null!=h?h:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+h+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},h)},0)};
-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,x){if(u.getModel().isVertex(x)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=x.referenceCell||x;u.getModel().beginUpdate();try{for(var E=x.referenceCell||x,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),I=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&
-!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&I.push(G[L]);I=G=I;if(null!=x.startIndex||0<pageSize&&G.length>pageSize){var T=x.startIndex||0;I=G.slice(Math.max(0,T),Math.min(G.length,T+pageSize))}I=f.getOpposites(I,D).concat(I);var K=u.cloneCells(I);for(L=0;L<I.length;L++)if(K[L].sourceCellId=I[L].id,u.model.isEdge(K[L]))for(K[L].geometry.x=0,K[L].geometry.y=0,K[L].geometry.points=null,K[L].setStyle(K[L].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[L].setTerminal(E,null==K[L].getTerminal(!0)),D=0;D<K[L].getChildCount();D++){var U=K[L].getChildAt(D);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<x.startIndex){var Y=u.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((x.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Y.referenceCell=E;Y.startIndex=Math.max(0,(x.startIndex||0)-pageSize);K.splice(0,0,Y)}if(G.length>(x.startIndex||0)+pageSize){var Q=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((x.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Q.referenceCell=
-E;Q.startIndex=(x.startIndex||0)+pageSize;K.splice(0,0,Q)}for(var P in u.getModel().cells){var M=u.getModel().getCell(P);M!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,M)&&u.getModel().isVertex(M)&&u.removeCells([M])}u.addCells(K);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));x=[];for(P in u.getModel().cells)M=u.getModel().getCell(P),M!=u.rootCell&&u.getModel().isVertex(M)&&u.getModel().getParent(M)==u.getDefaultParent()&&
-(x.push(M),V=u.getModel().getGeometry(M),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var aa=x.length,ia=2*Math.PI/aa,na=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<aa;z++)V=u.getModel().getGeometry(x[z]),null!=V&&(V=V.clone(),V.x+=na*Math.sin(z*ia),V.y+=na*Math.cos(z*ia),u.getModel().setGeometry(x[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=
+Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var E=w.referenceCell||w,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),K=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&
+!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&K.push(G[L]);K=G=K;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var Q=w.startIndex||0;K=G.slice(Math.max(0,Q),Math.min(G.length,Q+pageSize))}K=f.getOpposites(K,D).concat(K);var N=u.cloneCells(K);for(L=0;L<K.length;L++)if(N[L].sourceCellId=K[L].id,u.model.isEdge(N[L]))for(N[L].geometry.x=0,N[L].geometry.y=0,N[L].geometry.points=null,N[L].setStyle(N[L].getStyle()+
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),N[L].setTerminal(E,null==N[L].getTerminal(!0)),D=0;D<N[L].getChildCount();D++){var U=N[L].getChildAt(D);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<w.startIndex){var Y=u.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Y.referenceCell=E;Y.startIndex=Math.max(0,(w.startIndex||0)-pageSize);N.splice(0,0,Y)}if(G.length>(w.startIndex||0)+pageSize){var P=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");P.referenceCell=
+E;P.startIndex=(w.startIndex||0)+pageSize;N.splice(0,0,P)}for(var T in u.getModel().cells){var J=u.getModel().getCell(T);J!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,J)&&u.getModel().isVertex(J)&&u.removeCells([J])}u.addCells(N);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));w=[];for(T in u.getModel().cells)J=u.getModel().getCell(T),J!=u.rootCell&&u.getModel().isVertex(J)&&u.getModel().getParent(J)==u.getDefaultParent()&&
+(w.push(J),V=u.getModel().getGeometry(J),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var Z=w.length,ia=2*Math.PI/Z,oa=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Z;z++)V=u.getModel().getGeometry(w[z]),null!=V&&(V=V.clone(),V.x+=oa*Math.sin(z*ia),V.y+=oa*Math.cos(z*ia),u.getModel().setGeometry(w[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=
Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.style.width="100%";g.style.height="100%";g.style.left="0px";g.style.top="0px";g.style.zIndex=2;var m=document.createElement("img");m.setAttribute("src",Editor.closeBlackImage);m.style.position="absolute";m.style.cursor="pointer";m.style.right="10px";m.style.top="10px";g.appendChild(m);var p=document.createElement("div");p.style.position="absolute";p.style.cursor="pointer";p.style.right="38px";p.style.top="14px";p.style.textAlign="right";p.style.verticalAlign=
-"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var x=new Graph(u);x.keepEdgesInBackground=!0;x.isCellResizable=function(){return!1};x.isCellRotatable=function(){return!1};x.getCursorForCell=function(I){return this.model.isVertex(I)?"pointer":null};x.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,
-"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);x.setEnabled(!1);var C=x.click;x.click=function(I){var L=I.getCell(),T=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&x.rootCell!=L&&0<x.getEdges(T).length?d(x,L):C.apply(this,arguments)};z=x.container.scrollWidth/2;var E=x.container.scrollHeight/3;x.model.beginUpdate();var D=x.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;
-D.geometry.y=E-D.geometry.height/2;x.model.endUpdate();var G=!1;x.getModel().addListener(mxEvent.CHANGE,function(I,L){G||(I=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,x.labelsVisible=!1,G=!0,mxEffects.animateChanges(x,I,function(){var T=new mxParallelEdgeLayout(x);T.spacing=60;var K=T.layout;T.layout=function(U){T.spacing=Math.min(60,Math.max(30,60-5*U.length));K.apply(this,arguments)};T.execute(x.getDefaultParent());mxText.prototype.enableBoundingBox=!0;x.labelsVisible=!0;
-x.tooltipHandler.hide();x.refresh();G=!1}))});d(x,D)}else mxUtils.error("Browser is not supported!",200,!1)})(g)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
+"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(K){return this.model.isVertex(K)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,
+"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(K){var L=K.getCell(),Q=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&w.rootCell!=L&&0<w.getEdges(Q).length?d(w,L):C.apply(this,arguments)};z=w.container.scrollWidth/2;var E=w.container.scrollHeight/3;w.model.beginUpdate();var D=w.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;
+D.geometry.y=E-D.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(K,L){G||(K=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,K,function(){var Q=new mxParallelEdgeLayout(w);Q.spacing=60;var N=Q.layout;Q.layout=function(U){Q.spacing=Math.min(60,Math.max(30,60-5*U.length));N.apply(this,arguments)};Q.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;
+w.tooltipHandler.hide();w.refresh();G=!1}))});d(w,D)}else mxUtils.error("Browser is not supported!",200,!1)})(g)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
e.className&&a.parentNode.insertBefore(a.ownerDocument.createElement("br"),a);a.parentNode.removeChild(a)}!b&&null!=a.innerHTML&&0<=a.innerHTML.indexOf("\t")&&(f=Graph.createTabNode(4),a.innerHTML=a.innerHTML.replace(/\t/g,f.outerHTML))}a=e}};Graph.createTabNode=function(a){var b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));return a};Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};
Graph.sanitizeLink=function(a){if(null==a)return null;var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});
Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var f=decodeURIComponent(escape(atob(a.substring(26)))),h=f.indexOf("<svg");if(0<=h){e.innerHTML=Graph.sanitizeHtml(f.substring(h));var d=e.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(e);try{f=b=
1;var g=d[0].getAttribute("width"),m=d[0].getAttribute("height");g=null!=g&&"%"!=g.charAt(g.length-1)?parseFloat(g):NaN;m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN;var p=d[0].getAttribute("viewBox");h=null;if(null!=p&&!isNaN(g)&&!isNaN(m)){var k=p.split(" ");4<=p.length&&(b=parseFloat(k[2])/g,f=parseFloat(k[3])/m,h=new mxRectangle(parseFloat(k[0]),parseFloat(k[1]),parseFloat(k[2]),parseFloat(k[3])))}var u=d[0].getBBox();0<u.width&&0<u.height&&(null==h||u.width*u.height<h.width*h.height*
-.7)&&(e.getElementsByTagName("svg")[0].setAttribute("viewBox",u.x+" "+u.y+" "+u.width+" "+u.height),e.getElementsByTagName("svg")[0].setAttribute("width",u.width/b),e.getElementsByTagName("svg")[0].setAttribute("height",u.height/f))}catch(x){}finally{document.body.removeChild(e)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};
+.7)&&(e.getElementsByTagName("svg")[0].setAttribute("viewBox",u.x+" "+u.y+" "+u.width+" "+u.height),e.getElementsByTagName("svg")[0].setAttribute("width",u.width/b),e.getElementsByTagName("svg")[0].setAttribute("height",u.height/f))}catch(w){}finally{document.body.removeChild(e)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(w){}return a};
Graph.createRemoveIcon=function(a,b){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",a);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",b);return e};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};
Graph.rewritePageLinks=function(a,b){function e(h,d){var g=h.getAttribute(d);if(null!=g){Graph.isPageLink(g)&&(g="#"+g.substring(g.indexOf(":")+1));var m=d;b&&"xlink:href"==d&&(h.removeAttribute(d),m="href");h.setAttribute(m,g)}}a=a.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++)e(a[f],"href"),e(a[f],"xlink:href")};Graph.isLink=function(a){return null!=a&&a.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;
@@ -2608,8 +2609,8 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBa
Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(e,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var h=e.view.graph.tolerance,d=!0,g=null,m=mxUtils.bind(this,function(u){d=!0;g=new mxPoint(mxEvent.getClientX(u),mxEvent.getClientY(u))}),p=mxUtils.bind(this,function(u){d=d&&null!=g&&Math.abs(g.x-mxEvent.getClientX(u))<h&&Math.abs(g.y-mxEvent.getClientY(u))<h}),k=mxUtils.bind(this,function(u){if(d)for(var x=mxEvent.getSource(u);null!=
-x&&x!=f.node;){if("a"==x.nodeName.toLowerCase()){e.view.graph.labelLinkClicked(e,x,u);break}x=x.parentNode}});mxEvent.addGestureListeners(f.node,m,p,k);mxEvent.addListener(f.node,"click",function(u){mxEvent.consume(u)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(e){var f=mxEvent.getSource(e);"A"==f.nodeName&&(f=f.getAttribute("href"),null!=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(e,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var h=e.view.graph.tolerance,d=!0,g=null,m=mxUtils.bind(this,function(u){d=!0;g=new mxPoint(mxEvent.getClientX(u),mxEvent.getClientY(u))}),p=mxUtils.bind(this,function(u){d=d&&null!=g&&Math.abs(g.x-mxEvent.getClientX(u))<h&&Math.abs(g.y-mxEvent.getClientY(u))<h}),k=mxUtils.bind(this,function(u){if(d)for(var w=mxEvent.getSource(u);null!=
+w&&w!=f.node;){if("a"==w.nodeName.toLowerCase()){e.view.graph.labelLinkClicked(e,w,u);break}w=w.parentNode}});mxEvent.addGestureListeners(f.node,m,p,k);mxEvent.addListener(f.node,"click",function(u){mxEvent.consume(u)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(e){var f=mxEvent.getSource(e);"A"==f.nodeName&&(f=f.getAttribute("href"),null!=
f&&this.graph.isCustomLink(f)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&this.graph.customLinkClicked(f)&&mxEvent.consume(e))}))}}this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(g){return!this.isSpecialColor(g.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(g.style,"lineShape",null)&&(this.model.isVertex(g.cell)||"arrow"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(g.style,
mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(g){return this.isFillState(g)&&"wire"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(g){return!0};Graph.prototype.getTextColor=function(g,m){for(var p=g==this.cellEditor.textarea&&m?"default":Graph.getGivenColor(g,m?"color":
@@ -2617,15 +2618,15 @@ mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(g.style,mxConstants
return"label"==g||"rectangle"==g||"internalStorage"==g||"ext"==g||"umlLifeline"==g||"swimlane"==g||"process"==g};Graph.prototype.isRoundedState=function(g){return null!=g.shape?g.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(g){var m=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,!1)&&("connector"==m||"filledEdge"==m||"wire"==
m)};Graph.prototype.isAutoSizeState=function(g){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(g){return null!=mxUtils.getValue(g.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(g){return!0};Graph.prototype.getVerticesAndEdges=function(g,m){g=null!=g?g:!0;m=null!=m?m:!0;var p=this.model;return p.filterDescendants(function(k){return g&&p.isVertex(k)||m&&p.isEdge(k)},p.getRoot())};Graph.prototype.applyNewEdgeStyle=
function(g,m,p){g=this.getCellStyle(g).newEdgeStyle;if(null!=g){this.model.beginUpdate();try{var k=JSON.parse(g),u;for(u in k)this.setCellStyles(u,k[u],m),"edgeStyle"==u&&"elbowEdgeStyle"==k[u]&&null!=p&&this.setCellStyles("elbow",p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",m)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(g){for(var m={},p=0;p<g.length;p++){var k=this.view.getState(g[p]);null!=k&&this.mergeStyle(k.style,m,0==p)}return m};
-Graph.prototype.mergeStyle=function(g,m,p){if(null!=g){var k={},u;for(u in g){var x=g[u];null!=x&&(k[u]=!0,null==m[u]&&p?m[u]=x:m[u]!=x&&delete m[u])}for(u in m)k[u]||delete m[u]}};Graph.prototype.getStartEditingCell=function(g,m){m=this.getCellStyle(g);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g)&&(g=this.model.getChildAt(g,0),m=this.getCellStyle(g),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,
+Graph.prototype.mergeStyle=function(g,m,p){if(null!=g){var k={},u;for(u in g){var w=g[u];null!=w&&(k[u]=!0,null==m[u]&&p?m[u]=w:m[u]!=w&&delete m[u])}for(u in m)k[u]||delete m[u]}};Graph.prototype.getStartEditingCell=function(g,m){m=this.getCellStyle(g);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g)&&(g=this.model.getChildAt(g,0),m=this.getCellStyle(g),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,
0)));if(this.isTableRow(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g))for(m=0;m<this.model.getChildCount(g);m++){var p=this.model.getChildAt(g,m);if(this.isCellEditable(p)){g=p;break}}return g};Graph.prototype.copyStyle=function(g){return this.getCellStyle(g,!1)};Graph.prototype.pasteStyle=function(g,m,p,k){null!=g&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(g,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(g,m))};Graph.prototype.copyCellStyles=
-function(g,m,p,k,u,x,z){var C=!1,E=!1;if(0<g.length)for(var D=0;D<g.length&&(C=this.getModel().isVertex(g[D])||C,!(E=this.getModel().isEdge(g[D])||E)||!C);D++);else E=C=!0;C=C&&!x;E=E&&!z;for(D=0;D<m.length;D++)if(g=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(C||g)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||g)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=
-function(g){for(var m=[],p=0;p<g.length;p++)m=m.concat(this.model.getDescendants(g[p]));return m};Graph.prototype.pasteCellStyles=function(g,m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var x=0;x<g.length;x++){var z=g[x],C=this.model.getStyle(z),E=!1;null!=z.style&&(pairs=z.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var G=
-null!=C?C.split(";"):[],I=0;I<G.length;I++){var L=G[I],T=L.indexOf("=");if(0<=T){var K=L.substring(0,T),U=mxUtils.indexOf(D,K);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,K))for(var Q=0;Q<Y.length;Q++){var P=mxUtils.indexOf(D,Y[Q]);0<=P&&D.splice(P,1)}}}}var M=this.model.isEdge(z);E=M?p:m;for(I=0;I<D.length;I++){K=D[I];var V=E[K];null!=V&&("edgeStyle"!=K||u)&&(M||!M&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(C=mxUtils.setStyle(C,
-K,V),"fontFamily"==K&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),M&&"rounded"==K&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],
-!1),u=k[mxConstants.STYLE_PERIMETER],x=!1;for(C in g){var z=g[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){x=!0;var C="participant"}this.setCellStyles(C,z,[m[p]])}}x&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=
-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(g,m,p,k,u,x){this.useCssTransforms&&(g=g/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(g,m,p,k,u,x){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var z=
-this.model.getChildCount(p)-1;0<=z;z--){var C=this.model.getChildAt(p,z),E=this.getScaledCellAt(g,m,C,k,u,x);if(null!=E)return E;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(E=this.view.getState(C),null!=E&&(null==x||!x(E,g,m))&&this.intersects(E,g,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(g){return!this.isSwimlane(g.cell)&&0<this.model.getChildCount(g.cell)&&!this.isCellCollapsed(g.cell)&&"1"==mxUtils.getValue(g.style,"recursiveResize",
+function(g,m,p,k,u,w,z){var C=!1,E=!1;if(0<g.length)for(var D=0;D<g.length&&(C=this.getModel().isVertex(g[D])||C,!(E=this.getModel().isEdge(g[D])||E)||!C);D++);else E=C=!0;C=C&&!w;E=E&&!z;for(D=0;D<m.length;D++)if(g=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(C||g)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||g)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=
+function(g){for(var m=[],p=0;p<g.length;p++)m=m.concat(this.model.getDescendants(g[p]));return m};Graph.prototype.pasteCellStyles=function(g,m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<g.length;w++){var z=g[w],C=this.model.getStyle(z),E=!1;null!=z.style&&(pairs=z.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var G=
+null!=C?C.split(";"):[],K=0;K<G.length;K++){var L=G[K],Q=L.indexOf("=");if(0<=Q){var N=L.substring(0,Q),U=mxUtils.indexOf(D,N);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,N))for(var P=0;P<Y.length;P++){var T=mxUtils.indexOf(D,Y[P]);0<=T&&D.splice(T,1)}}}}var J=this.model.isEdge(z);E=J?p:m;for(K=0;K<D.length;K++){N=D[K];var V=E[N];null!=V&&("edgeStyle"!=N||u)&&(J||!J&&0>mxUtils.indexOf(Graph.edgeStyles,N))&&(C=mxUtils.setStyle(C,
+N,V),"fontFamily"==N&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),J&&"rounded"==N&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],
+!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(C in g){var z=g[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){w=!0;var C="participant"}this.setCellStyles(C,z,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=
+function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(g,m,p,k,u,w){this.useCssTransforms&&(g=g/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(g,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var z=
+this.model.getChildCount(p)-1;0<=z;z--){var C=this.model.getChildAt(p,z),E=this.getScaledCellAt(g,m,C,k,u,w);if(null!=E)return E;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(E=this.view.getState(C),null!=E&&(null==w||!w(E,g,m))&&this.intersects(E,g,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(g){return!this.isSwimlane(g.cell)&&0<this.model.getChildCount(g.cell)&&!this.isCellCollapsed(g.cell)&&"1"==mxUtils.getValue(g.style,"recursiveResize",
"1")&&null==mxUtils.getValue(g.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(g){for(var m=this.getCellGeometry(g);null!=m&&m.relative;)g=this.getModel().getParent(g),m=this.getCellGeometry(g);return g};Graph.prototype.isPart=function(g){return"1"==mxUtils.getValue(this.getCurrentCellStyle(g),"part","0")||this.isTableCell(g)||this.isTableRow(g)};Graph.prototype.getCompositeParents=function(g){for(var m=new mxDictionary,p=[],k=0;k<g.length;k++){var u=this.getCompositeParent(g[k]);
this.isTableCell(u)&&(u=this.graph.model.getParent(u));this.isTableRow(u)&&(u=this.graph.model.getParent(u));null==u||m.get(u)||(m.put(u,!0),p.push(u))}return p};Graph.prototype.getReferenceTerminal=function(g){if(null!=g){var m=this.getCellGeometry(g);null!=m&&m.relative&&(g=this.model.getParent(g))}null!=g&&this.model.isEdge(g)&&(g=this.model.getParent(g));null!=g&&(g=this.getCompositeParent(g));return g};Graph.prototype.getCompositeParent=function(g){for(;this.isPart(g);){var m=this.model.getParent(g);
if(!this.model.isVertex(m))break;g=m}return g};Graph.prototype.filterSelectionCells=function(g){var m=this.getSelectionCells();if(null!=g){for(var p=[],k=0;k<m.length;k++)g(m[k])||p.push(m[k]);m=p}return m};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(g){if(this.useCssTransforms){var m=this.currentScale,p=this.currentTranslate;g=new mxRectangle((g.x+2*p.x)*m-p.x,(g.y+2*p.y)*m-p.y,g.width*m,g.height*m)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=
@@ -2633,8 +2634,8 @@ function(g){g=this.strokeWidth;this.graph.useCssTransforms&&(g/=this.graph.curre
mxGraphView.prototype.validate=function(g){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);b.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var e=mxGraph.prototype.getCellsForGroup;
Graph.prototype.getCellsForGroup=function(g){g=e.apply(this,arguments);for(var m=[],p=0;p<g.length;p++)this.isTableRow(g[p])||this.isTableCell(g[p])||m.push(g[p]);return m};var f=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(g){g=f.apply(this,arguments);for(var m=[],p=0;p<g.length;p++)this.isTable(g[p])||this.isTableRow(g[p])||this.isTableCell(g[p])||m.push(g[p]);return m};Graph.prototype.updateCssTransform=function(){var g=this.view.getDrawPane();if(null!=g)if(g=
g.parentNode,this.useCssTransforms){var m=g.getAttribute("transform");g.setAttribute("transformOrigin","0 0");var p=Math.round(100*this.currentScale)/100;g.setAttribute("transform","scale("+p+","+p+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");m!=g.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",g.getAttribute("transform"))}else g.removeAttribute("transformOrigin"),g.removeAttribute("transform")};
-var h=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph.useCssTransforms,m=this.scale,p=this.translate;g&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);h.apply(this,arguments);g&&(this.scale=m,this.translate=p)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.useCssTransforms,u=this.view.scale,x=this.view.translate;k&&(this.view.scale=1,this.view.translate=
-new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);k&&(this.view.scale=u,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+var h=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph.useCssTransforms,m=this.scale,p=this.translate;g&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);h.apply(this,arguments);g&&(this.scale=m,this.translate=p)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.useCssTransforms,u=this.view.scale,w=this.view.translate;k&&(this.view.scale=1,this.view.translate=
+new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);k&&(this.view.scale=u,this.view.translate=w,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,e){var f=b.getAttribute("href");f!=Graph.sanitizeLink(f)&&Graph.sanitizeNode(b);if(null!=f&&!this.isCustomLink(f)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(f)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(f),a);mxEvent.consume(e)}};
Graph.prototype.openLink=function(a,b,e){var f=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var h=a.split("#")[1];window.location.hash=="#"+h&&(window.location.hash="");window.location.hash=h}else f=window.open(a,null!=b?b:"_blank",e?null:"noopener,noreferrer"),null==f||e||(f.opener=null)}catch(d){}return f};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a,b){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2663,10 +2664,10 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(I,L){I=String(I);for(L=L||2;I.length<L;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),x=a[m+"FullYear"](),z=a[m+"Hours"](),C=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),G={d:p,dd:g(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:g(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
-12],yy:String(x).slice(2),yyyy:x,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in G?G[I]:I.slice(1,
-I.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(K,L){K=String(K);for(L=L||2;K.length<L;)K="0"+K;return K};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),z=a[m+"Hours"](),C=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),G={d:p,dd:g(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:g(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
+12],yy:String(w).slice(2),yyyy:w,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(K){return K in G?G[K]:K.slice(1,
+K.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),h=f.getChildCount(f.root),d=0;d<h;d++)mxUtils.bind(this,function(g){function m(){f.isVisible(g)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(g)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(g)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);
mxEvent.addListener(k,"click",function(){f.setVisible(g,!f.isVisible(g));m();null!=a&&a(g)});m()})(f.getChildAt(f.root,d));return e};
@@ -2683,12 +2684,12 @@ this.model.isEdge(a)&&this.model.isEdge(b[d]))if(e){var g=this.model.getStyle(b[
Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};
Graph.prototype.connectVertex=function(a,b,e,f,h,d,g,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
-mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var x=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=x&&this.model.isVertex(x.cell)&&(k=x.x,z=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==x||null==G||mxUtils.intersects(x,G)||(E=d[D])}}var I=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;I&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],T=E;E=C;h=mxUtils.bind(this,function(K){if(null==g||null!=K||null==E&&p){this.model.beginUpdate();try{if(null==T&&I){var U=this.getAbsoluteParent(null!=K?K:a);U=p?a:this.getCompositeParent(U);T=null!=K?K:this.duplicateCells([U],
-!1)[0];null!=K&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(T);null!=Y&&(null!=K&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),E=null):I&&!p&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var Q=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&I||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());null!=Q&&(L.push(Q),this.applyNewEdgeStyle(a,[Q],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(Q,a));if(null==E&&null!=T&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var P=a.parent.getIndex(a);this.model.add(a.parent,T,P)}null==E&&null!=T&&L.push(T);null==T&&null!=Q&&Q.geometry.setTerminalPoint(u,!1);null!=Q&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[Q]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=T||!I||null==E&&p)return h(T);g(k+u.x*e,z+u.y*e,h)};
+mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,z=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?
+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==w||null==G||mxUtils.intersects(w,G)||(E=d[D])}}var K=
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;K&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],Q=E;E=C;h=mxUtils.bind(this,function(N){if(null==g||null!=N||null==E&&p){this.model.beginUpdate();try{if(null==Q&&K){var U=this.getAbsoluteParent(null!=N?N:a);U=p?a:this.getCompositeParent(U);Q=null!=N?N:this.duplicateCells([U],
+!1)[0];null!=N&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(Q);null!=Y&&(null!=N&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),E=null):K&&!p&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&K||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());null!=P&&(L.push(P),this.applyNewEdgeStyle(a,[P],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(P,a));if(null==E&&null!=Q&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var T=a.parent.getIndex(a);this.model.add(a.parent,Q,T)}null==E&&null!=Q&&L.push(Q);null==Q&&null!=P&&P.geometry.setTerminalPoint(u,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[P]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=Q||!K||null==E&&p)return h(Q);g(k+u.x*e,z+u.y*e,h)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,h=0;h<a.length;h++)if(f=a[h],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2700,7 +2701,7 @@ Graph.prototype.getDefaultColor=function(a,b,e){b="default"+b.charAt(0).toUpperC
Graph.prototype.setAdaptiveColors=function(a){this.adaptiveColors="default"==a?null:a;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(a=this.view.getDrawPane().ownerSVGElement,null!=a&&(a.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var f=this.layoutManager.getLayout(this.model.getParent(a));null!=f&&f.constructor==mxStackLayout&&(f.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
Graph.prototype.foldCells=function(a,b,e,f,h){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var d=0;d<e.length;d++){var g=this.view.getState(e[d]),m=this.getCellGeometry(e[d]);if(null!=g&&null!=m){var p=0,k=0;if(m.alternateBounds)p=m.width-m.alternateBounds.width,k=m.height-m.alternateBounds.height;else{var u=this.useCssTransforms?1:this.view.scale;
-p=Math.round(m.width-g.width/u);k=Math.round(m.height-g.height/u)}if(0!=k||0!=p){var x=this.model.getParent(e[d]),z=this.layoutManager.getLayout(x);null==z?null!=h&&this.isMoveCellsEvent(h,g)&&this.moveSiblings(g,x,p,k):null!=h&&mxEvent.isAltDown(h)||z.constructor!=mxStackLayout||z.resizeLast||this.resizeParentStacks(x,z,p,k)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+p=Math.round(m.width-g.width/u);k=Math.round(m.height-g.height/u)}if(0!=k||0!=p){var w=this.model.getParent(e[d]),z=this.layoutManager.getLayout(w);null==z?null!=h&&this.isMoveCellsEvent(h,g)&&this.moveSiblings(g,w,p,k):null!=h&&mxEvent.isAltDown(h)||z.constructor!=mxStackLayout||z.resizeLast||this.resizeParentStacks(w,z,p,k)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
Graph.prototype.moveSiblings=function(a,b,e,f){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<h.length;b++)if(h[b]!=a.cell){var d=this.view.getState(h[b]),g=this.getCellGeometry(h[b]);null!=d&&null!=g&&(g=g.clone(),g.translate(Math.round(e*Math.max(0,Math.min(1,(d.x-a.x)/a.width))),Math.round(f*Math.max(0,Math.min(1,(d.y-a.y)/a.height)))),this.model.setGeometry(h[b],g))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(a,b,e,f){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var h=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==h&&!b.resizeLast;){var d=this.getCellGeometry(a),g=this.view.getState(a);null!=g&&null!=d&&(d=d.clone(),b.horizontal?d.width+=e+Math.min(0,g.width/this.view.scale-d.width):d.height+=f+Math.min(0,g.height/this.view.scale-d.height),this.model.setGeometry(a,
d));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(this.getLayerForCell(a))&&(null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
@@ -2761,37 +2762,37 @@ Graph.prototype.setTableValues=function(a,b,e){for(var f=this.model.getChildCell
Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,f,h,d,g,m,p){e=null!=e?e:120;f=null!=f?f:120;g=null!=g?g:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";m=null!=m?m:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
p=null!=p?p:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";h=this.createVertex(null,null,null!=h?h:"",0,0,b*e,a*f,null!=d?d:"shape=table;childLayout=tableLayout;"+(null==h?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");d=mxUtils.getValue(this.getCellStyle(h),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);h.geometry.width+=d;h.geometry.height+=
d;g=this.createVertex(null,null,"",0,d,b*e+d,f,g);h.insert(this.createParent(g,this.createVertex(null,null,"",d,0,e,f,m),b,e,0));return 1<a?(g.geometry.y=f+d,this.createParent(h,this.createParent(g,this.createVertex(null,null,"",d,0,e,f,p),b,e,0),a-1,0,f)):h};
-Graph.prototype.visitTableCells=function(a,b){var e=null,f=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var h=0;h<f.length;h++){for(var d=this.getActualStartSize(f[h],!0),g=this.model.getChildCells(f[h],!0),m=this.getCellStyle(f[h],!0),p=null,k=[],u=0;u<g.length;u++){var x=this.getCellGeometry(g[u]),z={cell:g[u],rospan:1,colspan:1,row:h,col:u,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;z.point=new mxPoint(x.width+(null!=p?p.point.x:a.x+d.x),x.height+(null!=e&&null!=
+Graph.prototype.visitTableCells=function(a,b){var e=null,f=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var h=0;h<f.length;h++){for(var d=this.getActualStartSize(f[h],!0),g=this.model.getChildCells(f[h],!0),m=this.getCellStyle(f[h],!0),p=null,k=[],u=0;u<g.length;u++){var w=this.getCellGeometry(g[u]),z={cell:g[u],rospan:1,colspan:1,row:h,col:u,geo:w};w=null!=w.alternateBounds?w.alternateBounds:w;z.point=new mxPoint(w.width+(null!=p?p.point.x:a.x+d.x),w.height+(null!=e&&null!=
e[0]?e[0].point.y:a.y+d.y));z.actual=z;null!=e&&null!=e[u]&&1<e[u].rowspan?(z.rowspan=e[u].rowspan-1,z.colspan=e[u].colspan,z.actual=e[u].actual):null!=p&&1<p.colspan?(z.rowspan=p.rowspan,z.colspan=p.colspan-1,z.actual=p.actual):(p=this.getCurrentCellStyle(g[u],!0),null!=p&&(z.rowspan=parseInt(p.rowspan||1),z.colspan=parseInt(p.colspan||1)));p=1==mxUtils.getValue(m,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(z,g.length,
f.length,a.x+(p?d.x:0),a.y+(p?d.y:0));k.push(z);p=z}e=k}};Graph.prototype.getTableLines=function(a,b,e){var f=[],h=[];(b||e)&&this.visitTableCells(a,mxUtils.bind(this,function(d,g,m,p,k){b&&d.row<m-1&&(null==f[d.row]&&(f[d.row]=[new mxPoint(p,d.point.y)]),1<d.rowspan&&f[d.row].push(null),f[d.row].push(d.point));e&&d.col<g-1&&(null==h[d.col]&&(h[d.col]=[new mxPoint(d.point.x,k)]),1<d.colspan&&h[d.col].push(null),h[d.col].push(d.point))}));return f.concat(h)};
Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};Graph.prototype.isStack=function(a){a=this.getCellStyle(a);return null!=a&&"stackLayout"==a.childLayout};
Graph.prototype.isStackChild=function(a){return this.model.isVertex(a)&&this.isStack(this.model.getParent(a))};
Graph.prototype.setTableRowHeight=function(a,b,e){e=null!=e?e:!0;var f=this.getModel();f.beginUpdate();try{var h=this.getCellGeometry(a);if(null!=h){h=h.clone();h.height+=b;f.setGeometry(a,h);var d=f.getParent(a),g=f.getChildCells(d,!0);if(!e){var m=mxUtils.indexOf(g,a);if(m<g.length-1){var p=g[m+1],k=this.getCellGeometry(p);null!=k&&(k=k.clone(),k.y+=b,k.height-=b,f.setGeometry(p,k))}}var u=this.getCellGeometry(d);null!=u&&(e||(e=a==g[g.length-1]),e&&(u=u.clone(),u.height+=b,f.setGeometry(d,u)))}}finally{f.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var f=this.getModel(),h=f.getParent(a),d=f.getParent(h),g=f.getChildCells(h,!0);a=mxUtils.indexOf(g,a);var m=a==g.length-1;f.beginUpdate();try{for(var p=f.getChildCells(d,!0),k=0;k<p.length;k++){h=p[k];g=f.getChildCells(h,!0);var u=g[a],x=this.getCellGeometry(u);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),f.setGeometry(u,x));a<g.length-1&&(u=g[a+1],x=this.getCellGeometry(u),null!=x&&(x=x.clone(),
-x.x+=b,e||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),f.setGeometry(u,x)))}if(m||e){var z=this.getCellGeometry(d);null!=z&&(z=z.clone(),z.width+=b,f.setGeometry(d,z))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{f.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var f=this.getModel(),h=f.getParent(a),d=f.getParent(h),g=f.getChildCells(h,!0);a=mxUtils.indexOf(g,a);var m=a==g.length-1;f.beginUpdate();try{for(var p=f.getChildCells(d,!0),k=0;k<p.length;k++){h=p[k];g=f.getChildCells(h,!0);var u=g[a],w=this.getCellGeometry(u);null!=w&&(w=w.clone(),w.width+=b,null!=w.alternateBounds&&(w.alternateBounds.width+=b),f.setGeometry(u,w));a<g.length-1&&(u=g[a+1],w=this.getCellGeometry(u),null!=w&&(w=w.clone(),
+w.x+=b,e||(w.width-=b,null!=w.alternateBounds&&(w.alternateBounds.width-=b)),f.setGeometry(u,w)))}if(m||e){var z=this.getCellGeometry(d);null!=z&&(z=z.clone(),z.width+=b,f.setGeometry(d,z))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{f.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var e=0,f=0;f<a.length;f++)if(!this.isVertexIgnored(a[f])){var h=this.graph.getCellGeometry(a[f]);null!=h&&(e+=b?h.width:h.height)}return e};
TableLayout.prototype.getRowLayout=function(a,b){var e=this.graph.model.getChildCells(a,!0),f=this.graph.getActualStartSize(a,!0);a=this.getSize(e,!0);b=b-f.x-f.width;var h=[];f=f.x;for(var d=0;d<e.length;d++){var g=this.graph.getCellGeometry(e[d]);null!=g&&(f+=(null!=g.alternateBounds?g.alternateBounds.width:g.width)*b/a,h.push(Math.round(f)))}return h};
TableLayout.prototype.layoutRow=function(a,b,e,f){var h=this.graph.getModel(),d=h.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var g=a.x,m=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var p=0;p<d.length;p++){var k=this.graph.getCellGeometry(d[p]);null!=k&&(k=k.clone(),k.y=a.y,k.height=e-a.y-a.height,null!=b?(k.x=b[p],k.width=b[p+1]-k.x,p==d.length-1&&p<b.length-2&&(k.width=f-k.x-a.x-a.width)):(k.x=g,g+=k.width,p==d.length-1?k.width=f-a.x-a.width-m:m+=k.width),k.alternateBounds=new mxRectangle(0,
0,k.width,k.height),h.setGeometry(d[p],k))}return m};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),h="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var g=this.graph.getModel(),m=0;g.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=g.getChildCells(a,!0),x=0;x<u.length;x++)g.setVisible(u[x],!0);var z=this.getSize(u,!1);if(0<p&&0<k&&0<
-u.length&&0<z){if(h){var C=this.graph.getCellGeometry(u[u.length-1]);null!=C&&(C=C.clone(),C.height=p-z+C.height,g.setGeometry(u[u.length-1],C))}var E=d?null:this.getRowLayout(u[0],k),D=[],G=b.y;for(x=0;x<u.length;x++)C=this.graph.getCellGeometry(u[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=k,C.y=Math.round(G),G=h||f?G+C.height:G+C.height/z*p,C.height=Math.round(G)-C.y,g.setGeometry(u[x],C)),m=Math.max(m,this.layoutRow(u[x],E,C.height,k,D));f&&p<z&&(e=e.clone(),e.height=G+b.height,g.setGeometry(a,
-e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(I){g.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var L=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=L.width}I.actual.col==I.col&&(L=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=L.height)}}))}else for(x=0;x<u.length;x++)g.setVisible(u[x],
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),h="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var g=this.graph.getModel(),m=0;g.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=g.getChildCells(a,!0),w=0;w<u.length;w++)g.setVisible(u[w],!0);var z=this.getSize(u,!1);if(0<p&&0<k&&0<
+u.length&&0<z){if(h){var C=this.graph.getCellGeometry(u[u.length-1]);null!=C&&(C=C.clone(),C.height=p-z+C.height,g.setGeometry(u[u.length-1],C))}var E=d?null:this.getRowLayout(u[0],k),D=[],G=b.y;for(w=0;w<u.length;w++)C=this.graph.getCellGeometry(u[w]),null!=C&&(C=C.clone(),C.x=b.x,C.width=k,C.y=Math.round(G),G=h||f?G+C.height:G+C.height/z*p,C.height=Math.round(G)-C.y,g.setGeometry(u[w],C)),m=Math.max(m,this.layoutRow(u[w],E,C.height,k,D));f&&p<z&&(e=e.clone(),e.height=G+b.height,g.setGeometry(a,
+e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(K){g.setVisible(K.cell,K.actual.cell==K.cell);if(K.actual.cell!=K.cell){if(K.actual.row==K.row){var L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo;K.actual.geo.width+=L.width}K.actual.col==K.col&&(L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo,K.actual.geo.height+=L.height)}}))}else for(w=0;w<u.length;w++)g.setVisible(u[w],
!1)}finally{g.endUpdate()}}};
-(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(x,z){z=null!=z?z:!0;var C=this.getState(x);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&!C.invalid&&this.updateLineJumps(C)&&this.graph.cellRenderer.redraw(C,!1,this.isRendering());C=b.apply(this,
-arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var x=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-x)for(var z=0;z<x.length;z++)if("hidden"!=x[z].getAttribute("visibility"))return x[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(x){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;
-mxShape.prototype.createSvgCanvas=function(x){x=f.apply(this,arguments);null!=this.state&&(x.adaptiveColors=this.state.view.graph.getAdaptiveColors());return x};var h=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(x,z){return h.apply(this,arguments)||null!=x.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,x.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(x){d.apply(this,arguments);
-this.graph.model.isEdge(x.cell)&&1!=x.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(x)};mxGraphView.prototype.updateLineJumps=function(x){var z=x.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=x.routedPoints,E=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(x.style,"jumpStyle","none")){var D=function(na,qa,O){var Z=new mxPoint(qa,O);Z.type=na;E.push(Z);Z=null!=x.routedPoints?x.routedPoints[E.length-1]:null;return null==Z||Z.type!=na||Z.x!=qa||Z.y!=O},G=.5*this.scale;
-C=!1;E=[];for(var I=0;I<z.length-1;I++){for(var L=z[I+1],T=z[I],K=[],U=z[I+2];I<z.length-2&&mxUtils.ptSegDistSq(T.x,T.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,I++,U=z[I+2];C=D(0,T.x,T.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var Q=this.validEdges[Y],P=Q.absolutePoints;if(null!=P&&mxUtils.intersects(x,Q)&&"1"!=Q.style.noJump){var M=null;for(Q=0;Q<P.length-1;Q++){var V=P[Q+1],aa=P[Q];for(U=P[Q+2];Q<P.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,
-Q++,U=P[Q+2];var ia=mxUtils.intersection(T.x,T.y,L.x,L.y,aa.x,aa.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-T.x)>G||Math.abs(ia.y-T.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==M||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,M.x,M.y)>G||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,aa.x,aa.y)>G)&&(null==U||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-T.x;M=ia.y-T.y;ia={distSq:U*U+M*M,x:ia.x,y:ia.y};for(U=0;U<K.length;U++)if(K[U].distSq>ia.distSq){K.splice(U,
-0,ia);ia=null;break}null==ia||0!=K.length&&K[K.length-1].x===ia.x&&K[K.length-1].y===ia.y||K.push(ia)}M=aa}}}for(Q=0;Q<K.length;Q++)C=D(1,K[Q].x,K[Q].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}x.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(x,z,C){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)g.apply(this,
-arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,L=null,T=null,K=[],U=null;x.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var Q=this.state.routedPoints[Y],P=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==Y?P=z[0]:Y==this.state.routedPoints.length-1&&(P=z[z.length-1]);var M=!1;if(null!=
-L&&1==Q.type){var V=this.state.routedPoints[Y+1];Q=V.x/this.scale-P.x;V=V.y/this.scale-P.y;Q=Q*Q+V*V;null==U&&(U=new mxPoint(P.x-L.x,P.y-L.y),T=Math.sqrt(U.x*U.x+U.y*U.y),0<T?(U.x=U.x*D/T,U.y=U.y*D/T):U=null);Q>D*D&&0<T&&(Q=L.x-P.x,V=L.y-P.y,Q=Q*Q+V*V,Q>D*D&&(M=new mxPoint(P.x-U.x,P.y-U.y),Q=new mxPoint(P.x+U.x,P.y+U.y),K.push(M),this.addPoints(x,K,C,E,!1,null,I),K=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,I=!1,"sharp"==G?(x.lineTo(M.x-U.y*K,M.y+U.x*K),x.lineTo(Q.x-U.y*K,Q.y+
-U.x*K),x.lineTo(Q.x,Q.y)):"line"==G?(x.moveTo(M.x+U.y*K,M.y-U.x*K),x.lineTo(M.x-U.y*K,M.y+U.x*K),x.moveTo(Q.x-U.y*K,Q.y+U.x*K),x.lineTo(Q.x+U.y*K,Q.y-U.x*K),x.moveTo(Q.x,Q.y)):"arc"==G?(K*=1.3,x.curveTo(M.x-U.y*K,M.y+U.x*K,Q.x-U.y*K,Q.y+U.x*K,Q.x,Q.y)):(x.moveTo(Q.x,Q.y),I=!0),K=[Q],M=!0))}else U=null;M||(K.push(P),L=P)}this.addPoints(x,K,C,E,!1,null,I);x.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(x,z,C,E){return null!=z&&"centerPerimeter"==
-z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(x,z,C,E){if(null==z||null==x||"1"!=z.style.snapToPoint&&"1"!=x.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(x,z,E);var D=this.getNextPoint(x,C,E),G=this.graph.isOrthogonal(x),I=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),
-z.getCenterY());if(0!=I){var T=Math.cos(-I),K=Math.sin(-I);D=mxUtils.getRotatedPoint(D,T,K,L)}T=parseFloat(x.style[mxConstants.STYLE_PERIMETER_SPACING]||0);T+=parseFloat(x.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==I&&G,T);0!=I&&(T=Math.cos(I),K=Math.sin(I),D=mxUtils.getRotatedPoint(D,T,K,L));x.setAbsoluteTerminalPoint(this.snapToAnchorPoint(x,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(x,z,
-C,E,D){if(null!=z&&null!=x){x=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=x)for(var G=0;G<x.length;G++){var I=this.graph.getConnectionPoint(z,x[G]);if(null!=I){var L=(I.x-D.x)*(I.x-D.x)+(I.y-D.y)*(I.y-D.y);if(null==E||L<E)C=I,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(x,z,C){var E=k.apply(this,arguments);"1"==x.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,
-E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(x){if(null!=x.style&&"undefined"!==typeof pako){var z=mxUtils.getValue(x.style,mxConstants.STYLE_SHAPE,null);if(null!=z&&"string"===typeof z&&"stencil("==z.substring(0,8))try{var C=z.substring(8,z.length-1),E=mxUtils.parseXml(Graph.decompress(C));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();
+(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,z){z=null!=z?z:!0;var C=this.getState(w);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&!C.invalid&&this.updateLineJumps(C)&&this.graph.cellRenderer.redraw(C,!1,this.isRendering());C=b.apply(this,
+arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var w=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
+w)for(var z=0;z<w.length;z++)if("hidden"!=w[z].getAttribute("visibility"))return w[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;
+mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var h=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,z){return h.apply(this,arguments)||null!=w.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);
+this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,E=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(oa,sa,O){var X=new mxPoint(sa,O);X.type=oa;E.push(X);X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=oa||X.x!=sa||X.y!=O},G=.5*this.scale;
+C=!1;E=[];for(var K=0;K<z.length-1;K++){for(var L=z[K+1],Q=z[K],N=[],U=z[K+2];K<z.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,K++,U=z[K+2];C=D(0,Q.x,Q.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var P=this.validEdges[Y],T=P.absolutePoints;if(null!=T&&mxUtils.intersects(w,P)&&"1"!=P.style.noJump){var J=null;for(P=0;P<T.length-1;P++){var V=T[P+1],Z=T[P];for(U=T[P+2];P<T.length-2&&mxUtils.ptSegDistSq(Z.x,Z.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,P++,
+U=T[P+2];var ia=mxUtils.intersection(Q.x,Q.y,L.x,L.y,Z.x,Z.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-Q.x)>G||Math.abs(ia.y-Q.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==J||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,J.x,J.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,Z.x,Z.y)>G)&&(null==U||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-Q.x;J=ia.y-Q.y;ia={distSq:U*U+J*J,x:ia.x,y:ia.y};for(U=0;U<N.length;U++)if(N[U].distSq>ia.distSq){N.splice(U,
+0,ia);ia=null;break}null==ia||0!=N.length&&N[N.length-1].x===ia.x&&N[N.length-1].y===ia.y||N.push(ia)}J=Z}}}for(P=0;P<N.length;P++)C=D(1,N[P].x,N[P].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}w.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)g.apply(this,
+arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),K=!0,L=null,Q=null,N=[],U=null;w.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var P=this.state.routedPoints[Y],T=new mxPoint(P.x/this.scale,P.y/this.scale);0==Y?T=z[0]:Y==this.state.routedPoints.length-1&&(T=z[z.length-1]);var J=!1;if(null!=
+L&&1==P.type){var V=this.state.routedPoints[Y+1];P=V.x/this.scale-T.x;V=V.y/this.scale-T.y;P=P*P+V*V;null==U&&(U=new mxPoint(T.x-L.x,T.y-L.y),Q=Math.sqrt(U.x*U.x+U.y*U.y),0<Q?(U.x=U.x*D/Q,U.y=U.y*D/Q):U=null);P>D*D&&0<Q&&(P=L.x-T.x,V=L.y-T.y,P=P*P+V*V,P>D*D&&(J=new mxPoint(T.x-U.x,T.y-U.y),P=new mxPoint(T.x+U.x,T.y+U.y),N.push(J),this.addPoints(w,N,C,E,!1,null,K),N=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,K=!1,"sharp"==G?(w.lineTo(J.x-U.y*N,J.y+U.x*N),w.lineTo(P.x-U.y*N,P.y+
+U.x*N),w.lineTo(P.x,P.y)):"line"==G?(w.moveTo(J.x+U.y*N,J.y-U.x*N),w.lineTo(J.x-U.y*N,J.y+U.x*N),w.moveTo(P.x-U.y*N,P.y+U.x*N),w.lineTo(P.x+U.y*N,P.y-U.x*N),w.moveTo(P.x,P.y)):"arc"==G?(N*=1.3,w.curveTo(J.x-U.y*N,J.y+U.x*N,P.x-U.y*N,P.y+U.x*N,P.x,P.y)):(w.moveTo(P.x,P.y),K=!0),N=[P],J=!0))}else U=null;J||(N.push(T),L=T)}this.addPoints(w,N,C,E,!1,null,K);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,E){return null!=z&&"centerPerimeter"==
+z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,E){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(w,z,E);var D=this.getNextPoint(w,C,E),G=this.graph.isOrthogonal(w),K=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),
+z.getCenterY());if(0!=K){var Q=Math.cos(-K),N=Math.sin(-K);D=mxUtils.getRotatedPoint(D,Q,N,L)}Q=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==K&&G,Q);0!=K&&(Q=Math.cos(K),N=Math.sin(K),D=mxUtils.getRotatedPoint(D,Q,N,L));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,
+C,E,D){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=w)for(var G=0;G<w.length;G++){var K=this.graph.getConnectionPoint(z,w[G]);if(null!=K){var L=(K.x-D.x)*(K.x-D.x)+(K.y-D.y)*(K.y-D.y);if(null==E||L<E)C=K,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,
+E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var z=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=z&&"string"===typeof z&&"stencil("==z.substring(0,8))try{var C=z.substring(8,z.length-1),E=mxUtils.parseXml(Graph.decompress(C));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var h=b[f];if(!mxStencilRegistry.isFileLoaded(h))if(mxStencilRegistry.setFileLoaded(h),".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,
null);else if(".js"==h.toLowerCase().substring(h.length-3,h.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(h);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(g){null!=window.console&&console.log("error in getStencil:",a,e,b,h,g)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
@@ -2805,150 +2806,150 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(q){return!mxEvent.isAltDown(q)||mxEvent.isShiftDown(q)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(q){return e.apply(this,arguments)||this.graph.isTableRow(q)||this.graph.isTableCell(q)};var f=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
function(q){return f.apply(this,arguments)||this.graph.isEdgeIgnored(q)};var h=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(q){return this.graph.isCloneEvent(q)!=h.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var q=new mxEllipse(null,this.highlightColor,this.highlightColor,0);q.opacity=mxConstants.HIGHLIGHT_OPACITY;return q};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(q){q=this.graph.createCurrentEdgeStyle();q=this.graph.createEdge(null,null,null,null,null,q);q=new mxCellState(this.graph.view,q,this.graph.getCellStyle(q));for(var A in this.graph.currentEdgeStyle)q.style[A]=this.graph.currentEdgeStyle[A];if(null!=this.previous){var B=this.previous.style.newEdgeStyle;if(null!=B)try{var F=JSON.parse(B);for(A in F)q.style[A]=F[A]}catch(N){}}q.style=this.graph.postProcessCellStyle(q.cell,q.style);return q};
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(q){q=this.graph.createCurrentEdgeStyle();q=this.graph.createEdge(null,null,null,null,null,q);q=new mxCellState(this.graph.view,q,this.graph.getCellStyle(q));for(var A in this.graph.currentEdgeStyle)q.style[A]=this.graph.currentEdgeStyle[A];if(null!=this.previous){var B=this.previous.style.newEdgeStyle;if(null!=B)try{var F=JSON.parse(B);for(A in F)q.style[A]=F[A]}catch(M){}}q.style=this.graph.postProcessCellStyle(q.cell,q.style);return q};
var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var q=d.apply(this,arguments);q.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return q};mxConnectionHandler.prototype.updatePreview=function(q){};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var q=g.apply(this,arguments),A=q.getCell;q.getCell=mxUtils.bind(this,function(B){var F=A.apply(this,arguments);this.error=null;return F});
return q};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var q="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",A="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),B=0;B<A.length;B++)null!=
this.currentEdgeStyle[A[B]]&&(q+=A[B]+"="+this.currentEdgeStyle[A[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?q+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(q+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?q+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(q+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(q+="elbow="+this.currentEdgeStyle.elbow+";");return q=null!=this.currentEdgeStyle.html?q+("html="+this.currentEdgeStyle.html+";"):q+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var q=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-q&&(new mxCodec(q.ownerDocument)).decode(q,this.getStylesheet())};Graph.prototype.createCellLookup=function(q,A){A=null!=A?A:{};for(var B=0;B<q.length;B++){var F=q[B];A[mxObjectIdentity.get(F)]=F.getId();for(var N=this.model.getChildCount(F),R=0;R<N;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(q,A,B){B=null!=B?B:{};for(var F in q){var N=A[F];null==B[N]&&(B[N]=q[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(q,A,
-B,F){A=null!=A?A:0;B=null!=B?B:0;var N=new mxCodec(q.ownerDocument),R=new mxGraphModel;N.decode(q,R);q=[];N={};var X={},fa=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),N));if(null!=fa){var da=this.createCellLookup([R.root]);fa=fa.slice();this.model.beginUpdate();try{if(1!=fa.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<fa.length;R++)ha=this.model.getChildren(this.moveCells([fa[R]],A,B,!1,this.model.getRoot())[0]),null!=ha&&(q=q.concat(ha));else{var ha=R.getChildren(fa[0]);
-null!=ha&&(q=this.moveCells(ha,A,B,!1,this.getDefaultParent()),X[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(N,da,X),this.updateCustomLinks(X,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(q,!0);null!=va&&this.moveCells(q,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,N=0;N<q.length;N++)F.put(q[N],
-!0);var R=new mxCodec,X=new mxGraphModel,fa=X.getChildAt(X.getRoot(),0);for(N=0;N<B.length;N++){X.add(fa,B[N]);var da=this.view.getState(q[N]);if(null!=da){var ha=this.getCellGeometry(B[N]);null!=ha&&ha.relative&&!this.model.isEdge(q[N])&&null==F.get(this.model.getParent(q[N]))&&(ha.offset=null,ha.relative=!1,ha.x=da.x/da.view.scale-da.view.translate.x,ha.y=da.y/da.view.scale-da.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(X)};Graph.prototype.isSwimlane=
+q&&(new mxCodec(q.ownerDocument)).decode(q,this.getStylesheet())};Graph.prototype.createCellLookup=function(q,A){A=null!=A?A:{};for(var B=0;B<q.length;B++){var F=q[B];A[mxObjectIdentity.get(F)]=F.getId();for(var M=this.model.getChildCount(F),R=0;R<M;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(q,A,B){B=null!=B?B:{};for(var F in q){var M=A[F];null==B[M]&&(B[M]=q[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(q,A,
+B,F){A=null!=A?A:0;B=null!=B?B:0;var M=new mxCodec(q.ownerDocument),R=new mxGraphModel;M.decode(q,R);q=[];M={};var W={},ha=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),M));if(null!=ha){var fa=this.createCellLookup([R.root]);ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ha.length;R++)ja=this.model.getChildren(this.moveCells([ha[R]],A,B,!1,this.model.getRoot())[0]),null!=ja&&(q=q.concat(ja));else{var ja=R.getChildren(ha[0]);
+null!=ja&&(q=this.moveCells(ja,A,B,!1,this.getDefaultParent()),W[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(M,fa,W),this.updateCustomLinks(W,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(q,!0);null!=va&&this.moveCells(q,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,M=0;M<q.length;M++)F.put(q[M],
+!0);var R=new mxCodec,W=new mxGraphModel,ha=W.getChildAt(W.getRoot(),0);for(M=0;M<B.length;M++){W.add(ha,B[M]);var fa=this.view.getState(q[M]);if(null!=fa){var ja=this.getCellGeometry(B[M]);null!=ja&&ja.relative&&!this.model.isEdge(q[M])&&null==F.get(this.model.getParent(q[M]))&&(ja.offset=null,ja.relative=!1,ja.x=fa.x/fa.view.scale-fa.view.translate.x,ja.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(W)};Graph.prototype.isSwimlane=
function(q,A){var B=null;null==q||this.model.isEdge(q)||this.model.getParent(q)==this.model.getRoot()||(B=this.getCurrentCellStyle(q,A)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==B};var m=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(q){return null!=q&&m.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellEditable(this.model.getParent(q)):!0:!1};var p=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=
-function(q){return null!=q&&p.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellMovable(this.model.getParent(q)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(q){var A=this.model.getParent(q);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(q,A,B,F,N,R,X,fa){null==fa&&(fa=this.model.getParent(q),
-this.isTable(fa)||this.isTableRow(fa))&&(fa=this.getCellAt(R,X,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[q,A,B,F,N,R,X,fa]);this.model.setValue(B,"");var da=this.getChildCells(B,!0);for(A=0;A<da.length;A++){var ha=this.getCellGeometry(da[A]);null!=ha&&ha.relative&&0<ha.x&&this.model.remove(da[A])}var va=this.getChildCells(q,!0);for(A=0;A<va.length;A++)ha=this.getCellGeometry(va[A]),null!=ha&&ha.relative&&0>=ha.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
-if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var x=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)x.apply(this,arguments);else{var F=this.getSelectionCell(),N=null,R=[],X=mxUtils.bind(this,
-function(fa){if(null!=this.view.getState(fa)&&(this.model.isVertex(fa)||this.model.isEdge(fa)))if(R.push(fa),fa==F)N=R.length-1;else if(q&&null==F&&0<R.length||null!=N&&q&&R.length>N||!q&&0<N)return;for(var da=0;da<this.model.getChildCount(fa);da++)X(this.model.getChildAt(fa,da))});X(this.model.root);0<R.length&&(N=null!=N?mxUtils.mod(N+(q?1:-1),R.length):0,this.setSelectionCell(R[N]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,
-A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);if(null!=B&&null!=F){var N=B.clone(),R=F.clone();this.model.beginUpdate();try{N.x=F.getCenterX()-B.width/2,N.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,N),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,N,R,X){X=null!=X?X:{};if(this.isTable(N)){for(var fa=[],da=0;da<q.length;da++)this.isTable(q[da])?
-fa=fa.concat(this.model.getChildCells(q[da],!0).reverse()):fa.push(q[da]);q=fa}this.model.beginUpdate();try{fa=[];for(da=0;da<q.length;da++)if(null!=N&&this.isTableRow(q[da])){var ha=this.model.getParent(q[da]),va=this.getCellGeometry(q[da]);this.isTable(ha)&&fa.push(ha);if(null!=ha&&null!=va&&this.isTable(ha)&&this.isTable(N)&&(F||ha!=N)){if(!F){var Ma=this.getCellGeometry(ha);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ha,Ma))}Ma=this.getCellGeometry(N);null!=Ma&&(Ma=Ma.clone(),
-Ma.height+=va.height,this.model.setGeometry(N,Ma));var Na=this.model.getChildCells(N,!0);if(0<Na.length){q[da]=F?this.cloneCell(q[da]):q[da];var ya=this.model.getChildCells(q[da],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-ya.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Va=this.cloneCell(ya[ya.length-1]);null!=Va&&(Va.value="",this.model.add(q[da],Va))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(ya[ya.length+ua-1]);ya=this.model.getChildCells(q[da],!0);for(ua=0;ua<Ga.length;ua++){var Qa=
-this.getCellGeometry(Ga[ua]),Ka=this.getCellGeometry(ya[ua]);null!=Qa&&null!=Ka&&(Ka=Ka.clone(),Ka.width=Qa.width,this.model.setGeometry(ya[ua],Ka))}}}}var Ua=z.apply(this,arguments);for(da=0;da<fa.length;da++)!F&&this.model.contains(fa[da])&&0==this.model.getChildCount(fa[da])&&this.model.remove(fa[da]);F&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(q)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,
-A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var N=this.model.getParent(q[F]),R=this.model.getParent(N);1==this.model.getChildCount(N)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var X=this.model.getChildCells(R,!0),fa=0,da=0;da<X.length;da++)0<=mxUtils.indexOf(q,
-X[da])&&fa++;fa==X.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
-function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var N=q.shape.scale;B=A.width/N;A=A.height/N;if(F==mxConstants.DIRECTION_NORTH||
+function(q){return null!=q&&p.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellMovable(this.model.getParent(q)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(q){var A=this.model.getParent(q);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(q,A,B,F,M,R,W,ha){null==ha&&(ha=this.model.getParent(q),
+this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(R,W,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[q,A,B,F,M,R,W,ha]);this.model.setValue(B,"");var fa=this.getChildCells(B,!0);for(A=0;A<fa.length;A++){var ja=this.getCellGeometry(fa[A]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(fa[A])}var va=this.getChildCells(q,!0);for(A=0;A<va.length;A++)ja=this.getCellGeometry(va[A]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
+if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),M=null,R=[],W=mxUtils.bind(this,
+function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(R.push(ha),ha==F)M=R.length-1;else if(q&&null==F&&0<R.length||null!=M&&q&&R.length>M||!q&&0<M)return;for(var fa=0;fa<this.model.getChildCount(ha);fa++)W(this.model.getChildAt(ha,fa))});W(this.model.root);0<R.length&&(M=null!=M?mxUtils.mod(M+(q?1:-1),R.length):0,this.setSelectionCell(R[M]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,
+A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);if(null!=B&&null!=F){var M=B.clone(),R=F.clone();this.model.beginUpdate();try{M.x=F.getCenterX()-B.width/2,M.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,M),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,M,R,W){W=null!=W?W:{};if(this.isTable(M)){for(var ha=[],fa=0;fa<q.length;fa++)this.isTable(q[fa])?
+ha=ha.concat(this.model.getChildCells(q[fa],!0).reverse()):ha.push(q[fa]);q=ha}this.model.beginUpdate();try{ha=[];for(fa=0;fa<q.length;fa++)if(null!=M&&this.isTableRow(q[fa])){var ja=this.model.getParent(q[fa]),va=this.getCellGeometry(q[fa]);this.isTable(ja)&&ha.push(ja);if(null!=ja&&null!=va&&this.isTable(ja)&&this.isTable(M)&&(F||ja!=M)){if(!F){var Ma=this.getCellGeometry(ja);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ja,Ma))}Ma=this.getCellGeometry(M);null!=Ma&&(Ma=Ma.clone(),
+Ma.height+=va.height,this.model.setGeometry(M,Ma));var Na=this.model.getChildCells(M,!0);if(0<Na.length){q[fa]=F?this.cloneCell(q[fa]):q[fa];var ya=this.model.getChildCells(q[fa],!0),Ha=this.model.getChildCells(Na[0],!0),wa=Ha.length-ya.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Va=this.cloneCell(ya[ya.length-1]);null!=Va&&(Va.value="",this.model.add(q[fa],Va))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(ya[ya.length+ua-1]);ya=this.model.getChildCells(q[fa],!0);for(ua=0;ua<Ha.length;ua++){var Qa=
+this.getCellGeometry(Ha[ua]),Ka=this.getCellGeometry(ya[ua]);null!=Qa&&null!=Ka&&(Ka=Ka.clone(),Ka.width=Qa.width,this.model.setGeometry(ya[ua],Ka))}}}}var Ua=z.apply(this,arguments);for(fa=0;fa<ha.length;fa++)!F&&this.model.contains(ha[fa])&&0==this.model.getChildCount(ha[fa])&&this.model.remove(ha[fa]);F&&this.updateCustomLinks(this.createCellMapping(W,this.createCellLookup(q)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,
+A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var M=this.model.getParent(q[F]),R=this.model.getParent(M);1==this.model.getChildCount(M)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var W=this.model.getChildCells(R,!0),ha=0,fa=0;fa<W.length;fa++)0<=mxUtils.indexOf(q,
+W[fa])&&ha++;ha==W.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
+function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var M=q.shape.scale;B=A.width/M;A=A.height/M;if(F==mxConstants.DIRECTION_NORTH||
F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=q.shape.getConstraints(q.style,B,A);if(null!=A)return A;if(null!=q.shape.stencil&&null!=q.shape.stencil.constraints)return q.shape.stencil.constraints;if(null!=q.shape.constraints)return q.shape.constraints}}return null};Graph.prototype.flipEdge=function(q){if(null!=q){var A=this.getCurrentCellStyle(q);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=this.model.getChildCount(q),B=0,F=0;F<A;F++){var N=this.model.getChildAt(q,F);this.model.isVertex(N)&&(N=this.getCellGeometry(N),null==N||N.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),N=!0,R=!0,X=0;X<A.length&&R;X++)N=N&&this.isTable(A[X]),R=R&&this.isTableRow(A[X]);return!this.isCellLocked(q)&&(this.isTargetShape(q,
-A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||N))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
+this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=this.model.getChildCount(q),B=0,F=0;F<A;F++){var M=this.model.getChildAt(q,F);this.model.isVertex(M)&&(M=this.getCellGeometry(M),null==M||M.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),M=!0,R=!0,W=0;W<A.length&&R;W++)M=M&&this.isTable(A[W]),R=R&&this.isTableRow(A[W]);return!this.isCellLocked(q)&&(this.isTargetShape(q,
+A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||M))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
q&&null!=this.layoutManager){var B=this.model.getParent(q);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(q,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(q,A){var B=this.getModel(),F=[];B.beginUpdate();
-try{for(var N=0;N<q.length;N++){var R=q[N];if(B.isEdge(R)){var X=B.getTerminal(R,!0),fa=B.getTerminal(R,!1);B.setTerminal(R,fa,!0);B.setTerminal(R,X,!1);var da=B.getGeometry(R);if(null!=da){da=da.clone();null!=da.points&&da.points.reverse();var ha=da.getTerminalPoint(!0),va=da.getTerminalPoint(!1);da.setTerminalPoint(ha,!1);da.setTerminalPoint(va,!0);B.setGeometry(R,da);var Ma=this.view.getState(R),Na=this.view.getState(X),ya=this.view.getState(fa);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,
-Na,!0):null,wa=null!=ya?this.getConnectionConstraint(Ma,ya,!1):null;this.setConnectionConstraint(R,X,!0,wa);this.setConnectionConstraint(R,fa,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(da=this.getCellGeometry(R),null!=
-da)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Va=da.width;da.width=da.height;da.height=Va;B.setGeometry(R,da)}var Qa=this.view.getState(R);if(null!=Qa){var Ka=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
+try{for(var M=0;M<q.length;M++){var R=q[M];if(B.isEdge(R)){var W=B.getTerminal(R,!0),ha=B.getTerminal(R,!1);B.setTerminal(R,ha,!0);B.setTerminal(R,W,!1);var fa=B.getGeometry(R);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ja=fa.getTerminalPoint(!0),va=fa.getTerminalPoint(!1);fa.setTerminalPoint(ja,!1);fa.setTerminalPoint(va,!0);B.setGeometry(R,fa);var Ma=this.view.getState(R),Na=this.view.getState(W),ya=this.view.getState(ha);if(null!=Ma){var Ha=null!=Na?this.getConnectionConstraint(Ma,
+Na,!0):null,wa=null!=ya?this.getConnectionConstraint(Ma,ya,!1):null;this.setConnectionConstraint(R,W,!0,wa);this.setConnectionConstraint(R,ha,!1,Ha);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(fa=this.getCellGeometry(R),null!=
+fa)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Va=fa.width;fa.width=fa.height;fa.height=Va;B.setGeometry(R,fa)}var Qa=this.view.getState(R);if(null!=Qa){var Ka=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
Ka[mxUtils.mod(mxUtils.indexOf(Ka,Ua)+(A?-1:1),Ka.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var E=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=
q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var A=q.cell;this.isTableCell(A)&&(A=this.model.getParent(A));this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}E.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=
this.model.getDescendants(q);if(0<q.length)for(var A=0;A<q.length;A++){var B=this.view.getState(q[A]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(q[A]):this.isReplacePlaceholders(q[A])&&this.view.invalidate(q[A],!1,!1)}};Graph.prototype.replaceElement=function(q,A){A=q.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(q.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=
-q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),N=0;N<q.length;N++){var R=this.getCurrentCellStyle(q[N]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[N]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var X=F.getElementsByTagName(null!=
-B?B:"*"),fa=0;fa<X.length;fa++)A(X[fa]);F.innerHTML!=R&&this.cellLabelChanged(q[N],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),N=q;null!=N;){if(N==this.model.getRoot()||null!=N.value&&"object"==typeof N.value&&N.hasAttribute(F)){this.setAttributeForCell(N,F,A);break}N=this.model.getParent(N)}var R=
-q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var N=this.model.getParent(q[B]);null==N||A.get(N)||(A.put(N,!0),
-F.push(N))}for(B=0;B<F.length;B++)if(N=this.view.getState(F[B]),null!=N&&(this.model.isEdge(N.cell)||this.model.isVertex(N.cell))&&this.isCellDeletable(N.cell)&&this.isTransparentState(N)){for(var R=!0,X=0;X<this.model.getChildCount(N.cell)&&R;X++)A.get(this.model.getChildAt(N.cell,X))||(R=!1);R&&q.push(N.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&
+q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),M=0;M<q.length;M++){var R=this.getCurrentCellStyle(q[M]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[M]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var W=F.getElementsByTagName(null!=
+B?B:"*"),ha=0;ha<W.length;ha++)A(W[ha]);F.innerHTML!=R&&this.cellLabelChanged(q[M],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),M=q;null!=M;){if(M==this.model.getRoot()||null!=M.value&&"object"==typeof M.value&&M.hasAttribute(F)){this.setAttributeForCell(M,F,A);break}M=this.model.getParent(M)}var R=
+q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var M=this.model.getParent(q[B]);null==M||A.get(M)||(A.put(M,!0),
+F.push(M))}for(B=0;B<F.length;B++)if(M=this.view.getState(F[B]),null!=M&&(this.model.isEdge(M.cell)||this.model.isVertex(M.cell))&&this.isCellDeletable(M.cell)&&this.isTransparentState(M)){for(var R=!0,W=0;W<this.model.getChildCount(M.cell)&&R;W++)A.get(this.model.getChildAt(M.cell,W))||(R=!1);R&&q.push(M.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&
A.push(q[B]);q=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(q,A){this.setAttributeForCell(q,"link",A)};Graph.prototype.setTooltipForCell=function(q,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,B,A)};Graph.prototype.getAttributeForCell=function(q,A,B){q=null!=q.value&&
"object"===typeof q.value?q.value.getAttribute(A):null;return null!=q?q:B};Graph.prototype.setAttributeForCell=function(q,A,B){if(null!=q.value&&"object"==typeof q.value)var F=q.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",q.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(q,F)};Graph.prototype.isTargetShape=function(q,A,B){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(B=0;B<
-A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var N=0;N<q.length;N++){var R=this.model.getParent(q[N]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=D.apply(this,arguments);var X=!0;for(N=0;N<q.length&&X;N++)X=X&&this.isTableRow(q[N]);X&&(this.isTableCell(R)&&(R=
+A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var M=0;M<q.length;M++){var R=this.model.getParent(q[M]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=D.apply(this,arguments);var W=!0;for(M=0;M<q.length&&W;M++)W=W&&this.isTableRow(q[M]);W&&(this.isTableCell(R)&&(R=
this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,A){this.isEnabled()&&(A=this.insertTextForEvent(q,A),mxGraph.prototype.dblClick.call(this,q,A))};Graph.prototype.insertTextForEvent=function(q,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));
-if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,N=mxEvent.getSource(q);this.firstClickState!=F||this.firstClickSource!=N||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&N==this.view.getCanvas().ownerSVGElement)||
-(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),N=this.getPageSize();A=Math.max(A,F.x*N.width);B=Math.max(B,F.y*N.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=
+if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,M=mxEvent.getSource(q);this.firstClickState!=F||this.firstClickSource!=M||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&M==this.view.getCanvas().ownerSVGElement)||
+(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),M=this.getPageSize();A=Math.max(A,F.x*M.width);B=Math.max(B,F.y*M.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=
function(){var q=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/q.scale-q.translate.x+(0==A.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(F,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-
this.view.translate.x-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,A){q=null!=q?q:"";null!=
-A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var N=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*N.x)/1E4;F.geometry.y=Math.round(N.y);
-F.geometry.offset=new mxPoint(0,0);N=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-N.x)/R),Math.round((A-N.y)/R))}else N=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-N.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-N.y-(null!=B?B.origin.y:0),F.style+=
-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var da=this.container.getElementsByTagName("a");if(null!=da)for(var ha=0;ha<da.length;ha++){var va=this.getAbsoluteUrl(da[ha].getAttribute("href"));null!=va&&(da[ha].setAttribute("rel",this.linkRelation),
-da[ha].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(da[ha],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var N=this.container.style.cursor,R=this.getTolerance(),X=this,fa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(X,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(da){var ha=da.sourceState;if(null==ha||null==X.getLinkForCell(ha.cell))da=X.getCellAt(da.getGraphX(),
-da.getGraphY(),null,null,null,function(va,Ma,Na){return null==X.getLinkForCell(va.cell)}),ha=null==ha||X.model.isAncestor(da,ha.cell)?X.view.getState(da):null;ha!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ha,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ha){this.startX=ha.getGraphX();this.startY=ha.getGraphY();this.scrollLeft=X.container.scrollLeft;this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&
-(X.container.style.cursor="move");this.updateCurrentState(ha)},mouseMove:function(da,ha){if(X.isMouseDown)null!=this.currentLink&&(da=Math.abs(this.startX-ha.getGraphX()),ha=Math.abs(this.startY-ha.getGraphY()),(da>R||ha>R)&&this.clear());else{for(da=ha.getSource();null!=da&&"a"!=da.nodeName.toLowerCase();)da=da.parentNode;null!=da?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&X.tooltipHandler.reset(ha,!0,this.currentState),(null==this.currentState||ha.getState()!=
-this.currentState&&null!=ha.sourceState||!X.intersects(this.currentState,ha.getGraphX(),ha.getGraphY()))&&this.updateCurrentState(ha))}},mouseUp:function(da,ha){var va=ha.getSource();for(da=ha.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-X.container.scrollLeft)<R&&Math.abs(this.scrollTop-X.container.scrollTop)<R&&(null==ha.sourceState||!ha.isSource(ha.sourceState.control))&&((mxEvent.isLeftMouseButton(da)||mxEvent.isMiddleMouseButton(da))&&
-!mxEvent.isPopupTrigger(da)||mxEvent.isTouchEvent(da))&&(null!=this.currentLink?(va=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(da,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(da)||(da=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(da)?"_blank":va?X.linkTarget:"_top",X.openLink(this.currentLink,da),ha.consume())):null!=B&&!ha.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)<
-R&&Math.abs(this.scrollTop-X.container.scrollTop)<R&&Math.abs(this.startX-ha.getGraphX())<R&&Math.abs(this.startY-ha.getGraphY())<R&&B(ha.getEvent()));this.clear()},activate:function(da){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(da.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(da.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(da))},clear:function(){null!=X.container&&(X.container.style.cursor=N);this.currentLink=this.currentState=
-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(da){};X.addMouseListener(fa);mxEvent.addListener(document,"mouseleave",function(da){fa.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),N=this.gridSize,R=[];F.beginUpdate();
-try{var X={},fa=this.createCellLookup(q),da=this.cloneCells(q,!1,X,!0);for(B=0;B<q.length;B++){var ha=F.getParent(q[B]);if(null!=ha){var va=this.moveCells([da[B]],N,N,!1)[0];R.push(va);if(A)F.add(ha,da[B]);else{var Ma=ha.getIndex(q[B]);F.add(ha,da[B],Ma+1)}if(this.isTable(ha)){var Na=this.getCellGeometry(da[B]),ya=this.getCellGeometry(ha);null!=Na&&null!=ya&&(ya=ya.clone(),ya.height+=Na.height,F.setGeometry(ha,ya))}}else R.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,fa),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
-"cells",da))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),N=[],R=0;R<F.length;R++)N.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==N.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=N[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=
+A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var M=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*M.x)/1E4;F.geometry.y=Math.round(M.y);
+F.geometry.offset=new mxPoint(0,0);M=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-M.x)/R),Math.round((A-M.y)/R))}else M=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-M.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-M.y-(null!=B?B.origin.y:0),F.style+=
+"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ja=0;ja<fa.length;ja++){var va=this.getAbsoluteUrl(fa[ja].getAttribute("href"));null!=va&&(fa[ja].setAttribute("rel",this.linkRelation),
+fa[ja].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(fa[ja],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var M=this.container.style.cursor,R=this.getTolerance(),W=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(W,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ja=fa.sourceState;if(null==ja||null==W.getLinkForCell(ja.cell))fa=W.getCellAt(fa.getGraphX(),
+fa.getGraphY(),null,null,null,function(va,Ma,Na){return null==W.getLinkForCell(va.cell)}),ja=null==ja||W.model.isAncestor(fa,ja.cell)?W.view.getState(fa):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=W.container.scrollLeft;this.scrollTop=W.container.scrollTop;null==this.currentLink&&"auto"==W.container.style.overflow&&
+(W.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(fa,ja){if(W.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(fa>R||ja>R)&&this.clear());else{for(fa=ja.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&W.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=
+this.currentState&&null!=ja.sourceState||!W.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(fa,ja){var va=ja.getSource();for(fa=ja.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-W.container.scrollLeft)<R&&Math.abs(this.scrollTop-W.container.scrollTop)<R&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&&((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&
+!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(va=W.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(fa,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":va?W.linkTarget:"_top",W.openLink(this.currentLink,fa),ja.consume())):null!=B&&!ja.isConsumed()&&Math.abs(this.scrollLeft-W.container.scrollLeft)<
+R&&Math.abs(this.scrollTop-W.container.scrollTop)<R&&Math.abs(this.startX-ja.getGraphX())<R&&Math.abs(this.startY-ja.getGraphY())<R&&B(ja.getEvent()));this.clear()},activate:function(fa){this.currentLink=W.getAbsoluteUrl(W.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=W.getLinkTargetForCell(fa.cell),W.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=W.container&&(W.container.style.cursor=M);this.currentLink=this.currentState=
+this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=W.tooltipHandler&&W.tooltipHandler.hide()}};W.click=function(fa){};W.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(fa){ha.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),M=this.gridSize,R=[];F.beginUpdate();
+try{var W={},ha=this.createCellLookup(q),fa=this.cloneCells(q,!1,W,!0);for(B=0;B<q.length;B++){var ja=F.getParent(q[B]);if(null!=ja){var va=this.moveCells([fa[B]],M,M,!1)[0];R.push(va);if(A)F.add(ja,fa[B]);else{var Ma=ja.getIndex(q[B]);F.add(ja,fa[B],Ma+1)}if(this.isTable(ja)){var Na=this.getCellGeometry(fa[B]),ya=this.getCellGeometry(ja);null!=Na&&null!=ya&&(ya=ya.clone(),ya.height+=Na.height,F.setGeometry(ja,ya))}}else R.push(fa[B])}this.updateCustomLinks(this.createCellMapping(W,ha),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+"cells",fa))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),M=[],R=0;R<F.length;R++)M.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==M.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=M[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=
this.cellEditor.textarea)if(0==q.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(q));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);
-B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],N=
-null,R=null,X=0,fa=0;fa<A.length;fa++)if(this.getModel().isVertex(A[fa])){var da=this.view.getState(A[fa]);if(null!=da){var ha=q?da.getCenterX():da.getCenterY();N=null!=N?Math.max(N,ha):ha;R=null!=R?Math.min(R,ha):ha;B&&(X+=q?da.width:da.height);F.push(da)}}if(2<F.length){F.sort(function(Ga,wa){return q?Ga.x-wa.x:Ga.y-wa.y});B&&(X-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);da=this.view.translate;ha=this.view.scale;R=R/ha-(q?da.x:da.y);N=N/ha-(q?da.x:da.y);this.getModel().beginUpdate();
-try{var va=(N-R-X)/(F.length-1),Ma=R+(B?q?F[0].width/2:F[0].height/2:0);for(fa=1;fa<F.length-1;fa++){var Na=this.view.getState(this.model.getParent(F[fa].cell)),ya=this.getCellGeometry(F[fa].cell);Ma+=va;null!=ya&&null!=Na&&(ya=ya.clone(),q?ya.x=Math.round(Ma-(B?0:ya.width/2))-Na.origin.x:ya.y=Math.round(Ma-(B?0:ya.height/2))-Na.origin.y,this.getModel().setGeometry(F[fa].cell,ya));B&&(Ma+=q?F[fa].width:F[fa].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&
-mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=function(q){q=new mxImageExport;q.addCellData=function(B,F,N){F.setAttribute("data-cell-id",B.id);if(N)if(mxUtils.isNode(B.value))for(N=0;N<B.value.attributes.length;N++){var R=B.value.attributes[N];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;
-q.visitStatesRecursive=function(B,F,N){if(null!=B){var R=F.root,X=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=X.createElementNS?X.createElementNS(mxConstants.NS_SVG,"g"):X.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
-return q};Graph.prototype.parseBackgroundImage=function(q){var A=null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,N,R,X,fa,da,ha,va,Ma,Na,ya,Ga,wa){var ua=null;if(null!=ya)for(ua=new mxDictionary,va=0;va<ya.length;va++)ua.put(ya[va],!0);ya=this.useCssTransforms;var Va=this.enableFlowAnimation;this.enableFlowAnimation=!1;ya&&(this.useCssTransforms=!1,this.view.revalidate(),
-this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;N=null!=N?N:!0;R=null!=R?R:!0;X=null!=X?X:!0;ha=null!=ha?ha:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.backgroundImage,Ua=this.view.translate,Wa=this.view.scale;"diagram"==Na&&null!=Ka&&null!=Ka.width&&null!=Ka.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+Ka.x)*Wa,(Ua.y+Ka.y)*Wa,Ka.width*Wa,Ka.height*
-Wa)));if(null==Qa)throw Error(mxResources.get("drawingEmpty"));F=A/Wa;var mb=Math.max(1,Math.ceil(Qa.width*F)+2*B)+(ha&&0==B?5:0),ub=Math.max(1,Math.ceil(Qa.height*F)+2*B)+(ha&&0==B?5:0);ha=N?-.5:0;var vb=mxUtils.getLightDarkColor(q),jb=Graph.createSvgNode(ha,ha,mb,ub,vb),nb=jb.ownerDocument;if(null!=q){var db=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"rect");db.setAttribute("fill",vb.light);db.style.fill=vb.cssText;db.setAttribute("width","100%");db.setAttribute("height","100%");db.setAttribute("x",
-"0");db.setAttribute("y","0");jb.appendChild(db)}var qb=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"g");jb.appendChild(qb);var bb=this.createSvgCanvas(qb);bb.foOffset=N?-.5:0;bb.textOffset=N?-.5:0;bb.imageOffset=N?-.5:0;bb.translate(Math.floor(B/A-Qa.x/Wa),Math.floor(B/A-Qa.y/Wa));bb.idPrefix="drawio-svg-"+Editor.guid();var wb=document.createElement("div"),rb=bb.getAlternateText;bb.getAlternateText=function(Sa,sb,$a,kb,ob,Za,xb,c,l,t,n,r,v){if(null!=Za&&0<this.state.fontSize)try{mxUtils.isNode(Za)?
-Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var w=Math.ceil(2*kb/this.state.fontSize),J=[],y=0,ba=0;(0==w||y<w)&&ba<Za.length;){var S=Za.charCodeAt(ba);if(10==S||13==S){if(0<y)break}else J.push(Za.charAt(ba)),255>S&&y++;ba++}J.length<Za.length&&1<Za.length-J.length&&(Za=mxUtils.trim(J.join(""))+"...");return Za}catch(Ea){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=Ka&&null!=Ka.width&&null!=Ka.height&&(q=Wa/A,ha=new mxRectangle((Ka.x+
-Ua.x)*q,(Ka.y+Ua.y)*q,Ka.width*q,Ka.height*q),mxUtils.intersects(Qa,ha)&&bb.image(Ka.x+Ua.x,Ka.y+Ua.y,Ka.width,Ka.height,Ka.src,!0));bb.scale(F);bb.textEnabled=X;fa=null!=fa?fa:this.createSvgImageExport();var tb=fa.getLinkForCellState;fa.getLinkForCellState=function(Sa,sb){var $a=Sa.view.graph.getAbsoluteUrl(tb.apply(this,arguments));return null==$a||Sa.view.graph.isCustomLink($a)?null:$a};fa.getLinkTargetForCellState=function(Sa,sb){return Sa.view.graph.getLinkTargetForCell(Sa.cell)};var yb=fa.drawCellState,
-lb=null,hb=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});fa.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(R&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
+B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],M=
+null,R=null,W=0,ha=0;ha<A.length;ha++)if(this.getModel().isVertex(A[ha])){var fa=this.view.getState(A[ha]);if(null!=fa){var ja=q?fa.getCenterX():fa.getCenterY();M=null!=M?Math.max(M,ja):ja;R=null!=R?Math.min(R,ja):ja;B&&(W+=q?fa.width:fa.height);F.push(fa)}}if(2<F.length){F.sort(function(Ha,wa){return q?Ha.x-wa.x:Ha.y-wa.y});B&&(W-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);fa=this.view.translate;ja=this.view.scale;R=R/ja-(q?fa.x:fa.y);M=M/ja-(q?fa.x:fa.y);this.getModel().beginUpdate();
+try{var va=(M-R-W)/(F.length-1),Ma=R+(B?q?F[0].width/2:F[0].height/2:0);for(ha=1;ha<F.length-1;ha++){var Na=this.view.getState(this.model.getParent(F[ha].cell)),ya=this.getCellGeometry(F[ha].cell);Ma+=va;null!=ya&&null!=Na&&(ya=ya.clone(),q?ya.x=Math.round(Ma-(B?0:ya.width/2))-Na.origin.x:ya.y=Math.round(Ma-(B?0:ya.height/2))-Na.origin.y,this.getModel().setGeometry(F[ha].cell,ya));B&&(Ma+=q?F[ha].width:F[ha].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&
+mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=function(q){q=new mxImageExport;q.addCellData=function(B,F,M){F.setAttribute("data-cell-id",B.id);if(M)if(mxUtils.isNode(B.value))for(M=0;M<B.value.attributes.length;M++){var R=B.value.attributes[M];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;
+q.visitStatesRecursive=function(B,F,M){if(null!=B){var R=F.root,W=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"g"):W.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
+return q};Graph.prototype.parseBackgroundImage=function(q){var A=null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,M,R,W,ha,fa,ja,va,Ma,Na,ya,Ha,wa){var ua=null;if(null!=ya)for(ua=new mxDictionary,va=0;va<ya.length;va++)ua.put(ya[va],!0);ya=this.useCssTransforms;var Va=this.enableFlowAnimation;this.enableFlowAnimation=!1;ya&&(this.useCssTransforms=!1,this.view.revalidate(),
+this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;M=null!=M?M:!0;R=null!=R?R:!0;W=null!=W?W:!0;ja=null!=ja?ja:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.backgroundImage,Ua=this.view.translate,Wa=this.view.scale;"diagram"==Na&&null!=Ka&&null!=Ka.width&&null!=Ka.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+Ka.x)*Wa,(Ua.y+Ka.y)*Wa,Ka.width*Wa,Ka.height*
+Wa)));if(null==Qa)throw Error(mxResources.get("drawingEmpty"));F=A/Wa;var mb=Math.max(1,Math.ceil(Qa.width*F)+2*B)+(ja&&0==B?5:0),ub=Math.max(1,Math.ceil(Qa.height*F)+2*B)+(ja&&0==B?5:0);ja=M?-.5:0;var vb=mxUtils.getLightDarkColor(q),jb=Graph.createSvgNode(ja,ja,mb,ub,vb),nb=jb.ownerDocument;if(null!=q){var db=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"rect");db.setAttribute("fill",vb.light);db.style.fill=vb.cssText;db.setAttribute("width","100%");db.setAttribute("height","100%");db.setAttribute("x",
+"0");db.setAttribute("y","0");jb.appendChild(db)}var qb=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"g");jb.appendChild(qb);var bb=this.createSvgCanvas(qb);bb.foOffset=M?-.5:0;bb.textOffset=M?-.5:0;bb.imageOffset=M?-.5:0;bb.translate(Math.floor(B/A-Qa.x/Wa),Math.floor(B/A-Qa.y/Wa));bb.idPrefix="drawio-svg-"+Editor.guid();var wb=document.createElement("div"),rb=bb.getAlternateText;bb.getAlternateText=function(Sa,sb,$a,kb,ob,Za,xb,c,l,t,n,r,v){if(null!=Za&&0<this.state.fontSize)try{mxUtils.isNode(Za)?
+Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var x=Math.ceil(2*kb/this.state.fontSize),I=[],y=0,aa=0;(0==x||y<x)&&aa<Za.length;){var S=Za.charCodeAt(aa);if(10==S||13==S){if(0<y)break}else I.push(Za.charAt(aa)),255>S&&y++;aa++}I.length<Za.length&&1<Za.length-I.length&&(Za=mxUtils.trim(I.join(""))+"...");return Za}catch(Fa){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=Ka&&null!=Ka.width&&null!=Ka.height&&(q=Wa/A,ja=new mxRectangle((Ka.x+
+Ua.x)*q,(Ka.y+Ua.y)*q,Ka.width*q,Ka.height*q),mxUtils.intersects(Qa,ja)&&bb.image(Ka.x+Ua.x,Ka.y+Ua.y,Ka.width,Ka.height,Ka.src,!0));bb.scale(F);bb.textEnabled=W;ha=null!=ha?ha:this.createSvgImageExport();var tb=ha.getLinkForCellState;ha.getLinkForCellState=function(Sa,sb){var $a=Sa.view.graph.getAbsoluteUrl(tb.apply(this,arguments));return null==$a||Sa.view.graph.isCustomLink($a)?null:$a};ha.getLinkTargetForCellState=function(Sa,sb){return Sa.view.graph.getLinkTargetForCell(Sa.cell)};var yb=ha.drawCellState,
+lb=null,hb=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});ha.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(R&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
$a.isCellSelected(ob),ob=$a.model.getParent(ob);if(null!=Sa.shape)try{var Za=Sa.shape.isFlowAnimationEnabled,xb=Sa.shape.addFlowAnimationToShape;Sa.shape.isFlowAnimationEnabled=function(){return Va&&$a.model.isEdge(Sa.cell)&&"1"==mxUtils.getValue(Sa.style,"flowAnimation","0")};Sa.shape.addFlowAnimationToShape=function(){$a.addFlowAnimationToNode(this.getFlowAnimationPath(),Sa.style,A,hb())};if(R&&null==ua||kb)$a.view.redrawEnumerationState(Sa),yb.apply(this,arguments),this.doDrawShape(Sa.secondLabel,
-sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;fa.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,da,!0);return jb}finally{this.enableFlowAnimation=Va,ya&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&
-0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),F=q.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var N=q.createElement("a");N.setAttribute("transform","translate(0,-5)");null==N.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(N.setAttribute("xlink:href",Graph.foreignObjectWarningLink),N.setAttribute("target","_blank")):(N.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
-N.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=q.createElement("text");q.setAttribute("text-anchor","middle");q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);N.appendChild(q);B.appendChild(N);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));
-null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var N=q[F].getAttribute("href");null==N&&(N=q[F].getAttribute("xlink:href"));null!=N&&(null!=A&&/^https?:\/\//.test(N)?q[F].setAttribute("target",A):B&&this.isCustomLink(N)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);
+sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ha.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,fa,!0);return jb}finally{this.enableFlowAnimation=Va,ya&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&
+0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),F=q.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var M=q.createElement("a");M.setAttribute("transform","translate(0,-5)");null==M.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(M.setAttribute("xlink:href",Graph.foreignObjectWarningLink),M.setAttribute("target","_blank")):(M.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
+M.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=q.createElement("text");q.setAttribute("text-anchor","middle");q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);M.appendChild(q);B.appendChild(M);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));
+null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var M=q[F].getAttribute("href");null==M&&(M=q[F].getAttribute("xlink:href"));null!=M&&(null!=A&&/^https?:\/\//.test(M)?q[F].setAttribute("target",A):B&&this.isCustomLink(M)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);
q.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;q.adaptiveColors=this.getAdaptiveColors();q.pointerEvents=!0;return q};Graph.prototype.getSelectedElement=function(){var q=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(q=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(q=document.selection.createRange().parentElement());return q};Graph.prototype.getSelectedEditingElement=function(){var q=null;if(null!=this.cellEditor.textarea)for(q=this.getSelectedElement();null!=
q&&q.nodeType!=mxConstants.NODETYPE_ELEMENT;)q=q.parentNode;return q};Graph.prototype.getParentByName=function(q,A,B){for(;null!=q&&q.nodeName!=A;){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.getParentByNames=function(q,A,B){for(;null!=q&&!(0<=mxUtils.indexOf(A,q.nodeName));){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.selectNode=function(q){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(q);
-A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(q=A.createRange(),q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var N=0;N<F.points.length;N++)A?F.points[N].x=B+(B-F.points[N].x):F.points[N].y=B+(B-F.points[N].y);N=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};N(F.getTerminalPoint(!0));N(F.getTerminalPoint(!1));
-this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=function(q,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(q),N=0;N<F;N++){var R=this.model.getChildAt(q,N);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var X=this.getCellGeometry(R);null!=X&&(X=X.clone(),A?X.x=B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(R,X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);
-for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var N=this.view.getState(q[F]);null!=N&&this.flipEdgePoints(q[F],A,(A?N.getCenterX():N.getCenterY())/this.view.scale-(A?N.origin.x:N.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
-function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();try{for(var F=0;F<q.length;F++){var N=this.model.getParent(q[F]);if(this.isTable(N)){var R=this.getCellGeometry(q[F]),X=this.getCellGeometry(N);null!=R&&null!=X&&(X=X.clone(),X.height-=R.height,this.model.setGeometry(N,X))}}var fa=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=fa)for(B=[],F=0;F<fa.length;F++)this.model.contains(fa[F])&&(this.model.isVertex(fa[F])||
-this.model.isEdge(fa[F]))&&B.push(fa[F])}return B};Graph.prototype.insertTableColumn=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,N=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);N=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(N=B.getChildCells(q,!0).length-1);var X=B.getChildCells(F,!0),fa=Graph.minTableColumnWidth;for(q=0;q<X.length;q++){var da=B.getChildCells(X[q],!0)[N],ha=B.cloneCell(da,!1);
-null==ha&&(ha=this.createVertex());var va=this.getCellGeometry(ha);ha.value=null;ha.style=mxUtils.setStyle(mxUtils.setStyle(ha.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);fa=va.width;var Ma=this.getCellGeometry(X[q]);null!=Ma&&(va.height=Ma.height)}B.add(X[q],ha,N+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=fa,B.setGeometry(F,Na))}finally{B.endUpdate()}};
-Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(q).childLayout?q:A.getParent(q);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==q&&(q=F[F.length-1]),A.remove(q))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(q).childLayout){F=q;var N=B.getChildCells(F,!0);q=N[A?0:N.length-1]}else F=B.getParent(q);
-var R=F.getIndex(q);q=B.cloneCell(q,!1);q.value=null;B.add(F,q,R+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,N=q;if(this.isTableCell(q))N=B.getParent(q),F=B.getParent(N);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);N=R[A?0:R.length-1]}var X=B.getChildCells(N,!0),fa=F.getIndex(N);N=B.cloneCell(N,!1);N.value=null;var da=this.getCellGeometry(N);if(null!=da){for(R=0;R<X.length;R++){q=B.cloneCell(X[R],
-!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),"colspan",null);var ha=this.getCellGeometry(q);null!=ha&&(null!=ha.alternateBounds&&(ha.width=ha.alternateBounds.width,ha.height=ha.alternateBounds.height,ha.alternateBounds=null),ha.height=da.height);N.insert(q)}B.add(F,N,fa+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=da.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();
-A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&(B=A.getParent(F));var N=A.getChildCells(B,!0);if(0==N.length)A.remove(B);else{this.isTableRow(F)||(F=N[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var X=R.length-1;this.isTableCell(q)&&(X=mxUtils.indexOf(R,q));for(F=q=0;F<N.length;F++){var fa=A.getChildCells(N[F],!0)[X];A.remove(fa);var da=this.getCellGeometry(fa);null!=da&&(q=Math.max(q,da.width))}var ha=this.getCellGeometry(B);null!=
-ha&&(ha=ha.clone(),ha.width-=q,A.setGeometry(B,ha))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(q=F=A.getParent(q));this.isTableRow(q)&&(B=A.getParent(F));var N=A.getChildCells(B,!0);if(1>=N.length)A.remove(B);else{this.isTableRow(F)||(F=N[N.length-1]);A.remove(F);q=0;var R=this.getCellGeometry(F);null!=R&&(q=R.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=q,A.setGeometry(B,
-X))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(q,A){for(var B=q.tBodies[0],F=B.rows[0].cells,N=q=0;N<F.length;N++){var R=F[N].getAttribute("colspan");q+=null!=R?parseInt(R):1}A=B.insertRow(A);for(N=0;N<q;N++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(q,A){q.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(q,A){var B=q.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var N=document.createElement("th");B.rows[F].appendChild(N);
-mxUtils.br(N)}q=q.tBodies[0];for(B=0;B<q.rows.length;B++)F=q.rows[B].insertCell(A),mxUtils.br(F);return q.rows[0].cells[0<=A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=A){q=q.tBodies[0].rows;for(var B=0;B<q.length;B++)q[B].cells.length>A&&q[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(q){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=
-q;q=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=q.appendChild(F);A.insertNode(q)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(q)};Graph.prototype.createLinkForHint=function(q,A,B){function F(R,X){R.length>X&&(R=R.substring(0,Math.round(X/2))+"..."+R.substring(R.length-Math.round(X/4)));return R}q=null!=q?q:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(q)?this.getLinkTitle(q):q;var N=document.createElement("a");N.setAttribute("rel",
-this.linkRelation);N.setAttribute("href",this.getAbsoluteUrl(q));N.setAttribute("title",F(this.isCustomLink(q)?this.getLinkTitle(q):q,80));null!=this.linkTarget&&N.setAttribute("target",this.linkTarget);mxUtils.write(N,F(A,40));this.isCustomLink(q)&&mxEvent.addListener(N,"click",mxUtils.bind(this,function(R){this.customLinkClicked(q,B);mxEvent.consume(R)}));return N};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
-this.addListener(mxEvent.START_EDITING,function(R,X){this.popupMenuHandler.hideMenu()});var q=this.updateMouseEvent;this.updateMouseEvent=function(R){R=q.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var X=this.getCellAt(R.graphX,R.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,R.graphX,R.graphY)||(R.state=this.view.getState(X),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&
-this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,N=this.fireMouseEvent;this.fireMouseEvent=function(R,X,fa){R==mxEvent.MOUSE_DOWN&&(X=this.updateMouseEvent(X),A=this.isCellSelected(X.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());N.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,X){if(null!=this.freehand&&!this.freehand.isDrawing()){var fa=mxEvent.isMouseEvent(X.getEvent());this.popupMenuHandler.popupTrigger=
-!this.isEditing()&&this.isEnabled()&&(null==X.getState()||!X.isSource(X.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!fa&&(B&&null==X.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(X.getCell())));fa=!A||fa?null:mxUtils.bind(this,function(da){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ha=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(X.getX()+ha.x+1,X.getY()+ha.y+1,da,X.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-[R,X,fa])}})};mxCellEditor.prototype.isContentEditing=function(){var q=this.graph.view.getState(this.editingCell);return null!=q&&1==q.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var q="";window.getSelection?q=window.getSelection():document.getSelection?q=document.getSelection():document.selection&&(q=document.selection.createRange().text);
+A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(q=A.createRange(),q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var M=0;M<F.points.length;M++)A?F.points[M].x=B+(B-F.points[M].x):F.points[M].y=B+(B-F.points[M].y);M=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};M(F.getTerminalPoint(!0));M(F.getTerminalPoint(!1));
+this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=function(q,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(q),M=0;M<F;M++){var R=this.model.getChildAt(q,M);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var W=this.getCellGeometry(R);null!=W&&(W=W.clone(),A?W.x=B+(B-W.x-W.width):W.y=B+(B-W.y-W.height),this.model.setGeometry(R,W))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);
+for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var M=this.view.getState(q[F]);null!=M&&this.flipEdgePoints(q[F],A,(A?M.getCenterX():M.getCenterY())/this.view.scale-(A?M.origin.x:M.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
+function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();try{for(var F=0;F<q.length;F++){var M=this.model.getParent(q[F]);if(this.isTable(M)){var R=this.getCellGeometry(q[F]),W=this.getCellGeometry(M);null!=R&&null!=W&&(W=W.clone(),W.height-=R.height,this.model.setGeometry(M,W))}}var ha=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=ha)for(B=[],F=0;F<ha.length;F++)this.model.contains(ha[F])&&(this.model.isVertex(ha[F])||
+this.model.isEdge(ha[F]))&&B.push(ha[F])}return B};Graph.prototype.insertTableColumn=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,M=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);M=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(M=B.getChildCells(q,!0).length-1);var W=B.getChildCells(F,!0),ha=Graph.minTableColumnWidth;for(q=0;q<W.length;q++){var fa=B.getChildCells(W[q],!0)[M],ja=B.cloneCell(fa,!1);
+null==ja&&(ja=this.createVertex());var va=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);ha=va.width;var Ma=this.getCellGeometry(W[q]);null!=Ma&&(va.height=Ma.height)}B.add(W[q],ja,M+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=ha,B.setGeometry(F,Na))}finally{B.endUpdate()}};
+Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(q).childLayout?q:A.getParent(q);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==q&&(q=F[F.length-1]),A.remove(q))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(q).childLayout){F=q;var M=B.getChildCells(F,!0);q=M[A?0:M.length-1]}else F=B.getParent(q);
+var R=F.getIndex(q);q=B.cloneCell(q,!1);q.value=null;B.add(F,q,R+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,M=q;if(this.isTableCell(q))M=B.getParent(q),F=B.getParent(M);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);M=R[A?0:R.length-1]}var W=B.getChildCells(M,!0),ha=F.getIndex(M);M=B.cloneCell(M,!1);M.value=null;var fa=this.getCellGeometry(M);if(null!=fa){for(R=0;R<W.length;R++){q=B.cloneCell(W[R],
+!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(q);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=fa.height);M.insert(q)}B.add(F,M,ha+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=fa.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();
+A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&(B=A.getParent(F));var M=A.getChildCells(B,!0);if(0==M.length)A.remove(B);else{this.isTableRow(F)||(F=M[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var W=R.length-1;this.isTableCell(q)&&(W=mxUtils.indexOf(R,q));for(F=q=0;F<M.length;F++){var ha=A.getChildCells(M[F],!0)[W];A.remove(ha);var fa=this.getCellGeometry(ha);null!=fa&&(q=Math.max(q,fa.width))}var ja=this.getCellGeometry(B);null!=
+ja&&(ja=ja.clone(),ja.width-=q,A.setGeometry(B,ja))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(q=F=A.getParent(q));this.isTableRow(q)&&(B=A.getParent(F));var M=A.getChildCells(B,!0);if(1>=M.length)A.remove(B);else{this.isTableRow(F)||(F=M[M.length-1]);A.remove(F);q=0;var R=this.getCellGeometry(F);null!=R&&(q=R.height);var W=this.getCellGeometry(B);null!=W&&(W=W.clone(),W.height-=q,A.setGeometry(B,
+W))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(q,A){for(var B=q.tBodies[0],F=B.rows[0].cells,M=q=0;M<F.length;M++){var R=F[M].getAttribute("colspan");q+=null!=R?parseInt(R):1}A=B.insertRow(A);for(M=0;M<q;M++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(q,A){q.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(q,A){var B=q.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var M=document.createElement("th");B.rows[F].appendChild(M);
+mxUtils.br(M)}q=q.tBodies[0];for(B=0;B<q.rows.length;B++)F=q.rows[B].insertCell(A),mxUtils.br(F);return q.rows[0].cells[0<=A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=A){q=q.tBodies[0].rows;for(var B=0;B<q.length;B++)q[B].cells.length>A&&q[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(q){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=
+q;q=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=q.appendChild(F);A.insertNode(q)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(q)};Graph.prototype.createLinkForHint=function(q,A,B){function F(R,W){R.length>W&&(R=R.substring(0,Math.round(W/2))+"..."+R.substring(R.length-Math.round(W/4)));return R}q=null!=q?q:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(q)?this.getLinkTitle(q):q;var M=document.createElement("a");M.setAttribute("rel",
+this.linkRelation);M.setAttribute("href",this.getAbsoluteUrl(q));M.setAttribute("title",F(this.isCustomLink(q)?this.getLinkTitle(q):q,80));null!=this.linkTarget&&M.setAttribute("target",this.linkTarget);mxUtils.write(M,F(A,40));this.isCustomLink(q)&&mxEvent.addListener(M,"click",mxUtils.bind(this,function(R){this.customLinkClicked(q,B);mxEvent.consume(R)}));return M};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
+this.addListener(mxEvent.START_EDITING,function(R,W){this.popupMenuHandler.hideMenu()});var q=this.updateMouseEvent;this.updateMouseEvent=function(R){R=q.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var W=this.getCellAt(R.graphX,R.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,R.graphX,R.graphY)||(R.state=this.view.getState(W),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&
+this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,M=this.fireMouseEvent;this.fireMouseEvent=function(R,W,ha){R==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),A=this.isCellSelected(W.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());M.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,W){if(null!=this.freehand&&!this.freehand.isDrawing()){var ha=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=
+!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ha&&(B&&null==W.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(W.getCell())));ha=!A||ha?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ja=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ja.x+1,W.getY()+ja.y+1,fa,W.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+[R,W,ha])}})};mxCellEditor.prototype.isContentEditing=function(){var q=this.graph.view.getState(this.editingCell);return null!=q&&1==q.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var q="";window.getSelection?q=window.getSelection():document.getSelection?q=document.getSelection():document.selection&&(q=document.selection.createRange().text);
return""!=q};mxCellEditor.prototype.insertTab=function(q){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);q=Graph.createTabNode(q);B.insertNode(q);B.setStartAfter(q);B.setEndAfter(q);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(q,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),
-N=null!=A&&mxEvent.isShiftDown(A);if(N||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(X){N||F||window.getSelection().containsNode(X,!0)?(X.removeAttribute("align"),X.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=
+M=null!=A&&mxEvent.isShiftDown(A);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(W){M||F||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=
[],B=0,F=q.rangeCount;B<F;++B)A.push(q.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(q){try{if(q)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=q.length;A<B;++A)sel.addRange(q[A])}else document.selection&&q.select&&q.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
-function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;
+function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var K=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?K.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(q,A){q=this.graph.getStartEditingCell(q,A);L.apply(this,arguments);var B=this.graph.view.getState(q);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(q)};mxCellEditor.prototype.toggleViewMode=function(){var q=this.graph.view.getState(this.editingCell);
-if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);fa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<fa.length&&"\n"==fa.charAt(fa.length-1)&&(fa=fa.substring(0,fa.length-1));fa=Graph.sanitizeHtml(A?fa.replace(/\n/g,"<br/>"):fa,!0);this.textarea.className="mxCellEditor geContentEditable";da=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),N=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,X=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&X.push("underline");
-(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&X.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(da*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(da)+"px";this.textarea.style.textDecoration=X.join(" ");this.textarea.style.fontWeight=N?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
-F;this.textarea.style.padding="0px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,
-Graph.backupStyleAttribute);var fa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(fa=mxUtils.replaceTrailingNewlines(fa,"<div><br></div>"));fa=Graph.sanitizeHtml(A?fa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):fa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var da=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(da*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(da)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
-B;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(q,A){if(null!=this.textarea)if(q=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=q){var B=q.view.scale;this.bounds=mxRectangle.fromRectangle(q);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=q.text?q.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
+if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),M=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");
+(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=M?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
+F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,
+Graph.backupStyleAttribute);var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
+Math.round(fa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
+B;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(q,A){if(null!=this.textarea)if(q=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=q){var B=q.view.scale;this.bounds=mxRectangle.fromRectangle(q);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=q.text?q.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
mxUtils.getValue(q.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/B)+(this.textarea.offsetHeight-this.textarea.clientHeight)+
"px",this.bounds.height=parseInt(this.textarea.style.height)*B);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/B)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*B);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+B+","+B+")")}else this.textarea.style.height=
-"",this.textarea.style.overflow="",T.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(q,A){if("0"==mxUtils.getValue(q.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var B=this.graph.getEditingValue(q.cell,A);"1"==mxUtils.getValue(q.style,"nl2Br","1")&&(B=B.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(B,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=
+"",this.textarea.style.overflow="",Q.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(q,A){if("0"==mxUtils.getValue(q.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var B=this.graph.getEditingValue(q.cell,A);"1"==mxUtils.getValue(q.style,"nl2Br","1")&&(B=B.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(B,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=
function(q,A){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(q.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(q){if("0"==mxUtils.getValue(q.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);
-var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(q.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<A.length&&("<br/>"==A.substring(A.length-5)||"<br>"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("<br"))+"<div><br/></div>")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(q){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};
+var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(q.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<A.length&&("<br/>"==A.substring(A.length-5)||"<br>"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("<br"))+"<div><br/></div>")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var N=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(q){this.codeViewMode&&this.toggleViewMode();N.apply(this,arguments);this.focusContainer()};
mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(q){}};var U=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(q,A){this.graph.getModel().beginUpdate();try{U.apply(this,arguments),""==A&&this.graph.isCellDeletable(q.cell)&&0==this.graph.model.getChildCount(q.cell)&&this.graph.isTransparentState(q)&&this.graph.removeCells([q.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(q){q=
mxUtils.getValue(q.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);q==mxConstants.NONE&&(q=null);return q};mxCellEditor.prototype.getBorderColor=function(q){q=mxUtils.getValue(q.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);q==mxConstants.NONE&&(q=null);return q};mxCellEditor.prototype.getMinimumSize=function(q){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==q.text?30:q.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=
function(q,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(q){return q?b(q,this.unit):q};mxGraphHandler.prototype.updateHint=function(q){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;q=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+
this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(q,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=
-function(q,A){Y.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==B.childLayout){var F=this.graph.model.getParent(q),N=null!=F?this.graph.getCellGeometry(F):null;if(null!=N&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var X=this.graph.getActualStartSize(F);N=N.clone();B?N.height=A.height+X.y+X.height+2*R:N.width=A.width+X.x+X.width+2*R;
-this.graph.model.setGeometry(F,N)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(fa){B.get(fa)||(B.put(fa,!0),N.push(fa))}for(var A=Q.apply(this,arguments),B=new mxDictionary,F=this.graph.model,N=[],R=0;R<A.length;R++){var X=A[R];this.graph.isTableCell(X)?q(F.getParent(F.getParent(X))):this.graph.isTableRow(X)&&q(F.getParent(X));q(X)}return N};var P=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
-function(q){return P.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var M=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return M.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
-function(q){var A=V.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var aa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=aa.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
+function(q,A){Y.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==B.childLayout){var F=this.graph.model.getParent(q),M=null!=F?this.graph.getCellGeometry(F):null;if(null!=M&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(F);M=M.clone();B?M.height=A.height+W.y+W.height+2*R:M.width=A.width+W.x+W.width+2*R;
+this.graph.model.setGeometry(F,M)}}};var P=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(ha){B.get(ha)||(B.put(ha,!0),M.push(ha))}for(var A=P.apply(this,arguments),B=new mxDictionary,F=this.graph.model,M=[],R=0;R<A.length;R++){var W=A[R];this.graph.isTableCell(W)?q(F.getParent(F.getParent(W))):this.graph.isTableRow(W)&&q(F.getParent(W));q(W)}return M};var T=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
+function(q){return T.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var J=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return J.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
+function(q){var A=V.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var Z=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=Z.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ia=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ia.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var na=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return na.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
-var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(q){return q.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var q=0;this.graph.isTableRow(this.state.cell)?q=1:this.graph.isTableCell(this.state.cell)&&(q=2);return q};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
-function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Z=null,ca=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Z&&(Z=mxCellRenderer.defaultShapes.tableLine);var q=ca.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Va=[],Qa=0;Qa<Ga.length;Qa++){var Ka=Ga[Qa];Va.push(null==Ka?null:new mxPoint((da+Ka.x+wa)*R,(ha+Ka.y+ua)*
-R))}return Va},B=this,F=this.graph,N=F.model,R=F.view.scale,X=this.state,fa=this.selectionBorder,da=this.state.origin.x+F.view.translate.x,ha=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var va=F.view.getCellStates(N.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=N.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),ya=F.getTableLines(this.state.cell,!0,!1);for(N=0;N<va.length;N++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=
-Ga<va.length-1?va[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Va=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=ya[Ga]?new Z(ya[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=fa.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Qa=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=
-0==Qa?mxConstants.NONE:fa.stroke;if(this.shape.constructor==Z)this.shape.line=A(ya[Ga],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*R;this.shape.bounds.x=X.x+(Ga==va.length-1?0:Ua.x*R);this.shape.bounds.width=X.width-(Ga==va.length-1?0:Ua.width+Ua.x+R)}this.shape.redraw()}};var Ka=!1;ua.setPosition=function(Ua,Wa,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Wa.y-Ua.y-Ua.height);
-Ka=mxEvent.isShiftDown(mb.getEvent());null!=Va&&Ka&&(Qa=Math.min(Qa,Va.height-Graph.minTableRowHeight))};ua.execute=function(Ua){if(0!=Qa)F.setTableRowHeight(this.state.cell,Qa,!Ka);else if(!B.blockDelayedSelection){var Wa=F.getCellAt(Ua.getGraphX(),Ua.getGraphY())||X.cell;F.graphHandler.selectCellForEvent(Wa,Ua)}Qa=0};ua.reset=function(){Qa=0}}q.push(ua)})(N);for(N=0;N<Ma.length;N++)mxUtils.bind(this,function(Ga){var wa=F.view.getState(Ma[Ga]),ua=F.getCellGeometry(Ma[Ga]),Va=null!=ua.alternateBounds?
-ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=X.x+ua.x*R,wa.y=X.y+ua.y*R,wa.width=Va.width*R,wa.height=Va.height*R,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new Z(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=fa.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
-null,ua);wa.tableHandle=!0;var Ka=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ka?mxConstants.NONE:fa.stroke;if(this.shape.constructor==Z)this.shape.line=A(Na[Ga],Ka,0),this.shape.updateBoundsFromLine();else{var Wa=F.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Va.width+Ka)*R;this.shape.bounds.y=X.y+(Ga==Ma.length-1?0:Wa.y*R);this.shape.bounds.height=
-X.height-(Ga==Ma.length-1?0:(Wa.height+Wa.y)*R)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Wa,mb,ub){Ka=Math.max(Graph.minTableColumnWidth-Va.width,mb.x-Wa.x-Va.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(Ka=Math.min(Ka,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Wa){if(0!=Ka)F.setTableColumnWidth(this.state.cell,Ka,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Wa.getGraphX(),Wa.getGraphY())||X.cell;F.graphHandler.selectCellForEvent(mb,Wa)}Ka=
-0};wa.positionChanged=function(){};wa.reset=function(){Ka=0};q.push(wa)})(N)}}return null!=q?q.reverse():null};var W=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){W.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
+!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
+var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(q){return q.tableHandle||sa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var q=0;this.graph.isTableRow(this.state.cell)?q=1:this.graph.isTableCell(this.state.cell)&&(q=2);return q};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
+function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var X=null,ba=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==X&&(X=mxCellRenderer.defaultShapes.tableLine);var q=ba.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ha,wa,ua){for(var Va=[],Qa=0;Qa<Ha.length;Qa++){var Ka=Ha[Qa];Va.push(null==Ka?null:new mxPoint((fa+Ka.x+wa)*R,(ja+Ka.y+ua)*
+R))}return Va},B=this,F=this.graph,M=F.model,R=F.view.scale,W=this.state,ha=this.selectionBorder,fa=this.state.origin.x+F.view.translate.x,ja=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var va=F.view.getCellStates(M.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=M.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),ya=F.getTableLines(this.state.cell,!0,!1);for(M=0;M<va.length;M++)mxUtils.bind(this,function(Ha){var wa=va[Ha],ua=null;if(F.isCellMovable(wa.cell)){ua=
+Ha<va.length-1?va[Ha+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Va=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=ya[Ha]?new X(ya[Ha],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Qa=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==Qa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==X)this.shape.line=A(ya[Ha],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(W.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*R;this.shape.bounds.x=W.x+(Ha==va.length-1?0:Ua.x*R);this.shape.bounds.width=W.width-(Ha==va.length-1?0:Ua.width+Ua.x+R)}this.shape.redraw()}};var Ka=!1;ua.setPosition=function(Ua,Wa,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Wa.y-Ua.y-Ua.height);
+Ka=mxEvent.isShiftDown(mb.getEvent());null!=Va&&Ka&&(Qa=Math.min(Qa,Va.height-Graph.minTableRowHeight))};ua.execute=function(Ua){if(0!=Qa)F.setTableRowHeight(this.state.cell,Qa,!Ka);else if(!B.blockDelayedSelection){var Wa=F.getCellAt(Ua.getGraphX(),Ua.getGraphY())||W.cell;F.graphHandler.selectCellForEvent(Wa,Ua)}Qa=0};ua.reset=function(){Qa=0}}q.push(ua)})(M);for(M=0;M<Ma.length;M++)mxUtils.bind(this,function(Ha){var wa=F.view.getState(Ma[Ha]),ua=F.getCellGeometry(Ma[Ha]),Va=null!=ua.alternateBounds?
+ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ha],F.getCellStyle(Ma[Ha])),wa.x=W.x+ua.x*R,wa.y=W.y+ua.y*R,wa.width=Va.width*R,wa.height=Va.height*R,wa.updateCachedBounds());ua=Ha<Ma.length-1?Ma[Ha+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ha]?new X(Na[Ha],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
+null,ua);wa.tableHandle=!0;var Ka=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ka?mxConstants.NONE:ha.stroke;if(this.shape.constructor==X)this.shape.line=A(Na[Ha],Ka,0),this.shape.updateBoundsFromLine();else{var Wa=F.getActualStartSize(W.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Va.width+Ka)*R;this.shape.bounds.y=W.y+(Ha==Ma.length-1?0:Wa.y*R);this.shape.bounds.height=
+W.height-(Ha==Ma.length-1?0:(Wa.height+Wa.y)*R)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Wa,mb,ub){Ka=Math.max(Graph.minTableColumnWidth-Va.width,mb.x-Wa.x-Va.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(Ka=Math.min(Ka,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Wa){if(0!=Ka)F.setTableColumnWidth(this.state.cell,Ka,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Wa.getGraphX(),Wa.getGraphY())||W.cell;F.graphHandler.selectCellForEvent(mb,Wa)}Ka=
+0};wa.positionChanged=function(){};wa.reset=function(){Ka=0};q.push(wa)})(M)}}return null!=q?q.reverse():null};var da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){da.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
q?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var q=this.isMoveHandlesVisible();q&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():q||null==this.moveHandles||this.destroyMoveHandles();if(q&&null==this.moveHandles){for(q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].parentNode.removeChild(this.moveHandles[q]);
-this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var q=this.graph,A=q.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(N){if(null!=N&&A.isVertex(N.cell)&&q.isCellMovable(N.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=N;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());
-R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(X){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(X)&&this.graph.isCellSelected(N.cell)||this.graph.selectCellForEvent(N.cell,X);mxEvent.isPopupTrigger(X)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(X),mxEvent.getClientY(X),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(X),
-this.graph.isMouseDown=!0);mxEvent.consume(X)}),null,mxUtils.bind(this,function(X){mxEvent.isPopupTrigger(X)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(X),mxEvent.getClientY(X),N.cell,X),mxEvent.consume(X))}));B.push(R)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].destroy();
-this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var q=0;q<this.cornerHandles.length;q++)null!=this.cornerHandles[q]&&null!=this.cornerHandles[q].node&&null!=this.cornerHandles[q].node.parentNode&&this.cornerHandles[q].node.parentNode.removeChild(this.cornerHandles[q].node);this.cornerHandles=null}};var ja=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ja.apply(this,arguments);this.destroyMoveHandles();
+this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var q=this.graph,A=q.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(M){if(null!=M&&A.isVertex(M.cell)&&q.isCellMovable(M.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=M;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());
+R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),
+this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),M.cell,W),mxEvent.consume(W))}));B.push(R)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].destroy();
+this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var q=0;q<this.cornerHandles.length;q++)null!=this.cornerHandles[q]&&null!=this.cornerHandles[q].node&&null!=this.cornerHandles[q].node.parentNode&&this.cornerHandles[q].node.parentNode.removeChild(this.cornerHandles[q].node);this.cornerHandles=null}};var ca=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ca.apply(this,arguments);this.destroyMoveHandles();
this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var q=0;4>q;q++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());
this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();q=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(q,A)};var H=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var q=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||
-this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var N=this.customHandles[F].shape.bounds,R=N.getCenterX(),X=N.getCenterY();if(Math.abs(this.state.x-R)<N.width/2||Math.abs(this.state.y-X)<N.height/2||Math.abs(this.state.x+this.state.width-R)<N.width/2||Math.abs(this.state.y+this.state.height-X)<N.height/2){B=
+this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var M=this.customHandles[F].shape.bounds,R=M.getCenterX(),W=M.getCenterY();if(Math.abs(this.state.x-R)<M.width/2||Math.abs(this.state.y-W)<M.height/2||Math.abs(this.state.x+this.state.width-R)<M.width/2||Math.abs(this.state.y+this.state.height-W)<M.height/2){B=
!0;break}}B&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(A/=2,this.graph.isTable(this.state.cell)&&(A+=7),q.x=this.sizers[0].bounds.width+A,q.y=this.sizers[0].bounds.height+A):q=H.apply(this,arguments);return q};mxVertexHandler.prototype.updateHint=function(q){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{q=this.state.view.scale;
var A=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/q),A)+" x "+b(this.roundLength(this.bounds.height/q),A)}q=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==q&&(q=this.bounds);this.hint.style.left=q.x+Math.round((q.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=q.y+q.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=
-function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ea=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){ea.apply(this,arguments);var q=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(q,A)};var oa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(q,A){oa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&
-null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var sa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(q,A){sa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(q,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
-N=this.graph.view.scale,R=this.roundLength(A.x/N-F.x);F=this.roundLength(A.y/N-F.y);var X=this.graph.view.unit;this.hint.innerHTML=b(R,X)+", "+b(F,X);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(X==mxConstants.POINTS?Math.round(B.length/N):b(B.length/N,X))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
+function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ea=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){ea.apply(this,arguments);var q=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(q,A)};var ra=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(q,A){ra.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&
+null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var qa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(q,A){qa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(q,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
+M=this.graph.view.scale,R=this.roundLength(A.x/M-F.x);F=this.roundLength(A.y/M-F.y);var W=this.graph.view.unit;this.hint.innerHTML=b(R,W)+", "+b(F,W);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(W==mxConstants.POINTS?Math.round(B.length/M):b(B.length/M,W))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
this.hint.innerHTML="["+Math.round(100*B.x)+"%, "+Math.round(100*B.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(q.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(q.getGraphY(),A.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
@@ -2962,27 +2963,27 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
function(q){return!mxEvent.isShiftDown(q.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(q){return!mxEvent.isShiftDown(q.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(q){return mxEvent.isMouseEvent(q.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return null==q.getState()&&!mxEvent.isMouseEvent(A)||mxEvent.isPopupTrigger(A)&&(null==q.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))}}else mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return mxEvent.isLeftMouseButton(A)&&(this.useLeftButtonForPanning&&null==q.getState()||mxEvent.isControlDown(A)&&!mxEvent.isShiftDown(A))||this.usePopupTrigger&&mxEvent.isPopupTrigger(A)};
mxRubberband.prototype.isSpaceEvent=function(q){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(q.getEvent())||mxEvent.isMetaDown(q.getEvent()))&&mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(q,A){if(this.cancelled)this.cancelled=!1,A.consume();else{var B=
-null!=this.div&&"none"!=this.div.style.display,F=null,N=null,R=q=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,N=this.first.y,q=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-N)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(q=this.graph.snap(q),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(q)<this.graph.tolerance&&(q=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
-try{var X=this.graph.getCellsBeyond(F,N,this.graph.getDefaultParent(),!0,!0);for(B=0;B<X.length;B++)if(this.graph.isCellMovable(X[B])){var fa=this.graph.view.getState(X[B]),da=this.graph.getCellGeometry(X[B]);null!=fa&&null!=da&&(da=da.clone(),da.translate(q,R),this.graph.model.setGeometry(X[B],da))}}finally{this.graph.model.endUpdate()}}else X=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(X,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&
-null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);q=mxUtils.getOffset(this.graph.container);B.x-=q.x;B.y-=q.y;q=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-q,N=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(N)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(q,B),this.isSpaceEvent(A)?(q=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
+null!=this.div&&"none"!=this.div.style.display,F=null,M=null,R=q=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,M=this.first.y,q=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-M)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(q=this.graph.snap(q),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(q)<this.graph.tolerance&&(q=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
+try{var W=this.graph.getCellsBeyond(F,M,this.graph.getDefaultParent(),!0,!0);for(B=0;B<W.length;B++)if(this.graph.isCellMovable(W[B])){var ha=this.graph.view.getState(W[B]),fa=this.graph.getCellGeometry(W[B]);null!=ha&&null!=fa&&(fa=fa.clone(),fa.translate(q,R),this.graph.model.setGeometry(W[B],fa))}}finally{this.graph.model.endUpdate()}}else W=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(W,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&
+null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);q=mxUtils.getOffset(this.graph.container);B.x-=q.x;B.y-=q.y;q=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-q,M=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(M)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(q,B),this.isSpaceEvent(A)?(q=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
F)*F,this.height=this.graph.snap(this.height/F)*F,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=q-this.width),this.y<this.first.y&&(this.y=B-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+
"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor=
-"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Pa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Pa.apply(this,arguments)};var la=(new Date).getTime(),Ba=0,Ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,
-A,B,F){Ca.apply(this,arguments);B!=this.currentTerminalState?(la=(new Date).getTime(),Ba=0):Ba=(new Date).getTime()-la;this.currentTerminalState=B};var Fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<Ba||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:
+"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Pa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Pa.apply(this,arguments)};var ma=(new Date).getTime(),Ba=0,Ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,
+A,B,F){Ca.apply(this,arguments);B!=this.currentTerminalState?(ma=(new Date).getTime(),Ba=0):Ba=(new Date).getTime()-ma;this.currentTerminalState=B};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<Ba||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:
null!=q&&null!=F?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ia=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(q,A,B,F){F=A==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Ia.apply(this,arguments)};var Ha=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ha.apply(this,
-arguments)};var Ja=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ja.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ta=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=
-q.text&&null!=q.text.boundingBox?(A=q.text.unrotatedBoundingBox||q.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ta.apply(this,arguments)};var La=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(q,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),N=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==N||!N.relative||null==this.state||
+HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Ia.apply(this,arguments)};var Da=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Da.apply(this,
+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ga.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ta=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=
+q.text&&null!=q.text.boundingBox?(A=q.text.unrotatedBoundingBox||q.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ta.apply(this,arguments)};var La=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(q,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),M=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==M||!M.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&La.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var q=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&q==mxConstants.NONE&&A==mxConstants.NONE?(q=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
q,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Xa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(q,A){Xa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ya=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
function(q,A){Ya.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(q,A){try{if(null==q&&(null==A||0==A.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);else if(null!=q||null!=A&&0<A.length){var B=document.createElement("img");B.className="geAdaptiveAsset";B.setAttribute("src",Editor.editImage);B.setAttribute("title",mxResources.get("editLink"));B.setAttribute("width","14");B.setAttribute("height","14");B.style.paddingLeft="8px";B.style.marginLeft="auto";B.style.marginBottom="-1px";B.style.cursor="pointer";var F=B.cloneNode(!0);F.setAttribute("src",Editor.trashImage);F.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=q){var N=document.createElement("div");
-N.style.display="flex";N.style.alignItems="center";N.appendChild(this.graph.createLinkForHint(q,null,this.state.cell));this.linkHint.appendChild(N);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);N.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var X=F.cloneNode(!0);N.appendChild(X);mxEvent.addListener(X,
-"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}}if(null!=A)for(N=0;N<A.length;N++)mxUtils.bind(this,function(fa,da){var ha=document.createElement("div");ha.style.display="flex";ha.style.alignItems="center";ha.style.marginTop=null!=q||0<da?"6px":"0px";ha.appendChild(this.graph.createLinkForHint(fa.getAttribute("href"),mxUtils.getTextContent(fa),this.state.cell));var va=B.cloneNode(!0);ha.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var ya=
-document.createElement("div");ya.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=ya.getElementsByTagName("a")[da];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,ya.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(fa.getAttribute("href")||
-"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ha.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ha)})(A[N],N)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var cb=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=cb.apply(this,
+F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=q){var M=document.createElement("div");
+M.style.display="flex";M.style.alignItems="center";M.appendChild(this.graph.createLinkForHint(q,null,this.state.cell));this.linkHint.appendChild(M);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);M.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var W=F.cloneNode(!0);M.appendChild(W);mxEvent.addListener(W,
+"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}}if(null!=A)for(M=0;M<A.length;M++)mxUtils.bind(this,function(ha,fa){var ja=document.createElement("div");ja.style.display="flex";ja.style.alignItems="center";ja.style.marginTop=null!=q||0<fa?"6px":"0px";ja.appendChild(this.graph.createLinkForHint(ha.getAttribute("href"),mxUtils.getTextContent(ha),this.state.cell));var va=B.cloneNode(!0);ja.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var ya=
+document.createElement("div");ya.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ha=ya.getElementsByTagName("a")[fa];if(null!=Ha){if(null==Na||""==Na){for(Na=Ha.cloneNode(!0).firstChild;null!=Na;)Ha.parentNode.insertBefore(Na.cloneNode(!0),Ha),Na=Na.nextSibling;Ha.parentNode.removeChild(Ha)}else Ha.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,ya.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ha.getAttribute("href")||
+"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ja.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ja)})(A[M],M)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var cb=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=cb.apply(this,
arguments);q.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return q};var fb=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){fb.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var q=0;q<this.moveHandles.length;q++)null!=
this.moveHandles[q]&&(this.moveHandles[q].bounds.x=Math.round(this.moveHandles[q].rowState.x+this.moveHandles[q].rowState.width-this.moveHandles[q].bounds.width/2),this.moveHandles[q].bounds.y=Math.round(this.moveHandles[q].rowState.y+(this.moveHandles[q].rowState.height-this.moveHandles[q].bounds.height)/2),this.moveHandles[q].redraw());if(null!=this.cornerHandles){q=this.getSelectionBorderInset();var A=this.cornerHandles,B=A[0].bounds.height/2;A[0].bounds.x=this.state.x-A[0].bounds.width/2+q;A[0].bounds.y=
this.state.y-B+q;A[0].redraw();A[1].bounds.x=A[0].bounds.x+this.state.width-2*q;A[1].bounds.y=A[0].bounds.y;A[1].redraw();A[2].bounds.x=A[0].bounds.x;A[2].bounds.y=this.state.y+this.state.height-2*q;A[2].redraw();A[3].bounds.x=A[1].bounds.x;A[3].bounds.y=A[2].bounds.y;A[3].redraw();for(q=0;q<this.cornerHandles.length;q++)this.cornerHandles[q].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
@@ -3019,45 +3020,45 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,h){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.cursor="default";var f=document.createElement("div");f.className="geFormatSection";f.style.textAlign="center";f.style.fontWeight="bold";f.style.paddingTop="8px";f.style.fontSize="13px";f.style.borderWidth="0px 0px 1px 1px";f.style.borderStyle="solid";f.style.display="inline-block";
-f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var I=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,
-g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",I);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&I()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth=
-"0px";e.appendChild(f);h=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,h));this.container.appendChild(h);if(null!=Editor.styles){h.style.display="none";f.style.width=this.showCloseButton?"106px":"50%";f.style.cursor="pointer";f.style.backgroundColor=Format.inactiveTabBackgroundColor;var u=f.cloneNode(!1);u.style.borderLeftWidth="1px";u.style.borderRightWidth="1px";u.style.backgroundColor=Format.inactiveTabBackgroundColor;p(f,h,k++);var x=e.cloneNode(!1);x.style.display="none";mxUtils.write(u,
-mxResources.get("style"));e.appendChild(u);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);p(u,x,k++)}this.showCloseButton&&(u=f.cloneNode(!1),u.style.borderLeftWidth="1px",u.style.borderRightWidth="1px",u.style.borderBottomWidth="1px",u.style.backgroundColor=Format.inactiveTabBackgroundColor,u.style.position="absolute",u.style.display="flex",u.style.right="0px",u.style.top="0px",u.style.width="25px",u.style.padding="0px",u.style.height="33px",u.style.alignItems="center",
+f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var K=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,
+g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",K);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&K()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth=
+"0px";e.appendChild(f);h=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,h));this.container.appendChild(h);if(null!=Editor.styles){h.style.display="none";f.style.width=this.showCloseButton?"106px":"50%";f.style.cursor="pointer";f.style.backgroundColor=Format.inactiveTabBackgroundColor;var u=f.cloneNode(!1);u.style.borderLeftWidth="1px";u.style.borderRightWidth="1px";u.style.backgroundColor=Format.inactiveTabBackgroundColor;p(f,h,k++);var w=e.cloneNode(!1);w.style.display="none";mxUtils.write(u,
+mxResources.get("style"));e.appendChild(u);this.panels.push(new DiagramStylePanel(this,a,w));this.container.appendChild(w);p(u,w,k++)}this.showCloseButton&&(u=f.cloneNode(!1),u.style.borderLeftWidth="1px",u.style.borderRightWidth="1px",u.style.borderBottomWidth="1px",u.style.backgroundColor=Format.inactiveTabBackgroundColor,u.style.position="absolute",u.style.display="flex",u.style.right="0px",u.style.top="0px",u.style.width="25px",u.style.padding="0px",u.style.height="33px",u.style.alignItems="center",
u.style.justifyContent="center",p=document.createElement("img"),p.className="geAdaptiveAsset",p.setAttribute("border","0"),p.setAttribute("src",Editor.crossImage),p.setAttribute("title",mxResources.get("hide")),p.style.width="16px",p.style.height="16px",p.style.opacity=.5,u.appendChild(p),mxEvent.addListener(p,"click",function(){a.actions.get("format").funct()}),e.appendChild(u))}else if(b.isEditing())mxUtils.write(f,mxResources.get("text")),e.appendChild(f),f.style.borderLeftStyle="none",this.panels.push(new TextFormatPanel(this,
-a,e));else{f.style.backgroundColor=Format.inactiveTabBackgroundColor;f.style.borderLeftWidth="1px";f.style.cursor="pointer";f.style.width=0==h.cells.length?"100%":d?"50%":"33.3%";u=f.cloneNode(!1);var z=u.cloneNode(!1);u.style.backgroundColor=Format.inactiveTabBackgroundColor;z.style.backgroundColor=Format.inactiveTabBackgroundColor;d?u.style.borderLeftWidth="0px":0<h.cells.length&&(f.style.borderLeftWidth="0px",mxUtils.write(f,mxResources.get("style")),e.appendChild(f),x=e.cloneNode(!1),x.style.display=
-"none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),p(f,x,k++));mxUtils.write(u,mxResources.get("text"));e.appendChild(u);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new TextFormatPanel(this,a,f));this.container.appendChild(f);mxUtils.write(z,mxResources.get("arrange"));e.appendChild(z);e=e.cloneNode(!1);e.style.display="none";this.panels.push(new ArrangePanel(this,a,e));this.container.appendChild(e);0<h.cells.length?p(u,f,k+1):u.style.display="none";
+a,e));else{f.style.backgroundColor=Format.inactiveTabBackgroundColor;f.style.borderLeftWidth="1px";f.style.cursor="pointer";f.style.width=0==h.cells.length?"100%":d?"50%":"33.3%";u=f.cloneNode(!1);var z=u.cloneNode(!1);u.style.backgroundColor=Format.inactiveTabBackgroundColor;z.style.backgroundColor=Format.inactiveTabBackgroundColor;d?u.style.borderLeftWidth="0px":0<h.cells.length&&(f.style.borderLeftWidth="0px",mxUtils.write(f,mxResources.get("style")),e.appendChild(f),w=e.cloneNode(!1),w.style.display=
+"none",this.panels.push(new StyleFormatPanel(this,a,w)),this.container.appendChild(w),p(f,w,k++));mxUtils.write(u,mxResources.get("text"));e.appendChild(u);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new TextFormatPanel(this,a,f));this.container.appendChild(f);mxUtils.write(z,mxResources.get("arrange"));e.appendChild(z);e=e.cloneNode(!1);e.style.display="none";this.panels.push(new ArrangePanel(this,a,e));this.container.appendChild(e);0<h.cells.length?p(u,f,k+1):u.style.display="none";
p(z,e,k++,!0)}}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,h,d,g,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;h=null!=h?h:999;var x=null,z=!1,C=null,E=mxUtils.bind(this,function(D){var G=m?parseFloat(a.value):parseInt(a.value);p&&(G=this.fromUnit(G));if(G!=C){C=G;isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(h,Math.max(f,isNaN(G)?e:G));if(u.cellEditor.isContentEditing()&&g)z||(z=!0,null!=x&&(u.cellEditor.restoreSelection(x),
-x=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var I=k.getSelectionState().cells;u.setCellStyles(b,G,I);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(I,function(T){T.removeAttribute("size");T.style.fontSize="";""==T.getAttribute("style")&&T.removeAttribute("style")});for(var L=0;L<I.length;L++)0==u.model.getChildCount(I[L])&&u.autoSizeCell(I[L],!1);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[G],"cells",I))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(x=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};
+BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,h,d,g,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;h=null!=h?h:999;var w=null,z=!1,C=null,E=mxUtils.bind(this,function(D){var G=m?parseFloat(a.value):parseInt(a.value);p&&(G=this.fromUnit(G));if(G!=C){C=G;isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(h,Math.max(f,isNaN(G)?e:G));if(u.cellEditor.isContentEditing()&&g)z||(z=!0,null!=w&&(u.cellEditor.restoreSelection(w),
+w=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var K=k.getSelectionState().cells;u.setCellStyles(b,G,K);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(K,function(Q){Q.removeAttribute("size");Q.style.fontSize="";""==Q.getAttribute("style")&&Q.removeAttribute("style")});for(var L=0;L<K.length;L++)0==u.model.getChildCount(K[L])&&u.autoSizeCell(K[L],!1);k.fireEvent(new mxEventObject("styleChanged",
+"keys",[b],"values",[G],"cells",K))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 8px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};
BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;null!=e&&e.isEnabled()&&(b=mxUtils.button(e.label,mxUtils.bind(this,function(f){try{e.funct(f,f)}catch(h){this.editorUi.handleError(h)}})),b.setAttribute("title",e.label+(null!=e.shortcut?" ("+e.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b));return b};
BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,h=0,d=0;d<b.length;d++){var g=this.addAction(a,b[d]);null!=g&&(h++,0==mxUtils.mod(h,2)&&(f.style.marginRight="2px",f.style.width="104px",g.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=g)}return h};
BaseFormatPanel.prototype.createStepper=function(a,b,e,f,h,d,g){e=null!=e?e:1;f=null!=f?f:9;var m=10*e,p=document.createElement("div");p.className="geBtnStepper";p.style.position="absolute";var k=document.createElement("div");k.style.height=f+"px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";p.appendChild(k);var u=k.cloneNode(!1);u.style.height=f+"px";u.style.backgroundImage="url("+Editor.arrowDownImage+")";p.appendChild(u);mxEvent.addGestureListeners(u,function(z){mxEvent.consume(z)},
-null,function(z){""==a.value&&(a.value=d||"2");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});mxEvent.addGestureListeners(k,function(z){mxEvent.consume(z)},null,function(z){""==a.value&&(a.value=d||"0");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});if(h){var x=null;mxEvent.addGestureListeners(p,function(z){mxEvent.consume(z)},null,
-function(z){if(null!=x){try{x.select()}catch(C){}x=null;mxEvent.consume(z)}})}else mxEvent.addListener(p,"click",function(z){mxEvent.consume(z)});return p};
+null,function(z){""==a.value&&(a.value=d||"2");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});mxEvent.addGestureListeners(k,function(z){mxEvent.consume(z)},null,function(z){""==a.value&&(a.value=d||"0");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});if(h){var w=null;mxEvent.addGestureListeners(p,function(z){mxEvent.consume(z)},null,
+function(z){if(null!=w){try{w.select()}catch(C){}w=null;mxEvent.consume(z)}})}else mxEvent.addListener(p,"click",function(z){mxEvent.consume(z)});return p};
BaseFormatPanel.prototype.createOption=function(a,b,e,f,h){var d=document.createElement("div");d.style.display="flex";d.style.alignItems="center";d.style.padding="3px 0px 3px 0px";d.style.height="18px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.style.margin="1px 6px 0px 0px";g.style.verticalAlign="top";d.appendChild(g);var m=document.createElement("div");m.setAttribute("title",a);m.style.display="inline-block";m.style.whiteSpace="nowrap";m.style.textOverflow="ellipsis";
-m.style.overflow="hidden";m.style.maxWidth="75%";m.style.userSelect="none";mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(x,z){p||(p=!0,x?(g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0):(g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1),k!=x&&(k=x,b()!=k&&e(k,z)),p=!1)};mxEvent.addListener(d,"click",function(x){if("disabled"!=g.getAttribute("disabled")){var z=mxEvent.getSource(x);if(z==d||z==m)g.checked=!g.checked;u(g.checked,x)}});u(k);null!=f&&
+m.style.overflow="hidden";m.style.maxWidth="75%";m.style.userSelect="none";mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(w,z){p||(p=!0,w?(g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0):(g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1),k!=w&&(k=w,b()!=k&&e(k,z)),p=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=g.getAttribute("disabled")){var z=mxEvent.getSource(w);if(z==d||z==m)g.checked=!g.checked;u(g.checked,w)}});u(k);null!=f&&
(f.install(u),this.listeners.push(f));null!=h&&h(d);return d};
-BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;h=null!=h?"null"==h?null:h:0;var x=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,e)!=h},function(z){m&&u.stopEditing();if(null!=g)g.funct();else{u.getModel().beginUpdate();try{var C=null!=p?p:k.getSelectionState().cells;z=z?f:h;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(x,b,e)!=h)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,h,d,g,m,p,k){function u(Q,P){"default"!=Q||P||(Q=m);"default"!=Q&&p&&(Q=mxUtils.getLightDarkColor(Q),Q=k()?Q.dark:Q.light);return Q}var x=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.style.padding="3px 0px 3px 0px";C.style.whiteSpace="nowrap";C.style.overflow="hidden";C.style.width="200px";C.style.height="18px";var E=document.createElement("input");E.setAttribute("type","checkbox");
-E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),I=!1,L=null,T=null,K=document.createElement("input");K.setAttribute("type","color");K.style.position="relative";K.style.visibility="hidden";K.style.top="10px";K.style.width="0px";K.style.height="0px";K.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=
-Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(Q){K.value=u(G);K.click();mxEvent.consume(Q)}));var U=null,Y=function(Q,P){I||(I=!0,null!=d&&d(Q),P||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(Q)),G=b(),Q=mxUtils.getLightDarkColor("default"!=G?G:m),P=document.createElement("div"),P.style.width="21px",P.style.height="12px",
-P.style.margin="2px 18px 2px 3px",P.style.borderWidth="1px",P.style.borderStyle="solid",P.style.backgroundColor=Q.cssText,T.innerText="",T.appendChild(P),!p&&mxUtils.isLightDarkColor(G)&&Q.light!=Q.dark?P.style.background="linear-gradient(to right bottom, "+Q.cssText+" 50%, "+mxUtils.invertLightDarkColor(Q).cssText+" 50.3%)":p&&x&&(P.style.backgroundColor=k()?Q.dark:Q.light),null!=L?(P.style.width="21px",P.style.margin="2px 18px 2px 3px",P.appendChild(L)):(P.style.width="36px",P.style.margin="3px"),
-null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(Q="#"==G.charAt(0)?G.substring(1).toUpperCase():G,Q=ColorDialog.prototype.colorNames[Q],null!=Q?T.setAttribute("title",Q):"default"==G?T.setAttribute("title",mxResources.get("useBlackAndWhite")):T.setAttribute("title",G)),null==G||G==mxConstants.NONE||z.isSpecialColor(G)?(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1):(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0),T.style.display=E.checked||g?"":
-"none",I=!1)};C.appendChild(K);mxEvent.addListener(K,"change",function(){var Q=K.value;if(!p){var P=mxUtils.getLightDarkColor(G);k()?P.dark=Q:P.light=Q;Q="light-dark("+P.light+", "+P.dark+")"}Y(Q)});T=mxUtils.button("",mxUtils.bind(this,function(Q){var P=m;p&&k()&&mxUtils.isLightDarkColor(P)&&(P=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(M){Y(M)},"default"==f?"default":null,P,p);mxEvent.consume(Q)}));T.style.position="absolute";T.style.marginTop="-3px";T.style.left=
-"178px";T.style.height="22px";T.className="geColorBtn";T.style.display=E.checked||g?"":"none";C.appendChild(T);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&T.setAttribute("title",a);g||(mxEvent.addListener(C,"click",function(Q){Q=mxEvent.getSource(Q);if(Q==E||"INPUT"!=Q.nodeName)Q!=E&&(E.checked=!E.checked),E.checked||null==G||G==mxConstants.NONE||f==mxConstants.NONE||(f=u(G)),Y(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,
-mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));Y(G,!0);null!=h&&h.install(function(){Y(G,!0)},this.listeners.push(h));return C};
+BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;h=null!=h?"null"==h?null:h:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=h},function(z){m&&u.stopEditing();if(null!=g)g.funct();else{u.getModel().beginUpdate();try{var C=null!=p?p:k.getSelectionState().cells;z=z?f:h;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged",
+"keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(w,b,e)!=h)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,h,d,g,m,p,k){function u(P,T){"default"!=P||T||(P=m);"default"!=P&&p&&(P=mxUtils.getLightDarkColor(P),P=k()?P.dark:P.light);return P}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.style.padding="3px 0px 3px 0px";C.style.whiteSpace="nowrap";C.style.overflow="hidden";C.style.width="200px";C.style.height="18px";var E=document.createElement("input");E.setAttribute("type","checkbox");
+E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),K=!1,L=null,Q=null,N=document.createElement("input");N.setAttribute("type","color");N.style.position="relative";N.style.visibility="hidden";N.style.top="10px";N.style.width="0px";N.style.height="0px";N.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=
+Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(P){N.value=u(G);N.click();mxEvent.consume(P)}));var U=null,Y=function(P,T){K||(K=!0,null!=d&&d(P),T||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(P)),G=b(),P=mxUtils.getLightDarkColor("default"!=G?G:m),T=document.createElement("div"),T.style.width="21px",T.style.height="12px",
+T.style.margin="2px 18px 2px 3px",T.style.borderWidth="1px",T.style.borderStyle="solid",T.style.backgroundColor=P.cssText,Q.innerText="",Q.appendChild(T),!p&&mxUtils.isLightDarkColor(G)&&P.light!=P.dark?T.style.background="linear-gradient(to right bottom, "+P.cssText+" 50%, "+mxUtils.invertLightDarkColor(P).cssText+" 50.3%)":p&&w&&(T.style.backgroundColor=k()?P.dark:P.light),null!=L?(T.style.width="21px",T.style.margin="2px 18px 2px 3px",T.appendChild(L)):(T.style.width="36px",T.style.margin="3px"),
+null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(P="#"==G.charAt(0)?G.substring(1).toUpperCase():G,P=ColorDialog.prototype.colorNames[P],null!=P?Q.setAttribute("title",P):"default"==G?Q.setAttribute("title",mxResources.get("useBlackAndWhite")):Q.setAttribute("title",G)),null==G||G==mxConstants.NONE||z.isSpecialColor(G)?(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1):(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0),Q.style.display=E.checked||g?"":
+"none",K=!1)};C.appendChild(N);mxEvent.addListener(N,"change",function(){var P=N.value;if(!p){var T=mxUtils.getLightDarkColor(G);k()?T.dark=P:T.light=P;P="light-dark("+T.light+", "+T.dark+")"}Y(P)});Q=mxUtils.button("",mxUtils.bind(this,function(P){var T=m;p&&k()&&mxUtils.isLightDarkColor(T)&&(T=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(J){Y(J)},"default"==f?"default":null,T,p);mxEvent.consume(P)}));Q.style.position="absolute";Q.style.marginTop="-3px";Q.style.left=
+"178px";Q.style.height="22px";Q.className="geColorBtn";Q.style.display=E.checked||g?"":"none";C.appendChild(Q);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&Q.setAttribute("title",a);g||(mxEvent.addListener(C,"click",function(P){P=mxEvent.getSource(P);if(P==E||"INPUT"!=P.nodeName)P!=E&&(E.checked=!E.checked),E.checked||null==G||G==mxConstants.NONE||f==mxConstants.NONE||(f=u(G)),Y(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,
+mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));Y(G,!0);null!=h&&h.install(function(){Y(G,!0)},this.listeners.push(h));return C};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,h,d){var g=this.editorUi,m=g.editor.graph;return this.createColorOption(a,function(){var p=m.getCellStyle(m.getSelectionCell(),!1);return null!=p?p[b]:null},function(p){m.getModel().beginUpdate();try{var k=g.getSelectionState().cells;m.setCellStyles(b,p,k);null!=h&&h(p);g.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[p],"cells",k))}finally{m.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(p){this.listener=
function(){var k=m.getCellStyle(m.getSelectionCell(),!1);null!=k&&p(k[b],!0)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}},f,null,d)};
BaseFormatPanel.prototype.addArrow=function(a){a.className="geColorBtn";a.style.display="inline-flex";a.style.alignItems="top";a.style.boxSizing="border-box";a.style.width="64px";a.style.height="22px";a.style.borderWidth="1px";a.style.borderStyle="solid";a.style.margin="2px 2px 2px 3px";var b=document.createElement("div");b.className="geAdaptiveAsset";b.style.display="inline-block";b.style.backgroundImage="url("+Editor.thinExpandImage+")";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition=
"-2px 1px";b.style.backgroundSize="18px 18px";b.style.opacity="0.5";b.style.height="100%";b.style.width="14px";a.appendChild(b);a=a.getElementsByTagName("div")[0];null!=a&&(a.style.display="inline-block",a.style.backgroundPositionX="center",a.style.textAlign="center",a.style.height="100%",a.style.flexGrow="1",a.style.opacity="0.6");return a};
BaseFormatPanel.prototype.addUnitInput=function(a,b,e,f,h,d,g,m,p){g=null!=g?g:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-e-f+"px";b.style.width=f+"px";b.style.height="21px";b.style.borderWidth="1px";b.style.borderStyle="solid";b.style.boxSizing="border-box";a.appendChild(b);f=this.createStepper(b,h,d,null,m,null,p);f.style.marginTop=g-2+"px";f.style.left=228-e+"px";a.appendChild(f);return b};
-BaseFormatPanel.prototype.addGenericInput=function(a,b,e,f,h,d){var g=this.editorUi.editor.graph,m=function(){d(p.value)},p=this.addUnitInput(a,b,e,f,m),k=mxUtils.bind(this,function(u,x,z){if(z||p!=document.activeElement)p.value=h()+b});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(k(null,null,!0),g.container.focus(),mxEvent.consume(u))});g.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){g.getModel().removeListener(k)}});
+BaseFormatPanel.prototype.addGenericInput=function(a,b,e,f,h,d){var g=this.editorUi.editor.graph,m=function(){d(p.value)},p=this.addUnitInput(a,b,e,f,m),k=mxUtils.bind(this,function(u,w,z){if(z||p!=document.activeElement)p.value=h()+b});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(k(null,null,!0),g.container.focus(),mxEvent.consume(u))});g.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){g.getModel().removeListener(k)}});
k();mxEvent.addListener(p,"blur",m);mxEvent.addListener(p,"change",m);return p};
-BaseFormatPanel.prototype.createRelativeOption=function(a,b,e,f,h){e=null!=e?e:52;var d=this.editorUi,g=d.editor.graph,m=this.createPanel();m.style.paddingTop="10px";m.style.paddingBottom="12px";mxUtils.write(m,a);m.style.fontWeight="bold";a=mxUtils.bind(this,function(u){if(null!=f)f(p);else{var x=parseInt(p.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var z=g.view.getState(d.getSelectionState().cells[0]);null!=z&&x!=mxUtils.getValue(z.style,b,100)&&(100==x&&(x=null),z=d.getSelectionState().cells,
-g.setCellStyles(b,x,z),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",z)));p.value=(null!=x?x:"100")+" %"}mxEvent.consume(u)});var p=this.addUnitInput(m,"%",16,e,a,10,0,null!=f);if(null!=b){var k=mxUtils.bind(this,function(u,x,z){if(z||p!=document.activeElement)u=d.getSelectionState(),u=parseInt(mxUtils.getValue(u.style,b,100)),p.value=isNaN(u)?"":u+" %"});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,e,f,h){e=null!=e?e:52;var d=this.editorUi,g=d.editor.graph,m=this.createPanel();m.style.paddingTop="10px";m.style.paddingBottom="12px";mxUtils.write(m,a);m.style.fontWeight="bold";a=mxUtils.bind(this,function(u){if(null!=f)f(p);else{var w=parseInt(p.value);w=Math.min(100,Math.max(0,isNaN(w)?100:w));var z=g.view.getState(d.getSelectionState().cells[0]);null!=z&&w!=mxUtils.getValue(z.style,b,100)&&(100==w&&(w=null),z=d.getSelectionState().cells,
+g.setCellStyles(b,w,z),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[w],"cells",z)));p.value=(null!=w?w:"100")+" %"}mxEvent.consume(u)});var p=this.addUnitInput(m,"%",16,e,a,10,0,null!=f);if(null!=b){var k=mxUtils.bind(this,function(u,w,z){if(z||p!=document.activeElement)u=d.getSelectionState(),u=parseInt(mxUtils.getValue(u.style,b,100)),p.value=isNaN(u)?"":u+" %"});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==
u.keyCode&&(k(null,null,!0),g.container.focus(),mxEvent.consume(u))});g.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){g.getModel().removeListener(k)}});k()}mxEvent.addListener(p,"blur",a);mxEvent.addListener(p,"change",a);null!=h&&h(p);return m};
BaseFormatPanel.prototype.addLabel=function(a,b,e,f){f=null!=f?f:61;var h=document.createElement("div");mxUtils.write(h,b);h.style.position="absolute";h.style.left=240-e-f+"px";h.style.width=f+"px";h.style.marginTop="6px";h.style.display="flex";h.style.justifyContent="center";a.appendChild(h);return h};
BaseFormatPanel.prototype.addKeyHandler=function(a,b){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(e){13==e.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(e)):27==e.keyCode&&(null!=b&&b(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(e))}))};
@@ -3082,7 +3083,7 @@ ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.grap
f.checked)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);mxUtils.br(a);e=document.createElement("div");e.style.margin="6px 0 0 0";e.style.display="flex";e.style.justifyContent="center";e.style.alignItems="center";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","spacingCheckbox");f.style.margin="0 6px 0 0";e.appendChild(f);var h=document.createElement("label");h.style.verticalAlign="top";h.setAttribute("for",
"spacingCheckbox");h.style.userSelect="none";mxUtils.write(h,mxResources.get("spacing"));e.appendChild(h);a.appendChild(e);return a};
ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();a.style.paddingBottom="12px";var h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";var d=null,g=null,m=null;!f.rotatable||f.table||f.row||f.cell?a.style.paddingTop="8px":(mxUtils.write(h,mxResources.get("angle")),a.appendChild(h),d=this.addUnitInput(a,"°",16,52,function(){g.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
-"10px");f.containsLabel||(h=mxResources.get("reverse"),0<f.vertices.length&&0<f.edges.length?h=mxResources.get("turn")+" / "+h:0<f.vertices.length&&(h=mxResources.get("turn")),m=mxUtils.button(h,function(k){b.actions.get("turn").funct(k)}),m.setAttribute("title",h+" ("+this.editorUi.actions.get("turn").shortcut+")"),m.style.width="210px",a.appendChild(m),null!=d&&(m.style.marginTop="8px"));if(null!=d){var p=mxUtils.bind(this,function(k,u,x){if(x||document.activeElement!=d)f=b.getSelectionState(),
+"10px");f.containsLabel||(h=mxResources.get("reverse"),0<f.vertices.length&&0<f.edges.length?h=mxResources.get("turn")+" / "+h:0<f.vertices.length&&(h=mxResources.get("turn")),m=mxUtils.button(h,function(k){b.actions.get("turn").funct(k)}),m.setAttribute("title",h+" ("+this.editorUi.actions.get("turn").shortcut+")"),m.style.width="210px",a.appendChild(m),null!=d&&(m.style.marginTop="8px"));if(null!=d){var p=mxUtils.bind(this,function(k,u,w){if(w||document.activeElement!=d)f=b.getSelectionState(),
k=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0)),d.value=isNaN(k)?"":k+"°"});g=this.installInputHandler(d,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(d,p);e.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){e.getModel().removeListener(p)}});p()}return a};
BaseFormatPanel.prototype.getUnit=function(a){var b="";switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:b="pt";break;case mxConstants.INCHES:b='"';break;case mxConstants.MILLIMETERS:b="mm";break;case mxConstants.METERS:b="m"}return(a?a:"")+b};BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
@@ -3090,92 +3091,92 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.gra
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=f.getModel(),d=e.getSelectionState(),g=this.createPanel();g.style.paddingBottom="8px";var m=document.createElement("div");m.style.position="absolute";m.style.width="50px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("size"));g.appendChild(m);var p=this.addUnitInput(g,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
k=this.addUnitInput(g,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),u=document.createElement("div");u.className="geAdaptiveAsset";u.style.backgroundImage="url("+Editor.autosizeImage+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="18px 18px";u.style.width="21px";u.style.height="21px";u.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+
")");u.style.position="relative";u.style.cursor="pointer";u.style.marginTop="-3px";u.style.border="0px";u.style.left="42px";mxUtils.setOpacity(u,50);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){mxUtils.setOpacity(u,50)});mxEvent.addListener(u,"click",function(){e.actions.get("autosize").funct()});g.appendChild(u);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(g,mxResources.get("width"),
-87,64);this.addLabel(g,mxResources.get("height"),16,64);mxUtils.br(g);m=document.createElement("div");m.style.paddingTop="8px";m.style.paddingRight="20px";m.style.whiteSpace="nowrap";m.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";m.appendChild(x);d.cell||d.row?u.style.visibility="hidden":g.appendChild(m);var z=x.getElementsByTagName("input")[0];this.addKeyHandler(p,Y);this.addKeyHandler(k,
-Y);var C=this.addGeometryHandler(p,function(M,V,aa){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(aa))return f.setTableColumnWidth(aa,V-M.width,!0),!0;0<M.width&&(z.checked&&(M.height=Math.round(M.height*V*100/M.width)/100),M.width=V)});var E=this.addGeometryHandler(k,function(M,V,aa){V=Math.max(1,b.fromUnit(V));f.isTableCell(aa)&&(aa=h.getParent(aa));if(f.isTableRow(aa))return f.setTableRowHeight(aa,V-M.height),!0;0<M.height&&(z.checked&&(M.width=Math.round(M.width*V*100/M.height)/100),M.height=V)});
-(d.resizable||d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),I=this.addUnitInput(D,this.getUnit(),16,52,function(){P.apply(this,arguments)},
-this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(D);x=!0;var L=null,T=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=f.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*K.x)/10},function(M){M=parseFloat(M);if(!isNaN(M)){h.beginUpdate();
-try{K=K.clone(),K.x=parseFloat(M)/100,h.setGeometry(d.vertices[0],K)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){x=!1;var U=null;T=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(T,function(M,V){M.y=b.fromUnit(V)})}else T=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*K.y)/10},function(M){M=parseFloat(M);if(!isNaN(M)){h.beginUpdate();try{K=K.clone(),K.y=parseFloat(M)/100,h.setGeometry(d.vertices[0],
-K)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(x?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(x?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(M,V,aa){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(aa||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();
-if(aa||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){M=f.getCellGeometry(d.vertices[0]);D.style.display="";if(aa||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(aa||document.activeElement!=I)I.value=this.inUnit(d.y)+" "+this.getUnit();null!=M&&M.relative&&(null==L||!aa&&document.activeElement==L||(L.value=Math.round(1E3*M.x)/10+" %"),null==T||!aa&&document.activeElement==
-T||(h.isEdge(h.getParent(d.vertices[0]))?T.value=this.inUnit(M.y)+" "+this.getUnit():T.value=Math.round(1E3*M.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(I,Y);Y();var Q=this.addGeometryHandler(G,function(M,V){V=b.fromUnit(V);M.relative?(M.offset=null!=M.offset?M.offset:new mxPoint,M.offset.x=V):M.x=V});var P=this.addGeometryHandler(I,function(M,V){V=b.fromUnit(V);
-M.relative?(M.offset=null!=M.offset?M.offset:new mxPoint,M.offset.y=V):M.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(K=f.getCellGeometry(d.vertices[0]),null!=K&&K.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(M){h.beginUpdate();try{K=K.clone(),K.x=0,K.y=0,K.offset=new mxPoint,h.setGeometry(d.vertices[0],K)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left=
+87,64);this.addLabel(g,mxResources.get("height"),16,64);mxUtils.br(g);m=document.createElement("div");m.style.paddingTop="8px";m.style.paddingRight="20px";m.style.whiteSpace="nowrap";m.style.textAlign="right";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.style.width="210px";m.appendChild(w);d.cell||d.row?u.style.visibility="hidden":g.appendChild(m);var z=w.getElementsByTagName("input")[0];this.addKeyHandler(p,Y);this.addKeyHandler(k,
+Y);var C=this.addGeometryHandler(p,function(J,V,Z){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(Z))return f.setTableColumnWidth(Z,V-J.width,!0),!0;0<J.width&&(z.checked&&(J.height=Math.round(J.height*V*100/J.width)/100),J.width=V)});var E=this.addGeometryHandler(k,function(J,V,Z){V=Math.max(1,b.fromUnit(V));f.isTableCell(Z)&&(Z=h.getParent(Z));if(f.isTableRow(Z))return f.setTableRowHeight(Z,V-J.height),!0;0<J.height&&(z.checked&&(J.width=Math.round(J.width*V*100/J.height)/100),J.height=V)});(d.resizable||
+d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),K=this.addUnitInput(D,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),
+null,null,this.isFloatUnit());mxUtils.br(D);w=!0;var L=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var N=f.getCellGeometry(d.vertices[0]);if(null!=N&&N.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*N.x)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();
+try{N=N.clone(),N.x=parseFloat(J)/100,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){w=!1;var U=null;Q=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(Q,function(J,V){J.y=b.fromUnit(V)})}else Q=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*N.y)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();try{N=N.clone(),N.y=parseFloat(J)/100,h.setGeometry(d.vertices[0],
+N)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(w?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(w?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(J,V,Z){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(Z||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();
+if(Z||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){J=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Z||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Z||document.activeElement!=K)K.value=this.inUnit(d.y)+" "+this.getUnit();null!=J&&J.relative&&(null==L||!Z&&document.activeElement==L||(L.value=Math.round(1E3*J.x)/10+" %"),null==Q||!Z&&document.activeElement==
+Q||(h.isEdge(h.getParent(d.vertices[0]))?Q.value=this.inUnit(J.y)+" "+this.getUnit():Q.value=Math.round(1E3*J.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(K,Y);Y();var P=this.addGeometryHandler(G,function(J,V){V=b.fromUnit(V);J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.x=V):J.x=V});var T=this.addGeometryHandler(K,function(J,V){V=b.fromUnit(V);
+J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.y=V):J.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(N=f.getCellGeometry(d.vertices[0]),null!=N&&N.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(J){h.beginUpdate();try{N=N.clone(),N.x=0,N.y=0,N.offset=new mxPoint,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left=
"89px",m.style.position="absolute",mxUtils.br(D),mxUtils.br(D),D.appendChild(m))),a.appendChild(D))};
-ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+g.getUnit();else if(p!=d){h.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(h.getModel().isVertex(k[u])){var x=h.getCellGeometry(k[u]);if(null!=x&&(x=x.clone(),!b(x,p,k[u]))){var z=h.view.getState(k[u]);null!=z&&h.isRecursiveVertexResize(z)&&h.resizeChildCells(k[u],x);h.getModel().setGeometry(k[u],x);h.constrainChildCells(k[u])}}}finally{h.getModel().endUpdate()}d=
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+g.getUnit();else if(p!=d){h.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(h.getModel().isVertex(k[u])){var w=h.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var z=h.view.getState(k[u]);null!=z&&h.isRecursiveVertexResize(z)&&h.resizeChildCells(k[u],w);h.getModel().setGeometry(k[u],w);h.constrainChildCells(k[u])}}}finally{h.getModel().endUpdate()}d=
p;a.value=p+" "+g.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,h=f.editor.graph,d=null,g=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(g){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){h.getModel().beginUpdate();try{for(var p=f.getSelectionState().cells,k=0;k<p.length;k++)if(h.getModel().isEdge(p[k])){var u=h.getCellGeometry(p[k]);null!=u&&(u=u.clone(),b(u,m),h.getModel().setGeometry(p[k],u))}}finally{h.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(g)}var f=this.editorUi,h=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=e.getSelectionState(),d=this.createPanel(),g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("width"));d.appendChild(g);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(K){var U=parseInt(m.value);
-U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Y=e.getSelectionState().cells;f.setCellStyles("width",U,Y);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",Y))}m.value=U+" pt";mxEvent.consume(K)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";g=document.createElement("div");g.style.position=
-"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),x=this.addUnitInput(k,this.getUnit(),16,52,function(){I.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
-this.addKeyHandler(u,D);this.addKeyHandler(x,D);var z=this.createPanel();z.style.paddingBottom="30px";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("lineend"));z.appendChild(g);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){L.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(z,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(K,U,Y){h=e.getSelectionState();K=h.cells[0];if("link"==h.style.shape||"flexArrow"==h.style.shape){if(d.style.display="",Y||document.activeElement!=m)Y=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=Y+" pt"}else d.style.display=
-"none";1==h.cells.length&&f.model.isEdge(K)?(Y=f.model.getGeometry(K),null!=Y&&null!=Y.sourcePoint&&null==f.model.getTerminal(K,!0)?(u.value=this.inUnit(Y.sourcePoint.x)+" "+this.getUnit(),x.value=this.inUnit(Y.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=Y&&null!=Y.targetPoint&&null==f.model.getTerminal(K,!1)?(C.value=this.inUnit(Y.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(Y.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
-"none")});var G=this.addEdgeGeometryHandler(u,function(K,U){K.sourcePoint.x=b.fromUnit(U)});var I=this.addEdgeGeometryHandler(x,function(K,U){K.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(K,U){K.targetPoint.x=b.fromUnit(U)});var T=this.addEdgeGeometryHandler(E,function(K,U){K.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=e.getSelectionState(),d=this.createPanel(),g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("width"));d.appendChild(g);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(N){var U=parseInt(m.value);
+U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Y=e.getSelectionState().cells;f.setCellStyles("width",U,Y);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",Y))}m.value=U+" pt";mxEvent.consume(N)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";g=document.createElement("div");g.style.position=
+"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){K.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
+this.addKeyHandler(u,D);this.addKeyHandler(w,D);var z=this.createPanel();z.style.paddingBottom="30px";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("lineend"));z.appendChild(g);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){L.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(z,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,
+null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(N,U,Y){h=e.getSelectionState();N=h.cells[0];if("link"==h.style.shape||"flexArrow"==h.style.shape){if(d.style.display="",Y||document.activeElement!=m)Y=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=Y+" pt"}else d.style.display=
+"none";1==h.cells.length&&f.model.isEdge(N)?(Y=f.model.getGeometry(N),null!=Y&&null!=Y.sourcePoint&&null==f.model.getTerminal(N,!0)?(u.value=this.inUnit(Y.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(Y.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=Y&&null!=Y.targetPoint&&null==f.model.getTerminal(N,!1)?(C.value=this.inUnit(Y.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(Y.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
+"none")});var G=this.addEdgeGeometryHandler(u,function(N,U){N.sourcePoint.x=b.fromUnit(U)});var K=this.addEdgeGeometryHandler(w,function(N,U){N.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(N,U){N.targetPoint.x=b.fromUnit(U)});var Q=this.addEdgeGeometryHandler(E,function(N,U){N.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};
TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container);this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){a.style.paddingTop="8px";a.style.paddingBottom="6px";0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,A){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var B=mxUtils.getCurrentStyle(q);parseFloat(B.fontSize)*A/100!=parseFloat(B.lineHeight)?q.style.lineHeight=A+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,A){A?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var h=
this.editorUi,d=h.editor.graph,g=h.getSelectionState(),m=this.createTitle(mxResources.get("font"));m.style.paddingLeft="14px";m.style.paddingTop="10px";m.style.paddingBottom="6px";a.appendChild(m);m=this.createPanel();m.style.paddingTop="2px";m.style.paddingBottom="2px";m.style.position="relative";m.style.marginLeft="-2px";m.style.borderWidth="0px";m.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),
!0,"formatBlock",p,null,!0);this.addArrow(k);k.style.width="211px";k.style.alignItems="center";k.style.justifyContent="center";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.margin="0px";k.style.position="relative";k=k.getElementsByTagName("div")[0];k.style.position="absolute";k.style.right="2px";a.appendChild(p)}a.appendChild(m);p=this.createPanel();p.style.marginTop="8px";p.style.borderWidth="1px";p.style.borderStyle="solid";p.style.paddingTop="6px";p.style.paddingBottom="2px";var u=
-this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",m,null,!0);this.addArrow(u);u.style.width="211px";u.style.alignItems="center";u.style.justifyContent="center";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";u.style.position="relative";k=u.getElementsByTagName("div")[0];k.style.position="absolute";k.style.right="2px";k=m.cloneNode(!1);k.style.marginLeft="-3px";k.style.height="31px";var x=this.editorUi.toolbar.addItems(["bold","italic",
-"underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);x[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");x[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");x[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var z=this.editorUi.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);
-this.styleButtons(x);this.styleButtons([z]);var C=m.cloneNode(!1);C.style.height="31px";C.style.paddingTop="2px";C.style.marginLeft="-3px";C.style.paddingBottom="0px";var E=function(q){return function(){return q()}},D=this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],
+this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",m,null,!0);this.addArrow(u);u.style.width="211px";u.style.alignItems="center";u.style.justifyContent="center";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";u.style.position="relative";k=u.getElementsByTagName("div")[0];k.style.position="absolute";k.style.right="2px";k=m.cloneNode(!1);k.style.marginLeft="-3px";k.style.height="31px";var w=this.editorUi.toolbar.addItems(["bold","italic",
+"underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var z=this.editorUi.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);
+this.styleButtons(w);this.styleButtons([z]);var C=m.cloneNode(!1);C.style.height="31px";C.style.paddingTop="2px";C.style.marginLeft="-3px";C.style.paddingBottom="0px";var E=function(q){return function(){return q()}},D=this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],
"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),C),G=this.editorUi.toolbar.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
-[mxConstants.ALIGN_CENTER])),C),I=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,I]);if(d.cellEditor.isContentEditing()){var L=
-this.editorUi.toolbar.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([L])}var T=this.editorUi.toolbar.addButton(Editor.alignTopImage,mxResources.get("top"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),K=this.editorUi.toolbar.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],
-[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([T,K,U]);a.appendChild(C);var Y,Q,P,M,V;if(d.cellEditor.isContentEditing()){T.style.display="none";K.style.display="none";U.style.display="none";z.style.display="none";var aa=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),
-function(){1==aa.style.opacity&&document.execCommand("justifyfull",!1,null)},C);aa.style.marginRight="9px";this.styleButtons([aa,Y=this.editorUi.toolbar.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C),Q=this.editorUi.toolbar.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C)]);Y.style.marginLeft="10px";E=
-C.cloneNode(!1);E.style.paddingTop="4px";C=[this.editorUi.toolbar.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.outdentImage,
-mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else x[2].style.marginRight="12px",I.style.marginRight="12px";C=m.cloneNode(!1);
-C.removeAttribute("class");C.style.marginLeft="0px";C.style.paddingTop="8px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("position"));var ia=document.createElement("select");ia.style.position="absolute";ia.style.left="126px";ia.style.width="98px";ia.style.borderWidth="1px";ia.style.borderStyle="solid";ia.style.marginTop="-3px";var na="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,
+[mxConstants.ALIGN_CENTER])),C),K=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,K]);if(d.cellEditor.isContentEditing()){var L=
+this.editorUi.toolbar.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([L])}var Q=this.editorUi.toolbar.addButton(Editor.alignTopImage,mxResources.get("top"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),N=this.editorUi.toolbar.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],
+[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([Q,N,U]);a.appendChild(C);var Y,P,T,J,V;if(d.cellEditor.isContentEditing()){Q.style.display="none";N.style.display="none";U.style.display="none";z.style.display="none";var Z=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),
+function(){1==Z.style.opacity&&document.execCommand("justifyfull",!1,null)},C);Z.style.marginRight="9px";this.styleButtons([Z,Y=this.editorUi.toolbar.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C),P=this.editorUi.toolbar.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C)]);Y.style.marginLeft="10px";E=C.cloneNode(!1);
+E.style.paddingTop="4px";C=[this.editorUi.toolbar.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.outdentImage,
+mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",K.style.marginRight="12px";C=m.cloneNode(!1);
+C.removeAttribute("class");C.style.marginLeft="0px";C.style.paddingTop="8px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("position"));var ia=document.createElement("select");ia.style.position="absolute";ia.style.left="126px";ia.style.width="98px";ia.style.borderWidth="1px";ia.style.borderStyle="solid";ia.style.marginTop="-3px";var oa="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),sa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,
-mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<na.length;E++){var O=document.createElement("option");O.setAttribute("value",na[E]);mxUtils.write(O,
-mxResources.get(na[E]));ia.appendChild(O)}C.appendChild(ia);na=m.cloneNode(!1);na.removeAttribute("class");na.style.marginLeft="0px";na.style.paddingTop="4px";na.style.paddingBottom="4px";na.style.fontWeight="normal";mxUtils.write(na,mxResources.get("writingDirection"));var Z=document.createElement("select");Z.style.position="absolute";Z.style.borderWidth="1px";Z.style.borderStyle="solid";Z.style.left="126px";Z.style.width="98px";Z.style.marginTop="-3px";O=["automatic","leftToRight","rightToLeft"];
-g.html&&(O.push("vertical-leftToRight"),O.push("vertical-rightToLeft"));var ca={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<O.length;E++){var W=document.createElement("option");W.setAttribute("value",O[E]);"vertical-"==O[E].substring(0,9)?mxUtils.write(W,mxResources.get("vertical")+" ("+mxResources.get(O[E].substring(9))+
-")"):mxUtils.write(W,mxResources.get(O[E]));Z.appendChild(W)}na.appendChild(Z);d.isEditing()||(a.appendChild(C),mxEvent.addListener(ia,"change",function(q){d.getModel().beginUpdate();try{var A=qa[ia.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),
-a.appendChild(na),mxEvent.addListener(Z,"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ca[Z.value],g.cells);mxEvent.consume(q)}));var ja=document.createElement("input");ja.style.position="absolute";ja.style.borderWidth="1px";ja.style.borderStyle="solid";ja.style.textAlign="right";ja.style.marginTop="4px";ja.style.left="161px";ja.style.width="53px";ja.style.height="23px";ja.style.boxSizing="border-box";k.appendChild(ja);C=this.installInputHandler(ja,mxConstants.STYLE_FONTSIZE,
-Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ja.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);q!=b(F)?A[B].style.fontSize=q+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ja,
-C,1,10,!0,Menus.prototype.defaultFontSize);C.style.display=ja.style.display;C.style.marginTop="4px";C.style.left="214px";k.appendChild(C);k=u.getElementsByTagName("div")[0];k.style.cssFloat="right";var H=null,ea=d.shapeBackgroundColor,oa=null,sa=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Pa="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",la=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ea==
+mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<oa.length;E++){var O=document.createElement("option");O.setAttribute("value",oa[E]);mxUtils.write(O,
+mxResources.get(oa[E]));ia.appendChild(O)}C.appendChild(ia);oa=m.cloneNode(!1);oa.removeAttribute("class");oa.style.marginLeft="0px";oa.style.paddingTop="4px";oa.style.paddingBottom="4px";oa.style.fontWeight="normal";mxUtils.write(oa,mxResources.get("writingDirection"));var X=document.createElement("select");X.style.position="absolute";X.style.borderWidth="1px";X.style.borderStyle="solid";X.style.left="126px";X.style.width="98px";X.style.marginTop="-3px";O=["automatic","leftToRight","rightToLeft"];
+g.html&&(O.push("vertical-leftToRight"),O.push("vertical-rightToLeft"));var ba={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<O.length;E++){var da=document.createElement("option");da.setAttribute("value",O[E]);"vertical-"==O[E].substring(0,9)?mxUtils.write(da,mxResources.get("vertical")+" ("+mxResources.get(O[E].substring(9))+
+")"):mxUtils.write(da,mxResources.get(O[E]));X.appendChild(da)}oa.appendChild(X);d.isEditing()||(a.appendChild(C),mxEvent.addListener(ia,"change",function(q){d.getModel().beginUpdate();try{var A=sa[ia.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),
+a.appendChild(oa),mxEvent.addListener(X,"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ba[X.value],g.cells);mxEvent.consume(q)}));var ca=document.createElement("input");ca.style.position="absolute";ca.style.borderWidth="1px";ca.style.borderStyle="solid";ca.style.textAlign="right";ca.style.marginTop="4px";ca.style.left="161px";ca.style.width="53px";ca.style.height="23px";ca.style.boxSizing="border-box";k.appendChild(ca);C=this.installInputHandler(ca,mxConstants.STYLE_FONTSIZE,
+Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ca.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);q!=b(F)?A[B].style.fontSize=q+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ca,
+C,1,10,!0,Menus.prototype.defaultFontSize);C.style.display=ca.style.display;C.style.marginTop="4px";C.style.left="214px";k.appendChild(C);k=u.getElementsByTagName("div")[0];k.style.cssFloat="right";var H=null,ea=d.shapeBackgroundColor,ra=null,qa=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Pa="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",ma=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ea==
d.shapeBackgroundColor||ea==Pa?"default":ea},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,q,!1),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){H=q},destroy:function(){H=null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
-"default",null,function(q){d.updateLabelElements(g.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);la.style.fontWeight="bold";var Ba=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);Ba.style.fontWeight="bold";k=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),
-function(){return sa},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){oa=q},destroy:function(){oa=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),
-mxConstants.STYLE_FONTCOLOR,"default",function(q){la.style.display=q==mxConstants.NONE?"none":"";Ba.style.display=la.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,g.cells);d.updateLabelElements(g.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";p.appendChild(k);p.appendChild(la);
+"default",null,function(q){d.updateLabelElements(g.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);ma.style.fontWeight="bold";var Ba=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);Ba.style.fontWeight="bold";k=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),
+function(){return qa},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){ra=q},destroy:function(){ra=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),
+mxConstants.STYLE_FONTCOLOR,"default",function(q){ma.style.display=q==mxConstants.NONE?"none":"";Ba.style.display=ma.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,g.cells);d.updateLabelElements(g.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";p.appendChild(k);p.appendChild(ma);
k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(Ba),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";k=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==
A||d.isAutoSizeState(A)||d.getModel().isEdge(q)||!d.isTableRow(q)&&!d.isTableCell(q)&&!d.isCellResizable(q)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&p.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,h.actions.get("formattedText"));k.style.fontWeight="bold";p.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom=
-"28px";k.style.fontWeight="normal";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Fa=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);
-this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ha=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
+"28px";k.style.fontWeight="normal";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);
+this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Da=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ga=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ta=null,La=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ta&&(d.cellEditor.restoreSelection(ta),ta=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&
-B==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&d.cellEditor.textarea.firstChild.nodeType!=mxConstants.NODETYPE_ELEMENT&&1==d.cellEditor.textarea.children.length){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var N=F.getRangeAt(0);B=document.createElement("div");B.appendChild(N.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();N=new Range;N.selectNodeContents(B);F.addRange(N)}}if(null!=B)for(B!=d.cellEditor.textarea&&
-e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),N=0;N<B.length;N++)F.containsNode(B[N],!0)&&e(B[N],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link",
+B==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&d.cellEditor.textarea.firstChild.nodeType!=mxConstants.NODETYPE_ELEMENT&&1==d.cellEditor.textarea.children.length){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var M=F.getRangeAt(0);B=document.createElement("div");B.appendChild(M.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();M=new Range;M.selectNodeContents(B);F.addRange(M)}}if(null!=B)for(B!=d.cellEditor.textarea&&
+e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),M=0;M<B.length;M++)F.containsNode(B[M],!0)&&e(B[M],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link",
"image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[this.editorUi.toolbar.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},p),this.editorUi.toolbar.addMenuFunctionInContainer(p,Editor.tableImage,mxResources.get("table"),!1,mxUtils.bind(this,function(q){this.editorUi.menus.addInsertTableItem(q,null,null,!1)}))];this.styleButtons(k);this.styleButtons(C);k=this.createPanel();k.style.height="57px";k.style.paddingTop=
-"10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=P&&d.insertColumn(P,null!=M?M.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),
-mxUtils.bind(this,function(){try{null!=P&&d.insertColumn(P,null!=M?M.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=P&&null!=M&&d.deleteColumn(P,M.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=P&&null!=V&&d.insertRow(P,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),
-k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=P&&null!=V&&d.insertRow(P,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=P&&null!=V&&d.deleteRow(P,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();
-p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=P){var A=P.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,N,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(N).toString(16)).substr(-2)+
-("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==M||null!=q&&mxEvent.isShiftDown(q)?P:M;d.processElements(F,function(N){N.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=
-P){var A=P.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,N,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(N).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==M||null!=q&&mxEvent.isShiftDown(q)?P:M;d.processElements(F,function(N){N.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,
-mxResources.get("spacing"),function(){if(null!=P){var q=P.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?P.setAttribute("cellPadding",A):P.removeAttribute("cellPadding")}),mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=P&&P.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,
-mxResources.get("center"),function(){null!=P&&P.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=P&&P.setAttribute("align","right")},m)];this.styleButtons(C);C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(x[q],
-"click",function(){f(x[q],""==x[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(x[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(x[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(x[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,
-mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ja.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(I,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(T,q==mxConstants.ALIGN_TOP);
-f(K,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":
-q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?Z.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?Z.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?
-Z.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(Z.value="vertical-rightToLeft"):Z.value="automatic";if(B||document.activeElement!=Fa)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Fa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ha)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ha.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Fa,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),
-null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Ha,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),
-!0);this.addKeyHandler(ja,Ya);this.addKeyHandler(Fa,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ha,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=
-function(ya,Ga){if(null!=ya&&null!=Ga){if(ya==Ga)return!0;if(ya.length>Ga.length+1)return ya.substring(ya.length-Ga.length-1,ya.length)=="-"+Ga}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ga=q;null!=Ga&&1==Ga.childNodes.length;)if(Ga=Ga.childNodes[0],Ga.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},N=mxUtils.getCurrentStyle(q),
-R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,X=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(N);if(window.getSelection)for(var fa=q.getElementsByTagName("*"),da=window.getSelection(),ha=0;ha<fa.length&&(!da.containsNode(fa[ha],!0)||(null==X&&""!=fa[ha].style.fontSize&&(X=parseFloat(fa[ha].style.fontSize)),null==R&&""!=fa[ha].style.lineHeight&&(R=fa[ha].style.lineHeight),null==X||null==R));ha++);null==X&&(X=b(N));if(null==R)for(fa=q;null!=fa&&fa!=d.cellEditor.textarea.parentNode;){if(null!=
-fa.style&&""!=fa.style.lineHeight){R=fa.style.lineHeight;break}fa=fa.parentNode}if(null!=N){f(x[0],"bold"==N.fontWeight||400<N.fontWeight||B("B")||B("STRONG"));f(x[1],"italic"==N.fontStyle||B("I")||B("EM"));f(x[2],"underline"==N.textDecorationLine||B("U"));f(L,"line-through"==N.textDecorationLine||B("STRIKE"));f(Q,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ga){Na.push({name:ya,dispName:Ga,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,
+"10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),
+mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=T&&null!=J&&d.deleteColumn(T,J.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),
+k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.deleteRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();
+p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+
+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=
+T){var A=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,
+mxResources.get("spacing"),function(){if(null!=T){var q=T.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?T.setAttribute("cellPadding",A):T.removeAttribute("cellPadding")}),mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,
+mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},m)];this.styleButtons(C);C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],
+"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,
+mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ca.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(K,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(Q,q==mxConstants.ALIGN_TOP);
+f(N,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":
+q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?
+X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ga)q=parseFloat(mxUtils.getValue(g.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),Ga.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Da)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Da.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),
+null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),
+!0);this.addKeyHandler(ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ga,Ya);this.addKeyHandler(Da,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=
+function(ya,Ha){if(null!=ya&&null!=Ha){if(ya==Ha)return!0;if(ya.length>Ha.length+1)return ya.substring(ya.length-Ha.length-1,ya.length)=="-"+Ha}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ha=q;null!=Ha&&1==Ha.childNodes.length;)if(Ha=Ha.childNodes[0],Ha.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},M=mxUtils.getCurrentStyle(q),
+R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,W=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(M);if(window.getSelection)for(var ha=q.getElementsByTagName("*"),fa=window.getSelection(),ja=0;ja<ha.length&&(!fa.containsNode(ha[ja],!0)||(null==W&&""!=ha[ja].style.fontSize&&(W=parseFloat(ha[ja].style.fontSize)),null==R&&""!=ha[ja].style.lineHeight&&(R=ha[ja].style.lineHeight),null==W||null==R));ja++);null==W&&(W=b(M));if(null==R)for(ha=q;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=
+ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=M){f(w[0],"bold"==M.fontWeight||400<M.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==M.fontStyle||B("I")||B("EM"));f(w[2],"underline"==M.textDecorationLine||B("U"));f(L,"line-through"==M.textDecorationLine||B("STRIKE"));f(P,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ha){Na.push({name:ya,dispName:Ha,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,
Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Va[ya]=Qa;""==wa&&null!=ua&&(ua.value=Ma[ya])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,g,!0);null!=ib?ib.parentNode.replaceChild(B,ib):a.appendChild(B);
-ib=B}d.cellEditor.isTableSelected()?(f(aa,A(N.textAlign,"justify")),f(D,A(N.textAlign,"left")),f(G,A(N.textAlign,"center")),f(I,A(N.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(N.textAlign,"justify")?(f(aa,A(N.textAlign,"justify")),f(D,!1),f(G,!1),f(I,!1)):(f(aa,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(I,B==mxConstants.ALIGN_RIGHT)));P=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==
-P?null:d.getParentByName(q,"TR",P);M=null==P?null:d.getParentByNames(q,["TD","TH"],P);Xa.style.display=null!=P?"":"none";document.activeElement!=ja&&(ja.value=isNaN(X)?"":X+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=oa&&(sa=d.getTextColor(q,!0),oa(sa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(N.fontFamily))}}eb=
+ib=B}d.cellEditor.isTableSelected()?(f(Z,A(M.textAlign,"justify")),f(D,A(M.textAlign,"left")),f(G,A(M.textAlign,"center")),f(K,A(M.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(M.textAlign,"justify")?(f(Z,A(M.textAlign,"justify")),f(D,!1),f(G,!1),f(K,!1)):(f(Z,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(K,B==mxConstants.ALIGN_RIGHT)));T=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==T?
+null:d.getParentByName(q,"TR",T);J=null==T?null:d.getParentByNames(q,["TD","TH"],T);Xa.style.display=null!=T?"":"none";document.activeElement!=ca&&(ca.value=isNaN(W)?"":W+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=ra&&(qa=d.getTextColor(q,!0),ra(qa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(M.fontFamily))}}eb=
!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY);b.style.paddingTop="8px";b.style.paddingBottom="10px";this.container.appendChild(b);this.container.appendChild(this.addEffects(this.createPanel()))}b=this.createPanel();b.style.paddingTop="8px";1==a.cells.length&&(this.addEditOps(b),null!=b.firstChild&&mxUtils.br(b));1<=a.cells.length&&this.addStyleOps(b);null!=b.firstChild&&this.container.appendChild(b)};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light dark"!=g.documentElement.style.colorScheme,p=g.getElementsByTagName("style");
-for(b=0;b<p.length;b++){var k=this.getCssRules(mxUtils.getTextContent(p[b]));if(e=m)for(var u=0;u<k.length;u++)if(0<=k[b].cssText.indexOf("color-scheme: light dark")){e=!1;break}for(u=0;u<k.length;u++)this.addSvgRule(a,k[u],g,p[b],k,u,f,e)}}}}catch(x){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m){var p=this.editorUi,k=p.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(u,x,z){var C=mxUtils.trim(u.style[x]);if(""!=C&&"url("!=C.substring(0,4)){var E=C;"transparent"==E?E=mxConstants.NONE:mxUtils.isLightDarkColor(E)&&m&&(m=!1);u=this.createColorOption(z+" "+u.selectorText,function(){return E},mxUtils.bind(this,function(D){h[d].style[x]=D==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(D).cssText;D="";for(var G=
+for(b=0;b<p.length;b++){var k=this.getCssRules(mxUtils.getTextContent(p[b]));if(e=m)for(var u=0;u<k.length;u++)if(0<=k[b].cssText.indexOf("color-scheme: light dark")){e=!1;break}for(u=0;u<k.length;u++)this.addSvgRule(a,k[u],g,p[b],k,u,f,e)}}}}catch(w){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m){var p=this.editorUi,k=p.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(u,w,z){var C=mxUtils.trim(u.style[w]);if(""!=C&&"url("!=C.substring(0,4)){var E=C;"transparent"==E?E=mxConstants.NONE:mxUtils.isLightDarkColor(E)&&m&&(m=!1);u=this.createColorOption(z+" "+u.selectorText,function(){return E},mxUtils.bind(this,function(D){h[d].style[w]=D==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(D).cssText;D="";for(var G=
0;G<h.length;G++)D+=h[G].cssText+" ";f.textContent=D;D=mxUtils.getXml(e.documentElement);k.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(D))):Base64.encode(D,!0)),p.getSelectionState().cells)}),"#ffffff",{install:function(D){},destroy:function(){}},null,null,null,m);a.appendChild(u);a.style.display=""}}),g(b,"fill",mxResources.get("fill")),g(b,"stroke",mxResources.get("line")),g(b,"stop-color",mxResources.get("gradient")))};
StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.width="210px";e.style.textAlign="center";e.style.marginBottom="2px";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),h=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);h=this.editorUi.sidebar.getLibsForStyle(d);
null!=h||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(h=[])}null!=h&&f.push("openLibrary");for(d=0;d<f.length;d++){var g=this.editorUi.actions.get(f[d]);if(null==g||g.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+("edit"==f[d]?"":"..."));null!=g&&null!=g.shortcut&&(p+=" ("+g.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&
@@ -3184,27 +3185,27 @@ f=f.view.getState(f.getSelectionCell()),null!=f&&null!=mxUtils.getValue(f.style,
StyleFormatPanel.prototype.addFill=function(a){function b(){g.innerHTML="";C=1;for(var D=0;D<Editor.fillStyles.length;D++){var G=document.createElement("option");G.setAttribute("value",Editor.fillStyles[D].val);mxUtils.write(G,Editor.fillStyles[D].dispName);g.appendChild(G)}}var e=this.editorUi,f=e.editor.graph,h=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height=
"22px";d.style.marginTop="-3px";d.style.borderWidth="1px";d.style.borderStyle="solid";d.style.boxSizing="border-box";var g=d.cloneNode(!1);mxEvent.addListener(d,"click",function(D){mxEvent.consume(D)});mxEvent.addListener(g,"click",function(D){mxEvent.consume(D)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(D){d.style.display=null==D||D==mxConstants.NONE?"none":""},function(D){f.updateCellStyles({gradientColor:D},f.getSelectionCells())},
f.getDefaultColor(h.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==h.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(D){f.setCellStyles(p,D,h.cells)}),f.getDefaultColor(h.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(h.style,p,null);m.style.display=
-null!=u&&u!=mxConstants.NONE&&h.fill&&"image"!=h.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(u=0;u<x.length;u++){var z=document.createElement("option");z.setAttribute("value",x[u]);mxUtils.write(z,mxResources.get(x[u]));d.appendChild(z)}m.appendChild(d);var C;b();h.gradient&&k.appendChild(g);var E=mxUtils.bind(this,function(){h=e.getSelectionState();var D=mxUtils.getValue(h.style,
-mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var I=document.createElement("option");I.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(I,
-Editor.roughFillStyles[D].dispName);g.appendChild(I)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
+null!=u&&u!=mxConstants.NONE&&h.fill&&"image"!=h.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var z=document.createElement("option");z.setAttribute("value",w[u]);mxUtils.write(z,mxResources.get(w[u]));d.appendChild(z)}m.appendChild(d);var C;b();h.gradient&&k.appendChild(g);var E=mxUtils.bind(this,function(){h=e.getSelectionState();var D=mxUtils.getValue(h.style,
+mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var K=document.createElement("option");K.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(K,
+Editor.roughFillStyles[D].dispName);g.appendChild(K)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
d.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",h.cells));mxEvent.consume(D)});mxEvent.addListener(g,"change",function(D){f.setCellStyles("fillStyle",g.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[g.value],"cells",h.cells));mxEvent.consume(D)});a.appendChild(k);a.appendChild(m);k=this.getCustomColors();for(u=0;u<k.length;u++)a.appendChild(this.createCellColorOption(k[u].title,
k[u].key,k[u].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(I.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));I.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,
+StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(K.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));K.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,
Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));L.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}var f=this,h=this.editorUi,d=h.editor.graph,g=h.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var m=document.createElement("div");
-m.style.fontWeight="bold";g.stroke||(m.style.display="none");var p=document.createElement("select");p.style.position="absolute";p.style.height="22px";p.style.marginTop="-3px";p.style.textAlign="center";p.style.boxSizing="border-box";p.style.left="90px";p.style.width="83px";p.style.borderWidth="1px";p.style.borderStyle="solid";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var x=document.createElement("option");x.setAttribute("value",k[u]);mxUtils.write(x,mxResources.get(k[u]));p.appendChild(x)}mxEvent.addListener(p,
-"change",function(H){d.getModel().beginUpdate();try{var ea=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0","0"];"rounded"==p.value?oa=["1","0"]:"curved"==p.value&&(oa=["0","1"]);for(var sa=0;sa<ea.length;sa++)d.setCellStyles(ea[sa],oa[sa],g.cells);h.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",oa,"cells",g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(H)});mxEvent.addListener(p,"click",function(H){mxEvent.consume(H)});var z="image"==g.style.shape?mxConstants.STYLE_IMAGE_BORDER:
+m.style.fontWeight="bold";g.stroke||(m.style.display="none");var p=document.createElement("select");p.style.position="absolute";p.style.height="22px";p.style.marginTop="-3px";p.style.textAlign="center";p.style.boxSizing="border-box";p.style.left="90px";p.style.width="83px";p.style.borderWidth="1px";p.style.borderStyle="solid";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,
+"change",function(H){d.getModel().beginUpdate();try{var ea=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ra=["0","0"];"rounded"==p.value?ra=["1","0"]:"curved"==p.value&&(ra=["0","1"]);for(var qa=0;qa<ea.length;qa++)d.setCellStyles(ea[qa],ra[qa],g.cells);h.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",ra,"cells",g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(H)});mxEvent.addListener(p,"click",function(H){mxEvent.consume(H)});var z="image"==g.style.shape?mxConstants.STYLE_IMAGE_BORDER:
mxConstants.STYLE_STROKECOLOR;k="image"==g.style.shape?mxResources.get("border"):mxResources.get("line");k=this.createCellColorOption(k,z,"default",null,mxUtils.bind(this,function(H){d.setCellStyles(z,H,g.cells);if(null==H||H==mxConstants.NONE){H=[];for(var ea=0;ea<g.cells.length;ea++)(d.isTableCell(g.cells[ea])||d.isTableRow(g.cells[ea]))&&H.push(g.cells[ea]);0<H.length&&d.setCellStyles(z,"inherit",H)}}),d.shapeForegroundColor);k.appendChild(p);m.appendChild(k);var C=m.cloneNode(!1);C.style.display=
-"inline-flex";C.style.alignItems="top";C.style.fontWeight="normal";C.style.whiteSpace="nowrap";C.style.position="relative";C.style.paddingLeft="5px";C.style.overflow="hidden";C.style.marginTop="2px";C.style.width="220px";var E=mxUtils.bind(this,function(H,ea,oa,sa,Pa){H=this.editorUi.menus.styleChange(H,"",sa,Pa,"geIcon",null);sa=document.createElement("div");sa.style.width=ea+"px";sa.style.height="1px";sa.style.paddingTop="6px";Pa=oa.split(" ");2==Pa.length?(oa=parseInt(Pa[0])+parseInt(Pa[1]),Pa=
-parseInt(Pa[0])/oa*100,sa.style.borderBottom="1px pat transparent",sa.style.backgroundImage="linear-gradient(to right, currentcolor "+Pa+"%, transparent 0%)",sa.style.backgroundPosition="bottom left",sa.style.backgroundSize=oa+"px 1px",sa.style.backgroundRepeat="repeat-x"):sa.style.borderBottom="1px "+oa+" currentcolor";H.firstChild.firstChild.style.padding="0px 4px 0px 4px";H.firstChild.firstChild.style.width=ea+"px";H.firstChild.firstChild.appendChild(sa);return H});u=this.editorUi.toolbar.addMenuFunctionInContainer(C,
+"inline-flex";C.style.alignItems="top";C.style.fontWeight="normal";C.style.whiteSpace="nowrap";C.style.position="relative";C.style.paddingLeft="5px";C.style.overflow="hidden";C.style.marginTop="2px";C.style.width="220px";var E=mxUtils.bind(this,function(H,ea,ra,qa,Pa){H=this.editorUi.menus.styleChange(H,"",qa,Pa,"geIcon",null);qa=document.createElement("div");qa.style.width=ea+"px";qa.style.height="1px";qa.style.paddingTop="6px";Pa=ra.split(" ");2==Pa.length?(ra=parseInt(Pa[0])+parseInt(Pa[1]),Pa=
+parseInt(Pa[0])/ra*100,qa.style.borderBottom="1px pat transparent",qa.style.backgroundImage="linear-gradient(to right, currentcolor "+Pa+"%, transparent 0%)",qa.style.backgroundPosition="bottom left",qa.style.backgroundSize=ra+"px 1px",qa.style.backgroundRepeat="repeat-x"):qa.style.borderBottom="1px "+ra+" currentcolor";H.firstChild.firstChild.style.padding="0px 4px 0px 4px";H.firstChild.firstChild.style.width=ea+"px";H.firstChild.firstChild.appendChild(qa);return H});u=this.editorUi.toolbar.addMenuFunctionInContainer(C,
null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(H,75,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(H,75,"12 12",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(H,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");E(H,75,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,75,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
" (3)")}));var D=C.cloneNode(!1),G=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("connection"),!1,mxUtils.bind(this,function(H){Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,
mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))}));x=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,33,"dashed",[mxConstants.STYLE_DASHED,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))}));w=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,33,"dashed",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(H,33,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(H,33,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(H,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+
-" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var I=document.createElement("input");I.style.position="absolute";I.style.textAlign="right";I.style.marginTop="2px";I.style.width="52px";I.style.height="22px";I.style.left="146px";I.style.borderWidth=
-"1px";I.style.borderStyle="solid";I.style.boxSizing="border-box";I.setAttribute("title",mxResources.get("linewidth"));C.appendChild(I);var L=I.cloneNode(!0);D.appendChild(L);var T=this.createStepper(I,b,this.getUnitStep(),9,null,null,this.isFloatUnit());T.style.display=I.style.display;T.style.top="2px";T.style.left="198px";C.appendChild(T);T=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());T.style.display=L.style.display;L.style.position="absolute";T.style.top="2px";T.style.left=
-"198px";D.appendChild(T);mxEvent.addListener(I,"blur",b);mxEvent.addListener(I,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var K=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",
+" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var K=document.createElement("input");K.style.position="absolute";K.style.textAlign="right";K.style.marginTop="2px";K.style.width="52px";K.style.height="22px";K.style.left="146px";K.style.borderWidth=
+"1px";K.style.borderStyle="solid";K.style.boxSizing="border-box";K.setAttribute("title",mxResources.get("linewidth"));C.appendChild(K);var L=K.cloneNode(!0);D.appendChild(L);var Q=this.createStepper(K,b,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=K.style.display;Q.style.top="2px";Q.style.left="198px";C.appendChild(Q);Q=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=L.style.display;L.style.position="absolute";Q.style.top="2px";Q.style.left=
+"198px";D.appendChild(Q);mxEvent.addListener(K,"blur",b);mxEvent.addListener(K,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var N=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",
mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],
null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,
mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),
@@ -3236,31 +3237,31 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STY
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",
-mxResources.get("block")),H.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=H.div&&mxUtils.fit(H.div)}),0)}));this.addArrow(G);this.addArrow(K).style.marginTop="-1px";this.addArrow(U);this.addArrow(Y);T=this.addArrow(u);T.className="geIcon";u.style.width="134px";u=this.addArrow(x);u.className="geIcon";u.style.width="22px";var Q=document.createElement("div");Q.style.width="102px";Q.style.height="10px";Q.style.borderBottom="1px solid currentcolor";Q.style.marginLeft="10px";
-T.appendChild(Q);var P=document.createElement("div");P.style.width="30px";P.style.height="10px";P.style.borderBottom="1px solid currentcolor";P.style.marginLeft="10px";u.appendChild(P);a.appendChild(m);a.appendChild(D);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.padding="5px 4px 6px 0px";u.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.maxWidth="78px";x.style.overflow="hidden";x.style.textOverflow="ellipsis";x.style.marginLeft=
-"0px";x.style.marginBottom="12px";x.style.marginTop="2px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("lineend"));u.appendChild(x);var M=this.addUnitInput(u,this.getUnit(),98,52,function(){W.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ca.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);T=document.createElement("div");T.style.height="8px";u.appendChild(T);x=x.cloneNode(!1);
-mxUtils.write(x,mxResources.get("linestart"));u.appendChild(x);var aa=this.addUnitInput(u,this.getUnit(),98,52,function(){Z.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);
-m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";x=document.createElement("div");x.style.position="absolute";x.style.marginLeft="3px";x.style.marginBottom="12px";x.style.marginTop="1px";x.style.fontWeight="normal";x.style.width="120px";mxUtils.write(x,mxResources.get("perimeter"));m.appendChild(x);var na=this.addUnitInput(m,this.getUnit(),30,52,function(){ja.apply(this,
-arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var qa=mxUtils.bind(this,function(H,ea,oa){function sa(Pa,la,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,la);return Ba}g=h.getSelectionState();if(oa||document.activeElement!=I)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),I.value=isNaN(H)?"":
-this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");Q.style.borderBottom="1px solid currentcolor";
-"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length&&(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,Q.style.borderBottom="1px solid transparent",Q.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",Q.style.backgroundPosition="bottom left",Q.style.backgroundSize=H+"px 1px",Q.style.backgroundRepeat="repeat-x"));P.style.backgroundImage=Q.style.backgroundImage;
-P.style.backgroundPosition=Q.style.backgroundPosition;P.style.backgroundSize=Q.style.backgroundSize;P.style.backgroundRepeat=Q.style.backgroundRepeat;P.style.borderBottom=Q.style.borderBottom;H=K.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ea=null),"orthogonalEdgeStyle"==
-ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":H.style.backgroundImage="url("+Format.horizontalElbowImage.src+
-")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",H.style.backgroundImage="link"==
-g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");sa(mxUtils.getValue(g.style,mxConstants.STYLE_STARTARROW,null),
-mxUtils.getValue(g.style,"startFill","1"),U,"start");sa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(K,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(oa||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),M.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=na)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),na.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Z=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,
-this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var W=this.installInputHandler(M,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ja=this.installInputHandler(na,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(I,qa);this.addKeyHandler(ia,qa);this.addKeyHandler(aa,
-qa);this.addKeyHandler(V,qa);this.addKeyHandler(M,qa);this.addKeyHandler(na,qa);d.getModel().addListener(mxEvent.CHANGE,qa);this.listeners.push({destroy:function(){d.getModel().removeListener(qa)}});qa();return a};
+mxResources.get("block")),H.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=H.div&&mxUtils.fit(H.div)}),0)}));this.addArrow(G);this.addArrow(N).style.marginTop="-1px";this.addArrow(U);this.addArrow(Y);Q=this.addArrow(u);Q.className="geIcon";u.style.width="134px";u=this.addArrow(w);u.className="geIcon";u.style.width="22px";var P=document.createElement("div");P.style.width="102px";P.style.height="10px";P.style.borderBottom="1px solid currentcolor";P.style.marginLeft="10px";
+Q.appendChild(P);var T=document.createElement("div");T.style.width="30px";T.style.height="10px";T.style.borderBottom="1px solid currentcolor";T.style.marginLeft="10px";u.appendChild(T);a.appendChild(m);a.appendChild(D);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.padding="5px 4px 6px 0px";u.style.fontWeight="normal";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginLeft=
+"0px";w.style.marginBottom="12px";w.style.marginTop="2px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("lineend"));u.appendChild(w);var J=this.addUnitInput(u,this.getUnit(),98,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);Q=document.createElement("div");Q.style.height="8px";u.appendChild(Q);w=w.cloneNode(!1);
+mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var Z=this.addUnitInput(u,this.getUnit(),98,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);
+m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";w=document.createElement("div");w.style.position="absolute";w.style.marginLeft="3px";w.style.marginBottom="12px";w.style.marginTop="1px";w.style.fontWeight="normal";w.style.width="120px";mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var oa=this.addUnitInput(m,this.getUnit(),30,52,function(){ca.apply(this,
+arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var sa=mxUtils.bind(this,function(H,ea,ra){function qa(Pa,ma,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,ma);return Ba}g=h.getSelectionState();if(ra||document.activeElement!=K)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),K.value=isNaN(H)?"":
+this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");P.style.borderBottom="1px solid currentcolor";
+"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length?(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,P.style.borderBottom="1px solid transparent",P.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",P.style.backgroundPosition="bottom left",P.style.backgroundSize=H+"px 1px",P.style.backgroundRepeat="repeat-x"):P.style.borderBottom="1px dashed currentcolor");
+T.style.backgroundImage=P.style.backgroundImage;T.style.backgroundPosition=P.style.backgroundPosition;T.style.backgroundSize=P.style.backgroundSize;T.style.backgroundRepeat=P.style.backgroundRepeat;T.style.borderBottom=P.style.borderBottom;H=N.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,
+null)&&(ea=null),"orthogonalEdgeStyle"==ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":
+H.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",
+H.style.height="",H.style.backgroundImage="link"==g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");qa(mxUtils.getValue(g.style,
+mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(g.style,"startFill","1"),U,"start");qa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(N,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(ra||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Z.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=
+parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),J.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=oa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),oa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var X=this.installInputHandler(Z,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(oa,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(K,sa);this.addKeyHandler(ia,
+sa);this.addKeyHandler(Z,sa);this.addKeyHandler(V,sa);this.addKeyHandler(J,sa);this.addKeyHandler(oa,sa);d.getModel().addListener(mxEvent.CHANGE,sa);this.listeners.push({destroy:function(){d.getModel().removeListener(sa)}});sa();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.padding="2px 0px 24px 14px";var h=document.createElement("div");h.style.position="absolute";h.style.maxWidth="78px";h.style.overflow="hidden";h.style.textOverflow="ellipsis";mxUtils.write(h,mxResources.get("lineJumps"));a.appendChild(h);var d=document.createElement("select");d.style.position="absolute";
-d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(x){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,
-f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=
-mxUtils.bind(this,function(x,z,C){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(C||document.activeElement!=p)x=parseInt(mxUtils.getValue(f.style,"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(x)?"":this.inUnit(x)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
+d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,
+f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(w)});mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=
+mxUtils.bind(this,function(w,z,C){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(C||document.activeElement!=p)w=parseInt(mxUtils.getValue(f.style,"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(w)?"":this.inUnit(w)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";var h=document.createElement("table");h.style.width="210px";h.style.fontWeight="bold";h.style.tableLayout="fixed";var d=document.createElement("tbody"),g=document.createElement("tr");g.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign","top");var p=m.cloneNode(!0);p.style.paddingLeft=
-"8px";g.appendChild(m);g.appendChild(p);d.appendChild(g);h.appendChild(d);a.appendChild(h);var k=m,u=mxUtils.bind(this,function(z,C,E,D){z=this.createCellOption(z,C,E,null,null,D);z.style.width="100%";k.appendChild(z);k=k==m?p:m;return z}),x=mxUtils.bind(this,function(z,C,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,
+"8px";g.appendChild(m);g.appendChild(p);d.appendChild(g);h.appendChild(d);a.appendChild(h);var k=m,u=mxUtils.bind(this,function(z,C,E,D){z=this.createCellOption(z,C,E,null,null,D);z.style.width="100%";k.appendChild(z);k=k==m?p:m;return z}),w=mxUtils.bind(this,function(z,C,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,
function(D,G){e.updateCellStyles({sketch:G?"1":null,curveFitting:G?Editor.sketchDefaultCurveFitting:null,jiggle:G?Editor.sketchDefaultJiggle:null},D)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);z=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(z.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(z,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",
-0)});e.getModel().addListener(mxEvent.CHANGE,x);this.listeners.push({destroy:function(){e.getModel().removeListener(x)}});x();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
+0)});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
DiagramStylePanel.prototype.getGlobalStyleButtons=function(){var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.style.alignItems="center";e.style.textAlign="left";e.style.display="flex";var f=document.createElement("input");f.setAttribute("type","checkbox");f.style.margin="1px 6px 0px 0px";f.checked=Editor.sketchMode;e.appendChild(f);mxUtils.write(e,mxResources.get("sketch"));mxEvent.addListener(e,"click",function(d){if(b.isEnabled()){var g=!Editor.sketchMode;Editor.sketchMode=
g;b.updateCellStyles({sketch:g?"1":null,curveFitting:g?Editor.sketchDefaultCurveFitting:null,jiggle:g?Editor.sketchDefaultJiggle:null},b.getVerticesAndEdges());mxEvent.consume(d);window.setTimeout(function(){Editor.sketchMode=!g;a.setSketchMode(g)})}});e=[e,mxUtils.button(mxResources.get("rounded"),mxUtils.bind(this,function(d){var g=b.getVerticesAndEdges(),m=!0;if(0<g.length)for(var p=0;p<g.length;p++){var k=b.getCellStyle(g[p]);if(0==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,0)){m=!1;break}}m=
!m;b.updateCellStyles({rounded:m?"1":"0"},g);m?(b.currentEdgeStyle.rounded="1",b.currentVertexStyle.rounded="1"):(delete b.currentEdgeStyle.rounded,delete b.currentVertexStyle.rounded);mxEvent.consume(d)}))];if(!b.isEnabled())for(f=0;f<e.length;f++)if("BUTTON"==e[f].nodeName)e[f].setAttribute("disabled","disabled");else{var h=e[f].getElementsByTagName("input");0<h.length&&h[0].setAttribute("disabled","disabled")}return e};
@@ -3268,24 +3269,24 @@ DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.g
"inline-block";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="92px";g.style.width="92px";g.style.userSelect="none";mxUtils.write(g,d);h.appendChild(g);mxClient.IS_FF&&(g.style.marginTop="1px");var m=document.createElement("select");m.style.textOverflow="ellipsis";m.style.height="22px";m.style.position="absolute";m.style.maxWidth="70px";m.style.width="70px";m.style.left="127px";d=document.createElement("option");d.setAttribute("title",mxResources.get("default")+
" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")");mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","default");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("automatic"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","auto");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("simple"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));
d.setAttribute("value","simple");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("none"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","none");m.appendChild(d);m.value=null==e.adaptiveColors?"default":e.adaptiveColors;mxEvent.addListener(m,"change",function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;C.ignoreImage=!0;C.adaptiveColors=m.value;e.model.execute(C)});h.appendChild(m);if(!b.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)d=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),d.style.position="absolute",d.style.left="196px",h.appendChild(d);a.appendChild(h)}h=document.createElement("table");h.style.width="204px";d=document.createElement("tbody");g=document.createElement("tr");g.style.padding="0px";var p=document.createElement("td");p.style.textAlign="center";p.style.padding="2px";p.style.width="50%";for(var k=p.cloneNode(!0),u=this.getGlobalStyleButtons(),x=0;x<u.length;x+=
-2){var z=u[x];z.style.height="22px";z.style.width="88px";p.appendChild(z);g.appendChild(p);z=u[x+1];null!=z&&(z.style.height="22px",z.style.width="88px",k.appendChild(z));g.appendChild(k);d.appendChild(g);p=p.cloneNode(!1);k=k.cloneNode(!1);g=g.cloneNode(!1)}h.appendChild(d);f.appendChild(h);a.appendChild(f);e.isEnabled()&&this.addGraphStyles(a);return a};
-DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,Q){var P=e.getVerticesAndEdges();f.beginUpdate();try{for(var M=0;M<P.length;M++){var V=e.getCellStyle(P[M]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},
-[P[M]]):e.updateCellStyles({labelBackgroundColor:null!=Q?Q.background:null},[P[M]]);for(var aa=f.isEdge(P[M]),ia=f.getStyle(P[M]),na=aa?e.currentEdgeStyle:e.currentVertexStyle,qa=0;qa<Y.length;qa++)if(null!=V[Y[qa]]&&V[Y[qa]]!=mxConstants.NONE||Y[qa]!=mxConstants.STYLE_FILLCOLOR&&Y[qa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&aa&&Y[qa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[qa],"default"):mxUtils.setStyle(ia,Y[qa],na[Y[qa]]);f.setStyle(P[M],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,
-function(Y,Q,P){if(null!=Y)for(var M=0;M<Q.length;M++)if(null!=Y[Q[M]]&&Y[Q[M]]!=mxConstants.NONE||Q[M]!=mxConstants.STYLE_FILLCOLOR&&Q[M]!=mxConstants.STYLE_STROKECOLOR)Y[Q[M]]=P[Q[M]]}),p=!0,k=mxUtils.bind(this,function(Y,Q,P,M,V){if(null!=Y){null!=P&&(p||null==Q.labelBackgroundColor?p&&(Q.labelBackgroundColor=mxConstants.NONE):(M=null!=M?M.background:null,V=null!=V?V:e,null==M&&(M=V.background),null==M&&(M=V.defaultPageBackgroundColor),Q.labelBackgroundColor=M));for(var aa in Y)if(null==P||null!=
-Q[aa]&&Q[aa]!=mxConstants.NONE||aa!=mxConstants.STYLE_FILLCOLOR&&aa!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(P)&&aa==mxConstants.STYLE_FONTCOLOR?Q[aa]="default":Q[aa]=Y[aa]}}),u=mxUtils.bind(this,function(Y,Q,P,M,V){var aa=document.createElement("div");aa.style.position="absolute";aa.style.display="inline-block";aa.style.overflow="hidden";aa.style.pointerEvents="none";aa.style.width="100%";aa.style.height="100%";V.appendChild(aa);var ia=new Graph(aa,null,null,e.getStylesheet());ia.shapeBackgroundColor=
-"light-dark(#f1f3f4, "+Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,Z){Z=null!=Z?Z:!0;var ca=mxUtils.clone(e.getCellStyle.apply(this,arguments)),W=e.stylesheet.getDefaultVertexStyle(),ja=Q;f.isEdge(O)&&(W=e.stylesheet.getDefaultEdgeStyle(),ja=P);m(ca,d,W);k(Y,ca,O,M,ia);k(ja,ca,O,M,ia);Z&&(ca=e.postProcessCellStyle(O,ca));return ca};ia.model.beginUpdate();
-try{var na=ia.insertVertex(ia.getDefaultParent(),null,"Shape",14,8,70,36,"strokeWidth=2;"),qa=ia.insertEdge(ia.getDefaultParent(),null,"Connector",na,na,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");qa.geometry.points=[new mxPoint(32,66)];qa.geometry.offset=new mxPoint(0,8)}finally{ia.model.endUpdate()}V=ia.view.getDrawPane().ownerSVGElement;null!=V&&(aa=V.cloneNode(!0),aa.style.position="absolute",aa.style.clipPath="rect(0 52% 100% 0)",V.style.clipPath=
-"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(aa))}),x=document.createElement("div");x.style.position="relative";x.style.width="210px";a.appendChild(x);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,Q,P,M,V){var aa=this.format.cachedStyleEntries[V];null==aa&&(aa=document.createElement("div"),aa.className="geItem",aa.style.position="relative",aa.style.width="96px",aa.style.height="86px",aa.style.cursor="pointer",
-aa.style.border="1px solid gray",aa.style.borderRadius="8px",aa.style.margin="1px 2px",aa.style.overflow="hidden",p||null==M||null==M.background||(aa.style.backgroundColor=M.background),u(Y,Q,P,M,aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(Q,e.currentVertexStyle);k(P,e.currentEdgeStyle);f.beginUpdate();try{var na=d.slice(),
-qa;for(qa in Y)na.push(qa);g(na,M);if(!p){var O=new ChangePageSetup(b,null!=M?M.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=M&&null!=M.gridColor?M.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(aa,mxUtils.bind(this,function(ia){aa.style.opacity=.5}),null,mxUtils.bind(this,function(ia){aa.style.opacity=1})),mxEvent.addListener(aa,"mouseenter",mxUtils.bind(this,function(ia){var na=e.getCellStyle;ia=e.background;var qa=e.view.gridColor;p||
-(e.background=null!=M?M.background:null,e.view.gridColor=null!=M&&null!=M.gridColor?M.gridColor:h);e.getCellStyle=function(O,Z){Z=null!=Z?Z:!0;var ca=mxUtils.clone(na.apply(this,arguments)),W=e.stylesheet.getDefaultVertexStyle(),ja=Q;f.isEdge(O)&&(W=e.stylesheet.getDefaultEdgeStyle(),ja=P);m(ca,d,W);k(Y,ca,O,M);k(ja,ca,O,M);Z&&(ca=this.postProcessCellStyle(O,ca));return ca};e.refresh();e.getCellStyle=na;e.background=ia;e.view.gridColor=qa;aa.style.border="2px solid blue";aa.style.margin="0px 1px"})),
-mxEvent.addListener(aa,"mouseleave",mxUtils.bind(this,function(ia){aa.style.border="1px solid gray";aa.style.margin="1px 2px";e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[V]=aa));x.appendChild(aa)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");for(var Y=10*this.format.currentStylePage;Y<
-Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);Y++){var Q=Editor.styles[Y];z(Q.commonStyle,Q.vertexStyle,Q.edgeStyle,Q.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",x.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.position="relative";I.style.textAlign="center";I.style.paddingTop="4px";I.style.width="210px";for(var L=0;L<C;L++){var T=
-document.createElement("div");T.style.display="inline-block";T.style.width="6px";T.style.height="6px";T.style.marginLeft="4px";T.style.marginRight="3px";T.style.borderRadius="3px";T.style.cursor="pointer";T.style.background="transparent";T.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,Q){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){G(Y)}))})(L,T);I.appendChild(T);E.push(T)}a.appendChild(I);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity=
-"1"});mxEvent.addListener(Y,"mouseleave",function(){Y.style.opacity="0.5"})};var K=document.createElement("div");K.className="geAdaptiveAsset";K.style.position="absolute";K.style.left="0px";K.style.top="0px";K.style.bottom="0px";K.style.width="24px";K.style.height="24px";K.style.margin="0px";K.style.cursor="pointer";K.style.opacity="0.5";K.style.backgroundRepeat="no-repeat";K.style.backgroundPosition="center center";K.style.backgroundSize="24px 24px";K.style.backgroundImage="url("+Editor.previousImage+
-")";var U=K.cloneNode(!1);U.style.backgroundImage="url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";I.appendChild(K);I.appendChild(U);mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(K);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
-mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
+EditorUi.isElectronApp)d=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),d.style.position="absolute",d.style.left="196px",h.appendChild(d);a.appendChild(h)}h=document.createElement("table");h.style.width="204px";d=document.createElement("tbody");g=document.createElement("tr");g.style.padding="0px";var p=document.createElement("td");p.style.textAlign="center";p.style.padding="2px";p.style.width="50%";for(var k=p.cloneNode(!0),u=this.getGlobalStyleButtons(),w=0;w<u.length;w+=
+2){var z=u[w];z.style.height="22px";z.style.width="88px";p.appendChild(z);g.appendChild(p);z=u[w+1];null!=z&&(z.style.height="22px",z.style.width="88px",k.appendChild(z));g.appendChild(k);d.appendChild(g);p=p.cloneNode(!1);k=k.cloneNode(!1);g=g.cloneNode(!1)}h.appendChild(d);f.appendChild(h);a.appendChild(f);e.isEnabled()&&this.addGraphStyles(a);return a};
+DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,P){var T=e.getVerticesAndEdges();f.beginUpdate();try{for(var J=0;J<T.length;J++){var V=e.getCellStyle(T[J]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},
+[T[J]]):e.updateCellStyles({labelBackgroundColor:null!=P?P.background:null},[T[J]]);for(var Z=f.isEdge(T[J]),ia=f.getStyle(T[J]),oa=Z?e.currentEdgeStyle:e.currentVertexStyle,sa=0;sa<Y.length;sa++)if(null!=V[Y[sa]]&&V[Y[sa]]!=mxConstants.NONE||Y[sa]!=mxConstants.STYLE_FILLCOLOR&&Y[sa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&Z&&Y[sa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[sa],"default"):mxUtils.setStyle(ia,Y[sa],oa[Y[sa]]);f.setStyle(T[J],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(Y,
+P,T){if(null!=Y)for(var J=0;J<P.length;J++)if(null!=Y[P[J]]&&Y[P[J]]!=mxConstants.NONE||P[J]!=mxConstants.STYLE_FILLCOLOR&&P[J]!=mxConstants.STYLE_STROKECOLOR)Y[P[J]]=T[P[J]]}),p=!0,k=mxUtils.bind(this,function(Y,P,T,J,V){if(null!=Y){null!=T&&(p||null==P.labelBackgroundColor?p&&(P.labelBackgroundColor=mxConstants.NONE):(J=null!=J?J.background:null,V=null!=V?V:e,null==J&&(J=V.background),null==J&&(J=V.defaultPageBackgroundColor),P.labelBackgroundColor=J));for(var Z in Y)if(null==T||null!=P[Z]&&P[Z]!=
+mxConstants.NONE||Z!=mxConstants.STYLE_FILLCOLOR&&Z!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&Z==mxConstants.STYLE_FONTCOLOR?P[Z]="default":P[Z]=Y[Z]}}),u=mxUtils.bind(this,function(Y,P,T,J,V){var Z=document.createElement("div");Z.style.position="absolute";Z.style.display="inline-block";Z.style.overflow="hidden";Z.style.pointerEvents="none";Z.style.width="100%";Z.style.height="100%";V.appendChild(Z);var ia=new Graph(Z,null,null,e.getStylesheet());ia.shapeBackgroundColor="light-dark(#f1f3f4, "+
+Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(e.getCellStyle.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J,ia);k(ca,ba,O,J,ia);X&&(ba=e.postProcessCellStyle(O,ba));return ba};ia.model.beginUpdate();
+try{var oa=ia.insertVertex(ia.getDefaultParent(),null,"Shape",14,8,70,36,"strokeWidth=2;"),sa=ia.insertEdge(ia.getDefaultParent(),null,"Connector",oa,oa,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");sa.geometry.points=[new mxPoint(32,66)];sa.geometry.offset=new mxPoint(0,8)}finally{ia.model.endUpdate()}V=ia.view.getDrawPane().ownerSVGElement;null!=V&&(Z=V.cloneNode(!0),Z.style.position="absolute",Z.style.clipPath="rect(0 52% 100% 0)",V.style.clipPath=
+"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(Z))}),w=document.createElement("div");w.style.position="relative";w.style.width="210px";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,P,T,J,V){var Z=this.format.cachedStyleEntries[V];null==Z&&(Z=document.createElement("div"),Z.className="geItem",Z.style.position="relative",Z.style.width="96px",Z.style.height="86px",Z.style.cursor="pointer",Z.style.border=
+"1px solid gray",Z.style.borderRadius="8px",Z.style.margin="1px 2px",Z.style.overflow="hidden",p||null==J||null==J.background||(Z.style.backgroundColor=J.background),u(Y,P,T,J,Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(P,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var oa=d.slice(),sa;for(sa in Y)oa.push(sa);
+g(oa,J);if(!p){var O=new ChangePageSetup(b,null!=J?J.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=J&&null!=J.gridColor?J.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(Z,mxUtils.bind(this,function(ia){Z.style.opacity=.5}),null,mxUtils.bind(this,function(ia){Z.style.opacity=1})),mxEvent.addListener(Z,"mouseenter",mxUtils.bind(this,function(ia){var oa=e.getCellStyle;ia=e.background;var sa=e.view.gridColor;p||(e.background=null!=J?J.background:
+null,e.view.gridColor=null!=J&&null!=J.gridColor?J.gridColor:h);e.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(oa.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J);k(ca,ba,O,J);X&&(ba=this.postProcessCellStyle(O,ba));return ba};e.refresh();e.getCellStyle=oa;e.background=ia;e.view.gridColor=sa;Z.style.border="2px solid blue";Z.style.margin="0px 1px"})),mxEvent.addListener(Z,"mouseleave",
+mxUtils.bind(this,function(ia){Z.style.border="1px solid gray";Z.style.margin="1px 2px";e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[V]=Z));w.appendChild(Z)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");for(var Y=10*this.format.currentStylePage;Y<Math.min(10*(this.format.currentStylePage+
+1),Editor.styles.length);Y++){var P=Editor.styles[Y];z(P.commonStyle,P.vertexStyle,P.edgeStyle,P.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var K=document.createElement("div");K.style.whiteSpace="nowrap";K.style.position="relative";K.style.textAlign="center";K.style.paddingTop="4px";K.style.width="210px";for(var L=0;L<C;L++){var Q=document.createElement("div");Q.style.display=
+"inline-block";Q.style.width="6px";Q.style.height="6px";Q.style.marginLeft="4px";Q.style.marginRight="3px";Q.style.borderRadius="3px";Q.style.cursor="pointer";Q.style.background="transparent";Q.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,P){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(Y)}))})(L,Q);K.appendChild(Q);E.push(Q)}a.appendChild(K);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity="1"});mxEvent.addListener(Y,"mouseleave",
+function(){Y.style.opacity="0.5"})};var N=document.createElement("div");N.className="geAdaptiveAsset";N.style.position="absolute";N.style.left="0px";N.style.top="0px";N.style.bottom="0px";N.style.width="24px";N.style.height="24px";N.style.margin="0px";N.style.cursor="pointer";N.style.opacity="0.5";N.style.backgroundRepeat="no-repeat";N.style.backgroundPosition="center center";N.style.backgroundSize="24px 24px";N.style.backgroundImage="url("+Editor.previousImage+")";var U=N.cloneNode(!1);U.style.backgroundImage=
+"url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";K.appendChild(N);K.appendChild(U);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(N);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);
+DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),h=f.getElementsByTagName("input")[0];null!=h&&(h.style.visibility=null!=e.backgroundImage?
"visible":"hidden");h=f.getElementsByTagName("div")[0];null!=h&&(h.style.display="inline-block",h.style.textOverflow="ellipsis",h.style.overflow="hidden",h.style.maxWidth="80px");mxClient.IS_FF&&(h.style.marginTop="1px");h=mxUtils.button(mxResources.get("change")+"...",function(d){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage,b.editor.graph.background);mxEvent.consume(d)});h.style.position="absolute";h.style.height="22px";h.style.left="47%";h.style.marginLeft="1px";h.style.width=
@@ -3301,259 +3302,259 @@ m()));d.style.display=h.isGridEnabled()?"":"none";g.style.display=d.style.displa
null,null,p,!0,m);p.style.padding="6px 0 0 0";p.appendChild(d);p.appendChild(g);a.appendChild(p)};DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,
function(){f.set(e.pageFormat)});var h=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",h);this.listeners.push({destroy:function(){b.removeListener(h)}});e.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){e.getModel().removeListener(h)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
-DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function h(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function x(){mxShape.call(this)}
-function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function I(){mxActor.call(this)}function L(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(c,l){this.canvas=c;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-P.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function M(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ia(){mxActor.call(this)}function na(){mxActor.call(this)}function qa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function Z(){mxCylinder.call(this)}function ca(){mxShape.call(this)}function W(){mxShape.call(this)}function ja(){mxEllipse.call(this)}
-function H(){mxShape.call(this)}function ea(){mxShape.call(this)}function oa(){mxRectangleShape.call(this)}function sa(){mxShape.call(this)}function Pa(){mxShape.call(this)}function la(){mxShape.call(this)}function Ba(){mxShape.call(this)}function Ca(){mxShape.call(this)}function Fa(){mxCylinder.call(this)}function Ia(){mxCylinder.call(this)}function Ha(){mxRectangleShape.call(this)}function Ja(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Xa(){mxArrowConnector.call(this);this.spacing=0}function Ya(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function ib(){mxActor.call(this)}function eb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxEllipse.call(this)}
-function R(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function da(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Va(c,l,t,n,r,v,w,J,y,ba){w+=y;var S=n.clone();n.x-=r*(2*w+y);n.y-=v*(2*w+y);r*=w+y;v*=w+y;return function(){c.ellipse(S.x-r-w,S.y-v-w,2*w,2*w);ba?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
-t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var w=l[v];null!=w&&(null==r?c.moveTo(w.x+t,w.y+n):null!=r&&c.lineTo(w.x+t,w.y+n));r=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=
+DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function h(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
+function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function K(){mxActor.call(this)}function L(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function P(){mxActor.call(this)}function T(c,l){this.canvas=c;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,T.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,T.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,T.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,T.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+T.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,T.prototype.arcTo)}function J(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function da(){mxShape.call(this)}function ca(){mxEllipse.call(this)}
+function H(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxRectangleShape.call(this)}function qa(){mxShape.call(this)}function Pa(){mxShape.call(this)}function ma(){mxShape.call(this)}function Ba(){mxShape.call(this)}function Ca(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Ia(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function La(){mxArrowConnector.call(this);
+this.spacing=0}function Xa(){mxArrowConnector.call(this);this.spacing=0}function Ya(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function ib(){mxActor.call(this)}function eb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxEllipse.call(this)}
+function R(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ha(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Va(c,l,t,n,r,v,x,I,y,aa){x+=y;var S=n.clone();n.x-=r*(2*x+y);n.y-=v*(2*x+y);r*=x+y;v*=x+y;return function(){c.ellipse(S.x-r-x,S.y-v-x,2*x,2*x);aa?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
+t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var x=l[v];null!=x&&(null==r?c.moveTo(x.x+t,x.y+n):null!=r&&c.lineTo(x.x+t,x.y+n));r=x}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=
0;n<this.line.length&&!l;n++){var r=this.line[n];null!=r&&null!=t&&(l=mxUtils.rectangleIntersectsSegment(c,t,r));t=r}return l};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,l,t,n,r){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(w&&J<r||!w&&J<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var J=v;v=w;w=J}c.rotate(-this.getShapeRotation(),
-v,w,l+n/2,t+r/2);s=this.scale;l=this.bounds.x/s;t=this.bounds.y/s;n=this.bounds.width/s;r=this.bounds.height/s;this.paintTableForeground(c,l,t,n,r)}};b.prototype.paintTableForeground=function(c,l,t,n,r){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(r=0;r<n.length;r++)a.prototype.paintTableLine(c,n[r],l,t)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
-c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",b);mxUtils.extend(e,b);e.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",e);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.darkOpacity=0;f.prototype.darkOpacity2=0;f.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),J=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(v,r);c.lineTo(0,r-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-v,0),c.lineTo(n,v),c.lineTo(v,
-v),c.close(),c.fill()),0!=J&&(c.setFillAlpha(Math.abs(J)),c.setFillColor(0>J?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,v),c.lineTo(v,r),c.lineTo(0,r-v),c.close(),c.fill()),c.begin(),c.moveTo(v,r),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(n,v),c.end(),c.stroke())};f.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
+!1,x=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&I<r||!x&&I<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=x;x=I}c.rotate(-this.getShapeRotation(),
+v,x,l+n/2,t+r/2);s=this.scale;l=this.bounds.x/s;t=this.bounds.y/s;n=this.bounds.width/s;r=this.bounds.height/s;this.paintTableForeground(c,l,t,n,r)}};b.prototype.paintTableForeground=function(c,l,t,n,r){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(r=0;r<n.length;r++)a.prototype.paintTableLine(c,n[r],l,t)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
+c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",b);mxUtils.extend(e,b);e.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",e);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.darkOpacity=0;f.prototype.darkOpacity2=0;f.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(v,r);c.lineTo(0,r-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-v,0),c.lineTo(n,v),c.lineTo(v,
+v),c.close(),c.fill()),0!=I&&(c.setFillAlpha(Math.abs(I)),c.setFillColor(0>I?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,v),c.lineTo(v,r),c.lineTo(0,r-v),c.close(),c.fill()),c.begin(),c.moveTo(v,r),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(n,v),c.end(),c.stroke())};f.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
f);var Qa=Math.tan(mxUtils.toRadians(30)),Ka=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(h,mxConnector);h.prototype.paintEdgeShape=function(c,l){var t=this.createMarker(c,l,!0),n=this.createMarker(c,l,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
arguments);c.setStrokeColor(this.stroke);c.setFillColor(this.stroke);c.setDashed(!1);null!=t&&t();null!=n&&n()};mxCellRenderer.registerShape("wire",h);mxUtils.extend(d,mxCylinder);d.prototype.size=6;d.prototype.paintVertexShape=function(c,l,t,n,r){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-v),t+.5*(r-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};mxCellRenderer.registerShape("waypoint",
d);mxUtils.extend(g,mxActor);g.prototype.size=20;g.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/Qa);c.translate((n-l)/2,(r-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Ka);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Ka)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.redrawPath=function(c,l,t,n,r,v){l=Math.min(n,r/(.5+Qa));v?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Ka)*l),c.lineTo(l,.25*l),c.moveTo(.5*
l,(.5-Ka)*l),c.lineTo(.5*l,(1-Ka)*l)):(c.translate((n-l)/2,(r-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Ka),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Ka)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",m);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(c,l,t,n,r,v){l=Math.min(r/2,Math.round(r/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),v||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,
l),c.curveTo(0,2*l,n,2*l,n,l),v||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),v||(c.stroke(),c.begin()),c.translate(0,-l);v||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,r-l),c.curveTo(n,r+l/3,0,r+l/3,0,r-l),c.close())};p.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=
-0;k.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(0,r);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),
-c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(u,k);mxCellRenderer.registerShape("note2",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(x,mxShape);x.prototype.isoAngle=
-15;x.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
-x);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
-n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
-0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),w&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
-mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),J=mxUtils.getValue(this.style,
-"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));J||(y*=Math.min(n,r));y=Math.min(y,.5*n,.5*(r-t));l=Math.max(l,y);l=Math.min(n-y,l);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(y,0),0),c.lineTo(n-Math.max(y,0),t));w?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(n-y,t),c.arcTo(y,y,0,0,1,n,y+t),c.lineTo(n,r-y),c.arcTo(y,y,0,0,1,n-y,r),c.lineTo(y,
+0;k.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(0,r);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"),
+c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(u,k);mxCellRenderer.registerShape("note2",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(w,mxShape);w.prototype.isoAngle=
+15;w.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
+w);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
+n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
+0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
+mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,
+"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(n,r));y=Math.min(y,.5*n,.5*(r-t));l=Math.max(l,y);l=Math.min(n-y,l);x||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(y,0),0),c.lineTo(n-Math.max(y,0),t));x?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(n-y,t),c.arcTo(y,y,0,0,1,n,y+t),c.lineTo(n,r-y),c.arcTo(y,y,0,0,1,n-y,r),c.lineTo(y,
r),c.arcTo(y,y,0,0,1,0,r-y)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-
-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection",
-null);w||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,r-15),c.lineTo(n-20,r-15),
-c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(I,
-mxActor);I.prototype.size=30;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",I);mxUtils.extend(L,mxActor);L.prototype.size=
+t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection",
+null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,r-15),c.lineTo(n-20,r-15),
+c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(K,
+mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",K);mxUtils.extend(L,mxActor);L.prototype.size=
.4;L.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};L.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),t=c.width,n=c.height;if(null==this.direction||
-this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",L);mxUtils.extend(T,mxActor);T.prototype.size=.3;T.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};T.prototype.redrawPath=function(c,l,t,
-n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",T);var Ua=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ua.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
+this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",L);mxUtils.extend(Q,mxActor);Q.prototype.size=.3;Q.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};Q.prototype.redrawPath=function(c,l,t,
+n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var Ua=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ua.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};D.prototype.getLabelMargins=
function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,
.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*
-this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,
+this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(N,mxActor);N.prototype.size=.2;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",N);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,
l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("trapezoid",U);mxUtils.extend(Y,mxActor);
-Y.prototype.size=.5;Y.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Y);mxUtils.extend(Q,mxActor);
-Q.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);P.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};P.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
-arguments));this.originalClose.apply(this.canvas,arguments)};P.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};P.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};P.prototype.arcTo=function(c,l,t,n,r,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(S){return"number"===
-typeof S?S?0>S?-1:1:S===S?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var w=Math.round(v/10),J=this.defaultVariation;5>w&&(w=5,J/=3);var y=t(c-this.lastX)*n/w;t=t(l-this.lastY)*r/w;n/=v;r/=v;for(v=0;v<w;v++){var ba=(Math.random()-.5)*J;this.originalLineTo.call(this.canvas,y*v+this.lastX-ba*r,t*v+this.lastY-ba*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=l};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Wa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Wa.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new P(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};var ub=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=P)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=
+Y.prototype.size=.5;Y.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Y);mxUtils.extend(P,mxActor);
+P.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",P);T.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};T.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
+arguments));this.originalClose.apply(this.canvas,arguments)};T.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};T.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};T.prototype.arcTo=function(c,l,t,n,r,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=x};T.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(S){return"number"===
+typeof S?S?0>S?-1:1:S===S?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var x=Math.round(v/10),I=this.defaultVariation;5>x&&(x=5,I/=3);var y=t(c-this.lastX)*n/x;t=t(l-this.lastY)*r/x;n/=v;r/=v;for(v=0;v<x;v++){var aa=(Math.random()-.5)*I;this.originalLineTo.call(this.canvas,y*v+this.lastX-aa*r,t*v+this.lastY-aa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=l};T.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Wa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Wa.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new T(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};var ub=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=T)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=
this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(n/2,Math.min(r/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+
-v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(M,mxRectangleShape);M.prototype.size=.1;M.prototype.fixedSize=!1;M.prototype.isHtmlAllowed=function(){return!1};M.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};M.prototype.paintForeground=
-function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(n,w)):n*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(n*v,r*v)));w=Math.round(w);c.begin();c.moveTo(l+w,t);c.lineTo(l+w,t+r);c.moveTo(l+n-w,t);c.lineTo(l+n-w,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",M);mxCellRenderer.registerShape("process2",M);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(aa,mxHexagon);aa.prototype.size=30;aa.prototype.position=.5;aa.prototype.position2=.5;aa.prototype.base=20;aa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),J=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+J),r-t),new mxPoint(w,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",aa);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,
-t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",
-ia);mxUtils.extend(na,mxHexagon);na.prototype.size=.25;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",na);mxUtils.extend(qa,mxRectangleShape);qa.prototype.isHtmlAllowed=function(){return!1};qa.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",qa);var jb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(J,mxRectangleShape);J.prototype.size=.1;J.prototype.fixedSize=!1;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};J.prototype.paintForeground=
+function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",J);mxCellRenderer.registerShape("process2",J);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(Z,mxHexagon);Z.prototype.size=30;Z.prototype.position=.5;Z.prototype.position2=.5;Z.prototype.base=20;Z.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",Z);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,t,
+n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",
+ia);mxUtils.extend(oa,mxHexagon);oa.prototype.size=.25;oa.prototype.fixedSize=20;oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(n-l,0),new mxPoint(n,.5*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",oa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.isHtmlAllowed=function(){return!1};sa.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",sa);var jb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),jb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};O.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],ba=this.style["symbol"+v+"Width"],S=this.style["symbol"+v+"Height"],Ea=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Ea,
-Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Ea+=Oa,Ra+=Oa);Oa=l;var ka=t;Oa=J==mxConstants.ALIGN_CENTER?Oa+(n-ba)/2:J==mxConstants.ALIGN_RIGHT?Oa+(n-ba-Ea):Oa+Ea;ka=y==mxConstants.ALIGN_MIDDLE?ka+(r-S)/2:y==mxConstants.ALIGN_BOTTOM?ka+(r-S-Ra):ka+Ra;c.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,c,Oa,ka,ba,S);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
-O);mxUtils.extend(Z,mxCylinder);Z.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",Z);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/
-2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ca);mxUtils.extend(W,mxShape);W.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};W.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-W);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ja);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(ea,mxShape);
-ea.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};ea.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};ea.prototype.paintForeground=function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",ea);mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=
-40;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};oa.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,l,t,n,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=oa&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};oa.prototype.paintForeground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,
-Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",oa);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};sa.prototype.getLabelMargins=
-function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};sa.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,w=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),J=Math.min(r,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,
-mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(l,t,n,r),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,t,n,r),c.setGradient(this.fill,this.gradient,l,t,n,r,this.gradientDirection)):c.setFillColor(this.fill);c.pointerEvents=!0;c.begin();c.moveTo(l,t);c.lineTo(l+w,t);c.lineTo(l+w,t+Math.max(0,J-1.5*v));c.lineTo(l+Math.max(0,w-v),t+J);c.lineTo(l,t+J);c.close();c.fillAndStroke();this.configurePointerEvents(c);
-c.begin();c.moveTo(l+w,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+J);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,l,t,n){n=oa.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var I=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],aa=this.style["symbol"+v+"Width"],S=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Fa,
+Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Oa,Ra+=Oa);Oa=l;var ka=t;Oa=I==mxConstants.ALIGN_CENTER?Oa+(n-aa)/2:I==mxConstants.ALIGN_RIGHT?Oa+(n-aa-Fa):Oa+Fa;ka=y==mxConstants.ALIGN_MIDDLE?ka+(r-S)/2:y==mxConstants.ALIGN_BOTTOM?ka+(r-S-Ra):ka+Ra;c.save();I=new x;I.style=this.style;x.prototype.paintVertexShape.call(I,c,Oa,ka,aa,S);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+O);mxUtils.extend(X,mxCylinder);X.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",X);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/
+2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ba);mxUtils.extend(da,mxShape);da.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};da.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+da);mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ca);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(ea,mxShape);
+ea.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};ea.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};ea.prototype.paintForeground=function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",ea);mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=
+40;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};ra.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"participant");null==x||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,l,t,n,v):(x=this.state.view.graph.cellRenderer.getShape(x),null!=x&&x!=ra&&(x=new x,x.apply(this.state),c.save(),x.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};ra.prototype.paintForeground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,
+Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",ra);mxUtils.extend(qa,mxShape);qa.prototype.width=60;qa.prototype.height=30;qa.prototype.corner=10;qa.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};qa.prototype.getLabelMargins=
+function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};qa.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,x=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),I=Math.min(r,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,
+mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(l,t,n,r),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,t,n,r),c.setGradient(this.fill,this.gradient,l,t,n,r,this.gradientDirection)):c.setFillColor(this.fill);c.pointerEvents=!0;c.begin();c.moveTo(l,t);c.lineTo(l+x,t);c.lineTo(l+x,t+Math.max(0,I-1.5*v));c.lineTo(l+Math.max(0,x-v),t+I);c.lineTo(l,t+I);c.close();c.fillAndStroke();this.configurePointerEvents(c);
+c.begin();c.moveTo(l+x,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",qa);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,l,t,n){n=ra.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*
l.view.scale/2-1;t.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,t.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,t,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,t,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||
1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return t.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,t.y)));t.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+c.width,Math.max(c.x,t.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(c,l,t,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",aa.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixedSize:K.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));
-r&&(v*=l.view.scale);var w=c.x,J=c.y,y=c.width,ba=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+
-y,J),new mxPoint(w+y-r,J+ba),new mxPoint(w,J+ba),new mxPoint(w+r,J)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);n&&(t.x<w||t.x>w+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(J,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?U.prototype.fixedSize:U.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);
-var w=c.x,J=c.y,y=c.width,ba=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+y-r,J),new mxPoint(w+y,J+ba),new mxPoint(w,J+ba),new mxPoint(w+r,J)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J),new mxPoint(w+y-r,J+
-ba),new mxPoint(w+r,J+ba),new mxPoint(w,J)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J+r),new mxPoint(w+y,J),new mxPoint(w+y,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J+r)]):(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba-r),new mxPoint(w,J+ba),new mxPoint(w,J)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);n&&(t.x<w||t.x>w+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(J,
-c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var w=c.x,J=c.y,y=c.width,ba=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?
-(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y-r,J),new mxPoint(w+y,c),new mxPoint(w+y-r,J+ba),new mxPoint(w,J+ba),new mxPoint(w+r,c),new mxPoint(w,J)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+y,J),new mxPoint(w+y-r,c),new mxPoint(w+y,J+ba),new mxPoint(w+r,J+ba),new mxPoint(w,c),new mxPoint(w+r,J)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,
-Math.min(1,v)),J=[new mxPoint(w,J+r),new mxPoint(S,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba),new mxPoint(S,J+ba-r),new mxPoint(w,J+ba),new mxPoint(w,J+r)]):(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(S,J+r),new mxPoint(w+y,J),new mxPoint(w+y,J+ba-r),new mxPoint(S,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J)]);S=new mxPoint(S,c);n&&(t.x<w||t.x>w+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(J,S,t)};mxStyleRegistry.putValue("stepPerimeter",
-mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?na.prototype.fixedSize:na.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var w=c.x,J=c.y,y=c.width,ba=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,
-Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(S,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba-r),new mxPoint(S,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J+r),new mxPoint(S,J)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+y-r,J),new mxPoint(w+y,c),new mxPoint(w+y-r,J+ba),new mxPoint(w+r,J+ba),new mxPoint(w,c),new mxPoint(w+r,J)]);S=new mxPoint(S,c);n&&(t.x<w||t.x>w+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(J,S,t)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(Pa,mxShape);Pa.prototype.size=10;Pa.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Pa);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.inset=2;la.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+w);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-w,v/2);c.quadTo((n-v)/2-w,v+w,n/2,v+w);c.quadTo((n+v)/2+w,v+w,(n+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",la);mxUtils.extend(Ba,mxShape);Ba.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);
-c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ba);mxUtils.extend(Ca,mxShape);Ca.prototype.inset=2;Ca.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Ca);mxUtils.extend(Fa,mxCylinder);Fa.prototype.jettyWidth=
-20;Fa.prototype.jettyHeight=10;Fa.prototype.redrawPath=function(c,l,t,n,r,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var J=Math.min(l,r-l),y=Math.min(J+2*l,r-l);v?(c.moveTo(t,J),c.lineTo(w,J),c.lineTo(w,J+l),c.lineTo(t,J+l),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,
-y),c.lineTo(t,y),c.lineTo(t,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(t,J),c.close());c.end()};mxCellRenderer.registerShape("module",Fa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=32;Ia.prototype.jettyHeight=12;Ia.prototype.redrawPath=function(c,l,t,n,r,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var J=.3*r-l/2,y=.7*r-l/2;v?(c.moveTo(t,J),c.lineTo(w,J),c.lineTo(w,
-J+l),c.lineTo(t,J+l),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(t,J),c.close());c.end()};mxCellRenderer.registerShape("component",Ia);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,w=r/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+w),new mxPoint(l+v,t+r),new mxPoint(l,t+w)],this.isRounded,J,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ha);mxUtils.extend(Ja,mxDoubleEllipse);Ja.prototype.outerStroke=!0;Ja.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&
-(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ja);mxUtils.extend(ta,Ja);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=4;La.prototype.isOpenEnded=function(){return!0};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};La.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+function(c,l,t,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",Z.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?N.prototype.fixedSize:N.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));
+r&&(v*=l.view.scale);var x=c.x,I=c.y,y=c.width,aa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+
+y,I),new mxPoint(x+y-r,I+aa),new mxPoint(x,I+aa),new mxPoint(x+r,I)]);aa=c.getCenterX();c=c.getCenterY();c=new mxPoint(aa,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?U.prototype.fixedSize:U.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);
+var x=c.x,I=c.y,y=c.width,aa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+y-r,I),new mxPoint(x+y,I+aa),new mxPoint(x,I+aa),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y,I),new mxPoint(x+y-r,I+
+aa),new mxPoint(x+r,I+aa),new mxPoint(x,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(x+y,I),new mxPoint(x+y,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa-r),new mxPoint(x,I+aa),new mxPoint(x,I)]);aa=c.getCenterX();c=c.getCenterY();c=new mxPoint(aa,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,
+c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,y=c.width,aa=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?
+(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y-r,I),new mxPoint(x+y,c),new mxPoint(x+y-r,I+aa),new mxPoint(x,I+aa),new mxPoint(x+r,c),new mxPoint(x,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+y,I),new mxPoint(x+y-r,c),new mxPoint(x+y,I+aa),new mxPoint(x+r,I+aa),new mxPoint(x,c),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,
+Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(S,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa),new mxPoint(S,I+aa-r),new mxPoint(x,I+aa),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(S,I+r),new mxPoint(x+y,I),new mxPoint(x+y,I+aa-r),new mxPoint(S,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(I,S,t)};mxStyleRegistry.putValue("stepPerimeter",
+mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?oa.prototype.fixedSize:oa.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,y=c.width,aa=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,
+Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(S,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa-r),new mxPoint(S,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I+r),new mxPoint(S,I)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+y-r,I),new mxPoint(x+y,c),new mxPoint(x+y-r,I+aa),new mxPoint(x+r,I+aa),new mxPoint(x,c),new mxPoint(x+r,I)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(I,S,t)};mxStyleRegistry.putValue("hexagonPerimeter2",
+mxPerimeter.HexagonPerimeter2);mxUtils.extend(Pa,mxShape);Pa.prototype.size=10;Pa.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Pa);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.inset=2;ma.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,
+"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ma);mxUtils.extend(Ba,mxShape);Ba.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);
+c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ba);mxUtils.extend(Ca,mxShape);Ca.prototype.inset=2;Ca.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Ca);mxUtils.extend(Ja,mxCylinder);Ja.prototype.jettyWidth=
+20;Ja.prototype.jettyHeight=10;Ja.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=Math.min(l,r-l),y=Math.min(I+2*l,r-l);v?(c.moveTo(t,I),c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,
+y),c.lineTo(t,y),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ja);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=32;Ia.prototype.jettyHeight=12;Ia.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=.3*r-l/2,y=.7*r-l/2;v?(c.moveTo(t,I),c.lineTo(x,I),c.lineTo(x,
+I+l),c.lineTo(t,I+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("component",Ia);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&
+(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ga);mxUtils.extend(ta,Ga);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=4;La.prototype.isOpenEnded=function(){return!0};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};La.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
La);mxUtils.extend(Xa,mxArrowConnector);Xa.prototype.defaultWidth=10;Xa.prototype.defaultArrowWidth=20;Xa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Xa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Xa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
1)};mxCellRenderer.registerShape("flexArrow",Xa);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("manualInput",
-Ya);mxUtils.extend(cb,mxRectangleShape);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.isHtmlAllowed=function(){return!1};cb.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(n*w,r*w))}w=Math.max(v,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(r,
-parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,t+v);c.lineTo(l+n,t+v);c.end();c.stroke();c.begin();c.moveTo(l+w,t);c.lineTo(l+w,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",cb);mxUtils.extend(fb,mxActor);fb.prototype.dx=20;fb.prototype.dy=20;fb.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+Ya);mxUtils.extend(cb,mxRectangleShape);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.isHtmlAllowed=function(){return!1};cb.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(n*x,r*x))}x=Math.max(v,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(r,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,t+v);c.lineTo(l+n,t+v);c.end();c.stroke();c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",cb);mxUtils.extend(fb,mxActor);fb.prototype.dx=20;fb.prototype.dy=20;fb.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(l,t),new mxPoint(l,r),new mxPoint(0,r)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("corner",fb);mxUtils.extend(pb,mxActor);pb.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.lineTo(0,r);c.end();c.moveTo(n,0);c.lineTo(n,r);c.end();c.moveTo(0,r/2);c.lineTo(n,
r/2);c.end()};mxCellRenderer.registerShape("crossbar",pb);mxUtils.extend(gb,mxActor);gb.prototype.dx=20;gb.prototype.dy=20;gb.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,
0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint((n+l)/2,t),new mxPoint((n+l)/2,r),new mxPoint((n-l)/2,r),new mxPoint((n-l)/2,t),new mxPoint(0,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("tee",gb);mxUtils.extend(ab,mxActor);ab.prototype.arrowWidth=.3;ab.prototype.arrowSize=.2;ab.prototype.redrawPath=function(c,l,t,n,r){var v=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));t=(r-v)/2;v=t+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ab);mxUtils.extend(ib,mxActor);ib.prototype.redrawPath=function(c,l,t,n,r){var v=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
-ab.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ab.prototype.arrowSize))));t=(r-v)/2;v=t+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r/2),new mxPoint(l,0),new mxPoint(l,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(l,v),new mxPoint(l,r)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",
+"arrowSize",this.arrowSize))));t=(r-v)/2;v=t+v;var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(0,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ab);mxUtils.extend(ib,mxActor);ib.prototype.redrawPath=function(c,l,t,n,r){var v=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+ab.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ab.prototype.arrowSize))));t=(r-v)/2;v=t+v;var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r/2),new mxPoint(l,0),new mxPoint(l,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(l,v),new mxPoint(l,r)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",
ib);mxUtils.extend(eb,mxActor);eb.prototype.size=.1;eb.prototype.fixedSize=20;eb.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,r/2,n,r);c.lineTo(l,r);c.quadTo(l-2*l,r/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",eb);
mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.close();c.end()};mxCellRenderer.registerShape("or",q);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.quadTo(n/2,r/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",A);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(c,
l,t,n,r){l=Math.min(n/2,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,.8*l),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,.8*l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("loopLimit",B);mxUtils.extend(F,mxActor);F.prototype.size=.375;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(c,
-l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(N,mxEllipse);N.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
-c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",N);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(c,
-l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",X);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);
-c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",da);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,w=10+2*v,J=t+r-w/2;c.begin();
-c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,J);c.lineTo(l+v+w,J-w/2);c.moveTo(l+v,J);c.lineTo(l+v+w,J+w/2);c.moveTo(l+v,J);c.lineTo(l+n-v,J);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,J);c.lineTo(l+n-w-v,J-w/2);c.moveTo(l+n-v,J);c.lineTo(l+n-w-v,J+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ha);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,
-w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var J="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),ba="1"==mxUtils.getValue(this.style,"right","1"),S="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||J||ba||S||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,
-t),this.outline||J?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||ba?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||S?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,
+l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
+c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",M);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(c,
+l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",W);mxUtils.extend(ha,mxRhombus);ha.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);
+c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ha);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",fa);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,I=t+r-x/2;c.begin();
+c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,I);c.lineTo(l+v+x,I-x/2);c.moveTo(l+v,I);c.lineTo(l+v+x,I+x/2);c.moveTo(l+v,I);c.lineTo(l+n-v,I);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I-x/2);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ja);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,
+x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),aa="1"==mxUtils.getValue(this.style,"right","1"),S="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||I||aa||S||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,
+t),this.outline||I?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||aa?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||S?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,
"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Na,mxActor);Na.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Na);mxUtils.extend(ya,mxActor);ya.prototype.size=.2;ya.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=
-Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var w=(n-v)/2;v=w+v;c.moveTo(0,l);c.lineTo(w,l);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(w,r);c.lineTo(w,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.25;Ga.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ga);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};wa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
+Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(Ha,mxActor);Ha.prototype.size=.25;Ha.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ha);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};wa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",
type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",
type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},
-{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=function(c,l,t,n,r,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ba=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),S=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ea=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,S)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,
-"top",!0),ra=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),pa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),za=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Aa=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Da=v&&v.bottomLeftStyle?
+{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),aa=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),S=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,S)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,
+"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),la=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),za=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Aa=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ea=v&&v.bottomLeftStyle?
v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Bb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Cb=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Ab=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Db=v&&v.gradientDirection2?
-v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Eb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Fb=Math.max(0,Math.min(50,y));v=wa.prototype;c.setDashed(Ea);Ra&&""!=Ra&&c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);J||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));J||(S=Math.min(Oa*Math.min(n,r)/100));S=Math.min(S,.5*Math.min(n,r)-y);(ka||ra||pa||ma)&&"frame"!=ba&&(c.begin(),ka?v.moveNW(c,l,t,n,r,w,xa,y,ma):c.moveTo(0,
-0),ka&&v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),ra&&v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),pa&&v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),ma&&v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Ea=J=Eb,"none"==zb&&(J=0),"none"==Ab&&(Ea=0),c.setGradient(zb,Ab,0,0,n,r,Db,J,Ea),c.begin(),ka?v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma):c.moveTo(S,0),v.paintLeftInner(c,l,
-t,n,r,w,Da,y,S,pa,ma),ma&&pa&&v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),pa&&ra&&v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),ra&&ka&&v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),ka&&ma&&v.paintNWInner(c,l,t,n,r,w,xa,y,S),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,w,xa,za,Aa,Da,y,ka,ra,pa,ma),c.stroke()));ka||ra||pa||!ma?ka||ra||!pa||ma?!ka&&!ra&&pa&&ma?"frame"!=ba?(c.begin(),v.moveSE(c,
-l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,
-l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),c.fillAndStroke()):ka||!ra||pa||ma?!ka&&ra&&!pa&&ma?"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,
-l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):!ka&&ra&&pa&&!ma?"frame"!=ba?(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,
-Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,
-l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):!ka&&ra&&pa&&ma?"frame"!=ba?(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,
-pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),
-v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):!ka||ra||pa||ma?ka&&!ra&&!pa&&ma?"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,
-r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke()):ka&&!ra&&pa&&!ma?"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,w,
-Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),
-c.fillAndStroke()):ka&&!ra&&pa&&ma?"frame"!=ba?(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,
-pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),c.fillAndStroke()):ka&&ra&&!pa&&
-!ma?"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,
-w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke()):ka&&ra&&!pa&&ma?"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,
-l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,
-S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke()):ka&&ra&&pa&&!ma?"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,
-t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,
-w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke()):ka&&ra&&pa&&ma&&("frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),c.close(),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintSWInner(c,l,t,n,r,w,Da,
-y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,
-Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),c.close(),v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke())):
-"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke()):"frame"!=ba?(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,
-Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):"frame"!=ba?(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,
-l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),c.fillAndStroke()):"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke());
-c.begin();v.paintFolds(c,l,t,n,r,w,xa,za,Aa,Da,y,ka,ra,pa,ma);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,J)};wa.prototype.moveNE=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(n,0):c.moveTo(n-J,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(n,r):c.moveTo(n,r-J)};wa.prototype.moveSW=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==
-w&&"square"==v||!y?c.moveTo(0,r):c.moveTo(J,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(J,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(n,0):c.lineTo(n-J,0)};
-wa.prototype.paintNE=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,n,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n,J);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(n,r):c.lineTo(n,r-J)};wa.prototype.paintLeft=function(c,l,t,n,r,v,w,
-J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,J)};wa.prototype.paintSE=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,n-J,r)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n-J,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==
-v||!y?c.lineTo(0,r):c.lineTo(J,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,0,r-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,r-J);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+
-J);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+J,y+J),c.lineTo(y,y+J)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(0,y):ba&&!S?c.lineTo(y,0):ba?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(J+.5*y,y):c.lineTo(J+y,y):c.lineTo(0,
-y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,n-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,n-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(n-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(n-J-y,J+y),c.lineTo(n-J-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(n-y,0):ba&&!S?c.lineTo(n,y):ba?"square"==
-w||"default"==w&&"square"==v?c.lineTo(n-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-y,J+.5*y):c.lineTo(n-y,J+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(y,r):ba&&!S?c.lineTo(0,r-y):ba?"square"==w||"default"==w&&"square"==v?c.lineTo(y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,r-J-.5*y):c.lineTo(y,r-J-y):c.lineTo(y,r):c.lineTo(0,
-r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,n-y,r-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,n-y,r-J-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(n-y,r-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(n-J-y,r-J-y),c.lineTo(n-y,r-J-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(n,r-y):ba&&!S?c.lineTo(n-y,r):"square"==
-w||"default"==w&&"square"==v||!ba?c.lineTo(n-y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-J-.5*y,r-y):c.lineTo(n-J-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,w,J,y,ba){if(!ba)c.lineTo(y,r);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,r-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,r-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,J+y,r-y);else if("snip"==
-w||"default"==w&&"snip"==v)c.lineTo(J+.5*y,r-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+J,r-J-y),c.lineTo(y+J,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.moveTo(y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,r-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,r-J-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,
-r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.lineTo(y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,r-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,r-J-y):c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.moveTo(n-y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(n-y,r-J-.5*y):
-("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(n-y,r-J-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.lineTo(n-y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-y,r-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n-y,r-J-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,w,
-J,y,ba){ba?"square"==w||"default"==w&&"square"==v||ba?c.moveTo(n-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(n-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(n-y,J+y):c.moveTo(n,y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v||ba?c.lineTo(n-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-y,J+.5*y):("invRound"==
-w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n-y,J+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.moveTo(y,0):ba&&!S?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,J+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,
-l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(y,0):ba&&!S?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,J+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,w,J,y,ba,S,Ea,Ra,Oa,ka){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==ba)("fold"==w||"default"==w&&"fold"==v)&&Ea&&
-ka&&(c.moveTo(0,S),c.lineTo(S,S),c.lineTo(S,0)),("fold"==J||"default"==J&&"fold"==v)&&Ea&&Ra&&(c.moveTo(n-S,0),c.lineTo(n-S,S),c.lineTo(n,S)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-S,r),c.lineTo(n-S,r-S),c.lineTo(n,r-S)),("fold"==ba||"default"==ba&&"fold"==v)&&Oa&&ka&&(c.moveTo(0,r-S),c.lineTo(S,r-S),c.lineTo(S,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;
+v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Eb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Fb=Math.max(0,Math.min(50,y));v=wa.prototype;c.setDashed(Fa);Ra&&""!=Ra&&c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);I||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));I||(S=Math.min(Oa*Math.min(n,r)/100));S=Math.min(S,.5*Math.min(n,r)-y);(ka||pa||na||la)&&"frame"!=aa&&(c.begin(),ka?v.moveNW(c,l,t,n,r,x,xa,y,la):c.moveTo(0,
+0),ka&&v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),pa&&v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),na&&v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),la&&v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=I=Eb,"none"==zb&&(I=0),"none"==Ab&&(Fa=0),c.setGradient(zb,Ab,0,0,n,r,Db,I,Fa),c.begin(),ka?v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la):c.moveTo(S,0),v.paintLeftInner(c,l,
+t,n,r,x,Ea,y,S,na,la),la&&na&&v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),na&&pa&&v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),pa&&ka&&v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),ka&&la&&v.paintNWInner(c,l,t,n,r,x,xa,y,S),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,za,Aa,Ea,y,ka,pa,na,la),c.stroke()));ka||pa||na||!la?ka||pa||!na||la?!ka&&!pa&&na&&la?"frame"!=aa?(c.begin(),v.moveSE(c,
+l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,
+l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),c.fillAndStroke()):ka||!pa||na||la?!ka&&pa&&!na&&la?"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,
+l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&!la?"frame"!=aa?(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,
+Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,
+l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&la?"frame"!=aa?(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,
+na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),
+v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):!ka||pa||na||la?ka&&!pa&&!na&&la?"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,
+r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke()):ka&&!pa&&na&&!la?"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,
+Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),
+c.fillAndStroke()):ka&&!pa&&na&&la?"frame"!=aa?(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,
+na)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),c.fillAndStroke()):ka&&pa&&!na&&
+!la?"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,
+x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke()):ka&&pa&&!na&&la?"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,
+l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,
+S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke()):ka&&pa&&na&&!la?"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,
+t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,
+x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke()):ka&&pa&&na&&la&&("frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),c.close(),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintSWInner(c,l,t,n,r,x,Ea,
+y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,
+Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke())):
+"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke()):"frame"!=aa?(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,
+Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):"frame"!=aa?(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,
+l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),c.fillAndStroke()):"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke());
+c.begin();v.paintFolds(c,l,t,n,r,x,xa,za,Aa,Ea,y,ka,pa,na,la);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(n,0):c.moveTo(n-I,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(n,r):c.moveTo(n,r-I)};wa.prototype.moveSW=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==
+x&&"square"==v||!y?c.moveTo(0,r):c.moveTo(I,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,I,0)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,0):c.lineTo(n-I,0)};
+wa.prototype.paintNE=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n,I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n,I);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,r):c.lineTo(n,r-I)};wa.prototype.paintLeft=function(c,l,t,n,r,v,x,
+I,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,I)};wa.prototype.paintSE=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n-I,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-I,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==
+v||!y?c.lineTo(0,r):c.lineTo(I,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,0,r-I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-I);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,I,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,y,.5*y+
+I);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,y,y+I);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(y,.5*y+I);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+I,y+I),c.lineTo(y,y+I)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(0,y):aa&&!S?c.lineTo(y,0):aa?"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(I+.5*y,y):c.lineTo(I+y,y):c.lineTo(0,
+y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,I,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,n-I-.5*y,y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,n-I-y,y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-I-.5*y,y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-y,I+y),c.lineTo(n-I-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(n-y,0):aa&&!S?c.lineTo(n,y):aa?"square"==
+x||"default"==x&&"square"==v?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,I+.5*y):c.lineTo(n-y,I+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(y,r):aa&&!S?c.lineTo(0,r-y):aa?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-I-.5*y):c.lineTo(y,r-I-y):c.lineTo(y,r):c.lineTo(0,
+r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,I,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,n-y,r-I-.5*y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,n-y,r-I-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-y,r-I-.5*y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-y,r-I-y),c.lineTo(n-y,r-I-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(n,r-y):aa&&!S?c.lineTo(n-y,r):"square"==
+x||"default"==x&&"square"==v||!aa?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-I-.5*y,r-y):c.lineTo(n-I-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,I,y,aa){if(!aa)c.lineTo(y,r);else if("square"==x||"default"==x&&"square"==v)c.lineTo(y,r-y);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,I+.5*y,r-y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,I+y,r-y);else if("snip"==
+x||"default"==x&&"snip"==v)c.lineTo(I+.5*y,r-y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+I,r-I-y),c.lineTo(y+I,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.moveTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,r-I-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,r-I-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,
+r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-I-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,r-I-y):c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.moveTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,r-I-.5*y):
+("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,r-I-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,r-I-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,r-I-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,
+I,y,aa){aa?"square"==x||"default"==x&&"square"==v||aa?c.moveTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,I+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,I+y):c.moveTo(n,y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v||aa?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,I+.5*y):("invRound"==
+x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,I+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.moveTo(y,0):aa&&!S?c.moveTo(0,y):"square"==x||"default"==x&&"square"==v?c.moveTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,I+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,I+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,
+l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(y,0):aa&&!S?c.lineTo(0,y):"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,I,y,aa,S,Fa,Ra,Oa,ka){if("fold"==v||"fold"==x||"fold"==I||"fold"==y||"fold"==aa)("fold"==x||"default"==x&&"fold"==v)&&Fa&&
+ka&&(c.moveTo(0,S),c.lineTo(S,S),c.lineTo(S,0)),("fold"==I||"default"==I&&"fold"==v)&&Fa&&Ra&&(c.moveTo(n-S,0),c.lineTo(n-S,S),c.lineTo(n,S)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-S,r),c.lineTo(n-S,r-S),c.lineTo(n,r-S)),("fold"==aa||"default"==aa&&"fold"==v)&&Oa&&ka&&(c.moveTo(0,r-S),c.lineTo(S,r-S),c.lineTo(S,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;
ua.prototype.paintEdgeShape=function(c,l,t){for(var n=[],r=0;r<l.length;r++)n.push(mxUtils.clone(l[r]));r=c.state.dashed;var v=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,n,t]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(r,v),ua.prototype.origPaintEdgeShape.apply(this,[c,l,t])))};mxCellRenderer.registerShape("filledEdge",ua);"undefined"!==typeof StyleFormatPanel&&function(){var c=
-StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Ea/2,n.y-Ea/2+S/2);c.lineTo(n.x+Ea/2-3*S/2,n.y-3*Ea/2-S/2);c.stroke()}});mxMarker.addMarker("box",
-function(c,l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1),Ra=n.x+S/2,Oa=n.y+Ea/2;n.x-=S;n.y-=Ea;return function(){c.begin();c.moveTo(Ra-S/2-Ea/2,Oa-Ea/2+S/2);c.lineTo(Ra-S/2+Ea/2,Oa-Ea/2-S/2);c.lineTo(Ra+Ea/2-3*S/2,Oa-3*Ea/2-S/2);c.lineTo(Ra-Ea/2-3*S/2,Oa-3*Ea/2+S/2);c.close();ba?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Ea/2,n.y-Ea/2+S/2);c.lineTo(n.x+Ea/2-3*S/2,n.y-3*Ea/2-
-S/2);c.moveTo(n.x-S/2+Ea/2,n.y-Ea/2-S/2);c.lineTo(n.x-Ea/2-3*S/2,n.y-3*Ea/2+S/2);c.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,w,J,y,ba){var S=n.clone(),Ea=Va.apply(this,arguments),Ra=r*(w+2*y),Oa=v*(w+2*y);return function(){Ea.apply(this,arguments);c.begin();c.moveTo(S.x-r*y,S.y-v*y);c.lineTo(S.x-2*Ra+r*y,S.y-2*Oa+v*y);c.moveTo(S.x-Ra-Oa+v*y,S.y-Oa+Ra-r*y);c.lineTo(S.x+Oa-Ra-v*y,S.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
-l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1),Ra=n.clone();n.x-=S;n.y-=Ea;return function(){c.begin();c.moveTo(Ra.x-Ea,Ra.y+S);c.quadTo(n.x-Ea,n.y+S,n.x,n.y);c.quadTo(n.x+Ea,n.y-S,Ra.x+Ea,Ra.y-S);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,w,J,y,ba){l=r*y*1.118;t=v*y*1.118;r*=w+y;v*=w+y;var S=n.clone();S.x-=l;S.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(S.x,S.y);J?c.lineTo(S.x-r-v/2,S.y-v+r/2):c.lineTo(S.x+v/2-r,S.y-v-r/2);c.lineTo(S.x-r,S.y-v);c.close();ba?
-c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,w,J,y,ba,S){v*=J+ba;w*=J+ba;var Ea=r.clone();return function(){l.begin();l.moveTo(Ea.x,Ea.y);y?l.lineTo(Ea.x-v-w/c,Ea.y-w+v/c):l.lineTo(Ea.x+w/c-v,Ea.y-w-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var nb=function(c,l,t){return db(c,["width"],l,function(n,r,v,w,J){J=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(w.x+r*n/4+v*J/2,w.y+v*n/4-r*J/2)},function(n,
-r,v,w,J,y){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));c.style.width=Math.round(2*n)/c.view.scale-t})},db=function(c,l,t,n,r){return Ta(c,l,function(v){var w=c.absolutePoints;if(null!=w&&0<w.length){var J=w.length-1;v=c.view.translate;var y=c.view.scale,ba=t?w[0]:w[J];w=t?w[1]:w[J-1];J=w.x-ba.x;var S=w.y-ba.y,Ea=Math.sqrt(J*J+S*S);ba=n.call(this,Ea,J/Ea,S/Ea,ba,w);return new mxPoint(ba.x/y-v.x,ba.y/y-v.y)}return null},function(v,w,J){var y=c.absolutePoints,ba=y.length-1;v=c.view.translate;
-var S=c.view.scale,Ea=t?y[0]:y[ba];y=t?y[1]:y[ba-1];ba=y.x-Ea.x;var Ra=y.y-Ea.y,Oa=Math.sqrt(ba*ba+Ra*Ra);w.x=(w.x+v.x)*S;w.y=(w.y+v.y)*S;r.call(this,Oa,ba/Oa,Ra/Oa,Ea,y,w,J)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,function(n,r,v,w,J){J=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(w.x+r*n/4+v*J/2,w.y+v*n/4-r*J/2)},function(n,r,v,w,J,y){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));t.style.startWidth=Math.round(2*n)/t.view.scale-
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-S/2);c.stroke()}});mxMarker.addMarker("box",
+function(c,l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.x+S/2,Oa=n.y+Fa/2;n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra-S/2-Fa/2,Oa-Fa/2+S/2);c.lineTo(Ra-S/2+Fa/2,Oa-Fa/2-S/2);c.lineTo(Ra+Fa/2-3*S/2,Oa-3*Fa/2-S/2);c.lineTo(Ra-Fa/2-3*S/2,Oa-3*Fa/2+S/2);c.close();aa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-
+S/2);c.moveTo(n.x-S/2+Fa/2,n.y-Fa/2-S/2);c.lineTo(n.x-Fa/2-3*S/2,n.y-3*Fa/2+S/2);c.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,I,y,aa){var S=n.clone(),Fa=Va.apply(this,arguments),Ra=r*(x+2*y),Oa=v*(x+2*y);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(S.x-r*y,S.y-v*y);c.lineTo(S.x-2*Ra+r*y,S.y-2*Oa+v*y);c.moveTo(S.x-Ra-Oa+v*y,S.y-Oa+Ra-r*y);c.lineTo(S.x+Oa-Ra-v*y,S.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
+l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.clone();n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra.x-Fa,Ra.y+S);c.quadTo(n.x-Fa,n.y+S,n.x,n.y);c.quadTo(n.x+Fa,n.y-S,Ra.x+Fa,Ra.y-S);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,x,I,y,aa){l=r*y*1.118;t=v*y*1.118;r*=x+y;v*=x+y;var S=n.clone();S.x-=l;S.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(S.x,S.y);I?c.lineTo(S.x-r-v/2,S.y-v+r/2):c.lineTo(S.x+v/2-r,S.y-v-r/2);c.lineTo(S.x-r,S.y-v);c.close();aa?
+c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,I,y,aa,S){v*=I+aa;x*=I+aa;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);y?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/c):l.lineTo(Fa.x+x/c-v,Fa.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var nb=function(c,l,t){return db(c,["width"],l,function(n,r,v,x,I){I=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,
+r,v,x,I,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));c.style.width=Math.round(2*n)/c.view.scale-t})},db=function(c,l,t,n,r){return Ta(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var I=x.length-1;v=c.view.translate;var y=c.view.scale,aa=t?x[0]:x[I];x=t?x[1]:x[I-1];I=x.x-aa.x;var S=x.y-aa.y,Fa=Math.sqrt(I*I+S*S);aa=n.call(this,Fa,I/Fa,S/Fa,aa,x);return new mxPoint(aa.x/y-v.x,aa.y/y-v.y)}return null},function(v,x,I){var y=c.absolutePoints,aa=y.length-1;v=c.view.translate;
+var S=c.view.scale,Fa=t?y[0]:y[aa];y=t?y[1]:y[aa-1];aa=y.x-Fa.x;var Ra=y.y-Fa.y,Oa=Math.sqrt(aa*aa+Ra*Ra);x.x=(x.x+v.x)*S;x.y=(x.y+v.y)*S;r.call(this,Oa,aa/Oa,Ra/Oa,Fa,y,x,I)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,function(n,r,v,x,I){I=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));t.style.startWidth=Math.round(2*n)/t.view.scale-
l})]}},bb=function(c){return function(l){return[Ta(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ab.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ab.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,
-(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Ta(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},rb=function(c,l,t){return function(n){var r=[Ta(n,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+w,v.y+
-w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},tb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var w=[Ta(v,["size"],function(J){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ba=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(J.x+Math.max(0,Math.min(.5*J.width,
-ba*(y?1:J.width))),J.getCenterY())},function(J,y,ba){J=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(t,(y.x-J.x)/J.width));this.state.style.size=J},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(hb(v));return w}},yb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Ta(n,["size"],function(v){var w=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
-"size",w?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l}},hb=function(c,l){return Ta(c,
+(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Ta(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},rb=function(c,l,t){return function(n){var r=[Ta(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+x,v.y+
+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},tb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=[Ta(v,["size"],function(I){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,aa=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,
+aa*(y?1:I.width))),I.getCenterY())},function(I,y,aa){I=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-I.x:Math.max(0,Math.min(t,(y.x-I.x)/I.width));this.state.style.size=I},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(hb(v));return x}},yb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Ta(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l}},hb=function(c,l){return Ta(c,
[mxConstants.STYLE_ARCSIZE],function(t){var n=null!=l?l:t.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var r=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(t.x+t.width-Math.min(t.width/2,r),t.y+n)}r=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(t.x+t.width-Math.min(Math.max(t.width/2,t.height/2),Math.min(t.width,t.height)*
-r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,w){var J=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(ba){for(var S=0;S<l.length;S++)this.copyStyle(l[S]);
-w&&w(ba)};J.getPosition=t;J.setPosition=n;J.ignoreGrid=null!=r?r:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return J},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!0,function(n,r,v,w,J){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*c.view.scale)+v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
-3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ba.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!0,function(n,r,v,w,J){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*c.view.scale)+v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
-3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(ba.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),
-Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,w,J){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*
-c.view.scale)-v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ba.getEvent())||
-Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,w,J){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*
-c.view.scale)-v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],
-c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(ba.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=parseFloat(mxUtils.getValue(c.style,
+r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,x){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(aa){for(var S=0;S<l.length;S++)this.copyStyle(l[S]);
+x&&x(aa)};I.getPosition=t;I.setPosition=n;I.ignoreGrid=null!=r?r:!0;if(v){var y=I.positionChanged;I.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(n,r,v,x,I){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
+3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(aa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(n,r,v,x,I){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
+3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(aa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),
+Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,x,I){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*
+c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(aa.getEvent())||
+Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,x,I){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*
+c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],
+c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(aa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(hb(c,t/2))}l.push(Ta(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var w=[],J=0;J<v.length;J++)v[J]!=c.cell&&r.isSwimlane(v[J])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[J]))==
-n&&w.push(v[J]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,
-["width","height"],function(l){var t=Math.max(sa.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),n=Math.max(1.5*sa.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",sa.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*sa.prototype.corner,Math.min(l.height,t.y-l.y)))},
-!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
+mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],I=0;I<v.length;I++)v[I]!=c.cell&&r.isSwimlane(v[I])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[I]))==
+n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,
+["width","height"],function(l){var t=Math.max(qa.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",qa.prototype.width))),n=Math.max(1.5*qa.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",qa.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(qa.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*qa.prototype.corner,Math.min(l.height,t.y-l.y)))},
+!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
!1)&&l.push(hb(c));return l},cross:function(c){return[Ta(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ya.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,
Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},
function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Ta(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));
return l},dataStorage:function(c){return[Ta(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?eb.prototype.fixedSize:eb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=
-[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",aa.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",aa.prototype.position)));mxUtils.getValue(this.state.style,"base",aa.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",aa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=
-Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",aa.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",aa.prototype.size))),r=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position",aa.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",aa.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",aa.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));
-return l},internalStorage:function(c){var l=[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&
-l.push(hb(c));return l},module:function(c){return[Ta(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Fa.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Fa.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,
-t.y-l.y))/2)})]},corner:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Ta(c,["dx","dy"],function(l){var t=
-Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",gb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",gb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:bb(1),doubleArrow:bb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,
-20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[Ta(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
-t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
-Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",x.isoAngle))))*Math.PI/
-200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-
-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));
-return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(na.prototype.size,!0,.5,!0,na.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ga.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,I.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,
-U.prototype.fixedSize),parallelogram:yb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
-(l=mxConstants.SHAPE_SWIMLANE);l=Sa[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=Sa[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var w=c.absolutePoints,J=w[0];w=w[w.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==J&&null!=l&&(J=new mxPoint(l.getCenterX(),l.getCenterY()));null==w&&null!=t&&(w=new mxPoint(t.getCenterX(),
-t.getCenterY()));var y=$a.x,ba=$a.y,S=kb.x,Ea=kb.y,Ra="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=J){c=function(ka,ra,pa){ka-=Oa.x;var ma=ra-Oa.y;ra=(Ea*ka-S*ma)/(y*Ea-ba*S);ka=(ba*ka-y*ma)/(ba*S-y*Ea);Ra?(pa&&(Oa=new mxPoint(Oa.x+y*ra,Oa.y+ba*ra),r.push(Oa)),Oa=new mxPoint(Oa.x+S*ka,Oa.y+Ea*ka)):(pa&&(Oa=new mxPoint(Oa.x+S*ka,Oa.y+Ea*ka),r.push(Oa)),Oa=new mxPoint(Oa.x+y*ra,Oa.y+ba*ra));r.push(Oa)};var Oa=J;null==n&&(n=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/
-2));c(n.x,n.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};g.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;
-c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};x.prototype.getConstraints=function(c,l,t){c=[];var n=
-Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-
-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};aa.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));
-parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),
-new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};I.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};f.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};C.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=
-function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};cb.prototype.constraints=mxRectangleShape.prototype.constraints;eb.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;
-X.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Fa.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",Fa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Fa.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));t>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
-0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
-1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Z.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Z.prototype.position)));mxUtils.getValue(this.state.style,"base",Z.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",Z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=
+Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",Z.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Z.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",Z.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",Z.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l},internalStorage:function(c){var l=
+[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l},module:function(c){return[Ta(c,
+["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ja.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[Ta(c,
+["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,
+"dx",gb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",gb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:bb(1),doubleArrow:bb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),
+folder:function(c){return[Ta(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,t.x-l.x));mxUtils.getValue(this.state.style,
+"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},
+!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*
+Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=
+[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,
+n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(oa.prototype.size,!0,.5,!0,oa.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ha.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,K.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,N.prototype.size,
+N.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=Sa[l];null==l&&null!=this.state.shape&&
+this.state.shape.isRoundable()&&(l=Sa[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);
+$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,aa=$a.y,S=kb.x,Fa=kb.y,Ra="horizontal"==
+mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=I){c=function(ka,pa,na){ka-=Oa.x;var la=pa-Oa.y;pa=(Fa*ka-S*la)/(y*Fa-aa*S);ka=(aa*ka-y*la)/(aa*S-y*Fa);Ra?(na&&(Oa=new mxPoint(Oa.x+y*pa,Oa.y+aa*pa),r.push(Oa)),Oa=new mxPoint(Oa.x+S*ka,Oa.y+Fa*ka)):(na&&(Oa=new mxPoint(Oa.x+S*ka,Oa.y+Fa*ka),r.push(Oa)),Oa=new mxPoint(Oa.x+y*pa,Oa.y+aa*pa));r.push(Oa)};var Oa=I;null==n&&(n=new mxPoint(I.x+(x.x-I.x)/2,I.y+(x.y-I.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};g.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};w.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*
+Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0,n));return c};Z.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
+t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
+mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return c};K.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};f.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};C.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
+"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};cb.prototype.constraints=mxRectangleShape.prototype.constraints;eb.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
+mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ha.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Ja.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,
+"jettyHeight",Ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
+l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,l));t>
+15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
+1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
+.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
+1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
+new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];N.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;gb.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,r));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3563,44 +3564,44 @@ X.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints
function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));return c};ib.prototype.getConstraints=function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ab.prototype.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ab.prototype.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};ya.prototype.getConstraints=
-function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,w=(l-r)/2;r=w+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,n));return c};oa.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,x=(l-r)/2;r=x+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ra.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,x,z,C){C.getModel().beginUpdate();try{var E=C.getCellGeometry(k);null!=E&&x&&z&&(x/=z,E=E.clone(),1<x?E.height=E.width/x:E.width=E.height*x,C.getModel().setGeometry(k,
+Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,z,C){C.getModel().beginUpdate();try{var E=C.getCellGeometry(k);null!=E&&w&&z&&(w/=z,E=E.clone(),1<w?E.height=E.width/w:E.width=E.height*w,C.getModel().setGeometry(k,
E));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{C.getModel().endUpdate()}}var f=this.editorUi,h=f.editor,d=h.graph,g=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),
-function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,u=d.container.scrollLeft,x=d.container.scrollTop,z=d.view.translate.x,C=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(x-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?f.actions.get("smartFit").funct():d.isEnabled()&&
-d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,u){try{var x=mxUtils.parseXml(k);h.graph.setSelectionCells(h.graph.importGraphModel(x.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,u=d.container.scrollLeft,w=d.container.scrollTop,z=d.view.translate.x,C=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?f.actions.get("smartFit").funct():d.isEnabled()&&
+d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,u){try{var w=mxUtils.parseXml(k);h.graph.setSelectionCells(h.graph.importGraphModel(w.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null})}).isEnabled=g;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=g;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1);k.init()}).isEnabled=g;this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container,
320,240,!0,!0)}).isEnabled=g;this.addAction("print...",function(){f.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==
k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(u){if(null!=u){d.getModel().beginUpdate();try{f.pasteXml(u,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),
-k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,I=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/
-E-I)),d.cellsMoved(z,C-D.x,E-D.y))}}function x(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else x()}),k=!0)}catch(z){}k||x()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],
-k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var x=d.getCellGeometry(k[u]);
-null!=x&&(x=x.clone(),x.width=f.copiedSize.width,x.height=f.copiedSize.height,d.getModel().setGeometry(k[u],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),
-mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function x(E,D){var G=z.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||D.setAttribute("placeholders",G.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));z.setValue(E,D)}k=null!=u?u:k;var z=
-d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){z.beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)x(z.getRoot(),f.copiedValue);else for(u=0;u<C.length;u++)x(C[u],f.copiedValue)}finally{z.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(k,u){k=null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",
+k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,K=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/
+E-K)),d.cellsMoved(z,C-D.x,E-D.y))}}function w(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else w()}),k=!0)}catch(z){}k||w()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],
+k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);
+null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),
+mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var G=z.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||D.setAttribute("placeholders",G.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));z.setValue(E,D)}k=null!=u?u:k;var z=
+d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){z.beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)w(z.getRoot(),f.copiedValue);else for(u=0;u<C.length;u++)w(C[u],f.copiedValue)}finally{z.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(k,u){k=null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",
function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(k){f.handleError(k)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var k=f.getSelectionState();if(null!=k.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",k.rowspan,[k.mergeCell]),d.setCellStyles("colspan",
k.colspan,[k.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var k=f.getSelectionState();if(0<k.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,k.cells),d.setCellStyles("colspan",null,k.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(k,u){k=null!=u?u:k;d.turnShapes(d.getResizableCells(d.getSelectionCells()),
null!=k?mxEvent.isShiftDown(k):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(k){k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.addSelectionCells(d.getEdges(k))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,
-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var k=d.getSelectionCells(),u=d.getCurrentCellStyle(d.getSelectionCell()),x=1==mxUtils.getValue(u,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,x,k);d.setCellStyles(mxConstants.STYLE_RESIZABLE,x,k);d.setCellStyles(mxConstants.STYLE_ROTATABLE,x,
-k);d.setCellStyles(mxConstants.STYLE_DELETABLE,x,k);d.setCellStyles(mxConstants.STYLE_EDITABLE,x,k);d.setCellStyles("locked",1==x?0:1,k);d.setCellStyles("connectable",x,k)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){d.model.isVertex(d.getSelectionCell())&&Graph.exploreFromCell(f.editor.graph,f.editor.graph.getSelectionCell())});this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},
+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var k=d.getSelectionCells(),u=d.getCurrentCellStyle(d.getSelectionCell()),w=1==mxUtils.getValue(u,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,w,k);d.setCellStyles(mxConstants.STYLE_RESIZABLE,w,k);d.setCellStyles(mxConstants.STYLE_ROTATABLE,w,
+k);d.setCellStyles(mxConstants.STYLE_DELETABLE,w,k);d.setCellStyles(mxConstants.STYLE_EDITABLE,w,k);d.setCellStyles("locked",1==w?0:1,k);d.setCellStyles("connectable",w,k)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){d.model.isVertex(d.getSelectionCell())&&Graph.exploreFromCell(f.editor.graph,f.editor.graph.getSelectionCell())});this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},
null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",
function(k){d.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(k){d.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(d.isEnabled()){var k=mxUtils.sortCells(d.getSelectionCells(),!0);1!=k.length||d.isTable(k[0])||d.isTableRow(k[0])?(k=d.getCellsForGroup(k),1<k.length&&d.setSelectionCell(d.groupCells(null,0,k))):d.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",
-function(){if(d.isEnabled()){var k=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var u=d.ungroupCells();if(null!=k)for(var x=0;x<k.length;x++)d.model.contains(k[x])&&(0==d.model.getChildCount(k[x])&&d.model.isVertex(k[x])&&d.setCellStyles("container","0",[k[x]]),u.push(k[x]))}finally{d.model.endUpdate()}0<u.length&&d.setSelectionCells(u)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var k=d.getSelectionCells();if(null!=k){for(var u=
-[],x=0;x<k.length;x++)d.isTableRow(k[x])||d.isTableCell(k[x])||u.push(k[x]);d.removeCellsFromParent(u);0<u.length&&d.scrollCellToVisible(u[0])}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var k=d.getSelectionCell()||d.getModel().getRoot();f.showDataDialog(k)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=
-"";if(mxUtils.isNode(k.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=k.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=k.value.getAttribute("tooltip"));null!=x&&(u=x)}u=new TextareaDialog(f,mxResources.get("editTooltip")+":",u,function(z){d.setTooltipForCell(k,z)});f.showDialog(u.container,320,200,!0,!0);u.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var k=d.getLinkForCell(d.getSelectionCell());
-null!=k&&d.openLink(k)});this.addAction("editLink...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=d.getLinkForCell(k,!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(x,z,C){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<x.length?x:null),d.setAttributeForCell(k,"linkTarget",C)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=g;this.addAction("editImage...",function(){f.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,x){k=mxUtils.trim(k);if(0<k.length){var z=null,C=d.getLinkTitle(k);null!=u&&0<u.length&&(z=u[0].iconUrl,C=u[0].name||u[0].type,C=C.charAt(0).toUpperCase()+
-C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));u=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=z?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+z:"spacing=10;"));u.vertex=!0;z=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=z.x;u.geometry.y=z.y;d.setAttributeForCell(u,"linkTarget",x);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),
-d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=g;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),x="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var z=k.getElementsByTagName("a"),C=0;C<z.length&&null==u;C++)z[C].textContent==
-k.textContent&&(u=z[C]);null!=u&&"A"==u.nodeName&&(x=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(x,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=g;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var x=
-k[u];d.getModel().isVertex(x)&&(0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),
-x=0;x<u.length;x++)if(state=d.getView().getState(u[x]),null!=state){var z=mxUtils.getValue(state.style,"html","0");if("1"==z&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[x]]);else if("0"==z&&"1"==k){var C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",k,[u[x]])}}f.fireEvent(new mxEventObject("styleChanged",
+function(){if(d.isEnabled()){var k=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var u=d.ungroupCells();if(null!=k)for(var w=0;w<k.length;w++)d.model.contains(k[w])&&(0==d.model.getChildCount(k[w])&&d.model.isVertex(k[w])&&d.setCellStyles("container","0",[k[w]]),u.push(k[w]))}finally{d.model.endUpdate()}0<u.length&&d.setSelectionCells(u)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var k=d.getSelectionCells();if(null!=k){for(var u=
+[],w=0;w<k.length;w++)d.isTableRow(k[w])||d.isTableCell(k[w])||u.push(k[w]);d.removeCellsFromParent(u);0<u.length&&d.scrollCellToVisible(u[0])}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var k=d.getSelectionCell()||d.getModel().getRoot();f.showDataDialog(k)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=
+"";if(mxUtils.isNode(k.value)){var w=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(w=k.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==w&&(w=k.value.getAttribute("tooltip"));null!=w&&(u=w)}u=new TextareaDialog(f,mxResources.get("editTooltip")+":",u,function(z){d.setTooltipForCell(k,z)});f.showDialog(u.container,320,200,!0,!0);u.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var k=d.getLinkForCell(d.getSelectionCell());
+null!=k&&d.openLink(k)});this.addAction("editLink...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=d.getLinkForCell(k,!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(w,z,C){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<w.length?w:null),d.setAttributeForCell(k,"linkTarget",C)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&
+!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=g;this.addAction("editImage...",function(){f.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,w){k=mxUtils.trim(k);if(0<k.length){var z=null,C=d.getLinkTitle(k);null!=u&&0<u.length&&(z=u[0].iconUrl,C=u[0].name||u[0].type,C=C.charAt(0).toUpperCase()+
+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));u=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=z?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+z:"spacing=10;"));u.vertex=!0;z=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=z.x;u.geometry.y=z.y;d.setAttributeForCell(u,"linkTarget",w);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),
+d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=g;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var z=k.getElementsByTagName("a"),C=0;C<z.length&&null==u;C++)z[C].textContent==
+k.textContent&&(u=z[C]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=g;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=
+k[u];d.getModel().isVertex(w)&&(0<d.getModel().getChildCount(w)?d.updateGroupBounds([w],0,!0):d.updateCellSize(w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),
+w=0;w<u.length;w++)if(state=d.getView().getState(u[w]),null!=state){var z=mxUtils.getValue(state.style,"html","0");if("1"==z&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[w]]);else if("0"==z&&"1"==k){var C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",k,[u[w]])}}f.fireEvent(new mxEventObject("styleChanged",
"keys",["html"],"values",[null!=k?k:"0"],"cells",u))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),u="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(u=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,u)});this.addAction("rotation",function(){var k="0",u=d.getView().getState(d.getSelectionCell());null!=u&&(k=u.style[mxConstants.STYLE_ROTATION]||k);k=new FilenameDialog(f,k,mxResources.get("apply"),
-function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");f.showDialog(k.container,375,80,!0,!0);k.init()});this.addAction("resetView",function(){d.zoomTo(1);f.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(k){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,f.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(k){d.isFastZoomEnabled()?
+function(w){null!=w&&0<w.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,w)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");f.showDialog(k.container,375,80,!0,!0);k.init()});this.addAction("resetView",function(){d.zoomTo(1);f.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(k){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,f.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(k){d.isFastZoomEnabled()?
d.lazyZoom(!1,!0,f.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){d.pageVisible&&d.isSelectionEmpty()?d.fitPages():f.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible?d.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible?d.fitPages(2):this.get("pageView").funct()}),
null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible?d.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var k=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);!isNaN(u)&&0<u&&d.zoomTo(u/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(k.container,
300,80,!0,!0);k.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var k=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);!isNaN(u)&&0<u&&(u=new ChangePageSetup(f,null,null,null,u/100),u.ignoreColor=!0,u.ignoreImage=!0,d.model.execute(u))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(k.container,300,80,!0,!0);k.init()}));var m=null;m=this.addAction("grid",
@@ -3609,7 +3610,7 @@ m.setEnabled(!1);m=this.addAction("animations",function(){Editor.enableAnimation
m=this.addAction("collapseExpand",function(){var k=new ChangePageSetup(f);k.ignoreColor=!0;k.ignoreImage=!0;k.foldingEnabled=!d.foldingEnabled;d.model.execute(k)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=g;m=this.addAction("pageView",mxUtils.bind(this,function(){f.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=
!d.connectionArrowsEnabled;f.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());f.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",
function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());f.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=g;m=this.addAction("autosave",function(){f.editor.setAutosave(!f.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return f.editor.autosave});m.isEnabled=g;m.visible=!1;this.addAction("help",function(){var k="";mxResources.isLanguageSupported(mxClient.language)&&
-(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)}));m=mxUtils.bind(this,function(k,u,x,z){return this.addAction(k,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)}));m=mxUtils.bind(this,function(k,u,w,z){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
u,C);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(C,function(D){D.style.fontWeight=null;"B"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(C,function(D){D.style.fontStyle=null;"I"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(C,function(D){D.style.textDecoration=null;"U"==D.nodeName&&d.replaceElement(D)});for(var E=0;E<C.length;E++)0==d.model.getChildCount(C[E])&&
d.autoSizeCell(C[E],!1)}finally{d.getModel().endUpdate()}}},null,null,z)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){f.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000",
"default",d.shapeForegroundColor)});this.addAction("strokeColor...",function(){f.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("fillColor...",function(){f.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",d.shapeBackgroundColor)});this.addAction("gradientColor...",function(){f.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("backgroundColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
@@ -3618,19 +3619,19 @@ d.autoSizeCell(C[E],!1)}finally{d.getModel().endUpdate()}}},null,null,z)});m("bo
try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),f.fireEvent(new mxEventObject("styleChanged",
"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var k=d.getSelectionCells(),u=d.getCurrentCellStyle(k[0]),
-x="1"==mxUtils.getValue(u,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,x);d.setCellStyles(mxConstants.STYLE_CURVED,null);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
+w="1"==mxUtils.getValue(u,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,w);d.setCellStyles(mxConstants.STYLE_CURVED,null);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[w,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
"1"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var k=d.view.getState(d.getSelectionCell()),u="1";null!=k&&null!=d.getFoldingImage(k)&&(u="0");d.setCellStyles("collapsible",u);f.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[u],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var k=d.getEditableCells(d.getSelectionCells());if(null!=k&&0<k.length){var u=d.getModel();u=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",u.getStyle(k[0])||"",function(x){null!=x&&d.setCellStyle(mxUtils.trim(x),k)},null,null,400,220);this.editorUi.showDialog(u.container,420,300,!0,!0);u.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&f.setDefaultStyle(d.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&f.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var k=d.getSelectionCell();if(null!=k&&d.getModel().isEdge(k)){var u=h.graph.selectionCellsHandler.getHandler(k);if(u instanceof mxEdgeHandler){var x=d.view.translate,z=d.view.scale,C=x.x;x=x.y;k=d.getModel().getParent(k);for(var E=d.getCellGeometry(k);d.getModel().isVertex(k)&&null!=E;)C+=E.x,x+=E.y,k=
-d.getModel().getParent(k),E=d.getCellGeometry(k);C=Math.round(d.snap(d.popupMenuHandler.triggerX/z-C));z=Math.round(d.snap(d.popupMenuHandler.triggerY/z-x));u.addPointAt(u.state,C,z)}}});this.addAction("removeWaypoint",function(){var k=f.actions.get("removeWaypoint");null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction("clearAnchors",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var x=
-k[u];d.getModel().isEdge(x)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[x]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[x]))}}finally{d.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var x=k[u];if(d.getModel().isEdge(x)){var z=d.getCellGeometry(x);
-null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(x,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",
+mxUtils.bind(this,function(){var k=d.getEditableCells(d.getSelectionCells());if(null!=k&&0<k.length){var u=d.getModel();u=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",u.getStyle(k[0])||"",function(w){null!=w&&d.setCellStyle(mxUtils.trim(w),k)},null,null,400,220);this.editorUi.showDialog(u.container,420,300,!0,!0);u.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&f.setDefaultStyle(d.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&f.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var k=d.getSelectionCell();if(null!=k&&d.getModel().isEdge(k)){var u=h.graph.selectionCellsHandler.getHandler(k);if(u instanceof mxEdgeHandler){var w=d.view.translate,z=d.view.scale,C=w.x;w=w.y;k=d.getModel().getParent(k);for(var E=d.getCellGeometry(k);d.getModel().isVertex(k)&&null!=E;)C+=E.x,w+=E.y,k=
+d.getModel().getParent(k),E=d.getCellGeometry(k);C=Math.round(d.snap(d.popupMenuHandler.triggerX/z-C));z=Math.round(d.snap(d.popupMenuHandler.triggerY/z-w));u.addPointAt(u.state,C,z)}}});this.addAction("removeWaypoint",function(){var k=f.actions.get("removeWaypoint");null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction("clearAnchors",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=
+k[u];d.getModel().isEdge(w)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[w]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[w]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[w]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[w]))}}finally{d.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];if(d.getModel().isEdge(w)){var z=d.getCellGeometry(w);
+null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(w,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,
-mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),x="",z=null;null!=u&&(x=u.style[mxConstants.STYLE_IMAGE]||x,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();
-f.showImageDialog(k,x,function(E,D,G,I,L,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var K=d.getSelectionCells();if(null!=E&&(0<E.length||0<K.length)){var U=null;d.getModel().beginUpdate();try{if(0==K.length){K=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=Y.x;K[0].geometry.y=
-Y.y;null!=I&&e(K[0],I,L,T,d);U=K;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,K);var Q=d.getCurrentCellStyle(K[0]);"image"!=Q[mxConstants.STYLE_SHAPE]&&"label"!=Q[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=D&&null!=G)for(E=0;E<K.length;E++){var P=K[E];if("0"!=d.getCurrentCellStyle(P).expand){var M=
-d.getModel().getGeometry(P);null!=M&&(M=M.clone(),M.width=D,M.height=G,d.getModel().setGeometry(P,M))}null!=I&&e(P,I,L,T,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),x=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
-x&&"image"==z&&(u=new CropImageDialog(f,x,u[mxConstants.STYLE_CLIP_PATH],function(C,E,D){e(k,C,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=g;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),
+mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",z=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();
+f.showImageDialog(k,w,function(E,D,G,K,L,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var N=d.getSelectionCells();if(null!=E&&(0<E.length||0<N.length)){var U=null;d.getModel().beginUpdate();try{if(0==N.length){N=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=Y.x;N[0].geometry.y=
+Y.y;null!=K&&e(N[0],K,L,Q,d);U=N;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,N);var P=d.getCurrentCellStyle(N[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==K&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,N);if(null!=D&&null!=G)for(E=0;E<N.length;E++){var T=N[E];if("0"!=d.getCurrentCellStyle(T).expand){var J=
+d.getModel().getGeometry(T);null!=J&&(J=J.clone(),J.width=D,J.height=G,d.getModel().setGeometry(T,J))}null!=K&&e(T,K,L,Q,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
+w&&"image"==z&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(C,E,D){e(k,C,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=g;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),
this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);
m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),
f.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k&&null!=k.geometry){var u=new ConnectionPointsDialog(f,
@@ -3642,9 +3643,9 @@ function(p){p.removeAttribute("face");p.style.fontFamily=null;"PRE"==p.nodeName&
mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,h,!0,mxUtils.bind(this,function(m){0>mxUtils.indexOf(this.customFonts,m)&&(this.customFonts.push(m),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(f,h){function d(g,m){return f.addItem(g,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
m+">"))}),h)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML=
'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(f,h){var d=
-[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,z){return x-z}));for(var g=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<z.length;C++)if("3"==z[C].getAttribute("size")){z[C].removeAttribute("size");z[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
-"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),m=mxUtils.bind(this,function(x){this.styleChange(f,x,[mxConstants.STYLE_FONTSIZE],[x],null,h,function(){g(x)})}),p=0;p<d.length;p++)m(d[p]);f.addSeparator(h);if(0<this.customFontSizes.length){var k=0;for(p=0;p<this.customFontSizes.length;p++)0>mxUtils.indexOf(d,this.customFontSizes[p])&&(m(this.customFontSizes[p]),k++);0<k&&f.addSeparator(h);f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),h);f.addSeparator(h)}var u=
-null;this.promptChange(f,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,h,!0,mxUtils.bind(this,function(x){null!=u&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(u));null!=x&&0<x.length&&(this.customFontSizes.push(x),g(x))}),null,function(){u=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
+[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(w,z){return w-z}));for(var g=mxUtils.bind(this,function(w){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<z.length;C++)if("3"==z[C].getAttribute("size")){z[C].removeAttribute("size");z[C].style.fontSize=w+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
+"values",[w],"cells",[b.cellEditor.getEditingCell()]))}}),m=mxUtils.bind(this,function(w){this.styleChange(f,w,[mxConstants.STYLE_FONTSIZE],[w],null,h,function(){g(w)})}),p=0;p<d.length;p++)m(d[p]);f.addSeparator(h);if(0<this.customFontSizes.length){var k=0;for(p=0;p<this.customFontSizes.length;p++)0>mxUtils.indexOf(d,this.customFontSizes[p])&&(m(this.customFontSizes[p]),k++);0<k&&f.addSeparator(h);f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),h);f.addSeparator(h)}var u=
+null;this.promptChange(f,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,h,!0,mxUtils.bind(this,function(w){null!=u&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(u));null!=w&&0<w.length&&(this.customFontSizes.push(w),g(w))}),null,function(){u=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
!1)},h);f.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},h);this.addMenuItems(f,["-","rotation"],h)})));this.put("align",new Menu(mxUtils.bind(this,function(f,h){var d=1<this.editorUi.getSelectionState().vertices.length;f.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},h,null,d);f.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},h,null,d);f.addItem(mxResources.get("rightAlign"),
null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},h,null,d);f.addSeparator(h);f.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},h,null,d);f.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},h,null,d);f.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},h,null,d);this.addMenuItems(f,["-","snapToGrid"],h)})));this.put("distribute",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("horizontal"),
null,function(){b.distributeCells(!0)},h);f.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},h);f.addSeparator(h);this.addSubmenu("distributeSpacing",f,h,mxResources.get("spacing"))})));this.put("distributeSpacing",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("horizontal"),null,function(){b.distributeCells(!0,null,!0)},h);f.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1,null,!0)},h)})));this.put("line",new Menu(mxUtils.bind(this,
@@ -3667,26 +3668,26 @@ h)})));this.put("file",new Menu(mxUtils.bind(this,function(f,h){this.addMenuItem
["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(f,h){this.addMenuItems(f,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,e,f){var h=this.get(a),d=null;null!=h&&(h=h.isEnabled(),b.showDisabled||h)&&(d=b.addItem(f||mxResources.get(a),null,null,e,null,h),this.addMenu(a,b,d));return d};
Menus.prototype.addMenu=function(a,b,e){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,e)};
Menus.prototype.addInsertTableCellItem=function(a,b){var e=this.editorUi.editor.graph,f=e.getSelectionCell(),h=e.getCurrentCellStyle(f);1<e.getSelectionCount()&&(e.isTableCell(f)&&(f=e.model.getParent(f)),e.isTableRow(f)&&(f=e.model.getParent(f)));var d=e.isTable(f)||e.isTableRow(f)||e.isTableCell(f),g=e.isStack(f)||e.isStackChild(f),m=d,p=d;g&&(h=e.isStack(f)?h:e.getCellStyle(e.model.getParent(f)),p="0"==h.horizontalStack,m=!p);null!=b||!d&&!g?this.addInsertTableItem(a,mxUtils.bind(this,function(k,
-u,x,z,C){u=C||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)?e.createCrossFunctionalSwimlane(u,x,null,null,z||mxEvent.isShiftDown(k)?"Cross-Functional Flowchart":null):e.createTable(u,x,null,null,z||mxEvent.isShiftDown(k)?"Table":null);k=mxEvent.isAltDown(k)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([u],!0));x=null;e.getModel().beginUpdate();try{x=e.importCells([u],k.x,k.y),e.fireEvent(new mxEventObject("cellsInserted","cells",e.model.getDescendants(x[0])))}finally{e.getModel().endUpdate()}null!=
-x&&0<x.length&&(e.scrollCellToVisible(x[0]),e.setSelectionCells(x))}),b):(m&&(b=a.addItem(mxResources.get("insertColumnBefore"),Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableColumn(f,!0)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),Editor.addColumnRightImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableColumn(f,!1)}catch(k){this.editorUi.handleError(k)}})),
+u,w,z,C){u=C||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)?e.createCrossFunctionalSwimlane(u,w,null,null,z||mxEvent.isShiftDown(k)?"Cross-Functional Flowchart":null):e.createTable(u,w,null,null,z||mxEvent.isShiftDown(k)?"Table":null);k=mxEvent.isAltDown(k)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([u],!0));w=null;e.getModel().beginUpdate();try{w=e.importCells([u],k.x,k.y),e.fireEvent(new mxEventObject("cellsInserted","cells",e.model.getDescendants(w[0])))}finally{e.getModel().endUpdate()}null!=
+w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=a.addItem(mxResources.get("insertColumnBefore"),Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableColumn(f,!0)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),Editor.addColumnRightImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableColumn(f,!1)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{g?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{g?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",
mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=x,I=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<I;L++)for(var T=G.insertRow(L),K=0;K<G.rows[0].cells.length;K++)T.insertCell(-1);for(L=0;L<G.rows.length;L++)for(T=G.rows[L],K=T.cells.length;K<D;K++)T.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex+
-1);for(G=0;G<x.rows.length;G++)for(I=x.rows[G],D=0;D<I.cells.length;D++)L=I.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var I=G.cellEditor.textarea.getElementsByTagName("table");
-C=[];for(var L=0;L<I.length;L++)C.push(I[L]);G.container.focus();L=G.pasteHtmlAtCaret;I=["<table>"];for(var T=0;T<E;T++){I.push("<tr>");for(var K=0;K<D;K++)I.push("<td><br></td>");I.push("</tr>")}I.push("</table>");E=I.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",
+Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=w,K=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<K;L++)for(var Q=G.insertRow(L),N=0;N<G.rows[0].cells.length;N++)Q.insertCell(-1);for(L=0;L<G.rows.length;L++)for(Q=G.rows[L],N=Q.cells.length;N<D;N++)Q.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex+
+1);for(G=0;G<w.rows.length;G++)for(K=w.rows[G],D=0;D<K.cells.length;D++)L=K.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var K=G.cellEditor.textarea.getElementsByTagName("table");
+C=[];for(var L=0;L<K.length;L++)C.push(K[L]);G.container.focus();L=G.pasteHtmlAtCaret;K=["<table>"];for(var Q=0;Q<E;Q++){K.push("<tr>");for(var N=0;N<D;N++)K.push("<td><br></td>");K.push("</tr>")}K.push("</table>");E=K.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",
a.labels=!1);a=a.addItem("",null,null,e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var p=document.createElement("input");p.setAttribute("id","geTitleOption");p.setAttribute("type","checkbox");p.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");
e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));var k=document.createElement("input");k.setAttribute("id","geContainerOption");k.setAttribute("type","checkbox");k.style.verticalAlign="middle";var u=document.createElement("label");mxUtils.write(u,mxResources.get("container"));u.setAttribute("for","geContainerOption");u.style.verticalAlign=
-"middle";mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));f&&(a.firstChild.appendChild(p),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(k),a.firstChild.appendChild(u),mxUtils.br(a.firstChild));var x=function(C,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse=
-"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var I=D.insertRow(G),L=0;L<E;L++)I.insertCell(-1);return D}(5,5);a.firstChild.appendChild(x);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex+
-1,m.cellIndex+1,p.checked,k.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",h)};
-Menus.prototype.edgeStyleChange=function(a,b,e,f,h,d,g,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],x=0;x<k.length;x++){var z=k[x];if(p.getModel().isEdge(z)){if(g){var C=p.getCellGeometry(z);null!=C&&(C=C.clone(),C.points=null,p.getModel().setGeometry(z,C))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[z]);u.push(z)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"middle";mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));f&&(a.firstChild.appendChild(p),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(k),a.firstChild.appendChild(u),mxUtils.br(a.firstChild));var w=function(C,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse=
+"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var K=D.insertRow(G),L=0;L<E;L++)K.insertCell(-1);return D}(5,5);a.firstChild.appendChild(w);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(w,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex+
+1,m.cellIndex+1,p.checked,k.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(w,"mouseover",h)};
+Menus.prototype.edgeStyleChange=function(a,b,e,f,h,d,g,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var z=k[w];if(p.getModel().isEdge(z)){if(g){var C=p.getCellGeometry(z);null!=C&&(C=C.clone(),C.points=null,p.getModel().setGeometry(z,C))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[z]);u.push(z)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
"cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,h))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
-Menus.prototype.styleChange=function(a,b,e,f,h,d,g,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var x=this.editorUi.editor.graph;null!=g&&x.cellEditor.isContentEditing()?g():u(m)}),d,h);p&&this.showIconOnly(a);return a};
+Menus.prototype.styleChange=function(a,b,e,f,h,d,g,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var w=this.editorUi.editor.graph;null!=g&&w.cellEditor.isContentEditing()?g():u(m)}),d,h);p&&this.showIconOnly(a);return a};
Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(e){var f=this.editorUi.editor.graph;f.stopEditing(!1);f.getModel().beginUpdate();try{for(var h=f.getEditableCells(f.getSelectionCells()),d=!1,g=0;g<a.length;g++)if(f.setCellStyles(a[g],b[g],h),a[g]==mxConstants.STYLE_ALIGN&&f.updateLabelElements(h,function(m){m.removeAttribute("align");m.style.textAlign=null}),a[g]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[g])d=!0;if(d)for(d=0;d<h.length;d++)0==f.model.getChildCount(h[d])&&
f.autoSizeCell(h[d],!1);null!=e&&e();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",h))}finally{f.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,e,f,h,d,g,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,x=f,z=u.getView().getState(u.getSelectionCell());null!=z&&(x=z.style[h]||x);var C=null!=k?k():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(C){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(h,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
-(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),d,p,g)};
+Menus.prototype.promptChange=function(a,b,e,f,h,d,g,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,z=u.getView().getState(u.getSelectionCell());null!=z&&(w=z.style[h]||w);var C=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(C){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(h,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
+(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(w.container,300,80,!0,!0);w.init()}),d,p,g)};
Menus.prototype.pickColor=function(a,b,e,f,h,d){this.editorUi.tryAndHandle(mxUtils.bind(this,function(){var g=this.editorUi.editor.graph;if(null!=b&&g.cellEditor.isContentEditing()){var m=g.getSelectedEditingElement();null!=m&&null!=g.cellEditor.textarea&&(m=g.getTextColor(m,"forecolor"==b),this.editorUi.pickColor(m,mxUtils.bind(this,function(k){null!=g.cellEditor.textarea&&(Graph.setTextColor(g.cellEditor.textarea,k,"forecolor"==b),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
["forecolor"==b?mxConstants.STYLE_FONTCOLOR:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[k],"cells",[g.cellEditor.getEditingCell()])))}),f,h,d))}else{var p=g.getView().getState(g.getSelectionCell());m=mxConstants.NONE;null!=p&&(m=p.style[a]||m);this.editorUi.pickColor(m,ColorDialog.createApplyFunction(this.editorUi,a),f,h,d)}}))};
Menus.prototype.toggleStyle=function(a,b){var e=this.editorUi.editor.graph;b=e.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",e.getSelectionCells()))};
@@ -3739,8 +3740,8 @@ h.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,functio
b.getParentByName(m,"TABLE",b.cellEditor.text2);d=h.addItem("",Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(p,null!=g?g.cellIndex:0))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertColumnBefore"));d=h.addItem("",Editor.addColumnRightImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(p,null!=g?g.cellIndex+1:-1))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertColumnAfter"));
d=h.addItem("Delete column",Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=g)try{b.deleteColumn(p,g.cellIndex)}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("deleteColumn"));d=h.addItem("",Editor.addRowAboveImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(p,m.sectionRowIndex))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertRowBefore"));d=h.addItem("",Editor.addRowBelowImage,mxUtils.bind(this,
function(){try{b.selectNode(b.insertRow(p,m.sectionRowIndex+1))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertRowAfter"));d=h.addItem("",Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(p,m.sectionRowIndex)}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("deleteRow"));d=h.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var k=p.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(u,x,z,C){return"#"+("0"+Number(x).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){null==u||u==mxConstants.NONE?(p.removeAttribute("border"),p.style.border="",p.style.borderCollapse=""):(p.setAttribute("border","1"),p.style.border="1px solid "+u,p.style.borderCollapse="collapse")})}));d.setAttribute("title",mxResources.get("borderColor"));d=h.addItem("",Editor.fillColorImage,mxUtils.bind(this,
-function(){var k=p.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(u,x,z,C){return"#"+("0"+Number(x).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){p.style.backgroundColor=null==u||u==mxConstants.NONE?"":u})}));d.setAttribute("title",mxResources.get("backgroundColor"));d=h.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var k=p.getAttribute("cellPadding")||
+function(u,w,z,C){return"#"+("0"+Number(w).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){null==u||u==mxConstants.NONE?(p.removeAttribute("border"),p.style.border="",p.style.borderCollapse=""):(p.setAttribute("border","1"),p.style.border="1px solid "+u,p.style.borderCollapse="collapse")})}));d.setAttribute("title",mxResources.get("borderColor"));d=h.addItem("",Editor.fillColorImage,mxUtils.bind(this,
+function(){var k=p.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(u,w,z,C){return"#"+("0"+Number(w).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){p.style.backgroundColor=null==u||u==mxConstants.NONE?"":u})}));d.setAttribute("title",mxResources.get("backgroundColor"));d=h.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var k=p.getAttribute("cellPadding")||
0;k=new FilenameDialog(this.editorUi,k,mxResources.get("apply"),mxUtils.bind(this,function(u){null!=u&&0<u.length?p.setAttribute("cellPadding",u):p.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(k.container,300,80,!0,!0);k.init()}));d.setAttribute("title",mxResources.get("spacing"));d=h.addItem("",Editor.alignLeftImage,mxUtils.bind(this,function(){p.setAttribute("align","left")}));d.setAttribute("title",mxResources.get("left"));d=h.addItem("",Editor.alignCenterImage,
mxUtils.bind(this,function(){p.setAttribute("align","center")}));d.setAttribute("title",mxResources.get("center"));d=h.addItem("",Editor.alignRightImage,mxUtils.bind(this,function(){p.setAttribute("align","right")}));d.setAttribute("title",mxResources.get("right"))}}));this.addDropDownArrow(f,Editor.tableImage,38)};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
Toolbar.prototype.addMenu=function(a,b,e,f,h,d,g){var m=this.editorUi.menus.get(f),p=this.addMenuFunction(a,b,e,function(){m.funct.apply(m,arguments)},h,d);g||"function"!==typeof p.setEnabled||m.addListener("stateChanged",function(){p.setEnabled(m.enabled)});return p};Toolbar.prototype.addMenuFunction=function(a,b,e,f,h,d){return this.addMenuFunctionInContainer(null!=h?h:this.container,a,b,e,f,d)};
@@ -3751,113 +3752,115 @@ Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,
Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var e=document.createElement("div");null!=a&&"data:"==a.substring(0,5)&&(e.className="geAdaptiveAsset",e.style.backgroundImage="url("+a+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="18px",e.style.width="22px",e.style.height="20px");b.appendChild(e);return b};
Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};
Toolbar.prototype.addMenuHandler=function(a,b,e,f){if(null!=e){var h=this.editorUi.editor.graph,d=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(m){if(g&&(null==a.enabled||a.enabled)){h.popupMenuHandler.hideMenu();d=new mxPopupMenu(e);d.smartSeparators=!0;d.div.className+=" geToolbarMenu";d.showDisabled=f;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,
-arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var I=Math.floor(E),
-L=G*(1-D);E=G*(1-D*(I%2?E-I:1-(E-I)));switch(I){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
+arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var K=Math.floor(E),
+L=G*(1-D);E=G*(1-D*(K%2?E-K:1-(E-K)));switch(K){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var h=[0,0,1];e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position=
"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var d=document.createElement("div");d.style.border="1px solid light-dark(black, white)";d.style.pointerEvents="none";d.style.overflow="hidden";d.style.position="absolute";d.style.width="16px";d.style.height="101px";d.style.left="9px";d.style.top="0px";var g=!1,m=!1,p=mxUtils.bind(this,function(E){var D=Math.round(100*(1-h[1]));f.style.left=
-Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),I=0;I<D.length;I++)D[I].style.backgroundColor="rgb("+G[0]*(1-I/D.length)*255+", "+G[1]*(1-I/D.length)*255+", "+G[2]*(1-I/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",
-mxUtils.rgba2hex(D)))}),k=mxUtils.bind(this,function(E){0==h[2]&&(h[2]=1);g=!0;x(E)}),u=mxUtils.bind(this,function(E){m=!0;x(E)}),x=mxUtils.bind(this,function(E){if(g){var D=e.getBoundingClientRect(),G=mxEvent.getClientX(E)-D.left;E=mxEvent.getClientY(E)-D.top;f.style.left=G-8+"px";f.style.top=E-8+"px";G*=6/180;E=1-E/100;D=void 0;0>G&&(G=0);6<G&&(G=6);0>E&&(E=0);1<E&&(E=1);0>D&&(D=0);1<D&&(D=1);G=a(null==G?h[0]:h[0]=G,null==E?h[1]:h[1]=E,null==D?h[2]:h[2]=D);this.fromString("#"+("0"+Math.floor(255*
-G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+("0"+Math.floor(255*G[2]).toString(16)).slice(-2))}else m&&(D=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-D.top,h[2]=Math.max(Math.min(1,1-E/100),0),p())}),z=mxUtils.bind(this,function(){g=m=!1});mxEvent.addGestureListeners(e,k);mxEvent.addGestureListeners(sliderBox,u);mxEvent.addGestureListeners(b,null,x,z);mxEvent.addListener(b,"mouseleave",z);for(k=0;101>k;k+=4)u=document.createElement("div"),u.style.height=
+Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),K=0;K<D.length;K++)D[K].style.backgroundColor="rgb("+G[0]*(1-K/D.length)*255+", "+G[1]*(1-K/D.length)*255+", "+G[2]*(1-K/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",
+mxUtils.rgba2hex(D)))}),k=mxUtils.bind(this,function(E){0==h[2]&&(h[2]=1);g=!0;w(E)}),u=mxUtils.bind(this,function(E){m=!0;w(E)}),w=mxUtils.bind(this,function(E){if(g){var D=e.getBoundingClientRect(),G=mxEvent.getClientX(E)-D.left;E=mxEvent.getClientY(E)-D.top;f.style.left=G-8+"px";f.style.top=E-8+"px";G*=6/180;E=1-E/100;D=void 0;0>G&&(G=0);6<G&&(G=6);0>E&&(E=0);1<E&&(E=1);0>D&&(D=0);1<D&&(D=1);G=a(null==G?h[0]:h[0]=G,null==E?h[1]:h[1]=E,null==D?h[2]:h[2]=D);this.fromString("#"+("0"+Math.floor(255*
+G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+("0"+Math.floor(255*G[2]).toString(16)).slice(-2))}else m&&(D=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-D.top,h[2]=Math.max(Math.min(1,1-E/100),0),p())}),z=mxUtils.bind(this,function(){g=m=!1});mxEvent.addGestureListeners(e,k);mxEvent.addGestureListeners(sliderBox,u);mxEvent.addGestureListeners(b,null,w,z);mxEvent.addListener(b,"mouseleave",z);for(k=0;101>k;k+=4)u=document.createElement("div"),u.style.height=
"4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(E,D){D=null!=D?D:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",D=!0;var G=mxUtils.parseColor(E);
-E=G.r/255;var I=G.g/255,L=G.b/255,T=Math.min(Math.min(E,I),L);G=Math.max(Math.max(E,I),L);var K=G-T;0===K?E=[null,0,G]:(E=E===T?3+(L-I)/K:I===T?5+(E-L)/K:1+(I-E)/K,E=[6===E?0:E,K/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
+E=G.r/255;var K=G.g/255,L=G.b/255,Q=Math.min(Math.min(E,K),L);G=Math.max(Math.max(E,K),L);var N=G-Q;0===N?E=[null,0,G]:(E=E===Q?3+(L-K)/N:K===Q?5+(E-L)/N:1+(K-E)/N,E=[6===E?0:E,N/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
-var ColorDialog=function(a,b,e,f,h,d,g){function m(W){return mxUtils.color2hex("#"+W).substring(1).toUpperCase()}function p(){V.src="none"==M.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(W){""==W.value&&null!=I&&T?W.style.background=W==Y?I.dark:I.light:""==W.value||W.value==mxConstants.NONE||mxUtils.isVarColor(W.value)?W.style.background="transparent":W.style.background="#"+W.value;W.style.color="transparent"==W.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(W.style.background)?
-"#ffffff":"#000000"}function u(){k(K);k(Y)}function x(W){W?g&&null!=I?(K.value=I.light.substring(1).toUpperCase(),W=!1):(K.value="",Y.value="",Q.value="automatic",K.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),Y.setAttribute("title",mxResources.get("useBlackAndWhite")),K.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==K.value&&null!=I&&(K.value=I.light.substring(1).toUpperCase()),K.removeAttribute("placeholder"),K.removeAttribute("title"),""==Y.value&&null!=I&&(Y.value=
-I.dark.substring(1).toUpperCase()),Y.removeAttribute("placeholder"),Y.removeAttribute("title"),W=!1);T=W}function z(W){var ja=W.value,H=ja.toLowerCase();null==h||""!=ja&&"automatic"!=H&&"default"!=H&&H!=mxResources.get("default").toLowerCase()&&H!=mxResources.get("automatic").toLowerCase()||null==I?(W.value==mxConstants.NONE||mxUtils.isVarColor(W.value)||(W.value=m(W.value),na.fromString("#"+W.value)),x(!1),W!=Y||K.value==mxConstants.NONE&&Y.value==mxConstants.NONE||(Q.value="custom"),W==K&&"automatic"==
-Q.value&&(K.value==mxConstants.NONE?Y.value=mxConstants.NONE:mxUtils.isVarColor(K.value)?Y.value=K.value:Y.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+W.value)).substring(1).toUpperCase()),u()):aa.click()}function C(){var W=K.value,ja=Y.value;if(T&&null!=I||(/(^#?[a-zA-Z0-9]*$)/.test(W)||mxUtils.isVarColor(W))&&(/(^#?[a-zA-Z0-9]*$)/.test(ja)||mxUtils.isVarColor(ja))){if(T)W="default";else if(""==W&&(W=mxConstants.NONE),""==ja&&(ja=mxConstants.NONE),W==mxConstants.NONE||mxUtils.isVarColor(W)||
-"#"==W.charAt(0)||(W="#"+m(W)),ja==mxConstants.NONE||mxUtils.isVarColor(ja)||"#"==ja.charAt(0)||(ja="#"+m(ja)),ColorDialog.addRecentColor("none"!=W?W.substring(1):W,12),"automatic"!=Q.value&&ColorDialog.addRecentColor("none"!=ja?ja.substring(1):ja,12),"none"!=W||"none"!=ja)W=W==mxConstants.NONE?"transparent":W,ja=ja==mxConstants.NONE?"transparent":ja,g||"automatic"==Q.value||(W="light-dark("+W+","+ja+")");ia(W);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||
-(qa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?qa.select():document.execCommand("selectAll",!1,null))}function D(){var W=Z(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);W.style.marginBottom="8px";return W}function G(W){13==W.keyCode&&(z(mxEvent.getSource(W)),C())}var I=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,L=a.editor.graph;this.editorUi=a;var T=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||
-mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var K=document.createElement("input");K.style.textOverflow="ellipsis";K.style.margin="0 0 0 4px";K.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var U=document.createElement("div");U.style.display="flex";U.style.alignItems="center";d.appendChild(U);var Y=document.createElement("input");Y.style.textOverflow="ellipsis";Y.style.margin="0 4px";Y.style.maxWidth="60px";Y.style.width=
-"100%";var Q=document.createElement("select");Q.style.textOverflow="ellipsis";Q.style.width="100%";var P=document.createElement("option");P.setAttribute("value","automatic");mxUtils.write(P,mxResources.get("automatic"));Q.appendChild(P);P=document.createElement("option");P.setAttribute("value","custom");mxUtils.write(P,mxResources.get("userDefined"));Q.appendChild(P);Q.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var M=document.createElement("div");M.style.padding="0 6px 0 6px";P=document.createElement("img");
-P.setAttribute("title",mxResources.get("dark"));P.className="geAdaptiveAsset";P.src=Editor.thinDarkImage;P.style.width="20px";M.appendChild(P);mxEvent.addListener(P,"click",function(){Y.focus()});M.appendChild(Y);M.appendChild(Q);M.style.display="flex";M.style.alignItems="center";P=document.createElement("div");P.style.display="flex";P.style.alignItems="center";P.style.userSelect="none";P.style.cursor="pointer";P.style.padding="2px 0 2px 0";var V=document.createElement("img");V.setAttribute("title",
-mxResources.get("dark"));V.className="geAdaptiveAsset";V.style.marginLeft="-2px";P.appendChild(V);mxUtils.write(P,mxResources.get("advanced"));p();mxEvent.addListener(P,"click",function(){M.style.display="none"==M.style.display?"flex":"none";p();p();ColorDialog.collapsed="none"==M.style.display});var aa=mxUtils.button("",function(){x(!0);u();qa.focus();""==qa.value&&null!=I&&T&&na.fromString(qa==Y?I.dark:I.light,!0)});mxEvent.addListener(Q,"change",function(){"automatic"==Q.value?(K.focus(),z(K)):
-(x(!1),mxUtils.isVarColor(Y.value)||(Y.value=T&&null!=I?I.dark.substring(1).toUpperCase():Y.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+K.value)).substring(1).toUpperCase()),Y.focus(),E());u()});mxEvent.addListener(K,"change",function(){z(K)});mxEvent.addListener(Y,"change",function(){z(Y)});var ia=null!=e?e:this.createApplyFunction();this.init=function(){E()};var na=new ColorPicker,qa=Editor.isDarkMode()&&("auto"==L.getAdaptiveColors()||"simple"==L.getAdaptiveColors()&&"custom"==Q.value)&&
-!g?Y:K;mxEvent.addListener(K,"focus",function(){qa=K});mxEvent.addListener(Y,"focus",function(){qa=Y});na.addListener("change",function(W,ja){W=ja.getProperty("color").substring(1).toUpperCase();qa.value.toUpperCase()!=W&&(qa.value=W,z(qa),window.setTimeout(function(){qa.focus()},0))});e=document.createElement("div");e.appendChild(na.div);var O=document.createElement("div");O.style.display="flex";O.style.flexFlow="row wrap";O.style.justifyContent="center";O.style.paddingTop="10px";var Z=mxUtils.bind(this,
-function(W,ja,H,ea){ja=null!=ja?ja:12;var oa=document.createElement("table");oa.style.borderCollapse="collapse";oa.setAttribute("cellspacing","0");oa.style.marginBottom="20px";oa.style.cellSpacing="0px";oa.style.marginLeft="1px";var sa=document.createElement("tbody");oa.appendChild(sa);for(var Pa=W.length/ja,la=0;la<Pa;la++){for(var Ba=document.createElement("tr"),Ca=0;Ca<ja;Ca++)mxUtils.bind(this,function(Fa){var Ia=document.createElement("td");Ia.style.border="0px solid black";Ia.style.padding=
-"0px";Ia.style.width="16px";Ia.style.height="16px";null==Fa&&(Fa=H);if(null!=Fa){Ia.style.borderWidth="1px";Fa==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor="#"+Fa;var Ha=this.colorNames[String(Fa).toUpperCase()];null!=Ha&&Ia.setAttribute("title",Ha)}Ba.appendChild(Ia);null!=Fa&&(Ia.style.cursor="pointer",mxEvent.addListener(Ia,"click",function(){if(Fa==mxConstants.NONE){qa==Y&&Y.value==mxConstants.NONE?K.value=mxConstants.NONE:qa.value=
-mxConstants.NONE;if(qa==K||qa==Y&&K.value==mxConstants.NONE)Q.value="automatic";z(qa);window.setTimeout(function(){qa.focus()},0)}else na.fromString("#"+Fa)}),mxEvent.addListener(Ia,"dblclick",C))})(W[la*ja+Ca]);sa.appendChild(Ba)}ea&&(W=document.createElement("td"),W.setAttribute("title",mxResources.get("reset")),W.className="geAdaptiveAsset",W.style.border="1px solid black",W.style.padding="0px",W.style.width="16px",W.style.height="16px",W.style.backgroundImage="url('"+Editor.crossImage+"')",W.style.backgroundPosition=
-"center center",W.style.backgroundSize="14px 14px",W.style.backgroundRepeat="no-repeat",W.style.cursor="pointer",Ba.appendChild(W),mxEvent.addListener(W,"click",function(){ColorDialog.resetRecentColors();oa.parentNode.replaceChild(D(),oa)}));O.appendChild(oa);return oa});g||(d.appendChild(P),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==L.getAdaptiveColors()||"automatic"!=Q.value||(M.style.display="none",p()),P=document.createElement("img"),P.setAttribute("title",mxResources.get("light")),
-P.className="geAdaptiveAsset",P.src=Editor.thinLightImage,P.style.width="20px",U.appendChild(P),mxEvent.addListener(P,"click",function(){K.focus()}));U.appendChild(K);null!=I&&(aa.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),aa.style.cursor="pointer",aa.style.position="relative",aa.style.marginLeft="4px",aa.innerText="",L=document.createElement("div"),L.style.display="inline-block",L.style.verticalAlign="middle",L.style.borderStyle="solid",L.style.borderWidth="1px",L.style.marginTop=
-"-2px",L.style.width="12px",L.style.height="12px",g?L.style.backgroundColor=I.light:L.style.backgroundImage="linear-gradient(to right bottom, "+I.cssText+" 50%, "+mxUtils.invertLightDarkColor(I).cssText+" 50.3%)",aa.appendChild(L),U.appendChild(aa),mxEvent.addListener(aa,"dblclick",C));var ca=document.createElement("input");ca.setAttribute("type","color");ca.style.position="relative";ca.style.visibility="hidden";ca.style.top="10px";ca.style.width="0px";ca.style.height="0px";ca.style.border="none";
-e.style.whiteSpace="nowrap";U.appendChild(ca);L=mxUtils.button("",function(){document.activeElement==ca?K.focus():(ca.value="#"+K.value,ca.click())});L.style.cursor="pointer";P=document.createElement("img");P.src=Editor.colorDropperImage;P.className="geAdaptiveAsset";P.style.position="relative";P.style.verticalAlign="middle";P.style.marginTop="-2px";P.style.width="auto";P.style.height="14px";L.appendChild(P);U.appendChild(L);e.appendChild(d);mxEvent.addListener(ca,"change",function(){na.fromString(ca.value)});
-g||e.appendChild(M);D();d=Z(this.presetColors);d.style.marginBottom="8px";d=Z(this.defaultColors);d.style.marginBottom="16px";e.appendChild(O);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent="end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});U.className="geBtn";a.editor.cancelFirst&&
-d.appendChild(U);L=mxUtils.button(mxResources.get("apply"),C);L.className="geBtn gePrimaryBtn";d.appendChild(L);a.editor.cancelFirst||d.appendChild(U);null!=b&&("default"==b?aa.click():(U=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==U.light?K.value=mxConstants.NONE:mxUtils.isVarColor(U.light)?K.value=U.light:(mxUtils.isRgbColor(U.light)?U.light=mxUtils.rgba2hex(U.light):mxUtils.isHexColor(U.light)||(U.light="#"+m(U.light)),K.value=U.light.substring(1).toUpperCase()),b==mxConstants.NONE||
-"transparent"==U.dark?Y.value=mxConstants.NONE:mxUtils.isVarColor(U.dark)?Y.value=U.dark:(mxUtils.isRgbColor(U.dark)?U.dark=mxUtils.rgba2hex(U.dark):mxUtils.isHexColor(U.dark)||(U.dark="#"+m(U.dark)),Y.value=U.dark.substring(1).toUpperCase()),na.fromString(qa.value,!0),u()));g||!ColorDialog.collapsed||"automatic"!=Q.value||Editor.isDarkMode()||(M.style.display="none",p());e.appendChild(d);this.picker=na;this.colorInput=K;mxEvent.addListener(K,"keypress",G);mxEvent.addListener(Y,"keypress",G);mxEvent.addListener(e,
-"keydown",function(W){27==W.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(W))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+var ColorDialog=function(a,b,e,f,h,d,g){function m(ca){return mxUtils.color2hex("#"+ca).substring(1).toUpperCase()}function p(){Z.src="none"==V.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ca){V.style.display=ca||"none"==V.style.display?"flex":"none";p()}function u(ca){""==ca.value&&null!=L&&N?ca.style.background=ca==P?L.dark:L.light:""==ca.value||ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)?ca.style.background="transparent":ca.style.background="#"+ca.value;ca.style.color=
+"transparent"==ca.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ca.style.background)?"#ffffff":"#000000"}function w(){u(U);u(P)}function z(ca){ca?g&&null!=L?(U.value=L.light.substring(1).toUpperCase(),ca=!1):(U.value="",P.value="",T.value="automatic",U.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),P.setAttribute("title",mxResources.get("useBlackAndWhite")),U.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==U.value&&null!=L&&(U.value=L.light.substring(1).toUpperCase()),
+U.removeAttribute("placeholder"),U.removeAttribute("title"),""==P.value&&null!=L&&(P.value=L.dark.substring(1).toUpperCase()),P.removeAttribute("placeholder"),P.removeAttribute("title"),ca=!1);N=ca}function C(ca){var H=ca.value,ea=H.toLowerCase();null==h||""!=H&&"automatic"!=ea&&"default"!=ea&&ea!=mxResources.get("default").toLowerCase()&&ea!=mxResources.get("automatic").toLowerCase()||null==L?(ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)||(ca.value=m(ca.value),sa.fromString("#"+ca.value)),
+z(!1),ca!=P||U.value==mxConstants.NONE&&P.value==mxConstants.NONE||(T.value="custom"),ca==U&&"automatic"==T.value&&(U.value==mxConstants.NONE?P.value=mxConstants.NONE:mxUtils.isVarColor(U.value)?P.value=U.value:P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ca.value)).substring(1).toUpperCase()),w()):ia.click()}function E(){var ca=U.value,H=P.value;if(N&&null!=L||(/(^#?[a-zA-Z0-9]*$)/.test(ca)||mxUtils.isVarColor(ca))&&(/(^#?[a-zA-Z0-9]*$)/.test(H)||mxUtils.isVarColor(H))){if(N)ca="default";
+else if(""==ca&&(ca=mxConstants.NONE),""==H&&(H=mxConstants.NONE),ca==mxConstants.NONE||mxUtils.isVarColor(ca)||"#"==ca.charAt(0)||(ca="#"+m(ca)),H==mxConstants.NONE||mxUtils.isVarColor(H)||"#"==H.charAt(0)||(H="#"+m(H)),ca!=mxConstants.NONE&&H!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=T.value&&H!=mxConstants.NONE?ca==mxConstants.NONE?ColorDialog.addRecentColor(H.substring(1),12):ColorDialog.addRecentColor("light-dark("+ca+","+H+")",12):ca!=mxConstants.NONE&&
+ColorDialog.addRecentColor(ca.substring(1),12),"none"!=ca||"none"!=H)ca=ca==mxConstants.NONE?"transparent":ca,H=H==mxConstants.NONE?"transparent":H,g||"automatic"==T.value||(ca="light-dark("+ca+","+H+")");oa(ca);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null))}function G(){var ca=ba(0==ColorDialog.recentColors.length?
+["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function K(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),E())}var L=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,Q=a.editor.graph;this.editorUi=a;var N=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var U=document.createElement("input");U.style.textOverflow="ellipsis";U.style.margin=
+"0 0 0 4px";U.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Y=document.createElement("div");Y.style.display="flex";Y.style.alignItems="center";d.appendChild(Y);var P=document.createElement("input");P.style.textOverflow="ellipsis";P.style.margin="0 4px";P.style.maxWidth="60px";P.style.width="100%";var T=document.createElement("select");T.style.textOverflow="ellipsis";T.style.width="100%";var J=document.createElement("option");J.setAttribute("value","automatic");mxUtils.write(J,
+mxResources.get("automatic"));T.appendChild(J);J=document.createElement("option");J.setAttribute("value","custom");mxUtils.write(J,mxResources.get("userDefined"));T.appendChild(J);T.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var V=document.createElement("div");V.style.padding="0 6px 0 6px";J=document.createElement("img");J.setAttribute("title",mxResources.get("dark"));J.className="geAdaptiveAsset";J.src=Editor.thinDarkImage;J.style.width="20px";V.appendChild(J);mxEvent.addListener(J,"click",
+function(){P.focus()});V.appendChild(P);V.appendChild(T);V.style.display="flex";V.style.alignItems="center";J=document.createElement("div");J.style.display="flex";J.style.alignItems="center";J.style.userSelect="none";J.style.cursor="pointer";J.style.padding="2px 0 2px 0";var Z=document.createElement("img");Z.setAttribute("title",mxResources.get("dark"));Z.className="geAdaptiveAsset";Z.style.marginLeft="-2px";J.appendChild(Z);mxUtils.write(J,mxResources.get("advanced"));p();mxEvent.addListener(J,"click",
+function(){k();p();ColorDialog.collapsed="none"==V.style.display});var ia=mxUtils.button("",function(){z(!0);w();O.focus();""==O.value&&null!=L&&N&&sa.fromString(O==P?L.dark:L.light,!0)});mxEvent.addListener(T,"change",function(){"automatic"==T.value?(U.focus(),C(U)):(z(!1),mxUtils.isVarColor(P.value)||(P.value=N&&null!=L?L.dark.substring(1).toUpperCase():P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+U.value)).substring(1).toUpperCase()),P.focus(),D());w()});mxEvent.addListener(U,"change",
+function(){C(U)});mxEvent.addListener(P,"change",function(){C(P)});var oa=null!=e?e:this.createApplyFunction();this.init=function(){D()};var sa=new ColorPicker,O=Editor.isDarkMode()&&("auto"==Q.getAdaptiveColors()||"simple"==Q.getAdaptiveColors()&&"custom"==T.value)&&!g?P:U;mxEvent.addListener(U,"focus",function(){O=U});mxEvent.addListener(P,"focus",function(){O=P});sa.addListener("change",function(ca,H){ca=H.getProperty("color").substring(1).toUpperCase();O.value.toUpperCase()!=ca&&(O.value=ca,C(O),
+window.setTimeout(function(){O.focus()},0))});e=document.createElement("div");e.appendChild(sa.div);var X=document.createElement("div");X.style.display="flex";X.style.flexFlow="row wrap";X.style.justifyContent="center";X.style.paddingTop="10px";var ba=mxUtils.bind(this,function(ca,H,ea,ra){H=null!=H?H:12;var qa=document.createElement("table");qa.style.borderCollapse="collapse";qa.setAttribute("cellspacing","0");qa.style.marginBottom="20px";qa.style.cellSpacing="0px";qa.style.marginLeft="1px";var Pa=
+document.createElement("tbody");qa.appendChild(Pa);for(var ma=ca.length/H,Ba=0;Ba<ma;Ba++){for(var Ca=document.createElement("tr"),Ja=0;Ja<H;Ja++)mxUtils.bind(this,function(Ia){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==Ia&&(Ia=ea);if(null!=Ia){Da.style.borderWidth="1px";if(Ia==mxConstants.NONE||null==Ia)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(Ia)){var Ga=
+mxUtils.getLightDarkColor(Ia);Da.style.background="linear-gradient(to right bottom, "+Ga.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ga).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+Ia;Ga=this.colorNames[String(Ia).toUpperCase()];null!=Ga&&Da.setAttribute("title",Ga)}Ca.appendChild(Da);null!=Ia&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(Ia==mxConstants.NONE){O==P&&P.value==mxConstants.NONE?U.value=mxConstants.NONE:O.value=mxConstants.NONE;if(O==U||O==P&&U.value==
+mxConstants.NONE)T.value="automatic";C(O);window.setTimeout(function(){O.focus()},0)}else if(mxUtils.isLightDarkColor(Ia)){k(!0);T.value="custom";var ta=mxUtils.getLightDarkColor(Ia);U.value=ta.light.substring(1).toUpperCase();P.value=ta.dark.substring(1).toUpperCase();C(U);C(P);O==U?sa.fromString(ta.light):sa.fromString(ta.dark)}else sa.fromString("#"+Ia)}),mxEvent.addListener(Da,"dblclick",E))})(ca[Ba*H+Ja]);Pa.appendChild(Ca)}ra&&(ca=document.createElement("td"),ca.setAttribute("title",mxResources.get("reset")),
+ca.className="geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ca.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();qa.parentNode.replaceChild(G(),qa)}));X.appendChild(qa);return qa});g||(d.appendChild(J),
+!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==Q.getAdaptiveColors()||"automatic"!=T.value||(V.style.display="none",p()),J=document.createElement("img"),J.setAttribute("title",mxResources.get("light")),J.className="geAdaptiveAsset",J.src=Editor.thinLightImage,J.style.width="20px",Y.appendChild(J),mxEvent.addListener(J,"click",function(){U.focus()}));Y.appendChild(U);null!=L&&(ia.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),ia.style.cursor="pointer",ia.style.position=
+"relative",ia.style.marginLeft="4px",ia.innerText="",Q=document.createElement("div"),Q.style.display="inline-block",Q.style.verticalAlign="middle",Q.style.borderStyle="solid",Q.style.borderWidth="1px",Q.style.marginTop="-2px",Q.style.width="12px",Q.style.height="12px",g?Q.style.backgroundColor=L.light:Q.style.backgroundImage="linear-gradient(to right bottom, "+L.cssText+" 50%, "+mxUtils.invertLightDarkColor(L).cssText+" 50.3%)",ia.appendChild(Q),Y.appendChild(ia),mxEvent.addListener(ia,"dblclick",
+E));var da=document.createElement("input");da.setAttribute("type","color");da.style.position="relative";da.style.visibility="hidden";da.style.top="10px";da.style.width="0px";da.style.height="0px";da.style.border="none";e.style.whiteSpace="nowrap";Y.appendChild(da);Q=mxUtils.button("",function(){document.activeElement==da?U.focus():(da.value="#"+U.value,da.click())});Q.style.cursor="pointer";J=document.createElement("img");J.src=Editor.colorDropperImage;J.className="geAdaptiveAsset";J.style.position=
+"relative";J.style.verticalAlign="middle";J.style.marginTop="-2px";J.style.width="auto";J.style.height="14px";Q.appendChild(J);Y.appendChild(Q);e.appendChild(d);mxEvent.addListener(da,"change",function(){sa.fromString(da.value)});g||e.appendChild(V);G();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(X);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
+"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});Y.className="geBtn";a.editor.cancelFirst&&d.appendChild(Y);Q=mxUtils.button(mxResources.get("apply"),E);Q.className="geBtn gePrimaryBtn";d.appendChild(Q);a.editor.cancelFirst||d.appendChild(Y);null!=b&&("default"==b?ia.click():(Y=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==Y.light?U.value=
+mxConstants.NONE:mxUtils.isVarColor(Y.light)?U.value=Y.light:(mxUtils.isRgbColor(Y.light)?Y.light=mxUtils.rgba2hex(Y.light):mxUtils.isHexColor(Y.light)||(Y.light="#"+m(Y.light)),U.value=Y.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==Y.dark?P.value=mxConstants.NONE:mxUtils.isVarColor(Y.dark)?P.value=Y.dark:(mxUtils.isRgbColor(Y.dark)?Y.dark=mxUtils.rgba2hex(Y.dark):mxUtils.isHexColor(Y.dark)||(Y.dark="#"+m(Y.dark)),P.value=Y.dark.substring(1).toUpperCase()),sa.fromString(O.value,
+!0),w()));g||!ColorDialog.collapsed||"automatic"!=T.value||Editor.isDarkMode()||(V.style.display="none",p());e.appendChild(d);this.picker=sa;this.colorInput=U;mxEvent.addListener(U,"keypress",K);mxEvent.addListener(P,"keypress",K);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
+ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(e){var f=a.editor.graph;f.getModel().beginUpdate();try{f.setCellStyles(b,e),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[e],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href",
-"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C,E){k=null!=k?k:!1;g=document.createElement("div");g.style.position="absolute";g.style.top="20px";g.style.bottom="20px";g.style.left="20px";g.style.right="20px";m=document.createElement("div");
-m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var I=document.createElement("textarea");u?I.setAttribute("wrap","off"):I.style.wordBreak="break-all";
-I.setAttribute("spellcheck","false");I.setAttribute("autocorrect","off");I.setAttribute("autocomplete","off");I.setAttribute("autocapitalize","off");mxUtils.write(I,e||"");I.style.resize="none";I.style.outline="none";I.style.position="absolute";I.style.boxSizing="border-box";I.style.top="0px";I.style.left="0px";I.style.height="100%";I.style.width="100%";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};D.appendChild(I);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=
-C)for(b=0;b<C.length;b++)(function(T,K,U){T=mxUtils.button(T,function(Y){K(Y,I)});null!=U&&T.setAttribute("title",U);T.className="geBtn";G.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,I);if(null!=f){var L=mxUtils.button(x||mxResources.get("apply"),function(){k||a.hideDialog();f(I.value)});L.setAttribute("title",
-"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(I,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",
+"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C,E){k=null!=k?k:!1;g=document.createElement("div");g.style.position="absolute";g.style.top="20px";g.style.bottom="20px";g.style.left="20px";g.style.right="20px";m=document.createElement("div");
+m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var K=document.createElement("textarea");u?K.setAttribute("wrap","off"):K.style.wordBreak="break-all";
+K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");mxUtils.write(K,e||"");K.style.resize="none";K.style.outline="none";K.style.position="absolute";K.style.boxSizing="border-box";K.style.top="0px";K.style.left="0px";K.style.height="100%";K.style.width="100%";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};D.appendChild(K);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=
+C)for(b=0;b<C.length;b++)(function(Q,N,U){Q=mxUtils.button(Q,function(Y){N(Y,K)});null!=U&&Q.setAttribute("title",U);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,K);if(null!=f){var L=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(K.value)});L.setAttribute("title",
+"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(K,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",
"off");e.style.overflow="auto";e.style.resize="none";e.style.width="600px";e.style.height="360px";e.style.marginBottom="16px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),e.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;
p.onload=function(k){e.value=k.target.result};p.readAsText(m)}else e.value=a.extractGraphModelFromEvent(m)},!1));var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&b.appendChild(h);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var g=document.createElement("option");g.setAttribute("value","apply");mxUtils.write(g,mxResources.get("apply",
null,"Update Existing Drawing"));d.appendChild(g)}a.editor.graph.isEnabled()&&(g=document.createElement("option"),g.setAttribute("value","insert"),mxUtils.write(g,mxResources.get("insert")),d.appendChild(g));g=document.createElement("option");g.setAttribute("value","new");mxUtils.write(g,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(g);b.appendChild(d);g=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(e.value)),p=null;
-if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement;a.updateDiagramData(f,k);a.hideDialog()}catch(C){p=C}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(m),x=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,x);var z=x.getChildren(x.getChildAt(x.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(z));a.hideDialog()}catch(C){p=C}finally{a.editor.graph.model.endUpdate()}}null!=
+if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement;a.updateDiagramData(f,k);a.hideDialog()}catch(C){p=C}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(m),w=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,w);var z=w.getChildren(w.getChildAt(w.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(z));a.hideDialog()}catch(C){p=C}finally{a.editor.graph.model.endUpdate()}}null!=
p&&a.handleError(p)});g.className="geBtn gePrimaryBtn";b.appendChild(g);a.editor.cancelFirst||b.appendChild(h);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var Q=u.value,P=Q.lastIndexOf(".");u.value=0<P?Q.substring(0,P+1)+x.value:Q+"."+x.value;"xml"===x.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),E.setAttribute("disabled","true"),K.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),E.removeAttribute("disabled"),K.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?L.removeAttribute("disabled"):L.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(D.removeAttribute("disabled"),G.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function e(){C.style.backgroundColor=C.value*E.value>MAX_AREA||0>=C.value?"red":"";E.style.backgroundColor=C.value*E.value>MAX_AREA||0>=E.value?"red":""}var f=a.editor.graph,h=f.getGraphBounds(),d=f.view.scale,g=Math.ceil(h.width/
+var ExportDialog=function(a){function b(){var P=u.value,T=P.lastIndexOf(".");u.value=0<T?P.substring(0,T+1)+w.value:P+"."+w.value;"xml"===w.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),E.setAttribute("disabled","true"),N.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),E.removeAttribute("disabled"),N.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?L.removeAttribute("disabled"):L.setAttribute("disabled",
+"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===w.value?(D.removeAttribute("disabled"),G.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function e(){C.style.backgroundColor=C.value*E.value>MAX_AREA||0>=C.value?"red":"";E.style.backgroundColor=C.value*E.value>MAX_AREA||0>=E.value?"red":""}var f=a.editor.graph,h=f.getGraphBounds(),d=f.view.scale,g=Math.ceil(h.width/
d),m=Math.ceil(h.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");h=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");h.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);h.appendChild(k);
-p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");h.appendChild(k);var x=document.createElement("select");x.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));x.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),x.appendChild(k));
-k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));x.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));x.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),x.appendChild(k));k=document.createElement("td");k.appendChild(x);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");
+p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");h.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
+k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));w.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));w.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),w.appendChild(k));k=document.createElement("td");k.appendChild(w);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");
k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");h.appendChild(k);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";k=document.createElement("td");k.appendChild(z);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");h.appendChild(k);var C=document.createElement("input");
C.setAttribute("value",g);C.style.width="180px";k=document.createElement("td");k.appendChild(C);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");h.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");
k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");h.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var I=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=
-"",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var Q=parseInt(G.value);isNaN(Q)||0>=Q?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=Q))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");
-L.setAttribute("type","checkbox");L.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(L);mxUtils.write(k,mxResources.get("transparent"));h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");h.appendChild(k);var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=!1;k=document.createElement("td");k.appendChild(T);
-h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");h.appendChild(k);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";k=document.createElement("td");k.appendChild(K);h.appendChild(k);p.appendChild(h);d.appendChild(p);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(z,"change",
-function(){I=!0;var Q=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*Q).toFixed(2));0<g?(C.value=Math.floor(g*Q),E.value=Math.floor(m*Q)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var Q=parseInt(C.value)/g;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),E.value=Math.floor(m*Q)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var Q=parseInt(E.value)/m;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),C.value=Math.floor(g*
-Q)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var Q=u.value,P=x.value,M=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(K.value)),aa=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==P||"png"==P||
-"pdf"==P)&&L.checked)aa=null;else if(null==aa||aa==mxConstants.NONE)aa="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,Q,P,aa,M,V,ia,T.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
+k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var K=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=
+"",G.focus()):(G.value=this.value,K||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var P=parseInt(G.value);isNaN(P)||0>=P?G.style.backgroundColor="red":(G.style.backgroundColor="",K||(z.value=P))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");
+L.setAttribute("type","checkbox");L.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(L);mxUtils.write(k,mxResources.get("transparent"));h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");h.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=!1;k=document.createElement("td");k.appendChild(Q);
+h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");h.appendChild(k);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("value",ExportDialog.lastBorderValue);N.style.width="180px";k=document.createElement("td");k.appendChild(N);h.appendChild(k);p.appendChild(h);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",
+function(){K=!0;var P=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*P).toFixed(2));0<g?(C.value=Math.floor(g*P),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value)/g;0<P?(z.value=parseFloat((100*P).toFixed(2)),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value)/m;0<P?(z.value=parseFloat((100*P).toFixed(2)),C.value=Math.floor(g*
+P)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=u.value,T=w.value,J=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(N.value)),Z=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==T||"png"==T||
+"pdf"==T)&&L.checked)Z=null;else if(null==Z||Z==mxConstants.NONE)Z="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,P,T,Z,J,V,ia,Q.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,h,d,g,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,h,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/h-p.x)/m.view.scale),Math.floor((d/h-p.y)/m.view.scale));k.scale(h/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*h/m.view.scale+2*d);h=Math.ceil(p.height*h/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*h<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+h+"&"+u+"&dpi="+g)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function e(){0<K.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),h=a.editor.graph,d=h.getModel().getValue(b);if(!mxUtils.isNode(d)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",d||"");d=g}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(Q){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,x=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(Q,P){var M=document.createElement("div");M.style.position="relative";M.style.paddingRight="20px";M.style.boxSizing="border-box";M.style.width="100%";var V=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",
-mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(aa);P=function(ia){return function(){for(var na=0,qa=0;qa<x.length;qa++){if(x[qa]==ia){z[qa]=null;k.table.deleteRow(na+(null!=E?1:0));break}null!=z[qa]&&na++}}}(P);mxEvent.addListener(V,"click",P);P=Q.parentNode;M.appendChild(Q);M.appendChild(V);P.appendChild(M)};g=function(Q,P,M){x[Q]=P;z[Q]=k.addTextarea(x[C]+
-":",M,2);z[Q].style.width="100%";0<M.indexOf("\n")&&z[Q].setAttribute("rows","2");D(z[Q],P);null!=m[P]&&0==m[P].editable&&z[Q].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),I=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==I.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(Q,P){return"label"==Q.name?1:"label"==P.name?-1:Q.name<P.name?-1:Q.name>
-P.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var T=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(Q){Q=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(P){if(null!=P&&0<P.length&&P!=E)if(h.model.isRoot(b)){var M=a.getPageById(E);if(null!=M)if(null==a.getPageById(P)){var V=a.getPageIndex(M);0<=V&&(a.removePage(M),M.node.setAttribute("id",
-P),E=P,T.innerHTML=mxUtils.htmlEntities(P),a.insertPage(M,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(P)?(h.getModel().cellRemoved(b),b.setId(P),E=P,T.innerHTML=mxUtils.htmlEntities(P),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])})}),mxResources.get("id"));a.showDialog(Q.container,300,80,!0,!0);Q.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");
-p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);g=document.createElement("div");g.style.display="flex";g.style.alignItems="center";g.style.boxSizing="border-box";g.style.paddingRight="160px";g.style.whiteSpace="nowrap";g.style.marginTop="6px";g.style.width="100%";var K=document.createElement("input");K.setAttribute("placeholder",mxResources.get("enterPropertyName"));K.setAttribute("type",
-"text");K.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");K.style.boxSizing="border-box";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.marginLeft="2px";K.style.padding="4px";K.style.width="100%";g.appendChild(K);p.appendChild(g);f.appendChild(p);var U=mxUtils.button(mxResources.get("addProperty"),function(){var Q=K.value;if(0<Q.length&&"label"!=Q&&"id"!=Q&&"placeholders"!=Q&&0>Q.indexOf(":"))try{var P=mxUtils.indexOf(x,Q);if(0<=P&&null!=z[P])z[P].focus();else{d.cloneNode(!1).setAttribute(Q,
-"");0<=P&&(x.splice(P,1),z.splice(P,1));x.push(Q);var M=k.addTextarea(Q+":","",2);M.style.width="100%";z.push(M);D(M,Q);M.focus()}U.setAttribute("disabled","disabled");K.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(K,"keypress",function(Q){13==Q.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():K.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";
-U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";g.appendChild(U);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";g=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(Q){var P=h.getDataForCells([b],!0);Q=new EmbedDialog(a,JSON.stringify(P,null,2),null,null,function(){console.log(P);a.alert("Written to Console (Dev Tools)")},
-mxResources.get("export"),null,"Console","data.json");a.showDialog(Q.container,450,240,!0,!0);Q.init()}));g.setAttribute("title",mxResources.get("export"));g.className="geBtn";var Y=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var Q=!1,P=0;P<x.length;P++)null==z[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],z[P].value),Q=Q||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));Q&&d.removeAttribute("label");h.getModel().setValue(b,
-d)}catch(M){mxUtils.alert(M)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&Y.click()});mxEvent.addListener(K,"keyup",e);mxEvent.addListener(K,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
-G.style.marginRight="10px",I=document.createElement("input"),I.setAttribute("type","checkbox"),I.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(I.setAttribute("checked","checked"),I.defaultChecked=!0),mxEvent.addListener(I,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(I),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),
+var EditDataDialog=function(a,b){function e(){0<N.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),h=a.editor.graph,d=h.getModel().getValue(b);if(!mxUtils.isNode(d)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",d||"");d=g}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(P){}var k=new mxForm("properties");k.table.style.width=
+"100%";var u=d.attributes,w=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(P,T){var J=document.createElement("div");J.style.position="relative";J.style.paddingRight="20px";J.style.boxSizing="border-box";J.style.width="100%";var V=document.createElement("a"),Z=mxUtils.createImage(Dialog.prototype.closeImage);Z.style.height="9px";Z.style.fontSize="9px";Z.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",
+mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(Z);T=function(ia){return function(){for(var oa=0,sa=0;sa<w.length;sa++){if(w[sa]==ia){z[sa]=null;k.table.deleteRow(oa+(null!=E?1:0));break}null!=z[sa]&&oa++}}}(T);mxEvent.addListener(V,"click",T);T=P.parentNode;J.appendChild(P);J.appendChild(V);T.appendChild(J)};g=function(P,T,J){w[P]=T;z[P]=k.addTextarea(w[C]+
+":",J,2);z[P].style.width="100%";0<J.indexOf("\n")&&z[P].setAttribute("rows","2");D(z[P],T);null!=m[T]&&0==m[T].editable&&z[P].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),K=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==K.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(P,T){return"label"==P.name?1:"label"==T.name?-1:P.name<T.name?-1:P.name>
+T.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(P){P=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(T){if(null!=T&&0<T.length&&T!=E)if(h.model.isRoot(b)){var J=a.getPageById(E);if(null!=J)if(null==a.getPageById(T)){var V=a.getPageIndex(J);0<=V&&(a.removePage(J),J.node.setAttribute("id",
+T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),a.insertPage(J,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(T)?(h.getModel().cellRemoved(b),b.setId(T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[T])})}),mxResources.get("id"));a.showDialog(P.container,300,80,!0,!0);P.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");
+p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);g=document.createElement("div");g.style.display="flex";g.style.alignItems="center";g.style.boxSizing="border-box";g.style.paddingRight="160px";g.style.whiteSpace="nowrap";g.style.marginTop="6px";g.style.width="100%";var N=document.createElement("input");N.setAttribute("placeholder",mxResources.get("enterPropertyName"));N.setAttribute("type",
+"text");N.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");N.style.boxSizing="border-box";N.style.borderWidth="1px";N.style.borderStyle="solid";N.style.marginLeft="2px";N.style.padding="4px";N.style.width="100%";g.appendChild(N);p.appendChild(g);f.appendChild(p);var U=mxUtils.button(mxResources.get("addProperty"),function(){var P=N.value;if(0<P.length&&"label"!=P&&"id"!=P&&"placeholders"!=P&&0>P.indexOf(":"))try{var T=mxUtils.indexOf(w,P);if(0<=T&&null!=z[T])z[T].focus();else{d.cloneNode(!1).setAttribute(P,
+"");0<=T&&(w.splice(T,1),z.splice(T,1));w.push(P);var J=k.addTextarea(P+":","",2);J.style.width="100%";z.push(J);D(J,P);J.focus()}U.setAttribute("disabled","disabled");N.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(N,"keypress",function(P){13==P.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():N.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";
+U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";g.appendChild(U);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";g=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(P){var T=h.getDataForCells([b],!0);P=new EmbedDialog(a,JSON.stringify(T,null,2),null,null,function(){console.log(T);a.alert("Written to Console (Dev Tools)")},
+mxResources.get("export"),null,"Console","data.json");a.showDialog(P.container,450,240,!0,!0);P.init()}));g.setAttribute("title",mxResources.get("export"));g.className="geBtn";var Y=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var P=!1,T=0;T<w.length;T++)null==z[T]?d.removeAttribute(w[T]):(d.setAttribute(w[T],z[T].value),P=P||"placeholder"==w[T]&&"1"==d.getAttribute("placeholders"));P&&d.removeAttribute("label");h.getModel().setValue(b,
+d)}catch(J){mxUtils.alert(J)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(P){13==P.keyCode&&mxEvent.isControlDown(P)&&Y.click()});mxEvent.addListener(N,"keyup",e);mxEvent.addListener(N,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
+G.style.marginRight="10px",K=document.createElement("input"),K.setAttribute("type","checkbox"),K.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(K.setAttribute("checked","checked"),K.defaultChecked=!0),mxEvent.addListener(K,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(K),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),
u.appendChild(G);a.editor.cancelFirst&&u.appendChild(p);u.appendChild(g);u.appendChild(Y);a.editor.cancelFirst||u.appendChild(p);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,b,e,f){var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",b);g.setAttribute("placeholder","http://www.example.com/");g.setAttribute("type","text");
g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
mxEvent.addListener(b,"click",function(){g.value="";g.focus()});d.appendChild(g);d.appendChild(b);h.appendChild(d);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(g,"keypress",function(m){13==m.keyCode&&(a.hideDialog(),f(g.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);e=mxUtils.button(e,function(){a.hideDialog();f(g.value)});e.className="geBtn gePrimaryBtn";d.appendChild(e);a.editor.cancelFirst||d.appendChild(b);h.appendChild(d);this.container=h},OutlineWindow=function(a,b,e,f,h){var d=a.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),g,b,e,f,h,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var m=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){m.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();m.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){m.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,
-function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(g);mxEvent.addMouseWheelListener(function(p,k){for(var u=!1,x=mxEvent.getSource(p);null!=x;){if(x==m.svg){u=!0;break}x=x.parentNode}u&&(u=d.zoomFactor,null!=p.deltaY&&Math.round(p.deltaY)!=p.deltaY&&(u=1+Math.abs(p.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(p))})},LayersWindow=function(a,b,e,f,h){function d(){var P=K.get(p.getLayerForCells(p.getSelectionCells()));
-null!=P?P.appendChild(Q):null!=Q.parentNode&&Q.parentNode.removeChild(Q)}function g(){function P(aa,ia,na,qa){var O=document.createElement("div");O.className="geToolbarContainer";K.put(na,O);O.style.overflow="hidden";O.style.position="relative";O.style.padding="4px";O.style.height="22px";O.style.display="flex";O.style.alignItems="center";O.style.borderWidth="0px 0px 1px 0px";O.style.borderStyle="solid";O.style.whiteSpace="nowrap";O.setAttribute("title",ia+" ("+na.getId()+")");var Z=document.createElement("div");
-Z.style.display="inline-flex";Z.style.alignItems="center";Z.style.width="100%";Z.style.textOverflow="ellipsis";Z.style.overflow="hidden";var ca=document.createElement("span");mxEvent.addListener(O,"dragover",function(H){H.dataTransfer.dropEffect="move";z=aa;H.stopPropagation();H.preventDefault()});mxEvent.addListener(O,"dragstart",function(H){"true"!=ca.contentEditable&&(x=O,mxClient.IS_FF&&H.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(O,"dragend",function(H){null!=x&&null!=z&&
-p.addCell(na,p.model.root,z);z=x=null;H.stopPropagation();H.preventDefault()});var W=document.createElement("img");W.setAttribute("draggable","false");W.setAttribute("align","top");W.setAttribute("border","0");W.className="geAdaptiveAsset";W.style.width="16px";W.style.padding="0px 6px 0 4px";W.style.cursor="pointer";W.setAttribute("title",mxResources.get(p.model.isVisible(na)?"hide":"show"));p.model.isVisible(na)?(W.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(O,90)):(W.setAttribute("src",
-Editor.hiddenImage),mxUtils.setOpacity(O,40));p.isEnabled()||mxUtils.setOpacity(W,50);Z.appendChild(W);mxEvent.addListener(W,"click",function(H){p.isEnabled()&&p.model.setVisible(na,!p.model.isVisible(na));mxEvent.consume(H)});W=document.createElement("img");W.setAttribute("draggable","false");W.setAttribute("align","top");W.setAttribute("border","0");W.className="geAdaptiveAsset";W.style.width="16px";W.style.padding="0px 6px 0 0";W.setAttribute("title",mxResources.get("lockUnlock"));var ja=p.getCurrentCellStyle(na);
-"1"==mxUtils.getValue(ja,"locked","0")?(W.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(W,90),O.style.color="red"):(W.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(W,40));p.isEnabled()&&(W.style.cursor="pointer");mxEvent.addListener(W,"click",function(H){if(p.isEnabled()){var ea=null;p.getModel().beginUpdate();try{ea="1"==mxUtils.getValue(ja,"locked","0")?null:"1",p.setCellStyles("locked",ea,[na])}finally{p.getModel().endUpdate()}"1"==ea&&p.removeSelectionCells(p.getModel().getDescendants(na));
-mxEvent.consume(H)}});Z.appendChild(W);mxUtils.write(ca,ia);ca.style.display="block";ca.style.whiteSpace="nowrap";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.position="absolute";ca.style.padding="2px";ca.style.left="52px";ca.style.right="8px";Z.appendChild(ca);O.appendChild(Z);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ia=document.createElement("div"),ia.style.display="block",ia.style.textAlign="right",ia.style.whiteSpace=
-"nowrap",ia.style.position="absolute",ia.style.right="16px",ia.style.top="6px",0<aa&&(Z=document.createElement("a"),Z.setAttribute("title",mxResources.get("toBack")),Z.className="geButton",Z.style.cssFloat="none",Z.innerHTML="&#9660;",Z.style.width="14px",Z.style.height="14px",Z.style.fontSize="14px",Z.style.margin="0px",Z.style.marginTop="-1px",ia.appendChild(Z),mxEvent.addListener(Z,"click",function(H){p.isEnabled()&&p.addCell(na,p.model.root,aa-1);mxEvent.consume(H)})),0<=aa&&aa<C-1&&(Z=document.createElement("a"),
-Z.setAttribute("title",mxResources.get("toFront")),Z.className="geButton",Z.style.cssFloat="none",Z.innerHTML="&#9650;",Z.style.width="14px",Z.style.height="14px",Z.style.fontSize="14px",Z.style.margin="0px",Z.style.marginTop="-1px",ia.appendChild(Z),mxEvent.addListener(Z,"click",function(H){p.isEnabled()&&p.addCell(na,p.model.root,aa+1);mxEvent.consume(H)})),O.appendChild(ia);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(O.setAttribute("draggable","true"),O.style.cursor="move")}mxEvent.addListener(O,
-"dblclick",function(H){var ea=mxEvent.getSource(H).nodeName;"INPUT"!=ea&&"IMG"!=ea&&"true"!=ca.contentEditable&&(m(na),mxEvent.consume(H))});p.getDefaultParent()==na&&(O.classList.add("geActivePage"),O.style.fontWeight=p.isEnabled()?"bold":"",E=na);mxEvent.addListener(O,"click",function(H){p.isEnabled()&&"true"!=ca.contentEditable&&(p.setDefaultParent(qa),p.view.setCurrentRoot(null),mxEvent.isShiftDown(H)&&p.setSelectionCells(na.children),mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(I.classList.remove("mxDisabled"),
-T.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(I.classList.add("mxDisabled"),T.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";K.clear();for(var M=C-1;0<=M;M--)mxUtils.bind(this,function(aa){P(M,p.convertValueToString(aa)||mxResources.get("background"),aa,aa)})(p.model.getChildAt(p.model.root,M));var V=p.convertValueToString(E)||mxResources.get("background");
-I.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(P){if(p.isEnabled()&&null!=P){var M=K.get(P);if(null!=M){var V=M.getElementsByTagName("span");if(null!=V&&0<V.length){var aa=V[0],ia=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",!1,null);M.removeAttribute("draggable");M.style.cursor=
-"";var na=function(qa){if("true"==aa.contentEditable){aa.contentEditable="false";var O=mxUtils.getTextContent(aa);qa&&O!=ia?(O=mxUtils.getTextContent(aa),0<O.length?p.cellLabelChanged(P,O):p.cellLabelChanged(P,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(aa,"keydown",function(qa){if(13==qa.keyCode||27==qa.keyCode)na(13==qa.keyCode),mxEvent.consume(qa)});mxEvent.addListener(aa,"blur",function(qa){na(!0);mxEvent.consume(qa)})}}}}var p=a.editor.graph,k=document.createElement("div");k.style.userSelect=
-"none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom=parseInt("26px")+7+"px";k.appendChild(u);var x=null,z=null;mxEvent.addListener(k,"dragover",function(P){P.dataTransfer.dropEffect="move";z=0;P.stopPropagation();P.preventDefault()});mxEvent.addListener(k,"drop",function(P){P.stopPropagation();P.preventDefault()});
-var C=null,E=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height="26px";D.style.overflow="hidden";D.style.padding="3px 4px 4px 4px";D.style.borderWidth="1px 0px 0px 0px";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var G=document.createElement("a");G.className="geToolbarButton geAdaptiveAsset geToggleItem";G.style.width="16px";G.style.height="18px";
-G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var I=G.cloneNode(!1);I.style.backgroundImage="url("+Editor.trashImage+")";I.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(I,"click",function(P){if(p.isEnabled()){p.model.beginUpdate();try{var M=p.model.root.getIndex(E);p.removeCells([E],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,
-new mxCell),p.setDefaultParent(null)):0<M&&M<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,M-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(P)});p.isEnabled()||I.classList.add("mxDisabled");D.appendChild(I);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,"click",function(P){if(p.isEnabled()&&!p.isSelectionEmpty()){var M=
-mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,aa){for(var ia=p.getLayerForCells(p.getSelectionCells()),na=C-1;0<=na;na--)mxUtils.bind(this,function(qa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(qa),"locked","0"),Z=V.addItem(p.convertValueToString(qa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,qa)}),aa,null,null,!O);O?V.addCheckmark(Z,Editor.lockedImage):qa==ia&&V.addCheckmark(Z,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,
-na))}),M.x,M.y+L.offsetHeight,P)}});D.appendChild(L);var T=G.cloneNode(!1);T.style.backgroundImage="url("+Editor.editImage+")";T.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(T,"click",function(P){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(P)});p.isEnabled()||T.classList.add("mxDisabled");D.appendChild(T);var K=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,
-"click",function(P){if(p.isEnabled()){P=null;p.model.beginUpdate();try{P=p.cloneCell(E),p.cellLabelChanged(P,mxResources.get("untitledLayer")),P.setVisible(!0),P=p.addCell(P,p.model.root),p.setDefaultParent(P)}finally{p.model.endUpdate()}null==P||p.isCellLocked(P)||p.selectAll(P)}});p.isEnabled()||U.classList.add("mxDisabled");D.appendChild(U);var Y=G.cloneNode(!1);Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(Y,"click",
-function(P){if(p.isEnabled()){p.model.beginUpdate();try{var M=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(M)}finally{p.model.endUpdate()}m(M)}mxEvent.consume(P)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var Q=document.createElement("span");Q.setAttribute("title",mxResources.get("selectionOnly"));Q.innerHTML="&#8226;";Q.style.position="absolute";Q.style.fontWeight="bold";Q.style.fontSize="16pt";Q.style.right="6px";g();
-p.model.addListener(mxEvent.CHANGE,g);p.addListener("defaultParentChanged",g);a.addListener("lockedChanged",g);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?L.classList.add("mxDisabled"):L.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,h,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
-this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=g;a.installResizeHandler(this,!0)};
+function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(g);mxEvent.addMouseWheelListener(function(p,k){for(var u=!1,w=mxEvent.getSource(p);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=p.deltaY&&Math.round(p.deltaY)!=p.deltaY&&(u=1+Math.abs(p.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(p))})},LayersWindow=function(a,b,e,f,h){function d(){var T=N.get(p.getLayerForCells(p.getSelectionCells()));
+null!=T?T.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function g(){function T(Z,ia,oa,sa){var O=document.createElement("div");O.className="geToolbarContainer";N.put(oa,O);O.style.overflow="hidden";O.style.position="relative";O.style.padding="4px";O.style.height="22px";O.style.display="flex";O.style.alignItems="center";O.style.borderWidth="0px 0px 1px 0px";O.style.borderStyle="solid";O.style.whiteSpace="nowrap";O.setAttribute("title",ia+" ("+oa.getId()+")");var X=document.createElement("div");
+X.style.display="inline-flex";X.style.alignItems="center";X.style.width="100%";X.style.textOverflow="ellipsis";X.style.overflow="hidden";var ba=document.createElement("span");mxEvent.addListener(O,"dragover",function(H){H.dataTransfer.dropEffect="move";z=Z;H.stopPropagation();H.preventDefault()});mxEvent.addListener(O,"dragstart",function(H){"true"!=ba.contentEditable&&(w=O,mxClient.IS_FF&&H.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(O,"dragend",function(H){null!=w&&null!=z&&p.addCell(oa,
+p.model.root,z);z=w=null;H.stopPropagation();H.preventDefault()});var da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 4px";da.style.cursor="pointer";da.setAttribute("title",mxResources.get(p.model.isVisible(oa)?"hide":"show"));p.model.isVisible(oa)?(da.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(O,90)):(da.setAttribute("src",
+Editor.hiddenImage),mxUtils.setOpacity(O,40));p.isEnabled()||mxUtils.setOpacity(da,50);X.appendChild(da);mxEvent.addListener(da,"click",function(H){p.isEnabled()&&p.model.setVisible(oa,!p.model.isVisible(oa));mxEvent.consume(H)});da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 0";da.setAttribute("title",mxResources.get("lockUnlock"));var ca=
+p.getCurrentCellStyle(oa);"1"==mxUtils.getValue(ca,"locked","0")?(da.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(da,90),O.style.color="red"):(da.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(da,40));p.isEnabled()&&(da.style.cursor="pointer");mxEvent.addListener(da,"click",function(H){if(p.isEnabled()){var ea=null;p.getModel().beginUpdate();try{ea="1"==mxUtils.getValue(ca,"locked","0")?null:"1",p.setCellStyles("locked",ea,[oa])}finally{p.getModel().endUpdate()}"1"==ea&&
+p.removeSelectionCells(p.getModel().getDescendants(oa));mxEvent.consume(H)}});X.appendChild(da);mxUtils.write(ba,ia);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.padding="2px";ba.style.left="52px";ba.style.right="8px";X.appendChild(ba);O.appendChild(X);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ia=document.createElement("div"),ia.style.display=
+"block",ia.style.textAlign="right",ia.style.whiteSpace="nowrap",ia.style.position="absolute",ia.style.right="16px",ia.style.top="6px",0<Z&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9660;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,
+Z-1);mxEvent.consume(H)})),0<=Z&&Z<C-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9650;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,Z+1);mxEvent.consume(H)})),O.appendChild(ia);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
+(O.setAttribute("draggable","true"),O.style.cursor="move")}mxEvent.addListener(O,"dblclick",function(H){var ea=mxEvent.getSource(H).nodeName;"INPUT"!=ea&&"IMG"!=ea&&"true"!=ba.contentEditable&&(m(oa),mxEvent.consume(H))});p.getDefaultParent()==oa&&(O.classList.add("geActivePage"),O.style.fontWeight=p.isEnabled()?"bold":"",E=oa);mxEvent.addListener(O,"click",function(H){p.isEnabled()&&"true"!=ba.contentEditable&&(p.setDefaultParent(sa),p.view.setCurrentRoot(null),mxEvent.isShiftDown(H)&&p.setSelectionCells(oa.children),
+mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(K.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(K.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";N.clear();for(var J=C-1;0<=J;J--)mxUtils.bind(this,function(Z){T(J,p.convertValueToString(Z)||mxResources.get("background"),Z,Z)})(p.model.getChildAt(p.model.root,
+J));var V=p.convertValueToString(E)||mxResources.get("background");K.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(T){if(p.isEnabled()&&null!=T){var J=N.get(T);if(null!=J){var V=J.getElementsByTagName("span");if(null!=V&&0<V.length){var Z=V[0],ia=mxUtils.getTextContent(Z);Z.style.textOverflow="";Z.style.cursor="text";Z.contentEditable="true";Z.focus();document.execCommand("selectAll",
+!1,null);J.removeAttribute("draggable");J.style.cursor="";var oa=function(sa){if("true"==Z.contentEditable){Z.contentEditable="false";var O=mxUtils.getTextContent(Z);sa&&O!=ia?(O=mxUtils.getTextContent(Z),0<O.length?p.cellLabelChanged(T,O):p.cellLabelChanged(T,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(Z,"keydown",function(sa){if(13==sa.keyCode||27==sa.keyCode)oa(13==sa.keyCode),mxEvent.consume(sa)});mxEvent.addListener(Z,"blur",function(sa){oa(!0);mxEvent.consume(sa)})}}}}var p=
+a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom=parseInt("26px")+7+"px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(T){T.dataTransfer.dropEffect="move";z=0;T.stopPropagation();T.preventDefault()});mxEvent.addListener(k,
+"drop",function(T){T.stopPropagation();T.preventDefault()});var C=null,E=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height="26px";D.style.overflow="hidden";D.style.padding="3px 4px 4px 4px";D.style.borderWidth="1px 0px 0px 0px";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var G=document.createElement("a");G.className="geToolbarButton geAdaptiveAsset geToggleItem";
+G.style.width="16px";G.style.height="18px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var K=G.cloneNode(!1);K.style.backgroundImage="url("+Editor.trashImage+")";K.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(K,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.model.root.getIndex(E);p.removeCells([E],!1);
+0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<J&&J<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,J-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(T)});p.isEnabled()||K.classList.add("mxDisabled");D.appendChild(K);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,
+"click",function(T){if(p.isEnabled()&&!p.isSelectionEmpty()){var J=mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,Z){for(var ia=p.getLayerForCells(p.getSelectionCells()),oa=C-1;0<=oa;oa--)mxUtils.bind(this,function(sa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(sa),"locked","0"),X=V.addItem(p.convertValueToString(sa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,sa)}),Z,null,null,!O);O?V.addCheckmark(X,Editor.lockedImage):
+sa==ia&&V.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,oa))}),J.x,J.y+L.offsetHeight,T)}});D.appendChild(L);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(T){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(T)});p.isEnabled()||Q.classList.add("mxDisabled");D.appendChild(Q);var N=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+
+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,"click",function(T){if(p.isEnabled()){T=null;p.model.beginUpdate();try{T=p.cloneCell(E),p.cellLabelChanged(T,mxResources.get("untitledLayer")),T.setVisible(!0),T=p.addCell(T,p.model.root),p.setDefaultParent(T)}finally{p.model.endUpdate()}null==T||p.isCellLocked(T)||p.selectAll(T)}});p.isEnabled()||U.classList.add("mxDisabled");D.appendChild(U);var Y=G.cloneNode(!1);Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",
+mxResources.get("addLayer"));mxEvent.addListener(Y,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(J)}finally{p.model.endUpdate()}m(J)}mxEvent.consume(T)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="&#8226;";P.style.position="absolute";P.style.fontWeight=
+"bold";P.style.fontSize="16pt";P.style.right="6px";g();p.model.addListener(mxEvent.CHANGE,g);p.addListener("defaultParentChanged",g);a.addListener("lockedChanged",g);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?L.classList.add("mxDisabled"):L.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,h,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);
+this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=g;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3",gcp:"gcp2"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users VPC Boxes Connectors".split(" ");Sidebar.prototype.ibm_cloud=
@@ -12168,25 +12171,25 @@ DrawioFile.prototype.synchronizeFile=function(b,e){if(this.savingFile)null!=e&&e
function(p){f&&(window.clearTimeout(c),this.sync.cleanup(b,e,p))}),l,n):this.updateFile(mxUtils.bind(this,function(){f&&(window.clearTimeout(c),null!=b&&b())}),l,n)}};
DrawioFile.prototype.updateFile=function(b,e,f,c,l){null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",l,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(n){try{null!=f&&f()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[n]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=n?this.mergeFile(n,b,e,
c,l):this.reloadFile(b,e))}catch(p){null!=e&&e(p)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,f,c,l){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var p=this.getShadowPages(),u=[this.ui.diffPages(null!=c?c:p,n)],G=this.ignorePatches(u);if(G)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",G),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var H=this.isModified()?this.ui.diffPages(p,
-this.isRealtime()?this.ownPages:this.ui.pages):null,F=this.ui.patchPages(this.ui.clonePages(p),u[0]),K=this.ui.getHashValueForPages(F,{}),d=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",p,"pages",n,"patched",F,"patches",u,"changes",H,"checksum",K,"current",d,"valid",K==d,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",l);if(null!=K&&K!=d)this.checksumError(f,u,null,null,"mergeFile",
+DrawioFile.prototype.mergeFile=function(b,e,f,c,l){try{var n=b.getShadowPages();if(null!=n&&0<n.length){var p=this.getShadowPages(),u=[this.ui.diffPages(null!=c?c:p,n)],F=this.ignorePatches(u);if(F)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",F),null!=e&&e();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var H=this.isModified()?this.ui.diffPages(p,
+this.isRealtime()?this.ownPages:this.ui.pages):null,E=this.ui.patchPages(this.ui.clonePages(p),u[0]),K=this.ui.getHashValueForPages(E,{}),d=this.ui.getHashValueForPages(n,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",p,"pages",n,"patched",E,"patches",u,"changes",H,"checksum",K,"current",d,"valid",K==d,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",l);if(null!=K&&K!=d)this.checksumError(f,u,null,null,"mergeFile",
K,d,b.getCurrentRevisionId());else{this.setShadowPages(n);if(null!=this.sync){var g=this.sync.patchRealtime(u,DrawioFile.LAST_WRITE_WINS?H:null,null,l);null==g||mxUtils.isEmptyObject(g)||u.push(g)}this.patch(u,DrawioFile.LAST_WRITE_WINS?H:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=e&&e()}}catch(t){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=f&&f(t);try{var k=this.getCurrentUser(),v=null!=k?
k.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),v,t)}catch(x){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(t){null!=f&&f(t)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),f=e.document.createElement("mxfile");if(null!=b)for(var c=0;c<b.length;c++){var l=e.encode(new mxGraphModel(b[c].root));"1"!=urlParams.dev&&(l=this.ui.anonymizeNode(l,!0));l.setAttribute("id",b[c].getId());b[c].viewState&&this.ui.editor.graph.saveViewState(b[c].viewState,l,!0);f.appendChild(l)}return mxUtils.getPrettyXml(f)};
DrawioFile.prototype.compressReportData=function(b,e,f){e=null!=e?e:1E4;null!=f&&null!=b&&b.length>f?b=b.substring(0,f)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,f,c,l,n,p,u){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var G=this.getCurrentUser(),H=null!=G?G.id:"unknown",F=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",K=JSON.stringify(e).length,d=null;if(null!=e&&1E3>K){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);d=JSON.stringify(e);d=null!=d&&1E3>d.length?Graph.compress(d):
+DrawioFile.prototype.checksumError=function(b,e,f,c,l,n,p,u){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var F=this.getCurrentUser(),H=null!=F?F.id:"unknown",E=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",K=JSON.stringify(e).length,d=null;if(null!=e&&1E3>K){for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);d=JSON.stringify(e);d=null!=d&&1E3>d.length?Graph.compress(d):
null}this.getLatestVersion(mxUtils.bind(this,function(g){try{var k=null!=d?"report":"error",v=this.ui.getHashValueForPages(g.getShadowPages()),t="unknown",x="unknown",A="unknown";try{var J=null!=g.initialData&&0<g.initialData.length?mxUtils.parseXml(g.initialData).documentElement:null;null!=J&&(null!=J.getAttribute("version")&&(t=J.getAttribute("version")),null!=J.getAttribute("agent")&&(x=J.getAttribute("agent")),null!=J.getAttribute("type")&&(A=J.getAttribute("type")))}catch(D){}EditorUi.logError("Checksum "+
-k+" in "+l,null,this.getMode()+"."+F,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+(null!=d?"-json_"+d:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=p?"-current_"+p:"")+(null!=u?"-rev_"+this.ui.hashValue(u):"")+(null!=v?"-latest_"+v:"")+"-latestRev_"+this.ui.hashValue(g.getCurrentRevisionId())+("-latestVersion_"+t)+("-latestAgent_"+x)+("-latestType_"+A));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+F,action:l,label:"user_"+
+k+" in "+l,null,this.getMode()+"."+E,"user_"+H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+(null!=d?"-json_"+d:"")+"-size_"+this.getSize()+(null!=n?"-expected_"+n:"")+(null!=p?"-current_"+p:"")+(null!=u?"-rev_"+this.ui.hashValue(u):"")+(null!=v?"-latest_"+v:"")+"-latestRev_"+this.ui.hashValue(g.getCurrentRevisionId())+("-latestVersion_"+t)+("-latestAgent_"+x)+("-latestType_"+A));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+E,action:l,label:"user_"+
H+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+K+"-patches_"+e.length+"-size_"+this.getSize()})}catch(D){}}),function(){})}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",G=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),F=H.lastIndexOf(".");p="xml";0<F&&(p=H.substring(F));var K=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+G+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
+DrawioFile.prototype.sendErrorReport=function(b,e,f,c){try{var l=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),n=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),p=this.getCurrentUser(),u=null!=p?this.ui.hashValue(p.id):"unknown",F=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",H=this.getTitle(),E=H.lastIndexOf(".");p="xml";0<E&&(p=H.substring(E));var K=null!=f?f.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+p+")\nUser="+u+F+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=f?"\n\nError: "+f.message:"")+"\n\nStack:\n"+K+"\n\nShadow:\n"+l+"\n\nData:\n"+n,c)}catch(d){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.stats.fileReloaded++;var f=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),c=this.ui.editor.graph,l=c.getSelectionCells(),n=c.getViewState(),p=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(u){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[f],"viewState",[n],"latestFile",u);null!=u?(this.ui.replaceFileData(u.getData(),
-[f]),this.ui.restoreViewState(p,n,l),this.setDescriptor(u.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var G=this.ui.getCurrentFile();null!=G&&(G.stats=this.stats,G.patch([f]),G.fileChanged());this.ui.restoreViewState(p,n,l);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(u){null!=e&&e(u)}};
+[f]),this.ui.restoreViewState(p,n,l),this.setDescriptor(u.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var F=this.ui.getCurrentFile();null!=F&&(F.stats=this.stats,F.patch([f]),F.fileChanged());this.ui.restoreViewState(p,n,l);null!=b&&b()}else null!=e&&e(this.ui.fileLoadedError)}),!0))}),e)}catch(u){null!=e&&e(u)}};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var f=0;f<b.length&&e;f++)e=e&&mxUtils.isEmptyObject(b[f]);return e};
-DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var l=this.ui.editor.undoManager,n=l.history.slice(),p=l.indexOfNextAdd,u=this.ui.editor.graph;u.container.style.visibility="hidden";var G=this.changeListenerEnabled;this.changeListenerEnabled=f;var H=u.foldingEnabled,F=u.mathEnabled,K=u.cellRenderer.redraw;u.cellRenderer.redraw=function(x){x.view.graph.isEditing(x.cell)&&(x.view.graph.scrollCellToVisible(x.cell),x.view.graph.cellEditor.resize());K.apply(this,arguments)};u.model.beginUpdate();
+DrawioFile.prototype.patch=function(b,e,f,c){if(null!=b){var l=this.ui.editor.undoManager,n=l.history.slice(),p=l.indexOfNextAdd,u=this.ui.editor.graph;u.container.style.visibility="hidden";var F=this.changeListenerEnabled;this.changeListenerEnabled=f;var H=u.foldingEnabled,E=u.mathEnabled,K=u.cellRenderer.redraw;u.cellRenderer.redraw=function(x){x.view.graph.isEditing(x.cell)&&(x.view.graph.scrollCellToVisible(x.cell),x.view.graph.cellEditor.resize());K.apply(this,arguments)};u.model.beginUpdate();
try{if(f){for(var d=this.ui.pages.slice(),g=this.ui.currentPage,k=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),v=0;v<k.length;v++){var t=mxUtils.indexOf(this.ui.pages,k[v]);0>t?this.ui.insertPage(k[v],Math.min(v,this.ui.pages.length)):this.ui.movePage(t,v)}for(v=0;v<d.length;v++)0>mxUtils.indexOf(k,d[v])&&this.ui.removePage(d[v]);0<=mxUtils.indexOf(this.ui.pages,g)&&this.ui.selectPage(g,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);u.checkDefaultParent()}finally{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=K;this.changeListenerEnabled=G;f||(l.history=n,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)F!=u.mathEnabled?(this.ui.editor.updateGraphComponents(),u.refresh()):(H!=u.foldingEnabled?
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);u.checkDefaultParent()}finally{u.container.style.visibility="";u.model.endUpdate();u.cellRenderer.redraw=K;this.changeListenerEnabled=F;f||(l.history=n,l.indexOfNextAdd=p,l.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)E!=u.mathEnabled?(this.ui.editor.updateGraphComponents(),u.refresh()):(H!=u.foldingEnabled?
u.view.revalidate():u.view.validate(),u.sizeDidChange());null!=this.sync&&this.isRealtime()&&!c&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",f)}return b};
DrawioFile.prototype.save=function(b,e,f,c,l,n){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",c,"overwrite",l,"manual",n,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!l&&this.invalidChecksum)if(null!=f)f({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=f)f({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(p){if(null!=f)f(p);else throw p;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -12237,7 +12240,7 @@ DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new
mxUtils.bind(this,function(e){this.ui.stopSanityCheck();null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(e){this.handleFileError(e)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var e=Editor.guid(32);Editor.enableRealtimeCache&&null!=this.sync&&!this.isOptimisticSync()?this.sync.createToken(e,mxUtils.bind(this,function(f){EditorUi.debug("DrawioFile.createSecret",[this],"secret",e,"token",f);b(e,f)}),mxUtils.bind(this,function(){b(e)})):b(e)};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,e,f,c,l,n,p){this.lastSaved=new Date;this.ageStart=null;this.stats.saved++;try{this.invalidChecksum=this.inConflictState=!1;n=null!=n?n:this.ui.getPagesForXml(b);try{null==this.sync||this.isOptimisticSync()?(this.setShadowPages(n),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=f&&f()):this.sync.fileSaved(n,e,f,c,l,p)}catch(H){this.invalidChecksum=
-this.inConflictState=!0;this.descriptorChanged();null!=c&&c(H);try{var u=this.getCurrentUser(),G=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),G,H)}catch(F){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(H){this.descriptorChanged(),null!=c&&c(H)}};
+this.inConflictState=!0;this.descriptorChanged();null!=c&&c(H);try{var u=this.getCurrentUser(),F=null!=u?u.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),F,H)}catch(E){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"desc",[e],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)}catch(H){this.descriptorChanged(),null!=c&&c(H)}};
DrawioFile.prototype.autosave=function(b,e,f,c){null==this.lastAutosave&&(this.lastAutosave=Date.now());var l=Date.now()-this.lastAutosave<e?b:0;this.clearAutosave();var n=window.setTimeout(mxUtils.bind(this,function(){try{if(this.lastAutosave=null,this.autosaveThread==n&&(this.autosaveThread=null),EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile),this.isModified()&&this.isAutosaveNow()){var p=this.isAutosaveRevision();
p&&(this.lastAutosaveRevision=(new Date).getTime());this.save(p,mxUtils.bind(this,function(u){this.autosaveCompleted();null!=f&&f(u)}),mxUtils.bind(this,function(u){null!=c&&c(u)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=f&&f(null)}catch(u){null!=c&&c(u)}}),l);this.autosaveThread=n;EditorUi.debug("DrawioFile.autosave",[this],"thread",n,"delay",b,"maxDelay",e,"actualDelay",l,"lastAutosave",this.lastAutosave,"saving",this.savingFile)};DrawioFile.prototype.isAutosaveNow=function(){return!0};
DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
@@ -12246,10 +12249,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,f){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,f,c,l,n,p){DrawioFile.call(this,b,e);this.title=f;this.mode=c?null:App.MODE_DEVICE;this.fileHandle=l;this.desc=n;this.editable=p};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,e,f,c,l){this.saveAs(this.title,e,f,c,l)};LocalFile.prototype.saveAs=function(b,e,f,c,l){this.saveFile(b,!1,e,f,null,c,l)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?null!=e&&e({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,f,c,l,n,p){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var G=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),F=mxUtils.bind(this,function(K){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var d=mxUtils.bind(this,function(k){this.savingFile=!1;null!=c&&c({error:k})});this.saveDraft(G);this.fileHandle.createWritable().then(mxUtils.bind(this,function(k){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);p||this.desc.lastModified==v.lastModified?k.write(u?this.ui.base64ToBlob(K,"image/png"):K).then(mxUtils.bind(this,function(){k.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var x=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(G,x,H,d);this.removeDraft()}catch(A){d(A)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;d(v)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(K,b,u?"image/png":"text/xml",u);else if(K.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(K)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(K)}));H()}});u?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(K){F(K)}),c,this.ui.getCurrentFile()!=this?G:null,e.scale,e.border)):F(G)};
+LocalFile.prototype.saveFile=function(b,e,f,c,l,n,p){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;l||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var F=this.getData(),H=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=f&&f()}),E=mxUtils.bind(this,function(K){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var d=mxUtils.bind(this,function(k){this.savingFile=!1;null!=c&&c({error:k})});this.saveDraft(F);this.fileHandle.createWritable().then(mxUtils.bind(this,function(k){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);p||this.desc.lastModified==v.lastModified?k.write(u?this.ui.base64ToBlob(K,"image/png"):K).then(mxUtils.bind(this,function(){k.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(t){try{var x=this.desc;this.savingFile=!1;this.desc=t;this.fileSaved(F,x,H,d);this.removeDraft()}catch(A){d(A)}}),d)}),d)}),d):(this.inConflictState=!0,d())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;d(v)}))}),d)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(K,b,u?"image/png":"text/xml",u);else if(K.length<MAX_REQUEST_SIZE){var g=b.lastIndexOf(".");g=0<g?b.substring(g+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+g+"&xml="+encodeURIComponent(K)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(K)}));H()}});u?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(K){E(K)}),c,this.ui.getCurrentFile()!=this?F:null,e.scale,e.border)):E(F)};
LocalFile.prototype.rename=function(b,e,f){this.title=b;this.descriptorChanged();null!=e&&e()};LocalLibrary=function(b,e,f){LocalFile.call(this,b,e,f)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,e,f){this.saveFile(b,!1,e,f)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,e,f){DrawioFile.call(this,b,e);this.title=f;this.etag=this.getEtag(e)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,e){this.getLatestVersionId(b,e)};StorageFile.prototype.getLatestVersionId=function(b,e){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(f){b(this.getEtag(f))}),e)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};
StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,e,f){this.saveAs(this.getTitle(),e,f)};
@@ -12269,97 +12272,97 @@ StorageLibrary.prototype.isRenamable=function(b,e,f){return".scratchpad"!=this.t
RemoteLibrary.prototype.saveAs=function(b,e,f){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,e,f){StorageFile.call(this,b,e,f);b=f;e=b.lastIndexOf("/");0<=e&&(b=b.substring(e+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,e,f){return!1};UrlLibrary.prototype.saveAs=function(b,e,f){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,e,f){DrawioFile.call(this,b,e);this.desc=f||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
var StorageDialog=function(b,e,f){function c(K,d,g,k,v,t){function x(){mxEvent.addListener(A,"click",null!=t?t:function(){g==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()})):g==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(g,!0);e()}),function(V){b.spinner.stop();b.handleError(V)}):
-(b.setMode(g,!0),e())})}u++;++p>f&&(mxUtils.br(G),p=1);var A=document.createElement("a");A.style.overflow="hidden";A.style.display="inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="8px";A.style.marginBottom="0px";A.style.padding="8px 10px 8px 10px";A.style.width="88px";A.style.height="100px";A.style.whiteSpace="nowrap";A.setAttribute("title",d);var J=document.createElement("div");J.style.textOverflow=
+(b.setMode(g,!0),e())})}u++;++p>f&&(mxUtils.br(F),p=1);var A=document.createElement("a");A.style.overflow="hidden";A.style.display="inline-block";A.className="geBaseButton";A.style.boxSizing="border-box";A.style.fontSize="11px";A.style.position="relative";A.style.margin="4px";A.style.marginTop="8px";A.style.marginBottom="0px";A.style.padding="8px 10px 8px 10px";A.style.width="88px";A.style.height="100px";A.style.whiteSpace="nowrap";A.setAttribute("title",d);var J=document.createElement("div");J.style.textOverflow=
"ellipsis";J.style.overflow="hidden";J.style.position="absolute";J.style.bottom="8px";J.style.left="0px";J.style.right="0px";mxUtils.write(J,d);A.appendChild(J);if(null!=K){var D=document.createElement("img");D.setAttribute("src",K);D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.width="60px";D.style.height="60px";D.style.paddingBottom="6px";A.appendChild(D)}else J.style.paddingTop="5px",J.style.whiteSpace="normal",mxClient.IS_IOS?(A.style.padding="0px 10px 20px 10px",A.style.top=
-"6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=v)for(K=0;K<v.length;K++)mxUtils.br(J),mxUtils.write(J,v[K]);if(null!=k&&null==b[k]){D.style.visibility="hidden";mxUtils.setOpacity(J,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(A);var R=window.setTimeout(function(){null==b[k]&&(E.stop(),A.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(V,Q){null!=b[k]&&Q.getProperty("client")==b[k]&&(window.clearTimeout(R),mxUtils.setOpacity(J,100),D.style.visibility="",E.stop(),x(),"drive"==k&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else x();G.appendChild(A)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom="20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";
-n.style.padding="10px 0px 20px 0px";var p=0,u=0,G=document.createElement("div");G.style.paddingTop="2px";n.appendChild(G);var H=document.createElement("p"),F=document.createElement("p");F.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(F,mxResources.get("saveDiagramsTo")+":");l.appendChild(F);l.appendChild(n);p=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
+"6px"):mxClient.IS_FF&&(J.style.paddingTop="0px",J.style.marginTop="-2px");if(null!=v)for(K=0;K<v.length;K++)mxUtils.br(J),mxUtils.write(J,v[K]);if(null!=k&&null==b[k]){D.style.visibility="hidden";mxUtils.setOpacity(J,10);var G=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});G.spin(A);var R=window.setTimeout(function(){null==b[k]&&(G.stop(),A.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(V,Q){null!=b[k]&&Q.getProperty("client")==b[k]&&(window.clearTimeout(R),mxUtils.setOpacity(J,100),D.style.visibility="",G.stop(),x(),"drive"==k&&null!=H.parentNode&&H.parentNode.removeChild(H))}))}else x();F.appendChild(A)}f=null!=f?f:2;var l=document.createElement("div");l.style.textAlign="center";l.style.whiteSpace="nowrap";l.style.paddingTop="0px";l.style.paddingBottom="20px";var n=document.createElement("div");n.style.border="1px solid #d3d3d3";n.style.borderWidth="1px 0px 1px 0px";
+n.style.padding="10px 0px 20px 0px";var p=0,u=0,F=document.createElement("div");F.style.paddingTop="2px";n.appendChild(F);var H=document.createElement("p"),E=document.createElement("p");E.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(E,mxResources.get("saveDiagramsTo")+":");l.appendChild(E);l.appendChild(n);p=0;"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");n=document.createElement("span");n.style.position="absolute";n.style.cursor="pointer";n.style.bottom="27px";n.style.color="gray";n.style.userSelect="none";n.style.textAlign="center";n.style.left="50%";mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)");mxUtils.write(n,mxResources.get("decideLater"));
l.appendChild(n);mxEvent.addListener(n,"click",function(){b.hideDialog();var K=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=K});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(H.style.padding="7px",H.style.fontSize="9pt",H.style.marginTop="-14px",H.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",l.appendChild(H))},5E3);this.container=l},SplashDialog=function(b){var e=document.createElement("div");e.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var f=b.addLanguageMenu(e,!1,"28px");null!=f&&(f.style.bottom="24px")}var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.width=
"32px";c.style.height="32px";c.style.marginRight="8px";c.style.marginTop="-4px";var l=document.createElement("div");l.style.margin="8px 0px 0px 0px";l.style.padding="18px 0px 24px 0px";f="";b.mode==App.MODE_GOOGLE?(c.src=IMAGE_PATH+"/google-drive-logo.svg",f=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(c.src=IMAGE_PATH+"/dropbox-logo.svg",f=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(c.src=IMAGE_PATH+"/onedrive-logo.svg",f=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
(c.src=IMAGE_PATH+"/github-logo.svg",f=mxResources.get("github")):b.mode==App.MODE_GITLAB?(c.src=IMAGE_PATH+"/gitlab-logo.svg",f=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(c.src=IMAGE_PATH+"/osa_database.png",f=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(c.src=IMAGE_PATH+"/trello-logo.svg",f=mxResources.get("trello")):(c.src=IMAGE_PATH+"/osa_drive-harddisk.png",l.style.paddingBottom="10px",l.style.paddingTop="30px",f=mxResources.get("device"));var n=document.createElement("button");
-n.className="geBigButton";n.style.marginBottom="8px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",n.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var p=document.createElement("table"),u=document.createElement("tbody"),G=document.createElement("tr"),H=document.createElement("td"),F=document.createElement("td");p.setAttribute("align",
-"center");H.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);F.style.textAlign="left";F.appendChild(c);G.appendChild(H);G.appendChild(F);u.appendChild(G);p.appendChild(u);e.appendChild(p);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,
+n.className="geBigButton";n.style.marginBottom="8px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)l.style.padding="42px 0px 10px 0px",n.style.marginBottom="12px";else{l.style.border="1px solid #d3d3d3";l.style.borderWidth="1px 0px 1px 0px";var p=document.createElement("table"),u=document.createElement("tbody"),F=document.createElement("tr"),H=document.createElement("td"),E=document.createElement("td");p.setAttribute("align",
+"center");H.appendChild(c);c=document.createElement("div");c.style.fontSize="22px";c.style.paddingBottom="6px";c.style.color="gray";mxUtils.write(c,f);E.style.textAlign="left";E.appendChild(c);F.appendChild(H);F.appendChild(E);u.appendChild(F);p.appendChild(u);e.appendChild(p);f=document.createElement("span");f.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0)");mxUtils.write(f,
mxResources.get("changeStorage"));mxEvent.addListener(f,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});e.appendChild(f)}mxUtils.write(n,mxResources.get("createNewDiagram"));mxEvent.addListener(n,"click",function(){b.hideDialog();b.actions.get("new").funct()});l.appendChild(n);mxUtils.br(l);n=document.createElement("button");n.className="geBigButton";n.style.marginBottom="22px";n.style.fontSize="18px";n.style.padding="10px";n.style.width="340px";mxUtils.write(n,
mxResources.get("openExistingDiagram"));mxEvent.addListener(n,"click",function(){b.actions.get("open").funct()});l.appendChild(n);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&
mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(f=function(g){n.style.marginBottom="24px";var k=document.createElement("a");k.style.display="inline-block";k.style.color="gray";k.style.cursor="pointer";k.style.marginTop="6px";mxUtils.write(k,mxResources.get("signOut"));n.style.marginBottom="16px";l.style.paddingBottom="18px";mxEvent.addListener(k,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){g()})});l.appendChild(k)},b.mode==App.MODE_GOOGLE&&
null!=b.drive){var K=b.drive.getUsersList();if(0<K.length){c=document.createElement("span");c.style.marginTop="6px";mxUtils.write(c,mxResources.get("changeUser")+":");n.style.marginBottom="16px";l.style.paddingBottom="18px";l.appendChild(c);var d=document.createElement("select");d.style.marginLeft="4px";d.style.width="140px";for(f=0;f<K.length;f++)p=document.createElement("option"),mxUtils.write(p,K[f].displayName),p.value=f,d.appendChild(p),p=document.createElement("option"),p.innerHTML="&nbsp;&nbsp;&nbsp;",
mxUtils.write(p,"<"+K[f].email+">"),p.setAttribute("disabled","disabled"),d.appendChild(p);p=document.createElement("option");mxUtils.write(p,mxResources.get("addAccount"));p.value=K.length;d.appendChild(p);mxEvent.addListener(d,"change",function(){var g=d.value,k=K.length!=g;k&&b.drive.setUser(K[g]);b.drive.authorize(k,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(v){b.handleError(v,null,function(){b.hideDialog();b.showSplash()})},!0)});l.appendChild(d)}else f(function(){b.drive.logout()})}else b.mode!=
App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?f(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?f(function(){b.gitLab.logout();var g=document.createElement("form");g.setAttribute("method","post");g.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");g.setAttribute("target","_blank");document.body.appendChild(g);g.submit();g.parentNode.removeChild(g)}):b.mode==App.MODE_TRELLO&&
-null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,n,p,u,G){p=null!=p?p:"Check out the diagram I made using @drawio";c=document.createElement("div");var H=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=n?mxUtils.write(c,n):mxUtils.write(c,mxResources.get(5E5>
-e.length?H?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,b.formatFileSize(e.length));c.appendChild(n);var F=document.createElement("textarea");F.setAttribute("autocomplete","off");F.setAttribute("autocorrect","off");F.setAttribute("autocapitalize","off");F.setAttribute("spellcheck","false");F.style.fontFamily="monospace";F.style.wordBreak="break-all";F.style.marginTop=
-"10px";F.style.resize="none";F.style.height="150px";F.style.width="440px";F.style.border="1px solid gray";F.value=mxResources.get("updatingDocument");c.appendChild(F);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(F.value=e,F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)):(F.setAttribute("readonly","true"),F.value=mxResources.get("tooLargeUseDownload"))},0)};n=document.createElement("div");n.style.position=
-"absolute";n.style.bottom="36px";n.style.right="32px";var K=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(K=mxUtils.button(null!=u?u:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var g=5E5>e.length?F.value:e;if(null!=l)l(g);else if(H)try{var k=b.openLink(g);null!=k&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=
+null!=b.trello?b.trello.isAuthorized()&&f(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&f(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):f(function(){b.oneDrive.logout()});e.appendChild(l);this.container=e},EmbedDialog=function(b,e,f,c,l,n,p,u,F){p=null!=p?p:"Check out the diagram I made using @drawio";c=document.createElement("div");var H=/^https?:\/\//.test(e)||/^mailto:\/\//.test(e);null!=n?mxUtils.write(c,n):mxUtils.write(c,mxResources.get(5E5>
+e.length?H?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);n=document.createElement("div");n.style.position="absolute";n.style.top="30px";n.style.right="30px";n.style.color="gray";mxUtils.write(n,b.formatFileSize(e.length));c.appendChild(n);var E=document.createElement("textarea");E.setAttribute("autocomplete","off");E.setAttribute("autocorrect","off");E.setAttribute("autocapitalize","off");E.setAttribute("spellcheck","false");E.style.fontFamily="monospace";E.style.wordBreak="break-all";E.style.marginTop=
+"10px";E.style.resize="none";E.style.height="150px";E.style.width="440px";E.style.border="1px solid gray";E.value=mxResources.get("updatingDocument");c.appendChild(E);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>e.length?(E.value=e,E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null)):(E.setAttribute("readonly","true"),E.value=mxResources.get("tooLargeUseDownload"))},0)};n=document.createElement("div");n.style.position=
+"absolute";n.style.bottom="36px";n.style.right="32px";var K=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!H||navigator.standalone||!(H||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(K=mxUtils.button(null!=u?u:mxResources.get(5E5>e.length?"preview":"openInNewWindow"),function(){var g=5E5>e.length?E.value:e;if(null!=l)l(g);else if(H)try{var k=b.openLink(g);null!=k&&(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=k&&null!=
k.location.href&&k.location.href.substring(0,8)!=g.substring(0,8)&&(k.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(t){}}),f||500)}catch(t){b.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var v=window.open();v=null!=v?v.document:null;null!=v?(v.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==e.substring(0,7)?e:mxUtils.htmlEntities(e))+"</body></html>"),
-v.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),K.className="geBtn",n.appendChild(K));if(!H||7500<e.length)u=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=G?G:"embed.txt","txt",e,"text/plain")}),u.className="geBtn",n.appendChild(u);if(H&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var d=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(F.value);
+v.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),K.className="geBtn",n.appendChild(K));if(!H||7500<e.length)u=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=F?F:"embed.txt","txt",e,"text/plain")}),u.className="geBtn",n.appendChild(u);if(H&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>e.length){var d=mxUtils.button("",function(){try{var g="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(E.value);
b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}});u=document.createElement("img");u.setAttribute("src",Editor.facebookImage);u.setAttribute("width","18");u.setAttribute("height","18");u.setAttribute("border","0");d.appendChild(u);d.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");d.style.verticalAlign="bottom";d.style.paddingTop="4px";d.style.minWidth="46px";d.className="geBtn";n.appendChild(d)}7168>e.length&&(d=
-mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(p)+"&url="+encodeURIComponent(F.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.setAttribute("src",Editor.tweetImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+
-" max)"),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d))}!b.isOffline()&&5E5>e.length&&(d=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(G||b.defaultFilename)+"&body="+encodeURIComponent(F.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.className="geAdaptiveAsset",u.setAttribute("src",Editor.mailImage),u.setAttribute("width",
-"18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d));u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(u);d=mxUtils.button(mxResources.get("copy"),function(){F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
+mxUtils.button("",function(){try{var g="https://twitter.com/intent/tweet?text="+encodeURIComponent(p)+"&url="+encodeURIComponent(E.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.setAttribute("src",Editor.tweetImage),u.setAttribute("width","18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+
+" max)"),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d))}!b.isOffline()&&5E5>e.length&&(d=mxUtils.button("",function(){try{var g="mailto:?subject="+encodeURIComponent(F||b.defaultFilename)+"&body="+encodeURIComponent(E.value);b.openLink(g)}catch(k){b.handleError({message:k.message||mxResources.get("drawingTooLarge")})}}),u=document.createElement("img"),u.className="geAdaptiveAsset",u.setAttribute("src",Editor.mailImage),u.setAttribute("width",
+"18"),u.setAttribute("height","18"),u.setAttribute("border","0"),u.style.marginBottom="5px",d.appendChild(u),d.style.verticalAlign="bottom",d.style.paddingTop="4px",d.style.minWidth="46px",d.className="geBtn",n.appendChild(d));u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.appendChild(u);d=mxUtils.button(mxResources.get("copy"),function(){E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
b.alert(mxResources.get("copiedToClipboard"))});5E5>e.length?mxClient.IS_SF||null!=document.documentMode?u.className="geBtn gePrimaryBtn":(n.appendChild(d),d.className="geBtn gePrimaryBtn",u.className="geBtn"):null!=K&&(n.appendChild(K),u.className="geBtn",K.className="geBtn gePrimaryBtn");c.appendChild(n);this.container=c};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,e){function f(){var V=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(D.checked&&""!=d.value){var Q="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(d.value));null!=V&&(Q+="&title="+encodeURIComponent(V));0<E.length&&(Q+="&s="+E);""!=g.value&&"0"!=g.value&&(Q+="&border="+g.value);""!=K.value&&(Q+="&height="+K.value);Q+="&pan="+(k.checked?"1":"0");Q+="&zoom="+(v.checked?"1":"0");Q+="&fit="+(J.checked?"1":"0");
-Q+="&resize="+(A.checked?"1":"0");Q+="&x0="+Number(F.value);Q+="&y0="+G;l.mathEnabled&&(Q+="&math=1");x.checked?Q+="&edit=_blank":t.checked&&(Q+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=Q}else R.constructor==DriveFile||R.constructor==DropboxFile?(Q="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=d.value?Q+=encodeURIComponent(mxUtils.htmlEntities(d.value))+"&type=3":(Q+=R.getHash().substring(1),Q=R.constructor==DropboxFile?Q+"&type=2":Q+"&type=1"),null!=
-V&&(Q+="&title="+encodeURIComponent(V)),""!=K.value&&(V=parseInt(K.value)+parseInt(F.value),Q+="&height="+V),H.value=Q):H.value=""}var c=document.createElement("div"),l=b.editor.graph,n=l.getGraphBounds(),p=l.view.scale,u=Math.floor(n.x/p-l.view.translate.x),G=Math.floor(n.y/p-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";
-c.appendChild(H);mxUtils.br(c);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("size","4");F.style.marginRight="16px";F.style.marginLeft="4px";F.value=u;c.appendChild(F);mxUtils.write(c,mxResources.get("height")+":");var K=document.createElement("input");K.setAttribute("type","text");
+var GoogleSitesDialog=function(b,e){function f(){var V=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(D.checked&&""!=d.value){var Q="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(d.value));null!=V&&(Q+="&title="+encodeURIComponent(V));0<G.length&&(Q+="&s="+G);""!=g.value&&"0"!=g.value&&(Q+="&border="+g.value);""!=K.value&&(Q+="&height="+K.value);Q+="&pan="+(k.checked?"1":"0");Q+="&zoom="+(v.checked?"1":"0");Q+="&fit="+(J.checked?"1":"0");
+Q+="&resize="+(A.checked?"1":"0");Q+="&x0="+Number(E.value);Q+="&y0="+F;l.mathEnabled&&(Q+="&math=1");x.checked?Q+="&edit=_blank":t.checked&&(Q+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));H.value=Q}else R.constructor==DriveFile||R.constructor==DropboxFile?(Q="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=d.value?Q+=encodeURIComponent(mxUtils.htmlEntities(d.value))+"&type=3":(Q+=R.getHash().substring(1),Q=R.constructor==DropboxFile?Q+"&type=2":Q+"&type=1"),null!=
+V&&(Q+="&title="+encodeURIComponent(V)),""!=K.value&&(V=parseInt(K.value)+parseInt(E.value),Q+="&height="+V),H.value=Q):H.value=""}var c=document.createElement("div"),l=b.editor.graph,n=l.getGraphBounds(),p=l.view.scale,u=Math.floor(n.x/p-l.view.translate.x),F=Math.floor(n.y/p-l.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var H=document.createElement("input");H.setAttribute("type","text");H.style.marginBottom="8px";H.style.marginTop="2px";H.style.width="410px";
+c.appendChild(H);mxUtils.br(c);this.init=function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("size","4");E.style.marginRight="16px";E.style.marginLeft="4px";E.value=u;c.appendChild(E);mxUtils.write(c,mxResources.get("height")+":");var K=document.createElement("input");K.setAttribute("type","text");
K.setAttribute("size","4");K.style.marginLeft="4px";K.value=Math.ceil(n.height/p);c.appendChild(K);mxUtils.br(c);n=document.createElement("hr");n.setAttribute("size","1");n.style.marginBottom="16px";n.style.marginTop="16px";c.appendChild(n);mxUtils.write(c,mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var d=document.createElement("input");d.setAttribute("type","text");d.setAttribute("size","28");d.style.marginBottom="8px";d.style.marginTop="2px";d.style.width="410px";d.value=e||"";c.appendChild(d);
mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var g=document.createElement("input");g.setAttribute("type","text");g.setAttribute("size","3");g.style.marginBottom="8px";g.style.marginLeft="4px";g.value="0";c.appendChild(g);mxUtils.br(c);var k=document.createElement("input");k.setAttribute("type","checkbox");k.setAttribute("checked","checked");k.defaultChecked=!0;k.style.marginLeft="16px";c.appendChild(k);mxUtils.write(c,mxResources.get("pan")+" ");var v=document.createElement("input");
v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("zoom")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";t.setAttribute("title",window.location.href);c.appendChild(t);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,
mxResources.get("asNew")+" ");mxUtils.br(c);var A=document.createElement("input");A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="16px";c.appendChild(A);mxUtils.write(c,mxResources.get("resize")+" ");var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginLeft="8px";c.appendChild(J);mxUtils.write(c,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft=
-"8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(k,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(D,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(F,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(d,"change",f);f();
+"8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var G=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(k,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(A,"change",f);mxEvent.addListener(J,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(D,"change",f);mxEvent.addListener(K,"change",f);mxEvent.addListener(E,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(d,"change",f);f();
mxEvent.addListener(H,"click",function(){H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)});e=document.createElement("div");e.style.paddingTop="12px";e.style.textAlign="right";n=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});n.className="geBtn gePrimaryBtn";e.appendChild(n);c.appendChild(e);this.container=c},CreateGraphDialog=function(b,e,f){var c=document.createElement("div");c.style.textAlign="right";this.init=
function(){var l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.boxSizing="border-box";l.style.width="100%";l.style.height="360px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);c.appendChild(l);var n=new Graph(l);n.setCellsCloneable(!0);n.setPanning(!0);n.setAllowDanglingEdges(!1);n.connectionHandler.select=!1;n.view.setTranslate(20,20);n.border=20;n.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&
null!=n.view.getDrawPane()&&(l=n.view.getDrawPane().ownerSVGElement,null!=l&&(l.style.position="absolute"));var p="curved=1;";n.cellRenderer.installCellOverlayListeners=function(k,v,t){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(t.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(x){v.fireEvent(new mxEventObject("pointerdown","event",x,"state",k))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(t.node,"touchstart",function(x){v.fireEvent(new mxEventObject("pointerdown",
-"event",x,"state",k))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=!1;n.connectionHandler.createEdgeState=function(k){k=n.createEdge(null,null,null,null,null,p);return new mxCellState(this.graph.view,k,this.graph.getCellStyle(k))};var u=n.getDefaultParent(),G=mxUtils.bind(this,function(k){var v=new mxCellOverlay(this.connectImage,"Add outgoing");v.cursor="hand";v.addListener(mxEvent.CLICK,function(t,x){n.connectionHandler.reset();n.clearSelection();
-var A=n.getCellGeometry(k),J;K(function(){J=n.insertVertex(u,null,"Entry",A.x,A.y,80,30,"rounded=1;");G(J);n.view.refresh(J);n.insertEdge(u,null,"",k,J,p)},function(){n.scrollCellToVisible(J)})});v.addListener("pointerdown",function(t,x){t=x.getProperty("event");x=x.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var A=mxUtils.convertPoint(n.container,mxEvent.getClientX(t),mxEvent.getClientY(t));n.connectionHandler.start(x,A.x,A.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(t);
-mxEvent.consume(t)});n.addCellOverlay(k,v)});n.getModel().beginUpdate();try{var H=n.insertVertex(u,null,"Start",0,0,80,30,"ellipse");G(H)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var F=new mxCompactTreeLayout(n);F.edgeRouting=!1;F.levelDistance=30;F.sortEdges=!0;p="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(F=new mxCompactTreeLayout(n,!1),F.edgeRouting=!1,F.levelDistance=30,F.sortEdges=!0,p="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(F=new mxRadialTreeLayout(n,
-!1),F.edgeRouting=!1,F.levelDistance=80):"verticalFlow"==f?F=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?F=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"circle"==f?F=new mxCircleLayout(n):(F=new mxFastOrganicLayout(n,!1),F.forceConstant=80);if(null!=F){var K=function(k,v){n.getModel().beginUpdate();try{null!=k&&k(),F.execute(n.getDefaultParent(),H)}catch(t){throw t;}finally{k=new mxMorphing(n),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();
+"event",x,"state",k))})};n.getAllConnectionConstraints=function(){return null};n.connectionHandler.marker.highlight.keepOnTop=!1;n.connectionHandler.createEdgeState=function(k){k=n.createEdge(null,null,null,null,null,p);return new mxCellState(this.graph.view,k,this.graph.getCellStyle(k))};var u=n.getDefaultParent(),F=mxUtils.bind(this,function(k){var v=new mxCellOverlay(this.connectImage,"Add outgoing");v.cursor="hand";v.addListener(mxEvent.CLICK,function(t,x){n.connectionHandler.reset();n.clearSelection();
+var A=n.getCellGeometry(k),J;K(function(){J=n.insertVertex(u,null,"Entry",A.x,A.y,80,30,"rounded=1;");F(J);n.view.refresh(J);n.insertEdge(u,null,"",k,J,p)},function(){n.scrollCellToVisible(J)})});v.addListener("pointerdown",function(t,x){t=x.getProperty("event");x=x.getProperty("state");n.popupMenuHandler.hideMenu();n.stopEditing(!1);var A=mxUtils.convertPoint(n.container,mxEvent.getClientX(t),mxEvent.getClientY(t));n.connectionHandler.start(x,A.x,A.y);n.isMouseDown=!0;n.isMouseTrigger=mxEvent.isMouseEvent(t);
+mxEvent.consume(t)});n.addCellOverlay(k,v)});n.getModel().beginUpdate();try{var H=n.insertVertex(u,null,"Start",0,0,80,30,"ellipse");F(H)}finally{n.getModel().endUpdate()}if("horizontalTree"==f){var E=new mxCompactTreeLayout(n);E.edgeRouting=!1;E.levelDistance=30;E.sortEdges=!0;p="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==f?(E=new mxCompactTreeLayout(n,!1),E.edgeRouting=!1,E.levelDistance=30,E.sortEdges=!0,p="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==f?(E=new mxRadialTreeLayout(n,
+!1),E.edgeRouting=!1,E.levelDistance=80):"verticalFlow"==f?E=new mxHierarchicalLayout(n,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?E=new mxHierarchicalLayout(n,mxConstants.DIRECTION_WEST):"circle"==f?E=new mxCircleLayout(n):(E=new mxFastOrganicLayout(n,!1),E.forceConstant=80);if(null!=E){var K=function(k,v){n.getModel().beginUpdate();try{null!=k&&k(),E.execute(n.getDefaultParent(),H)}catch(t){throw t;}finally{k=new mxMorphing(n),k.addListener(mxEvent.DONE,mxUtils.bind(this,function(){n.getModel().endUpdate();
null!=v&&v()})),k.startAnimation()}},d=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(k,v,t,x,A){d.apply(this,arguments);K()};n.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);K()};n.connectionHandler.addListener(mxEvent.CONNECT,function(){K()})}l=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);var g=mxUtils.button(mxResources.get("insert"),
function(k){n.clearCellOverlays();var v=n.getModel().getChildren(n.getDefaultParent());k=mxEvent.isAltDown(k)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(n.getBoundingBoxFromGeometry(v,!0));v=b.editor.graph.importCells(v,k.x,k.y);k=b.editor.graph.view;var t=k.getBounds(v);null!=t&&(t.x-=k.translate.x,t.y-=k.translate.y,b.editor.graph.scrollRectToVisible(t),b.editor.graph.setSelectionCells(v));b.hideDialog()});c.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
c.appendChild(l);this.graph=n};this.container=c};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,e,f,c,l){function n(){null==q||q==mxConstants.NONE?(P.style.display="none",V.checked=!1):(P.style.backgroundColor=q,P.style.display="",V.checked=!0)}var p=b.editor.graph,u=document.createElement("div");u.style.whiteSpace="nowrap";var G=document.createElement("h2");mxUtils.write(G,mxResources.get("background"));G.style.marginTop="0px";u.appendChild(G);var H=null!=f&&null!=f.originalSrc;G=!1;var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-bottom:8px;";
-F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","geBackgroundImageDialogOption");var K=document.createElement("input");K.style.cssText="margin-right:8px;margin-bottom:8px;";K.setAttribute("value","url");K.setAttribute("type","radio");K.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.width="360px";d.value=H||null==f?"":f.src;var g=document.createElement("select");
-g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var v=document.createElement("option");mxUtils.write(v,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1]));v.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&v.setAttribute("disabled","disabled");null!=f&&f.originalSrc==v.getAttribute("value")&&(v.setAttribute("selected","selected"),G=!0);g.appendChild(v)}H||null!=b.pages&&1!=b.pages.length||(F.style.display="none",K.style.display=
-"none",g.style.display="none");var t=document.createElement("option"),x=!1,A=!1,J=function(B,C){x||null!=B&&A||(K.checked?null!=C&&C(t.selected?null:g.value):""==d.value||b.isOffline()?(E.value="",R.value="",null!=C&&C("")):(d.value=mxUtils.trim(d.value),b.loadImage(d.value,function(M){E.value=M.width;R.value=M.height;null!=C&&C(d.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));E.value="";R.value="";null!=C&&C(null)})))},D=mxUtils.bind(this,
-function(B){b.importFiles(B,0,0,b.maxBackgroundSize,function(C,M,T,m,z,I){d.value=C;J();d.focus()},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var M=0;M<C.length;M++)C[M]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){H?g.focus():d.focus();mxEvent.addListener(g,"focus",function(){F.removeAttribute("checked");K.setAttribute("checked","checked");K.checked=!0});mxEvent.addListener(d,"focus",function(){K.removeAttribute("checked");F.setAttribute("checked",
-"checked");F.checked=!0});if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=u.parentNode,C=null;mxEvent.addListener(B,"dragleave",function(M){null!=C&&(C.parentNode.removeChild(C),C=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(M){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(B));M.stopPropagation();M.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,
-function(M){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<M.dataTransfer.files.length)D(M.dataTransfer.files);else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var T=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(d.value=decodeURIComponent(T),J())}M.stopPropagation();M.preventDefault()}),!1)}};u.appendChild(F);u.appendChild(d);mxUtils.br(u);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+
-":");u.appendChild(k);var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==f||H?"":f.width;u.appendChild(E);mxUtils.write(u,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==f||H?"":f.height;u.appendChild(R);mxUtils.br(u);mxUtils.br(u);mxEvent.addListener(d,"change",
-J);ImageDialog.filePicked=function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(d.value=B.url,J()));d.focus()};u.appendChild(K);u.appendChild(g);mxUtils.br(u);mxUtils.br(u);H?(K.setAttribute("checked","checked"),K.checked=!0):(F.setAttribute("checked","checked"),F.checked=!0);!G&&K.checked&&(mxUtils.write(t,mxResources.get("pageNotFound")),t.setAttribute("disabled","disabled"),t.setAttribute("selected","selected"),
+var BackgroundImageDialog=function(b,e,f,c,l){function n(){null==q||q==mxConstants.NONE?(O.style.display="none",V.checked=!1):(O.style.backgroundColor=q,O.style.display="",V.checked=!0)}var p=b.editor.graph,u=document.createElement("div");u.style.whiteSpace="nowrap";var F=document.createElement("h2");mxUtils.write(F,mxResources.get("background"));F.style.marginTop="0px";u.appendChild(F);var H=null!=f&&null!=f.originalSrc;F=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";
+E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var K=document.createElement("input");K.style.cssText="margin-right:8px;margin-bottom:8px;";K.setAttribute("value","url");K.setAttribute("type","radio");K.setAttribute("name","geBackgroundImageDialogOption");var d=document.createElement("input");d.setAttribute("type","text");d.style.marginBottom="8px";d.style.width="360px";d.value=H||null==f?"":f.src;var g=document.createElement("select");
+g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var v=document.createElement("option");mxUtils.write(v,b.pages[k].getName()||mxResources.get("pageWithNumber",[k+1]));v.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&v.setAttribute("disabled","disabled");null!=f&&f.originalSrc==v.getAttribute("value")&&(v.setAttribute("selected","selected"),F=!0);g.appendChild(v)}H||null!=b.pages&&1!=b.pages.length||(E.style.display="none",K.style.display=
+"none",g.style.display="none");var t=document.createElement("option"),x=!1,A=!1,J=function(B,C){x||null!=B&&A||(K.checked?null!=C&&C(t.selected?null:g.value):""==d.value||b.isOffline()?(G.value="",R.value="",null!=C&&C("")):(d.value=mxUtils.trim(d.value),b.loadImage(d.value,function(M){G.value=M.width;R.value=M.height;null!=C&&C(d.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));G.value="";R.value="";null!=C&&C(null)})))},D=mxUtils.bind(this,
+function(B){b.importFiles(B,0,0,b.maxBackgroundSize,function(C,M,T,m,z,I){d.value=C;J();d.focus()},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var M=0;M<C.length;M++)C[M]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){H?g.focus():d.focus();mxEvent.addListener(g,"focus",function(){E.removeAttribute("checked");K.setAttribute("checked","checked");K.checked=!0});mxEvent.addListener(d,"focus",function(){K.removeAttribute("checked");E.setAttribute("checked",
+"checked");E.checked=!0});if(Graph.fileSupport){d.setAttribute("placeholder",mxResources.get("dragImagesHere"));var B=u.parentNode,C=null;mxEvent.addListener(B,"dragleave",function(M){null!=C&&(C.parentNode.removeChild(C),C=null);M.stopPropagation();M.preventDefault()});mxEvent.addListener(B,"dragover",mxUtils.bind(this,function(M){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(B));M.stopPropagation();M.preventDefault()}));mxEvent.addListener(B,"drop",mxUtils.bind(this,
+function(M){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<M.dataTransfer.files.length)D(M.dataTransfer.files);else if(0<=mxUtils.indexOf(M.dataTransfer.types,"text/uri-list")){var T=M.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(d.value=decodeURIComponent(T),J())}M.stopPropagation();M.preventDefault()}),!1)}};u.appendChild(E);u.appendChild(d);mxUtils.br(u);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+
+":");u.appendChild(k);var G=document.createElement("input");G.setAttribute("type","text");G.style.width="60px";G.style.marginLeft="8px";G.style.marginRight="16px";G.value=null==f||H?"":f.width;u.appendChild(G);mxUtils.write(u,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==f||H?"":f.height;u.appendChild(R);mxUtils.br(u);mxUtils.br(u);mxEvent.addListener(d,"change",
+J);ImageDialog.filePicked=function(B){B.action==google.picker.Action.PICKED&&null!=B.docs[0].thumbnails&&(B=B.docs[0].thumbnails[B.docs[0].thumbnails.length-1],null!=B&&(d.value=B.url,J()));d.focus()};u.appendChild(K);u.appendChild(g);mxUtils.br(u);mxUtils.br(u);H?(K.setAttribute("checked","checked"),K.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!F&&K.checked&&(mxUtils.write(t,mxResources.get("pageNotFound")),t.setAttribute("disabled","disabled"),t.setAttribute("selected","selected"),
t.setAttribute("value","pageNotFound"),g.appendChild(t),mxEvent.addListener(g,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)}));f=document.createElement("div");f.style.display=l?"inline-flex":"none";f.style.alignItems="center";f.style.cursor="default";f.style.minWidth="40%";f.style.height="20px";var V=document.createElement("input");V.setAttribute("type","checkbox");V.style.margin="0px 10px 0px 4px";V.style.verticalAlign="bottom";V.defaultChecked=c!=mxConstants.NONE&&
null!=c;V.checked=V.defaultChecked;f.appendChild(V);mxUtils.write(f,mxResources.get("fillColor"));l=f.cloneNode(!1);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.style.margin="0px 10px 0px 30px";Q.style.verticalAlign="bottom";Q.defaultChecked=p.shadowVisible;Q.checked=Q.defaultChecked;l.appendChild(Q);mxUtils.write(l,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||Q.setAttribute("disabled","disabled");mxEvent.addListener(l,"click",function(B){mxEvent.getSource(B)!=
-Q&&(Q.checked=!Q.checked)});var P=document.createElement("button");P.style.width="36px";P.style.height="18px";P.style.cursor="pointer";P.style.marginLeft="10px";P.style.backgroundPosition="center center";P.style.backgroundRepeat="no-repeat";P.style.verticalAlign="bottom";P.className="geColorBtn";var q=c;n();mxEvent.addListener(f,"click",function(B){mxEvent.getSource(B)!=V&&(V.checked=!V.checked);q=V.checked?"#ffffff":null;n()});mxEvent.addListener(P,"click",function(B){b.pickColor(q||"none",function(C){q=
-C;n()});mxEvent.consume(B)});f.appendChild(P);u.appendChild(f);u.appendChild(l);mxUtils.br(u);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);l=mxUtils.button(mxResources.get("reset"),function(){d.value="";E.value="";R.value="";F.checked=!0;q=mxConstants.NONE;n();x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className=
+Q&&(Q.checked=!Q.checked)});var O=document.createElement("button");O.style.width="36px";O.style.height="18px";O.style.cursor="pointer";O.style.marginLeft="10px";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.verticalAlign="bottom";O.className="geColorBtn";var q=c;n();mxEvent.addListener(f,"click",function(B){mxEvent.getSource(B)!=V&&(V.checked=!V.checked);q=V.checked?"#ffffff":null;n()});mxEvent.addListener(O,"click",function(B){b.pickColor(q||"none",function(C){q=
+C;n()});mxEvent.consume(B)});f.appendChild(O);u.appendChild(f);u.appendChild(l);mxUtils.br(u);c=document.createElement("div");c.style.marginTop="30px";c.style.textAlign="right";p=mxUtils.button(mxResources.get("cancel"),function(){x=!0;b.hideDialog()});p.className="geBtn";b.editor.cancelFirst&&c.appendChild(p);l=mxUtils.button(mxResources.get("reset"),function(){d.value="";G.value="";R.value="";E.checked=!0;q=mxConstants.NONE;n();x=!1});mxEvent.addGestureListeners(l,function(){x=!0});l.className=
"geBtn";l.width="100";c.appendChild(l);if(Graph.fileSupport){var y=document.createElement("input");y.setAttribute("multiple","multiple");y.setAttribute("type","file");mxEvent.addListener(y,"change",function(B){null!=y.files&&(D(y.files),y.type="",y.type="file",y.value="")});y.style.display="none";u.appendChild(y);l=mxUtils.button(mxResources.get("open"),function(){y.click()});l.className="geBtn";c.appendChild(l)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();J(null,function(B){e(""!=
-B&&null!=B?new mxImage(B,E.value,R.value):null,null==B,q,!mxClient.IS_SVG||mxClient.IS_SF?null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){A=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(p);u.appendChild(c);this.container=u},ParseDialog=function(b,e,f){function c(g,k,v){var t=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,
+B&&null!=B?new mxImage(B,G.value,R.value):null,null==B,q,!mxClient.IS_SVG||mxClient.IS_SF?null:Q.checked)})});mxEvent.addGestureListeners(applyBtn,function(){A=!0});applyBtn.className="geBtn gePrimaryBtn";c.appendChild(applyBtn);b.editor.cancelFirst||c.appendChild(p);u.appendChild(c);this.container=u},ParseDialog=function(b,e,f){function c(g,k,v){var t=g.split("\n");if("plantUmlPng"==k||"plantUmlSvg"==k||"plantUmlTxt"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var x=function(T,
m,z,I,L){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,I,L));var N=null;A.getModel().beginUpdate();try{N="txt"==m?b.insertAsPreText(z,n.x,n.y):A.insertVertex(null,null,null,n.x,n.y,I,L,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(z)+";"),A.setAttributeForCell(N,"plantUmlData",JSON.stringify({data:T,format:m},null,2))}finally{A.getModel().endUpdate()}null!=N&&(A.setSelectionCell(N),A.scrollCellToVisible(N))},A=b.editor.graph,J="plantUmlTxt"==
k?"txt":"plantUmlPng"==k?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==g&&"svg"==J?window.setTimeout(function(){b.spinner.stop();x(g,J,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(g,J,function(T,m,z){b.spinner.stop();x(g,J,T,m,z)},function(T){b.handleError(T)})}}else if("mermaid"==k||"mermaid2drawio"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var D=0;D<t.length&&(0==t[D].trim().length||"%%"==t[D].substring(0,2));)D++;if("---"==t[D].trim()){do D++;while(D<t.length&&"---"!=t[D].trim());D++}D=t[D].trim().toLowerCase();t=D.indexOf(" ");D=D.substring(0,0<t?t:D.length);var E="undefined"!==typeof mxMermaidToDrawio&&
-"mermaid2drawio"==k&&("graph"==D||"flowchart"==D||"sequencediagram"==D||"classdiagram"==D||"statediagram-v2"==D||"statediagram"==D||"erdiagram"==D||"requirementdiagram"==D||"gitgraph"==D||"mindmap"==D||"journey"==D);A=b.editor.graph;E&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();A.setSelectionCells(b.importXml(T,Math.max(n.x,20),Math.max(n.y,20),!0,null,null,!0));A.scrollCellToVisible(A.getSelectionCell())}));b.generateMermaidImage(g,null,function(T,m,z){if(!E){n=
+295,212)},200):b.generatePlantUmlImage(g,J,function(T,m,z){b.spinner.stop();x(g,J,T,m,z)},function(T){b.handleError(T)})}}else if("mermaid"==k||"mermaid2drawio"==k){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var D=0;D<t.length&&(0==t[D].trim().length||"%%"==t[D].substring(0,2));)D++;if("---"==t[D].trim()){do D++;while(D<t.length&&"---"!=t[D].trim());D++}D=t[D].trim().toLowerCase();t=D.indexOf(" ");D=D.substring(0,0<t?t:D.length);var G="undefined"!==typeof mxMermaidToDrawio&&
+"mermaid2drawio"==k&&("graph"==D||"flowchart"==D||"sequencediagram"==D||"classdiagram"==D||"statediagram-v2"==D||"statediagram"==D||"erdiagram"==D||"requirementdiagram"==D||"gitgraph"==D||"mindmap"==D||"journey"==D);A=b.editor.graph;G&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();A.setSelectionCells(b.importXml(T,Math.max(n.x,20),Math.max(n.y,20),!0,null,null,!0));A.scrollCellToVisible(A.getSelectionCell())}));b.generateMermaidImage(g,null,function(T,m,z){if(!G){n=
mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(new mxRectangle(0,0,m,z));b.spinner.stop();var I=null;A.getModel().beginUpdate();try{I=A.insertVertex(null,null,null,n.x,n.y,m,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),A.setAttributeForCell(I,"mermaidData",JSON.stringify({data:g},null,2))}finally{A.getModel().endUpdate()}null!=I&&(A.setSelectionCell(I),A.scrollCellToVisible(I))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==
-k){k=null;var R=[],V=0,Q={};for(D=0;D<t.length;D++){var P=mxUtils.trim(t[D]);if("primary key"==P.substring(0,11).toLowerCase()){var q=P.match(/\((.+)\)/);q&&q[1]&&(Q[q[1]]=!0);t.splice(D,1)}else 0<P.toLowerCase().indexOf("primary key")&&(Q[P.split(" ")[0]]=!0,t[D]=mxUtils.trim(P.replace(/primary key/i,"")))}for(D=0;D<t.length;D++)if(P=mxUtils.trim(t[D]),"create table"==P.substring(0,12).toLowerCase())P=mxUtils.trim(P.substring(12)),"("==P.charAt(P.length-1)&&(P=mxUtils.trim(P.substring(0,P.length-
-1))),k=new mxCell(P,new mxGeometry(V,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,R.push(k),P=b.editor.graph.getPreferredSizeForCell(y),null!=P&&(k.geometry.width=P.width+10);else if(null!=k&&")"==P.charAt(0))V+=k.geometry.width+40,k=null;else if("("!=P&&null!=k){P=P.substring(0,","==P.charAt(P.length-1)?P.length-1:P.length);q=Q[P.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,
-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var B=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));B.vertex=!0;y.insert(B);P=new mxCell(P,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));P.vertex=!0;y.insert(P);P=b.editor.graph.getPreferredSizeForCell(P);null!=P&&k.geometry.width<P.width+30&&(k.geometry.width=Math.min(320,Math.max(k.geometry.width,P.width+30)));k.insert(y,q?0:null);k.geometry.height+=30}0<R.length&&(A=b.editor.graph,n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,
-!0)),A.setSelectionCells(A.importCells(R,n.x,n.y)),A.scrollCellToVisible(A.getSelectionCell()))}else if("list"==k){if(0<t.length){A=b.editor.graph;k=null;R=[];for(D=y=0;D<t.length;D++)";"!=t[D].charAt(0)&&(0==t[D].length?k=null:null==k?(k=new mxCell(t[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),k.vertex=!0,R.push(k),P=A.getPreferredSizeForCell(k),
-null!=P&&k.geometry.width<P.width+10&&(k.geometry.width=P.width+10),y+=k.geometry.width+40):"--"==t[D]?(P=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),P.vertex=!0,k.geometry.height+=P.geometry.height,k.insert(P)):0<t[D].length&&(V=new mxCell(t[D],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-V.vertex=!0,P=A.getPreferredSizeForCell(V),null!=P&&V.geometry.width<P.width&&(V.geometry.width=P.width),k.geometry.width=Math.max(k.geometry.width,V.geometry.width),k.geometry.height+=V.geometry.height,k.insert(V)));if(0<R.length){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0));A.getModel().beginUpdate();try{R=A.importCells(R,n.x,n.y);P=[];for(D=0;D<R.length;D++)P.push(R[D]),P=P.concat(R[D].children);A.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{A.getModel().endUpdate()}A.setSelectionCells(R);
+k){k=null;var R=[],V=0,Q={};for(D=0;D<t.length;D++){var O=mxUtils.trim(t[D]);if("primary key"==O.substring(0,11).toLowerCase()){var q=O.match(/\((.+)\)/);q&&q[1]&&(Q[q[1]]=!0);t.splice(D,1)}else 0<O.toLowerCase().indexOf("primary key")&&(Q[O.split(" ")[0]]=!0,t[D]=mxUtils.trim(O.replace(/primary key/i,"")))}for(D=0;D<t.length;D++)if(O=mxUtils.trim(t[D]),"create table"==O.substring(0,12).toLowerCase())O=mxUtils.trim(O.substring(12)),"("==O.charAt(O.length-1)&&(O=mxUtils.trim(O.substring(0,O.length-
+1))),k=new mxCell(O,new mxGeometry(V,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),k.vertex=!0,R.push(k),O=b.editor.graph.getPreferredSizeForCell(y),null!=O&&(k.geometry.width=O.width+10);else if(null!=k&&")"==O.charAt(0))V+=k.geometry.width+40,k=null;else if("("!=O&&null!=k){O=O.substring(0,","==O.charAt(O.length-1)?O.length-1:O.length);q=Q[O.split(" ")[0]];var y=new mxCell("",new mxGeometry(0,
+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(q?"1":"0")+";");y.vertex=!0;var B=new mxCell(q?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(q?"fontStyle=1;":""));B.vertex=!0;y.insert(B);O=new mxCell(O,new mxGeometry(30,
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(q?"fontStyle=5;":""));O.vertex=!0;y.insert(O);O=b.editor.graph.getPreferredSizeForCell(O);null!=O&&k.geometry.width<O.width+30&&(k.geometry.width=Math.min(320,Math.max(k.geometry.width,O.width+30)));k.insert(y,q?0:null);k.geometry.height+=30}0<R.length&&(A=b.editor.graph,n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,
+!0)),A.setSelectionCells(A.importCells(R,n.x,n.y)),A.scrollCellToVisible(A.getSelectionCell()))}else if("list"==k){if(0<t.length){A=b.editor.graph;k=null;R=[];for(D=y=0;D<t.length;D++)";"!=t[D].charAt(0)&&(0==t[D].length?k=null:null==k?(k=new mxCell(t[D],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),k.vertex=!0,R.push(k),O=A.getPreferredSizeForCell(k),
+null!=O&&k.geometry.width<O.width+10&&(k.geometry.width=O.width+10),y+=k.geometry.width+40):"--"==t[D]?(O=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),O.vertex=!0,k.geometry.height+=O.geometry.height,k.insert(O)):0<t[D].length&&(V=new mxCell(t[D],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+V.vertex=!0,O=A.getPreferredSizeForCell(V),null!=O&&V.geometry.width<O.width&&(V.geometry.width=O.width),k.geometry.width=Math.max(k.geometry.width,V.geometry.width),k.geometry.height+=V.geometry.height,k.insert(V)));if(0<R.length){n=mxEvent.isAltDown(v)?n:A.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0));A.getModel().beginUpdate();try{R=A.importCells(R,n.x,n.y);O=[];for(D=0;D<R.length;D++)O.push(R[D]),O=O.concat(R[D].children);A.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{A.getModel().endUpdate()}A.setSelectionCells(R);
A.scrollCellToVisible(A.getSelectionCell())}}}else{y=function(T){var m=C[T];null==m&&(m=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),m.vertex=!0,C[T]=m,R.push(m));return m};var C={};R=[];for(D=0;D<t.length;D++)if(";"!=t[D].charAt(0)){var M=t[D].split("->");2<=M.length&&(q=y(M[0]),B=y(M[M.length-1]),M=new mxCell(2<M.length?M[1]:"",new mxGeometry),M.edge=!0,M.geometry.relative=!0,q.insertEdge(M,!0),B.insertEdge(M,!1),R.push(M))}if(0<R.length){t=document.createElement("div");t.style.visibility=
-"hidden";document.body.appendChild(t);A=new Graph(t);A.getModel().beginUpdate();try{R=A.importCells(R);for(D=0;D<R.length;D++)A.getModel().isVertex(R[D])&&(P=A.getPreferredSizeForCell(R[D]),R[D].geometry.width=Math.max(R[D].geometry.width,P.width),R[D].geometry.height=Math.max(R[D].geometry.height,P.height));D=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(A,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(A.getDefaultParent(),R),D=!1):"circle"==
-k?(new mxCircleLayout(A)).execute(A.getDefaultParent()):(V=new mxFastOrganicLayout(A),V.disableEdgeStyle=!1,V.forceConstant=180,V.execute(A.getDefaultParent()));D&&(Q=new mxParallelEdgeLayout(A),Q.spacing=30,Q.execute(A.getDefaultParent()))}finally{A.getModel().endUpdate()}A.clearCellOverlays();P=[];b.editor.graph.getModel().beginUpdate();try{R=A.getModel().getChildren(A.getDefaultParent()),n=mxEvent.isAltDown(v)?n:b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0)),P=b.editor.graph.importCells(R,
-n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",P))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(P);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());A.destroy();t.parentNode.removeChild(t)}}}function l(){return"list"==u.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==u.value||
+"hidden";document.body.appendChild(t);A=new Graph(t);A.getModel().beginUpdate();try{R=A.importCells(R);for(D=0;D<R.length;D++)A.getModel().isVertex(R[D])&&(O=A.getPreferredSizeForCell(R[D]),R[D].geometry.width=Math.max(R[D].geometry.width,O.width),R[D].geometry.height=Math.max(R[D].geometry.height,O.height));D=!0;"horizontalFlow"==k||"verticalFlow"==k?((new mxHierarchicalLayout(A,"horizontalFlow"==k?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(A.getDefaultParent(),R),D=!1):"circle"==
+k?(new mxCircleLayout(A)).execute(A.getDefaultParent()):(V=new mxFastOrganicLayout(A),V.disableEdgeStyle=!1,V.forceConstant=180,V.execute(A.getDefaultParent()));D&&(Q=new mxParallelEdgeLayout(A),Q.spacing=30,Q.execute(A.getDefaultParent()))}finally{A.getModel().endUpdate()}A.clearCellOverlays();O=[];b.editor.graph.getModel().beginUpdate();try{R=A.getModel().getChildren(A.getDefaultParent()),n=mxEvent.isAltDown(v)?n:b.editor.graph.getCenterInsertPoint(A.getBoundingBoxFromGeometry(R,!0)),O=b.editor.graph.importCells(R,
+n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",O))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(O);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());A.destroy();t.parentNode.removeChild(t)}}}function l(){return"list"==u.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==u.value||
"mermaid2drawio"==u.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==u.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==u.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==u.value||"plantUmlTxt"==u.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var n=b.editor.graph.getFreeInsertPoint();e=document.createElement("div");e.style.textAlign="right";var p=document.createElement("textarea");p.style.boxSizing="border-box";p.style.resize=
-"none";p.style.width="100%";p.style.height="354px";p.style.marginBottom="16px";var u=document.createElement("select");u.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())u.style.display="none";var G=document.createElement("option");G.setAttribute("value","list");mxUtils.write(G,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&u.appendChild(G);null!=f&&"fromText"!=f||G.setAttribute("selected","selected");G=document.createElement("option");
-G.setAttribute("value","table");mxUtils.write(G,mxResources.get("formatSql"));"formatSql"==f&&(u.appendChild(G),G.setAttribute("selected","selected"));G=document.createElement("option");G.setAttribute("value","mermaid");mxUtils.write(G,mxResources.get("image"));if("mermaid"==f)if("undefined"!==typeof mxMermaidToDrawio){var H=document.createElement("option");H.setAttribute("value","mermaid2drawio");H.setAttribute("selected","selected");mxUtils.write(H,mxResources.get("diagram"));u.appendChild(H)}else u.style.display=
-"none";u.appendChild(G);G=document.createElement("option");G.setAttribute("value","diagram");mxUtils.write(G,mxResources.get("diagram"));H=document.createElement("option");H.setAttribute("value","circle");mxUtils.write(H,mxResources.get("circle"));var F=document.createElement("option");F.setAttribute("value","horizontalFlow");mxUtils.write(F,mxResources.get("horizontalFlow"));var K=document.createElement("option");K.setAttribute("value","verticalFlow");mxUtils.write(K,mxResources.get("verticalFlow"));
-"plantUml"!=f&&"mermaid"!=f&&(u.appendChild(G),u.appendChild(H),u.appendChild(F),u.appendChild(K));G=document.createElement("option");G.setAttribute("value","plantUmlSvg");mxUtils.write(G,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&G.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","plantUmlPng");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");F=document.createElement("option");F.setAttribute("value",
-"plantUmlTxt");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(u.appendChild(G),u.appendChild(H),u.appendChild(F));var d=l();p.value=d;e.appendChild(p);this.init=function(){p.focus()};Graph.fileSupport&&(p.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),p.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=
-g.dataTransfer.files[0];var k=new FileReader;k.onload=function(v){p.value=v.target.result};k.readAsText(g)}},!1));e.appendChild(u);mxEvent.addListener(u,"change",function(){var g=l();if(0==p.value.length||p.value==d)d=g,p.value=d});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(G=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),G.className="geBtn",e.appendChild(G));G=mxUtils.button(mxResources.get("close"),
-function(){p.value==d?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});G.className="geBtn";b.editor.cancelFirst&&e.appendChild(G);H=mxUtils.button(mxResources.get("insert"),function(g){try{b.hideDialog(),c(p.value,u.value,g)}catch(k){b.handleError(k)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(G);this.container=e},NewDialog=function(b,e,f,c,l,n,p,u,G,H,F,K,d,g,k,v,t,x){function A(la){null!=la&&(ka=Ba=la?135:140);la=!0;
+"none";p.style.width="100%";p.style.height="354px";p.style.marginBottom="16px";var u=document.createElement("select");u.className="geBtn";if("formatSql"==f||"mermaid"==f&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())u.style.display="none";var F=document.createElement("option");F.setAttribute("value","list");mxUtils.write(F,mxResources.get("list"));"plantUml"!=f&&"mermaid"!=f&&u.appendChild(F);null!=f&&"fromText"!=f||F.setAttribute("selected","selected");F=document.createElement("option");
+F.setAttribute("value","table");mxUtils.write(F,mxResources.get("formatSql"));"formatSql"==f&&(u.appendChild(F),F.setAttribute("selected","selected"));F=document.createElement("option");F.setAttribute("value","mermaid");mxUtils.write(F,mxResources.get("image"));if("mermaid"==f)if("undefined"!==typeof mxMermaidToDrawio){var H=document.createElement("option");H.setAttribute("value","mermaid2drawio");H.setAttribute("selected","selected");mxUtils.write(H,mxResources.get("diagram"));u.appendChild(H)}else u.style.display=
+"none";u.appendChild(F);F=document.createElement("option");F.setAttribute("value","diagram");mxUtils.write(F,mxResources.get("diagram"));H=document.createElement("option");H.setAttribute("value","circle");mxUtils.write(H,mxResources.get("circle"));var E=document.createElement("option");E.setAttribute("value","horizontalFlow");mxUtils.write(E,mxResources.get("horizontalFlow"));var K=document.createElement("option");K.setAttribute("value","verticalFlow");mxUtils.write(K,mxResources.get("verticalFlow"));
+"plantUml"!=f&&"mermaid"!=f&&(u.appendChild(F),u.appendChild(H),u.appendChild(E),u.appendChild(K));F=document.createElement("option");F.setAttribute("value","plantUmlSvg");mxUtils.write(F,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==f&&F.setAttribute("selected","selected");H=document.createElement("option");H.setAttribute("value","plantUmlPng");mxUtils.write(H,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");E=document.createElement("option");E.setAttribute("value",
+"plantUmlTxt");mxUtils.write(E,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(u.appendChild(F),u.appendChild(H),u.appendChild(E));var d=l();p.value=d;e.appendChild(p);this.init=function(){p.focus()};Graph.fileSupport&&(p.addEventListener("dragover",function(g){g.stopPropagation();g.preventDefault()},!1),p.addEventListener("drop",function(g){g.stopPropagation();g.preventDefault();if(0<g.dataTransfer.files.length){g=
+g.dataTransfer.files[0];var k=new FileReader;k.onload=function(v){p.value=v.target.result};k.readAsText(g)}},!1));e.appendChild(u);mxEvent.addListener(u,"change",function(){var g=l();if(0==p.value.length||p.value==d)d=g,p.value=d});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(F=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),F.className="geBtn",e.appendChild(F));F=mxUtils.button(mxResources.get("close"),
+function(){p.value==d?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});F.className="geBtn";b.editor.cancelFirst&&e.appendChild(F);H=mxUtils.button(mxResources.get("insert"),function(g){try{b.hideDialog(),c(p.value,u.value,g)}catch(k){b.handleError(k)}});H.className="geBtn gePrimaryBtn";e.appendChild(H);b.editor.cancelFirst||e.appendChild(F);this.container=e},NewDialog=function(b,e,f,c,l,n,p,u,F,H,E,K,d,g,k,v,t,x){function A(la){null!=la&&(ka=Ba=la?135:140);la=!0;
if(null!=Ua)for(;m<Ua.length&&(la||0!=mxUtils.mod(m,30));){var va=Ua[m++];va=q(va.url,va.libs,va.title,va.tooltip?va.tooltip:va.title,va.select,va.imgUrl,va.info,va.onClick,va.preview,va.noImg,va.clibs,va.type);la&&va.click();la=!1}}function J(la,va,ta,na,ra,za){if(null!=la&&mxUtils.isAncestorNode(document.body,na)){la=mxUtils.parseXml(la);la=Editor.parseDiagramNode(la.documentElement,null,!0);var Ga=new mxCodec(la.ownerDocument),Ia=new mxGraphModel;Ga.decode(la,Ia);b.sidebar.createTooltip(na,Ia.root.children,
Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=ra?mxResources.get(ra):null,!0,new mxPoint(va,ta),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=za&&R(na,null,null,za,infoObj,clibs)},!0,!1)}}function D(){var la=document.createElement("div");la.style.position="absolute";la.style.overflow="visible";
la.style.left="8px";la.style.right="8px";la.style.bottom="8px";la.style.top="8px";mxUtils.write(la,mxResources.get("describeYourDiagram")+":");mxUtils.br(la);var va=document.createElement("input");va.setAttribute("type","text");va.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));va.style.width="100%";va.style.marginTop="6px";va.style.marginBottom="4px";va.style.boxSizing="border-box";la.appendChild(va);la.init=function(){va.focus()};mxUtils.br(la);var ta=document.createElement("div");
@@ -12370,21 +12373,21 @@ Ia);ra.appendChild(na)}var Pa=mxUtils.button(mxResources.get("generate"),functio
1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ta.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ha,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ha=aa=Qa;Qa=L.cloneNode(!0);ta.appendChild(Qa);Ya=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ha=function(gb){S||J(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,
Ya,null,Ha);mxEvent.addGestureListeners(Qa,Ya,null,Ha)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";na=function(){window.setTimeout(function(){""!=va.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};za=urlParams["smart-template"];null!=za&&"1"!=za&&(va.value=decodeURIComponent(za),na(),"1"==urlParams["smart-template-generate"]&&
window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(va,"change",na);mxEvent.addListener(va,"keydown",na);mxEvent.addListener(va,"cut",na);mxEvent.addListener(va,"paste",na);mxEvent.addListener(va,"keydown",function(La){13==La.keyCode&&Pa.click()});na=document.createElement("div");na.style.height="40px";na.style.marginTop="4px";na.style.marginBottom="4px";na.style.whiteSpace="nowrap";na.style.overflowX="auto";na.style.overflowY="hidden";na.appendChild(ra);na.appendChild(Pa);la.appendChild(na);
-la.appendChild(ta);return la}function E(){null!=aa&&aa==ha&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:xa});if(ia&&null!=g)f||b.hideDialog(),g(ia,oa,T.value);else if(c)f||b.hideDialog(),c(aa,T.value,pa,ca);else{var la=T.value;if(null!=la&&0<la.length){var va=function(na,ra,za){b.createFile(za,aa,null!=ca&&0<ca.length?ca:null,na,function(){b.hideDialog()},null,ra,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,
+la.appendChild(ta);return la}function G(){null!=aa&&aa==ha&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:xa});if(ia&&null!=g)f||b.hideDialog(),g(ia,oa,T.value);else if(c)f||b.hideDialog(),c(aa,T.value,pa,ca);else{var la=T.value;if(null!=la&&0<la.length){var va=function(na,ra,za){b.createFile(za,aa,null!=ca&&0<ca.length?ca:null,na,function(){b.hideDialog()},null,ra,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ta=new SaveDialog(b,
la,mxUtils.bind(this,function(na,ra,za){va(ra,za,na.value)}),null,null,null,null,b.mode);b.showDialog(ta.container,420,150,!0,!1);ta.init()}else b.pickFolder(b.mode,function(na){va(b.mode,na,la)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(la,va,ta,na,ra,za,Ga){return da!=la?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility=
"visible"),da==sa&&(sa.style.backgroundImage=Ea,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",wa.style.visibility="hidden",Ca.style.visibility="hidden",Fa.style.visibility="hidden",Aa.style.visibility="hidden",Da.style.visibility=null!=ha?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=la.style.backgroundImage&&0<la.getElementsByTagName("table").length&&(la.getElementsByTagName("table")[0].style.visibility=
-"hidden"),la==sa&&(va=ha,null!=va?(Da.style.visibility="visible",Da.style.visibility=null!=ha?"visible":"hidden",Aa.style.visibility="visible"):(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="hidden",Da.style.visibility="hidden")),I.removeAttribute("disabled"),aa=va,ca=ta,fa=za,da=la,ia=na,pa=Ga,oa=ra,da.style.border=G,!0):!1}function V(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";wa.style.visibility=
-"visible";Ca.style.visibility="visible";Fa.style.visibility="visible";Aa.style.visibility="hidden";Da.style.visibility="hidden";wa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?wa.select():document.execCommand("selectAll",!1,null)}function Q(){wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";sa.style.backgroundImage=Ea;sa.style.backgroundSize="contain";Aa.style.visibility="visible";Da.style.visibility="visible"}function P(la){var va=mxUtils.trim(wa.value);
+"hidden"),la==sa&&(va=ha,null!=va?(Da.style.visibility="visible",Da.style.visibility=null!=ha?"visible":"hidden",Aa.style.visibility="visible"):(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="hidden",Da.style.visibility="hidden")),I.removeAttribute("disabled"),aa=va,ca=ta,fa=za,da=la,ia=na,pa=Ga,oa=ra,da.style.border=F,!0):!1}function V(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";wa.style.visibility=
+"visible";Ca.style.visibility="visible";Fa.style.visibility="visible";Aa.style.visibility="hidden";Da.style.visibility="hidden";wa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?wa.select():document.execCommand("selectAll",!1,null)}function Q(){wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";sa.style.backgroundImage=Ea;sa.style.backgroundSize="contain";Aa.style.visibility="visible";Da.style.visibility="visible"}function O(la){var va=mxUtils.trim(wa.value);
if(la||""==va)null!=xa&&(wa.value=xa,Q());else{wa.style.visibility="hidden";Ca.style.visibility="hidden";Fa.style.visibility="hidden";var ta=!1;la='Write a detailed and complex MermaidJS declaration for "'+(""!=va?va:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(na){na!=b.emptyDiagramXml&&(ta=!0,aa=na)}));sa.style.backgroundImage="url("+Editor.spinImage+
")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(la,function(na,ra,za,Ga){da==sa&&"hidden"==wa.style.visibility&&(Ea="url(data:image/svg+xml;base64,"+ra.substring(ra.indexOf(",")+1)+")",sa.setAttribute("title",va),ha=aa=na=ta?aa:b.createMermaidXml(na,EditorUi.defaultMermaidConfig,ra,za,Ga,va),xa=va,Q())},function(na){da==sa&&(wa.style.visibility="visible",Ca.style.visibility="visible",Fa.style.visibility="visible",Aa.style.visibility="visible",Da.style.visibility="visible",b.handleError(na))})}}
-function q(la,va,ta,na,ra,za,Ga,Ia,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==la||N||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=O){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+
-O.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+O.naturalWidth+'" height="'+O.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";J(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,N=!0,Ma(la,function(hb){if(N&&b.sidebar.currentElt==Ha)try{J(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}N=!1})}function Ya(){var Oa=document.createElement("table");
+function q(la,va,ta,na,ra,za,Ga,Ia,Pa,La,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==la||N||b.sidebar.currentElt==Ha)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=P){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+
+P.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+P.naturalWidth+'" height="'+P.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";J(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ta,la)}else b.sidebar.currentElt=Ha,N=!0,Ma(la,function(hb){if(N&&b.sidebar.currentElt==Ha)try{J(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ha,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}N=!1})}function Ya(){var Oa=document.createElement("table");
Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius=
"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ka-34+"px";mxUtils.write(Za,mxResources.get(ta,null,ta));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ha=null;if("generative"!=Va||null==sa){Ha=document.createElement("div");Ha.className="geTemplate geAdaptiveAsset";Ha.style.backgroundOrigin="content-box";Ha.style.backgroundPosition="center center";Ha.style.backgroundRepeat="no-repeat";
Ha.style.backgroundSize="contain";Ha.style.boxSizing="border-box";Ha.style.borderRadius="12px";Ha.style.position="relative";Ha.style.height=ka+"px";Ha.style.width=Ba+"px";Ha.style.padding="4px";Ha.style.border="2px solid transparent";var fb=null,Ta=la;null!=ta?Ha.setAttribute("title",mxResources.get(ta,null,ta)):null!=na&&0<na.length&&Ha.setAttribute("title",na)}else Ha=sa;if(null!=za){Ha.style.display="inline-flex";Ha.style.justifyContent="center";Ha.style.alignItems="center";ra=document.createElement("img");
-ra.setAttribute("src",za);ra.setAttribute("alt",na);ra.style.maxWidth=ka+"px";ra.style.maxHeight=Ba+"px";O=ra;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ra);ra.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga,Na)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){E();mxEvent.consume(Oa)})}else if(!La&&null!=la&&0<la.length){var gb=
-function(Oa){z.spin(qa)&&Ma(la,function(bb,cb){z.stop();null!=bb&&(R(Ha,bb,va,null,null,Na,cb),Oa&&E())})};za=Pa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Ha.style.backgroundImage="url("+za+")";null!=ta&&Ha.appendChild(Ya());mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ha.appendChild(Ya()),"generative"==Va&&null==sa&&(Ha.style.backgroundImage=Ea,Ha.style.overflow="visible",
-Ha.appendChild(Da),Ha.appendChild(Aa),Ha.appendChild(wa),Ha.appendChild(Ca),Ha.appendChild(Fa),sa=Ha),ra&&R(Ha),null!=Ia?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga)})),mxEvent.addListener(Ha,"click",Ia)):(mxEvent.addListener(Ha,"click",function(Oa){R(Ha,null,null,la,Ga)&&"generative"==Va&&null==ha&&V()}),mxEvent.addListener(Ha,"dblclick",function(Oa){"generative"!=Va?E():"hidden"==wa.style.visibility&&V();mxEvent.consume(Oa)}));null!=la&&(za=L.cloneNode(!0),
+ra.setAttribute("src",za);ra.setAttribute("alt",na);ra.style.maxWidth=ka+"px";ra.style.maxHeight=Ba+"px";P=ra;var ib=za.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ha.appendChild(ra);ra.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga,Na)}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){G();mxEvent.consume(Oa)})}else if(!La&&null!=la&&0<la.length){var gb=
+function(Oa){z.spin(qa)&&Ma(la,function(bb,cb){z.stop();null!=bb&&(R(Ha,bb,va,null,null,Na,cb),Oa&&G())})};za=Pa||TEMPLATE_PATH+"/"+la.substring(0,la.length-4)+".png";Ha.style.backgroundImage="url("+za+")";null!=ta&&Ha.appendChild(Ya());mxEvent.addGestureListeners(Ha,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ha,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ha.appendChild(Ya()),"generative"==Va&&null==sa&&(Ha.style.backgroundImage=Ea,Ha.style.overflow="visible",
+Ha.appendChild(Da),Ha.appendChild(Aa),Ha.appendChild(wa),Ha.appendChild(Ca),Ha.appendChild(Fa),sa=Ha),ra&&R(Ha),null!=Ia?(mxEvent.addGestureListeners(Ha,null,null,mxUtils.bind(this,function(Oa){R(Ha,null,null,la,Ga)})),mxEvent.addListener(Ha,"click",Ia)):(mxEvent.addListener(Ha,"click",function(Oa){R(Ha,null,null,la,Ga)&&"generative"==Va&&null==ha&&V()}),mxEvent.addListener(Ha,"dblclick",function(Oa){"generative"!=Va?G():"hidden"==wa.style.visibility&&V();mxEvent.consume(Oa)}));null!=la&&(za=L.cloneNode(!0),
Ha.appendChild(za),mxEvent.addGestureListeners(za,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ha}),null,null),mxEvent.addListener(za,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ta?ta:na);mxEvent.consume(Oa)})));qa.appendChild(Ha);return Ha}function y(){function la(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"&hellip;");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function va(Ma,Qa,Ya){mxEvent.addListener(Qa,
"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=p,qa.scrollTop=0,qa.innerText="",m=0,null!=Ja[Ma].content?(qa.appendChild(Ja[Ma].content),aa=ha,Ua=null,null!=Ja[Ma].content.init&&Ja[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:Ja[Ma],W=null,A(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(qa,"scroll",function(Ma){qa.scrollTop+qa.clientHeight>=qa.scrollHeight&&(A(),mxEvent.consume(Ma))}));if(0<ab){var ta=
document.createElement("div");ta.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ta,mxResources.get("custom"));ma.appendChild(ta);for(var na in Sa){var ra=document.createElement("div");ta=na;var za=Sa[na];18<ta.length&&(ta=ta.substring(0,18)+"&hellip;");ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";ra.setAttribute("title",ta+" ("+
@@ -12392,273 +12395,273 @@ za.length+")");mxUtils.write(ra,ra.getAttribute("title"));null!=H&&(ra.style.pad
za=null;if(null!=Ja[na].content)ra=document.createElement(Ga?"ul":"div"),ta=la(na),ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",ta),mxUtils.write(ra,ta),ma.appendChild(ra),ta=ra;else{var Ga=Ra[na];ta=ra=document.createElement(Ga?"ul":"div");za=Ja[na];var Ia=la(na,za);if(null!=Ga){za=document.createElement("li");var Pa=document.createElement("div");
Pa.className="geTempTreeCaret";Pa.setAttribute("title",Ia);mxUtils.write(Pa,Ia);ta=Pa;za.appendChild(Pa);Ia=document.createElement("ul");Ia.className="geTempTreeNested";Ia.style.visibility="hidden";for(var La in Ga){var Na=document.createElement("li"),Va=la(La,Ga[La]);Na.setAttribute("title",Va);mxUtils.write(Na,Va);va(na,Na,La);Ia.appendChild(Na)}za.appendChild(Ia);ra.className="geTempTree";ra.appendChild(za);(function(Ma,Qa){mxEvent.addListener(Qa,"click",function(){Ma.style.visibility="visible";
Ma.classList.toggle("geTempTreeActive");Ma.classList.toggle("geTempTreeNested")&&setTimeout(function(){Ma.style.visibility="hidden"},550);Qa.classList.toggle("geTempTreeCaret-down")})})(Ia,Pa)}else ra.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",ra.setAttribute("title",Ia),mxUtils.write(ra,Ia);null!=H&&(ra.style.padding=H);ma.appendChild(ra)}va(na,ta);null==Wa&&ta.click()}A(!1)}
-u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;p=null!=p?p:"light-dark(#ebf2f9, "+Editor.darkColor+")";G=null!=G?G:"2px dashed light-dark(#29b6f2, #00a8ff)";F=null!=F?F:EditorUi.templateFile;var B=document.createElement("div");B.style.userSelect="none";B.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";f&&B.appendChild(C);var M=document.createElement("img");M.setAttribute("border",
+u=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;l=null!=l?l:!1;p=null!=p?p:"light-dark(#ebf2f9, "+Editor.darkColor+")";F=null!=F?F:"2px dashed light-dark(#29b6f2, #00a8ff)";E=null!=E?E:EditorUi.templateFile;var B=document.createElement("div");B.style.userSelect="none";B.style.height="100%";var C=document.createElement("div");C.style.whiteSpace="nowrap";C.style.height="46px";f&&B.appendChild(C);var M=document.createElement("img");M.setAttribute("border",
"0");M.setAttribute("align","absmiddle");M.style.width="40px";M.style.height="40px";M.style.marginRight="10px";M.style.paddingBottom="4px";M.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?
IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||u||!f||C.appendChild(M);f&&mxUtils.write(C,(u?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");M=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?M=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?M=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?M=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=
b.gitHub?M=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?M=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(M=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+M);T.style.marginLeft="10px";T.style.width=e||u?"144px":"244px";this.init=function(){f&&Editor.selectFilename(T);null!=qa.parentNode&&null!=qa.parentNode.parentNode&&mxEvent.addGestureListeners(qa.parentNode.parentNode,mxUtils.bind(this,function(la){null!=b.sidebar&&
b.sidebar.hideTooltip()}),null,null)};f&&(C.appendChild(T),x?T.style.width=e||u?"350px":"450px":null!=b.editor.diagramFileTypes&&(x=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),x.style.marginLeft="6px",x.style.width=e||u?"80px":"180px",C.appendChild(x)));x=!1;var m=0,z=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),I=mxUtils.button(v||mxResources.get("create"),function(){I.setAttribute("disabled",
-"disabled");E();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";var L=document.createElement("img");L.setAttribute("src",Editor.magnifyImage);L.setAttribute("title",mxResources.get("preview"));L.className="geAdaptiveAsset geActiveButton";L.style.position="absolute";L.style.borderRadius="16px";L.style.background="white";L.style.cursor="default";L.style.padding="2px";L.style.opacity="0.8";L.style.height="16px";L.style.right="2px";L.style.top="2px";var N=!1,O=null,S=!1;if(K||d){var U=
+"disabled");G();I.removeAttribute("disabled")});I.className="geBtn gePrimaryBtn";var L=document.createElement("img");L.setAttribute("src",Editor.magnifyImage);L.setAttribute("title",mxResources.get("preview"));L.className="geAdaptiveAsset geActiveButton";L.style.position="absolute";L.style.borderRadius="16px";L.style.background="white";L.style.cursor="default";L.style.padding="2px";L.style.opacity="0.8";L.style.height="16px";L.style.right="2px";L.style.top="2px";var N=!1,P=null,S=!1;if(K||d){var U=
[],W=null,X=null,Z=null,Y=function(la){I.setAttribute("disabled","disabled");for(var va=0;va<U.length;va++)U[va].className=va==la?"geBtn gePrimaryBtn":"geBtn"};x=!0;v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.height="30px";B.appendChild(v);u=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ma.style.display="";ua.style.display="";qa.style.left="160px";Y(0);qa.scrollTop=0;qa.innerText="";m=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,ma.innerText="",y(),W=null)});U.push(u);
v.appendChild(u);var ba=function(la){ma.style.display="none";ua.style.display="none";qa.style.left="30px";Y(la?-1:1);null==W&&(W=Ua);qa.scrollTop=0;qa.innerText="";z.spin(qa);var va=function(ta,na,ra){m=0;z.stop();Ua=ta;ra=ra||{};var za=0,Ga;for(Ga in ra)za+=ra[Ga].length;if(na)qa.innerText=na;else if(0==ta.length&&0==za)qa.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(qa.innerText="",0<za){ma.style.display="";qa.style.left="160px";ma.innerText="";ab=0;Ja={"draw.io":ta};
for(Ga in ra)Ja[Ga]=ra[Ga];y()}else A(!0)};la?d(ea.value,va):K(va)};K&&(u=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),v.appendChild(u),U.push(u));if(d){u=document.createElement("span");u.style.marginLeft="10px";u.innerText=mxResources.get("search")+":";v.appendChild(u);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(la){13==la.keyCode&&ba(!0)});v.appendChild(ea);
u=mxUtils.button(mxResources.get("search"),function(){ba(!0)});u.className="geBtn";v.appendChild(u)}Y(0)}var ca=null,fa=null,aa=null,da=null,ia=null,pa=null,oa=null,ha=null,xa=null,qa=document.createElement("div");qa.style.border="1px solid #d3d3d3";qa.style.position="absolute";qa.style.left="160px";qa.style.right="34px";v=(f?72:40)+(x?30:0);qa.style.top=v+"px";qa.style.bottom="68px";qa.style.margin="6px 0 0 -1px";qa.style.padding="6px";qa.style.overflow="auto";var ua=document.createElement("div");
ua.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;height:22px;margin-top: 6px;white-space: nowrap;";var ya=document.createElement("input");ya.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";ya.setAttribute("placeholder",mxResources.get("search"));ya.setAttribute("type","text");ua.appendChild(ya);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));
ja.className="geAdaptiveAsset";ja.style.position="relative";ja.style.cursor="pointer";ja.style.opacity="0.5";ja.style.height="16px";ja.style.left="-20px";ja.style.top="4px";ja.style.background="url('"+b.editor.transparentImage+"')";ua.appendChild(ja);mxEvent.addListener(ja,"click",function(){ja.getAttribute("src")!=Editor.magnifyImage&&(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search")),ya.value="",null!=Xa&&(Xa.click(),Xa=null));ya.focus()});mxEvent.addListener(ya,
-"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var va=ya.value;if(""==va)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[F]){var ta={};for(Na in Ja)if(null==Ja[Na].content)for(var na=Ja[Na],ra=0;ra<na.length;ra++){var za=na[ra];if(null!=za.tags)for(var Ga=za.tags.toLowerCase().split(";"),Ia=0;Ia<Ga.length;Ia++)null==ta[Ga[Ia]]&&(ta[Ga[Ia]]=[]),ta[Ga[Ia]].push(za)}NewDialog.tagsList[F]=ta}var Pa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[F];if(0<ab&&null==ta.__tagsList__){for(Na in Sa)for(na=
+"keydown",mxUtils.bind(this,function(la){if(13==la.keyCode){var va=ya.value;if(""==va)null!=Xa&&(Xa.click(),Xa=null);else{if(null==NewDialog.tagsList[E]){var ta={};for(Na in Ja)if(null==Ja[Na].content)for(var na=Ja[Na],ra=0;ra<na.length;ra++){var za=na[ra];if(null!=za.tags)for(var Ga=za.tags.toLowerCase().split(";"),Ia=0;Ia<Ga.length;Ia++)null==ta[Ga[Ia]]&&(ta[Ga[Ia]]=[]),ta[Ga[Ia]].push(za)}NewDialog.tagsList[E]=ta}var Pa=va.toLowerCase().split(" ");ta=NewDialog.tagsList[E];if(0<ab&&null==ta.__tagsList__){for(Na in Sa)for(na=
Sa[Na],ra=0;ra<na.length;ra++)for(za=na[ra],Ga=za.title.split(" "),Ga.push(Na),Ia=0;Ia<Ga.length;Ia++){var La=Ga[Ia].toLowerCase();null==ta[La]&&(ta[La]=[]);ta[La].push(za)}ta.__tagsList__=!0}var Na=[];na={};for(ra=Ga=0;ra<Pa.length;ra++)if(0<Pa[ra].length){La=ta[Pa[ra]];var Va={};Na=[];if(null!=La)for(Ia=0;Ia<La.length;Ia++)za=La[Ia],0==Ga==(null==na[za.url])&&(Va[za.url]=!0,Na.push(za));na=Va;Ga++}qa.scrollTop=0;qa.innerText="";m=0;ta=document.createElement("div");ta.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
mxUtils.write(ta,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[va]));qa.appendChild(ta);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ta);Ua=Na;W=null;A(!1)}mxEvent.consume(la)}}));mxEvent.addListener(ya,"keyup",mxUtils.bind(this,function(la){""==ya.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));v+=23;var ma=document.createElement("div");
ma.style.cssText="position:absolute;left:30px;width:128px;top:"+v+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(qa,"scroll",function(){b.sidebar.hideTooltip()});var ka=140,Ba=ka,sa=null,Ea="url("+Editor.sparklesImage+")",wa=document.createElement("textarea");wa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));wa.style.position="absolute";wa.style.fontFamily="sans-serif";wa.style.outline="none";wa.style.left="0px";wa.style.right="0px";
wa.style.top="0px";wa.style.bottom="38px";wa.style.resize="none";wa.style.boxSizing="border-box";wa.style.fontSize="12px";wa.style.border="none";wa.style.margin="8px";var Ca=document.createElement("button");Ca.className="geBtn gePrimaryBtn";Ca.style.position="absolute";Ca.style.bottom="0px";Ca.style.height="30px";Ca.style.right="0px";Ca.style.left="0px";Ca.style.margin="8px";Ca.style.fontSize="14px";Ca.style.borderRadius="4px";Ca.setAttribute("disabled","disabled");Ca.setAttribute("title",mxResources.get("ok"));
mxUtils.write(Ca,mxResources.get("ok"));var Da=L.cloneNode(!0),Ka=!1;mxEvent.addGestureListeners(Da,function(la){Ka=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(la){if(!Ka&&null!=ha){var va="<mxfile><diagram>"+Graph.compress(ha)+"</diagram></mxfile>";J(va,mxEvent.getClientX(la),mxEvent.getClientY(la),sa,xa)}});var Aa=L.cloneNode(!0);Aa.setAttribute("src",Editor.editImage);Aa.setAttribute("title",mxResources.get("edit"));Aa.style.right="";Aa.style.left="2px";var Fa=
L.cloneNode(!0);Fa.setAttribute("src",Editor.helpImage);Fa.setAttribute("title",mxResources.get("help"));Fa.style.opacity="1";Fa.style.right="-8px";Fa.style.top="-8px";mxEvent.addListener(Fa,"click",function(la){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(la)});wa.style.visibility="hidden";Ca.style.visibility="hidden";Aa.style.visibility="hidden";Fa.style.visibility="hidden";Da.style.visibility="hidden";mxEvent.addListener(Aa,"click",V);mxEvent.addListener(wa,
-"input",function(){""!=wa.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){P()});mxEvent.addListener(wa,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(P(!0),mxEvent.consume(la)):(P(),mxEvent.consume(la))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==
+"input",function(){""!=wa.value?Ca.removeAttribute("disabled"):Ca.setAttribute("disabled","disabled")});mxEvent.addListener(Ca,"click",function(){O()});mxEvent.addListener(wa,"keydown",function(la){13!=la.keyCode||mxEvent.isShiftDown(la)?27==la.keyCode&&(O(!0),mxEvent.consume(la)):(O(),mxEvent.consume(la))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==
typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:D()});if(!e){var eb=function(){mxUtils.get($a,function(la){if(!jb){jb=!0;la=la.getXml().documentElement.firstChild;for(var va={};null!=la;){if("undefined"!==typeof la.getAttribute)if("parsererror"==la.nodeName)null!=window.console&&
-console.log("Parser error in "+F+": "+la.textContent);else if("clibs"==la.nodeName){for(var ta=la.getAttribute("name"),na=la.getElementsByTagName("add"),ra=[],za=0;za<na.length;za++)ra.push(encodeURIComponent(mxUtils.getTextContent(na[za])));null!=ta&&0<ra.length&&(va[ta]=ra.join(";"))}else if(ra=la.getAttribute("url"),null!=ra){na=la.getAttribute("section");ta=la.getAttribute("subsection");if(null==na&&(za=ra.indexOf("/"),na=ra.substring(0,za),null==ta)){var Ga=ra.indexOf("/",za+1);-1<Ga&&(ta=ra.substring(za+
+console.log("Parser error in "+E+": "+la.textContent);else if("clibs"==la.nodeName){for(var ta=la.getAttribute("name"),na=la.getElementsByTagName("add"),ra=[],za=0;za<na.length;za++)ra.push(encodeURIComponent(mxUtils.getTextContent(na[za])));null!=ta&&0<ra.length&&(va[ta]=ra.join(";"))}else if(ra=la.getAttribute("url"),null!=ra){na=la.getAttribute("section");ta=la.getAttribute("subsection");if(null==na&&(za=ra.indexOf("/"),na=ra.substring(0,za),null==ta)){var Ga=ra.indexOf("/",za+1);-1<Ga&&(ta=ra.substring(za+
1,Ga))}za=Ja[na];null==za&&(za=[],Ja[na]=za);ra=la.getAttribute("clibs");null!=va[ra]&&(ra=va[ra]);ra={url:la.getAttribute("url"),libs:la.getAttribute("libs"),title:la.getAttribute("title"),tooltip:la.getAttribute("name")||la.getAttribute("url"),preview:la.getAttribute("preview"),clibs:ra,tags:la.getAttribute("tags")};za.push(ra);null!=ta&&(za=Ra[na],null==za&&(za={},Ra[na]=za),na=za[ta],null==na&&(na=[],za[ta]=na),na.push(ra))}la=la.nextSibling}z.stop();y()}})};B.appendChild(ua);B.appendChild(ma);
-B.appendChild(qa);var jb=!1,$a=F;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));z.spin(qa);null!=t?t(function(la,va){Sa=la;Z=ab=va;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(la){b.dialog.container.firstChild==B&&13==la.keyCode&&E()});t=document.createElement("div");t.style.marginTop=e?"4px":"16px";t.style.textAlign="right";t.style.position="absolute";t.style.left="40px";t.style.bottom="24px";t.style.right="40px";v=mxUtils.button(mxResources.get("cancel"),
-function(){null!=n&&n();b.hideDialog(!0)});v.className="geBtn";!b.editor.cancelFirst||l&&null==n||t.appendChild(v);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(ta){aa=ta;ca=null;templateRealURl=va;b.hideDialog();E()},function(ta){b.handleError(ta)})},
+B.appendChild(qa);var jb=!1,$a=E;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));z.spin(qa);null!=t?t(function(la,va){Sa=la;Z=ab=va;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(la){b.dialog.container.firstChild==B&&13==la.keyCode&&G()});t=document.createElement("div");t.style.marginTop=e?"4px":"16px";t.style.textAlign="right";t.style.position="absolute";t.style.left="40px";t.style.bottom="24px";t.style.right="40px";v=mxUtils.button(mxResources.get("cancel"),
+function(){null!=n&&n();b.hideDialog(!0)});v.className="geBtn";!b.editor.cancelFirst||l&&null==n||t.appendChild(v);e||"1"==urlParams.embed||l||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var la=new FilenameDialog(b,"",mxResources.get("create"),function(va){null!=va&&0<va.length&&b.editor.loadUrl(b.editor.getProxiedUrl(va),function(ta){aa=ta;ca=null;templateRealURl=va;b.hideDialog();G()},function(ta){b.handleError(ta)})},
mxResources.get("url"),null,null,null,!1);b.showDialog(la.container,300,80,!0,!0);la.init()}),e.className="geBtn",t.appendChild(e));Graph.fileSupport&&k&&(k=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var la=document.createElement("input");la.setAttribute("multiple","multiple");la.setAttribute("type","file");mxEvent.addListener(la,"change",function(va){b.openFiles(la.files,!0);la.value=""});la.style.display="none";document.body.appendChild(la);b.newDlgFileInputElt=
la}b.newDlgFileInputElt.click()}),k.className="geBtn",t.appendChild(k));t.appendChild(I);b.editor.cancelFirst||null!=c||l&&null==n||t.appendChild(v);B.appendChild(t);this.container=B};NewDialog.tagsList={};
-var SaveDialog=function(b,e,f,c,l,n,p,u){function G(B,C,M,T,m,z){var I=null;if(null==c||0>mxUtils.indexOf(c,B))if(m=null!=m?m:b.getTitleForService(B),0<=mxUtils.indexOf(V,B)||null!=b.getServiceForName(B)){I=document.createElement("option");if("pick"==z)I.innerHTML=mxUtils.htmlEntities(m)+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",I.setAttribute("value","pickFolder-"+B),I.setAttribute("title",m+" - "+mxResources.get("pickFolder")+"...");else{var L=B+
-(null!=M?"-"+M:""),N=q[L];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var O=N.lastIndexOf("/");0<=O&&(N=N.substring(O+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}I.innerHTML=mxUtils.htmlEntities(m)+(null!=N?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(N):"");I.setAttribute("title",m+
-(null!=C?" ("+C+")":"")+(null!=M&&decodeURIComponent(M)!=C?" ["+M+"]":""));I.setAttribute("value",L);q[L]={option:I,mode:B,path:C,id:M};SaveDialog.lastValue==L&&null==u?T=!0:null==T&&("root"==z?T=null==u&&b.mode==B||null!=B&&B==u:"pickFolder-"==E.value.substring(0,11)&&(T=!0));T&&I.setAttribute("selected","selected")}E.appendChild(I)}return I}function H(B){b.pickFolder(B,function(C){var M=null;B==App.MODE_GOOGLE&&null!=C.docs&&0<C.docs.length?M={mode:B,path:C.docs[0].name,id:C.docs[0].id}:B==App.MODE_ONEDRIVE&&
-null!=C.value&&0<C.value.length?M={mode:B,path:C.value[0].name,id:OneDriveFile.prototype.getIdOf(C.value[0])}:(B==App.MODE_GITHUB||B==App.MODE_GITLAB)&&null!=C&&0<C.length&&(M={mode:B,path:decodeURIComponent(C),id:C});null!=M&&(R.style.display="",b.addRecent(M,"Folders",5),C=G(M.mode,M.path,M.id,!0),E.innerHTML="",q={},F(),M=E.selectedIndex,E.value=C.value,0>E.selectedIndex&&(E.selectedIndex=M))},!0,!0,!0,!0)}function F(){var B=b.getRecent("Folders"),C=0;if(null!=B&&0<B.length){for(var M=0;M<B.length;M++)null!=
-G(B[M].mode,B[M].path,B[M].id)&&C++;0<C&&E.appendChild(Q.cloneNode(!0))}G(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");G(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(G(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),G(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&G(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);G(App.MODE_GITHUB,null,null,null,null,"pick");G(App.MODE_GITLAB,null,
-null,null,null,"pick");G(App.MODE_TRELLO);B=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&B&&G(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&G(App.MODE_BROWSER);B&&G("download");Editor.popupsAllowed&&G("_blank",null,null,null,mxResources.get("openInNewWindow"));0<C&&(E.appendChild(Q.cloneNode(!0)),C=E.value,E.appendChild(R),
-E.value=C);if("pickFolder-"==E.value.substring(0,11)||"reset"==E.value)C=document.createElement("option"),C.setAttribute("value",""),C.setAttribute("selected","selected"),mxUtils.write(C,mxResources.get("pickFolder")+"..."),E.insertBefore(C,E.firstChild);P=E.value}function K(){if("reset"==E.value)b.resetRecent("Folders"),E.innerHTML="",E.value="",pickFolderOption=null,q={},F();else if("pickFolder-"==E.value.substring(0,11)){var B=E.value.substring(11);E.value=P;H(B)}else if(null!=D&&null!=q[E.value]&&
-null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[D.value].extension){B=b.getExtensionForService(q[E.value].mode);var C=J.value;null!=B&&0>e.indexOf(".")&&0>C.indexOf(".")&&(J.value=C+B)}y.innerHTML="";mxUtils.write(y,mxResources.get("download"==E.value||"_blank"==E.value?"ok":"save"));""==E.value?y.setAttribute("disabled","disabled"):y.removeAttribute("disabled")}var d=document.createElement("div");d.style.display="flex";d.style.flexWrap="wrap";d.style.whiteSpace="nowrap";var g=
+var SaveDialog=function(b,e,f,c,l,n,p,u){function F(B,C,M,T,m,z){var I=null;if(null==c||0>mxUtils.indexOf(c,B))if(m=null!=m?m:b.getTitleForService(B),0<=mxUtils.indexOf(V,B)||null!=b.getServiceForName(B)){I=document.createElement("option");if("pick"==z)I.innerHTML=mxUtils.htmlEntities(m)+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",I.setAttribute("value","pickFolder-"+B),I.setAttribute("title",m+" - "+mxResources.get("pickFolder")+"...");else{var L=B+
+(null!=M?"-"+M:""),N=q[L];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(B!=App.MODE_GITHUB&&B==App.MODE_GITLAB){var P=N.lastIndexOf("/");0<=P&&(N=N.substring(P+1))}40<N.length&&(N=N.substring(0,20)+"..."+N.substring(N.length-20))}I.innerHTML=mxUtils.htmlEntities(m)+(null!=N?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(N):"");I.setAttribute("title",m+
+(null!=C?" ("+C+")":"")+(null!=M&&decodeURIComponent(M)!=C?" ["+M+"]":""));I.setAttribute("value",L);q[L]={option:I,mode:B,path:C,id:M};SaveDialog.lastValue==L&&null==u?T=!0:null==T&&("root"==z?T=null==u&&b.mode==B||null!=B&&B==u:"pickFolder-"==G.value.substring(0,11)&&(T=!0));T&&I.setAttribute("selected","selected")}G.appendChild(I)}return I}function H(B){b.pickFolder(B,function(C){var M=null;B==App.MODE_GOOGLE&&null!=C.docs&&0<C.docs.length?M={mode:B,path:C.docs[0].name,id:C.docs[0].id}:B==App.MODE_ONEDRIVE&&
+null!=C.value&&0<C.value.length?M={mode:B,path:C.value[0].name,id:OneDriveFile.prototype.getIdOf(C.value[0])}:(B==App.MODE_GITHUB||B==App.MODE_GITLAB)&&null!=C&&0<C.length&&(M={mode:B,path:decodeURIComponent(C),id:C});null!=M&&(R.style.display="",b.addRecent(M,"Folders",5),C=F(M.mode,M.path,M.id,!0),G.innerHTML="",q={},E(),M=G.selectedIndex,G.value=C.value,0>G.selectedIndex&&(G.selectedIndex=M))},!0,!0,!0,!0)}function E(){var B=b.getRecent("Folders"),C=0;if(null!=B&&0<B.length){for(var M=0;M<B.length;M++)null!=
+F(B[M].mode,B[M].path,B[M].id)&&C++;0<C&&G.appendChild(Q.cloneNode(!0))}F(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");F(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(F(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),F(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&F(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);F(App.MODE_GITHUB,null,null,null,null,"pick");F(App.MODE_GITLAB,null,
+null,null,null,"pick");F(App.MODE_TRELLO);B=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&B&&F(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=c&&0<=mxUtils.indexOf(c,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&F(App.MODE_BROWSER);B&&F("download");Editor.popupsAllowed&&F("_blank",null,null,null,mxResources.get("openInNewWindow"));0<C&&(G.appendChild(Q.cloneNode(!0)),C=G.value,G.appendChild(R),
+G.value=C);if("pickFolder-"==G.value.substring(0,11)||"reset"==G.value)C=document.createElement("option"),C.setAttribute("value",""),C.setAttribute("selected","selected"),mxUtils.write(C,mxResources.get("pickFolder")+"..."),G.insertBefore(C,G.firstChild);O=G.value}function K(){if("reset"==G.value)b.resetRecent("Folders"),G.innerHTML="",G.value="",pickFolderOption=null,q={},E();else if("pickFolder-"==G.value.substring(0,11)){var B=G.value.substring(11);G.value=O;H(B)}else if(null!=D&&null!=q[G.value]&&
+null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[D.value].extension){B=b.getExtensionForService(q[G.value].mode);var C=J.value;null!=B&&0>e.indexOf(".")&&0>C.indexOf(".")&&(J.value=C+B)}y.innerHTML="";mxUtils.write(y,mxResources.get("download"==G.value||"_blank"==G.value?"ok":"save"));""==G.value?y.setAttribute("disabled","disabled"):y.removeAttribute("disabled")}var d=document.createElement("div");d.style.display="flex";d.style.flexWrap="wrap";d.style.whiteSpace="nowrap";var g=
document.createElement("div");g.style.display="grid";g.style.gap="5px 8px";g.style.gridAutoRows="auto auto 44px";g.style.gridAutoColumns="0fr minmax(0,1fr)";g.style.width="100%";var k=null,v=null;if(null!=l&&null!=n&&"image/"==n.substring(0,6)&&("image/svg"!=n.substring(0,9)||mxClient.IS_SVG)){g.style.display="inline-grid";g.style.flexBasis="75%";k=document.createElement("div");k.style.display="inline-block";k.style.height="auto";k.style.maxWidth="25%";k.style.margin="auto";var t=document.createElement("img"),
x=p?l:btoa(unescape(encodeURIComponent(l)));t.setAttribute("src","data:"+n+";base64,"+x);t.style.boxSizing="border-box";t.style.maxHeight="50px";t.style.maxWidth="100%";t.style.paddingLeft="10px";k.appendChild(t);mxClient.IS_FF||"image/png"!=n||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(v=mxUtils.button(mxResources.get("copy"),function(){var B=b.base64ToBlob(x,"image/png");B=new ClipboardItem({"image/png":B,"text/html":new Blob(['<img src="data:'+n+";base64,"+x+'">'],{type:"text/html"})});
navigator.clipboard.write([B]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(C){b.handleError(C)}))},null,"geBtn"));Editor.popupsAllowed&&(null==c||0>mxUtils.indexOf(c,"_blank"))?(k.setAttribute("title",mxResources.get("openInNewWindow")),k.style.cursor="pointer",mxEvent.addGestureListeners(k,null,null,function(B){mxEvent.isPopupTrigger(B)||b.openInNewWindow(l,n,p)})):k.setAttribute("title",mxResources.get("preview"))}t=document.createElement("div");
t.style.display="flex";t.style.padding="1px";t.style.alignItems="center";t.style.justifyContent="flex-end";t.style.gridColumn="1";t.style.whiteSpace="nowrap";var A=document.createElement("div");A.style.display="grid";A.style.padding="1px";A.style.alignItems="center";A.style.gridColumn="2";A.style.gridAutoColumns="minmax(0,1fr) auto";A.style.gap="6px";mxUtils.write(t,mxResources.get("saveAs")+":");var J=document.createElement("input");J.setAttribute("type","text");J.setAttribute("value",e);J.style.boxSizing=
-"border-box";J.style.width="100%";A.appendChild(J);g.appendChild(t);g.appendChild(A);var D=null;null!=b.editor.diagramFileTypes&&null==n&&(t=t.cloneNode(!1),A=A.cloneNode(!1),mxUtils.write(t,mxResources.get("type")+":"),D=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),D.style.boxSizing="border-box",D.style.width="100%",A.appendChild(D),g.appendChild(t),g.appendChild(A));t=t.cloneNode(!1);A=A.cloneNode(!1);mxUtils.write(t,mxResources.get("where")+":");var E=document.createElement("select");
-E.style.textOverflow="ellipsis";E.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var V=["browser","device","download","_blank"],Q=document.createElement("option");Q.setAttribute("disabled","disabled");Q.innerHTML="-----------------";var P=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=E.value;var B=q[SaveDialog.lastValue];null!=B&&f(J,B.mode,B.id)},null,"geBtn gePrimaryBtn");
-mxEvent.addListener(J,"keypress",function(B){13==B.keyCode&&y.click()});mxEvent.addListener(E,"change",K);F();K();A.appendChild(E);null!=SaveDialog.lastValue&&null!=q[SaveDialog.lastValue]&&(E.value=SaveDialog.lastValue);g.appendChild(t);g.appendChild(A);d.appendChild(g);null!=k&&d.appendChild(k);g=document.createElement("div");g.style.flexBasis="100%";g.style.textAlign="right";g.style.marginTop=null!=n?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));
-k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(k);null!=v&&g.appendChild(v);g.appendChild(y);b.editor.cancelFirst||g.appendChild(k);d.appendChild(g);this.init=function(){Editor.selectFilename(J)};this.container=d},CreateDialog=function(b,e,f,c,l,n,p,u,G,H,F,K,d,g,k,v,t){function x(P,q,y,B){function C(){mxEvent.addListener(M,"click",function(){var L=y;if(p){var N=D.value,O=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>O){L=null!=
-L?L:Q.value;var S="";L==App.MODE_GOOGLE?S=b.drive.extension:L==App.MODE_GITHUB?S=b.gitHub.extension:L==App.MODE_GITLAB?S=b.gitLab.extension:L==App.MODE_TRELLO?S=b.trello.extension:L==App.MODE_DROPBOX?S=b.dropbox.extension:L==App.MODE_ONEDRIVE?S=b.oneDrive.extension:L==App.MODE_DEVICE&&(S=".drawio");0<=O&&(N=N.substring(0,O));D.value=N+S}}A(y)})}var M=document.createElement("a");M.style.overflow="hidden";var T=document.createElement("img");T.src=P;T.setAttribute("border","0");T.setAttribute("align",
+"border-box";J.style.width="100%";A.appendChild(J);g.appendChild(t);g.appendChild(A);var D=null;null!=b.editor.diagramFileTypes&&null==n&&(t=t.cloneNode(!1),A=A.cloneNode(!1),mxUtils.write(t,mxResources.get("type")+":"),D=FilenameDialog.createFileTypes(b,J,b.editor.diagramFileTypes),D.style.boxSizing="border-box",D.style.width="100%",A.appendChild(D),g.appendChild(t),g.appendChild(A));t=t.cloneNode(!1);A=A.cloneNode(!1);mxUtils.write(t,mxResources.get("where")+":");var G=document.createElement("select");
+G.style.textOverflow="ellipsis";G.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var V=["browser","device","download","_blank"],Q=document.createElement("option");Q.setAttribute("disabled","disabled");Q.innerHTML="-----------------";var O=null,q={},y=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=G.value;var B=q[SaveDialog.lastValue];null!=B&&f(J,B.mode,B.id)},null,"geBtn gePrimaryBtn");
+mxEvent.addListener(J,"keypress",function(B){13==B.keyCode&&y.click()});mxEvent.addListener(G,"change",K);E();K();A.appendChild(G);null!=SaveDialog.lastValue&&null!=q[SaveDialog.lastValue]&&(G.value=SaveDialog.lastValue);g.appendChild(t);g.appendChild(A);d.appendChild(g);null!=k&&d.appendChild(k);g=document.createElement("div");g.style.flexBasis="100%";g.style.textAlign="right";g.style.marginTop=null!=n?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||g.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));
+k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&g.appendChild(k);null!=v&&g.appendChild(v);g.appendChild(y);b.editor.cancelFirst||g.appendChild(k);d.appendChild(g);this.init=function(){Editor.selectFilename(J)};this.container=d},CreateDialog=function(b,e,f,c,l,n,p,u,F,H,E,K,d,g,k,v,t){function x(O,q,y,B){function C(){mxEvent.addListener(M,"click",function(){var L=y;if(p){var N=D.value,P=N.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>P){L=null!=
+L?L:Q.value;var S="";L==App.MODE_GOOGLE?S=b.drive.extension:L==App.MODE_GITHUB?S=b.gitHub.extension:L==App.MODE_GITLAB?S=b.gitLab.extension:L==App.MODE_TRELLO?S=b.trello.extension:L==App.MODE_DROPBOX?S=b.dropbox.extension:L==App.MODE_ONEDRIVE?S=b.oneDrive.extension:L==App.MODE_DEVICE&&(S=".drawio");0<=P&&(N=N.substring(0,P));D.value=N+S}}A(y)})}var M=document.createElement("a");M.style.overflow="hidden";var T=document.createElement("img");T.src=O;T.setAttribute("border","0");T.setAttribute("align",
"absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";M.style.display="inline-block";M.className="geBaseButton";M.style.position="relative";M.style.margin="4px";M.style.padding="8px 8px 10px 8px";M.style.whiteSpace="nowrap";M.appendChild(T);M.style.color="gray";M.style.fontSize="11px";var m=document.createElement("div");M.appendChild(m);mxUtils.write(m,q);if(null!=B&&null==b[B]){T.style.visibility="hidden";mxUtils.setOpacity(m,10);var z=new Spinner({lines:12,length:12,
-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(M);var I=window.setTimeout(function(){null==b[B]&&(z.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(I),mxUtils.setOpacity(m,100),T.style.visibility="",z.stop(),C())}))}else C();R.appendChild(M);++V==K&&(mxUtils.br(R),V=0)}function A(P){var q=D.value;if(null==P||null!=q&&0<q.length)t&&b.hideDialog(),
-f(q,P,D)}F="1"==urlParams.noDevice?!1:F;p=null!=p?p:!0;u=null!=u?u:!0;K=null!=K?K:4;t=null!=t?t:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom="24px";n.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";
+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});z.spin(M);var I=window.setTimeout(function(){null==b[B]&&(z.stop(),M.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[B]&&(window.clearTimeout(I),mxUtils.setOpacity(m,100),T.style.visibility="",z.stop(),C())}))}else C();R.appendChild(M);++V==K&&(mxUtils.br(R),V=0)}function A(O){var q=D.value;if(null==O||null!=q&&0<q.length)t&&b.hideDialog(),
+f(q,O,D)}E="1"==urlParams.noDevice?!1:E;p=null!=p?p:!0;u=null!=u?u:!0;K=null!=K?K:4;t=null!=t?t:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var J=document.createElement("h2");mxUtils.write(J,l||mxResources.get("create"));J.style.marginTop="0px";J.style.marginBottom="24px";n.appendChild(J);l=document.createElement("span");mxUtils.write(l,mxResources.get("filename")+":");l.style.maxWidth="106px";l.style.overflow="hidden";l.style.textOverflow="ellipsis";
l.style.display="inline-block";n.appendChild(l);var D=document.createElement("input");D.setAttribute("value",e);D.style.width="180px";D.style.marginLeft="10px";D.style.marginBottom="20px";D.style.maxWidth="70%";this.init=function(){Editor.selectFilename(D)};n.appendChild(D);null!=v&&null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,D,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width="90px",n.appendChild(v));v=null;if("1"!=urlParams.noDevice&&null!=d&&null!=g&&"image/"==
-g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";l=document.createElement("img");var E=k?d:btoa(unescape(encodeURIComponent(d)));l.setAttribute("src","data:"+g+";base64,"+E);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");n.appendChild(l);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||
-(v=mxUtils.button(mxResources.get("copy"),function(P){P=b.base64ToBlob(E,"image/png");P=new ClipboardItem({"image/png":P,"text/html":new Blob(['<img src="data:'+g+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([P]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),v.style.marginTop="6px",v.className="geBtn");G&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,
-null,null,function(P){mxEvent.isPopupTrigger(P)||A("_blank")}))}mxUtils.br(n);var R=document.createElement("div");R.style.textAlign="center";var V=0;R.style.marginTop="6px";n.appendChild(R);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),Q.appendChild(d),x(IMAGE_PATH+"/google-drive-logo.svg",
+g.substring(0,6)&&("image/svg"!=g.substring(0,9)||mxClient.IS_SVG)){D.style.width="160px";l=document.createElement("img");var G=k?d:btoa(unescape(encodeURIComponent(d)));l.setAttribute("src","data:"+g+";base64,"+G);l.style.position="absolute";l.style.top="70px";l.style.right="100px";l.style.maxWidth="120px";l.style.maxHeight="80px";mxUtils.setPrefixedStyle(l.style,"transform","translate(50%,-50%)");n.appendChild(l);mxClient.IS_FF||"image/png"!=g||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||
+(v=mxUtils.button(mxResources.get("copy"),function(O){O=b.base64ToBlob(G,"image/png");O=new ClipboardItem({"image/png":O,"text/html":new Blob(['<img src="data:'+g+";base64,"+G+'">'],{type:"text/html"})});navigator.clipboard.write([O]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(q){b.handleError(q)}))}),v.style.marginTop="6px",v.className="geBtn");F&&Editor.popupsAllowed&&(l.style.cursor="pointer",mxEvent.addGestureListeners(l,
+null,null,function(O){mxEvent.isPopupTrigger(O)||A("_blank")}))}mxUtils.br(n);var R=document.createElement("div");R.style.textAlign="center";var V=0;R.style.marginTop="6px";n.appendChild(R);var Q=document.createElement("select");Q.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(d,mxResources.get("googleDrive")),Q.appendChild(d),x(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(d,mxResources.get("oneDrive")),Q.appendChild(d),b.mode==App.MODE_ONEDRIVE&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_DROPBOX),
mxUtils.write(d,mxResources.get("dropbox")),Q.appendChild(d),b.mode==App.MODE_DROPBOX&&d.setAttribute("selected","selected"),x(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_GITHUB),mxUtils.write(d,mxResources.get("github")),Q.appendChild(d),x(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(d=document.createElement("option"),
d.setAttribute("value",App.MODE_GITLAB),mxUtils.write(d,mxResources.get("gitlab")),Q.appendChild(d),x(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(d=document.createElement("option"),d.setAttribute("value",App.MODE_TRELLO),mxUtils.write(d,mxResources.get("trello")),Q.appendChild(d),x(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||
-null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)d=document.createElement("option"),d.setAttribute("value",App.MODE_DEVICE),mxUtils.write(d,mxResources.get("device")),Q.appendChild(d),b.mode!=App.MODE_DEVICE&&u||d.setAttribute("selected","selected"),F&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);u&&isLocalStorage&&"0"!=urlParams.browser&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_BROWSER),mxUtils.write(u,mxResources.get("browser")),Q.appendChild(u),
-b.mode==App.MODE_BROWSER&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));u=document.createElement("div");u.style.marginTop="26px";u.style.textAlign="center";null!=H&&(F=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),F.className="geBtn",u.appendChild(F));F=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});
-F.className="geBtn";b.editor.cancelFirst&&null==c&&u.appendChild(F);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),d.className="geBtn",u.appendChild(d));G&&Editor.popupsAllowed&&(G=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),G.className="geBtn",u.appendChild(G));CreateDialog.showDownloadButton&&(G=mxUtils.button(mxResources.get("download"),function(){A("download")}),G.className="geBtn",u.appendChild(G),null!=v&&(G.style.marginTop="6px",
-u.style.marginTop="6px"));null!=v&&(mxUtils.br(u),u.appendChild(v));b.editor.cancelFirst&&null==c||u.appendChild(F);mxEvent.addListener(D,"keypress",function(P){13==P.keyCode?A(App.MODE_DEVICE):27==P.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(u);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)d=document.createElement("option"),d.setAttribute("value",App.MODE_DEVICE),mxUtils.write(d,mxResources.get("device")),Q.appendChild(d),b.mode!=App.MODE_DEVICE&&u||d.setAttribute("selected","selected"),E&&x(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);u&&isLocalStorage&&"0"!=urlParams.browser&&(u=document.createElement("option"),u.setAttribute("value",App.MODE_BROWSER),mxUtils.write(u,mxResources.get("browser")),Q.appendChild(u),
+b.mode==App.MODE_BROWSER&&u.setAttribute("selected","selected"),x(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));u=document.createElement("div");u.style.marginTop="26px";u.style.textAlign="center";null!=H&&(E=mxUtils.button(mxResources.get("help"),function(){b.openLink(H)}),E.className="geBtn",u.appendChild(E));E=mxUtils.button(mxResources.get(null!=c?"close":"cancel"),function(){null!=c?c():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});
+E.className="geBtn";b.editor.cancelFirst&&null==c&&u.appendChild(E);null==c&&(d=mxUtils.button(mxResources.get("decideLater"),function(){A(null)}),d.className="geBtn",u.appendChild(d));F&&Editor.popupsAllowed&&(F=mxUtils.button(mxResources.get("openInNewWindow"),function(){A("_blank")}),F.className="geBtn",u.appendChild(F));CreateDialog.showDownloadButton&&(F=mxUtils.button(mxResources.get("download"),function(){A("download")}),F.className="geBtn",u.appendChild(F),null!=v&&(F.style.marginTop="6px",
+u.style.marginTop="6px"));null!=v&&(mxUtils.br(u),u.appendChild(v));b.editor.cancelFirst&&null==c||u.appendChild(E);mxEvent.addListener(D,"keypress",function(O){13==O.keyCode?A(App.MODE_DEVICE):27==O.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});n.appendChild(u);this.container=n};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,e,f,c,l){l=null!=l?l:!0;var n=document.createElement("div");n.style.textAlign="left";n.style.height="100%";mxUtils.write(n,mxResources.get("fileOpenLocation"));mxUtils.br(n);mxUtils.br(n);var p=mxUtils.button(mxResources.get("openInThisWindow"),function(){l&&b.hideDialog();null!=c&&c()});p.className="geBtn";p.style.marginBottom="8px";p.style.width="280px";n.appendChild(p);mxUtils.br(n);var u=mxUtils.button(mxResources.get("openInNewWindow"),function(){l&&b.hideDialog();
-null!=f&&f();b.openLink(e,null,!0)});u.className="geBtn gePrimaryBtn";u.style.width=p.style.width;n.appendChild(u);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,l,n,p,u){function G(){0<K.value.length?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"data:"!=K.value.substring(0,5)?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}n=null!=n?n:!0;var H=b.editor.graph,F=document.createElement("div");
-mxUtils.write(F,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var K=document.createElement("input");K.setAttribute("value",f);K.setAttribute("type","text");K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");K.style.marginTop=
+null!=f&&f();b.openLink(e,null,!0)});u.className="geBtn gePrimaryBtn";u.style.width=p.style.width;n.appendChild(u);mxUtils.br(n);mxUtils.br(n);mxUtils.write(n,mxResources.get("allowPopups"));this.container=n},ImageDialog=function(b,e,f,c,l,n,p,u){function F(){0<K.value.length?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");"data:"!=K.value.substring(0,5)?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}n=null!=n?n:!0;var H=b.editor.graph,E=document.createElement("div");
+mxUtils.write(E,e);e=document.createElement("div");e.className="geTitle";e.style.backgroundColor="transparent";e.style.borderColor="transparent";e.style.whiteSpace="nowrap";e.style.textOverflow="clip";e.style.cursor="default";e.style.paddingRight="20px";var K=document.createElement("input");K.setAttribute("value",f);K.setAttribute("type","text");K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");K.style.marginTop=
"6px";K.style.width=(Graph.fileSupport?460:340)-20+"px";K.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";K.style.backgroundRepeat="no-repeat";K.style.backgroundPosition="100% 50%";K.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display="inline-block";f.style.top="3px";f.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(f,"click",function(){K.value="";K.focus()});e.appendChild(K);e.appendChild(f);F.appendChild(e);var d=u,g,k,v=function(D,E,R,V){var Q="data:"==D.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(P){b.spinner.stop();b.hideDialog();var q=!1===V?1:null!=E&&null!=R?Math.max(E/P.width,R/P.height):Math.min(1,Math.min(520/P.width,520/P.height));n&&(D=b.convertDataUri(D));c(D,
-Math.round(Number(P.width)*q),Math.round(Number(P.height)*q),d,g,k)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,d,g,k)):(D=b.convertDataUri(D),E=null==E?120:E,R=null==R?100:R,b.hideDialog(),c(D,E,R,d,g,k))},t=function(D,E){if(null!=D){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?v(D,R.width,R.height,E):v(D,null,null,E)}else b.hideDialog(),c(null)};this.init=function(){K.focus();
-if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=F.parentNode,E=null;mxEvent.addListener(D,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){null!=E&&(E.parentNode.removeChild(E),
-E=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(Q,P,q,y,B,C,M,T){t(Q,T)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var P=0;P<Q.length;P++)Q[P]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var V=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(V)&&t(decodeURIComponent(V))}R.stopPropagation();R.preventDefault()}),
+"')";mxEvent.addListener(f,"click",function(){K.value="";K.focus()});e.appendChild(K);e.appendChild(f);E.appendChild(e);var d=u,g,k,v=function(D,G,R,V){var Q="data:"==D.substring(0,5);!b.isOffline()||Q&&"undefined"===typeof chrome?0<D.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(D,function(O){b.spinner.stop();b.hideDialog();var q=!1===V?1:null!=G&&null!=R?Math.max(G/O.width,R/O.height):Math.min(1,Math.min(520/O.width,520/O.height));n&&(D=b.convertDataUri(D));c(D,
+Math.round(Number(O.width)*q),Math.round(Number(O.height)*q),d,g,k)},function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(D,null,null,d,g,k)):(D=b.convertDataUri(D),G=null==G?120:G,R=null==R?100:R,b.hideDialog(),c(D,G,R,d,g,k))},t=function(D,G){if(null!=D){var R=l?null:H.getModel().getGeometry(H.getSelectionCell());null!=R?v(D,R.width,R.height,G):v(D,null,null,G)}else b.hideDialog(),c(null)};this.init=function(){K.focus();
+if(Graph.fileSupport){K.setAttribute("placeholder",mxResources.get("dragImagesHere"));var D=E.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(R){null!=G&&(G.parentNode.removeChild(G),G=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){null!=G&&(G.parentNode.removeChild(G),
+G=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(Q,O,q,y,B,C,M,T){t(Q,T)},function(){},function(Q){return"image/"==Q.type.substring(0,6)},function(Q){for(var O=0;O<Q.length;O++)Q[O]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var V=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(V)&&t(decodeURIComponent(V))}R.stopPropagation();R.preventDefault()}),
!1)}};u=document.createElement("div");u.style.marginTop="14px";u.style.textAlign="center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&u.appendChild(f);ImageDialog.filePicked=function(D){D.action==google.picker.Action.PICKED&&null!=D.docs[0].thumbnails&&(D=D.docs[0].thumbnails[D.docs[0].thumbnails.length-1],null!=D&&(K.value=D.url));K.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var x=document.createElement("input");
-x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(D){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(E,R,V,Q,P,q){t(E)},function(){},function(E){return"image/"==E.type.substring(0,6)},function(E){for(var R=0;R<E.length;R++)E[R]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
-e.className="geBtn";u.appendChild(e)}mxEvent.addListener(K,"keypress",function(D){13==D.keyCode&&t(K.value)});var A=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,K.value,d,function(E,R,V){d=E;g=R;k=V});b.showDialog(D.container,300,390,!0,!0)});p&&(A.className="geBtn",u.appendChild(A));var J=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=K.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(K.value),
-E=new Image;E.onload=function(){b.editor.convertImageToDataUri(D,function(R){b.confirmImageResize(function(V){b.resizeImage(E,R,mxUtils.bind(this,function(Q,P,q){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(K.value=Q,G()):b.handleError({message:mxResources.get("imageTooBig")})}),V,b.maxImageSize)},E.width>b.maxImageSize||E.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};E.onerror=function(){b.spinner.stop();
-b.handleError({message:mxResources.get("fileNotFound")})};E.src=D}});J.className="geBtn";mxEvent.addListener(K,"change",function(D){d=null;G()});G();u.appendChild(J);p=mxUtils.button(mxResources.get("apply"),function(){t(K.value)});p.className="geBtn gePrimaryBtn";u.appendChild(p);b.editor.cancelFirst||u.appendChild(f);Graph.fileSupport&&(u.style.marginTop="120px",F.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",F.style.backgroundPosition="center 65%",F.style.backgroundRepeat="no-repeat",
-p=document.createElement("div"),p.style.position="absolute",p.style.width="420px",p.style.top="58%",p.style.textAlign="center",p.style.fontSize="18px",p.style.color="#a0c3ff",mxUtils.write(p,mxResources.get("dragImagesHere")),F.appendChild(p));F.appendChild(u);this.container=F},LinkDialog=function(b,e,f,c,l,n,p){function u(D,E){var R=document.createElement("option");mxUtils.write(R,mxResources.get(D));R.value=D;A.appendChild(R);J[D]=E}var G=document.createElement("div");G.style.height="100%";mxUtils.write(G,
-mxResources.get("editLink")+":");var H=document.createElement("div");H.className="geTitle";H.style.backgroundColor="transparent";H.style.borderColor="transparent";H.style.whiteSpace="nowrap";H.style.textOverflow="clip";H.style.cursor="default";var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("dragUrlsHere"));F.setAttribute("type","text");F.style.marginTop="6px";F.style.width="414px";F.style.boxSizing="border-box";F.style.backgroundImage="url('"+Dialog.prototype.clearImage+
-"')";F.style.backgroundRepeat="no-repeat";F.style.backgroundPosition="100% 50%";F.style.paddingRight="14px";F.style.marginBottom="4px";var K=document.createElement("div");K.setAttribute("title",mxResources.get("reset"));K.style.position="relative";K.style.left="-16px";K.style.width="12px";K.style.height="14px";K.style.cursor="pointer";K.style.display="inline-block";K.style.top="3px";K.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(K,"click",function(){F.value="";F.focus()});
+x.setAttribute("multiple","multiple");x.setAttribute("type","file");mxEvent.addListener(x,"change",function(D){null!=x.files&&(b.importFiles(x.files,0,0,b.maxImageSize,function(G,R,V,Q,O,q){t(G)},function(){},function(G){return"image/"==G.type.substring(0,6)},function(G){for(var R=0;R<G.length;R++)G[R]()},!0),x.type="",x.type="file",x.value="")});x.style.display="none";document.body.appendChild(x);b.imgDlgFileInputElt=x}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
+e.className="geBtn";u.appendChild(e)}mxEvent.addListener(K,"keypress",function(D){13==D.keyCode&&t(K.value)});var A=mxUtils.button(mxResources.get("crop"),function(){var D=new CropImageDialog(b,K.value,d,function(G,R,V){d=G;g=R;k=V});b.showDialog(D.container,300,390,!0,!0)});p&&(A.className="geBtn",u.appendChild(A));var J=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=K.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var D=b.editor.createImageUrlConverter().convert(K.value),
+G=new Image;G.onload=function(){b.editor.convertImageToDataUri(D,function(R){b.confirmImageResize(function(V){b.resizeImage(G,R,mxUtils.bind(this,function(Q,O,q){b.spinner.stop();null!=Q&&Q.length<b.maxImageBytes?(K.value=Q,F()):b.handleError({message:mxResources.get("imageTooBig")})}),V,b.maxImageSize)},G.width>b.maxImageSize||G.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};G.onerror=function(){b.spinner.stop();
+b.handleError({message:mxResources.get("fileNotFound")})};G.src=D}});J.className="geBtn";mxEvent.addListener(K,"change",function(D){d=null;F()});F();u.appendChild(J);p=mxUtils.button(mxResources.get("apply"),function(){t(K.value)});p.className="geBtn gePrimaryBtn";u.appendChild(p);b.editor.cancelFirst||u.appendChild(f);Graph.fileSupport&&(u.style.marginTop="120px",E.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",E.style.backgroundPosition="center 65%",E.style.backgroundRepeat="no-repeat",
+p=document.createElement("div"),p.style.position="absolute",p.style.width="420px",p.style.top="58%",p.style.textAlign="center",p.style.fontSize="18px",p.style.color="#a0c3ff",mxUtils.write(p,mxResources.get("dragImagesHere")),E.appendChild(p));E.appendChild(u);this.container=E},LinkDialog=function(b,e,f,c,l,n,p){function u(D,G){var R=document.createElement("option");mxUtils.write(R,mxResources.get(D));R.value=D;A.appendChild(R);J[D]=G}var F=document.createElement("div");F.style.height="100%";mxUtils.write(F,
+mxResources.get("editLink")+":");var H=document.createElement("div");H.className="geTitle";H.style.backgroundColor="transparent";H.style.borderColor="transparent";H.style.whiteSpace="nowrap";H.style.textOverflow="clip";H.style.cursor="default";var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("dragUrlsHere"));E.setAttribute("type","text");E.style.marginTop="6px";E.style.width="414px";E.style.boxSizing="border-box";E.style.backgroundImage="url('"+Dialog.prototype.clearImage+
+"')";E.style.backgroundRepeat="no-repeat";E.style.backgroundPosition="100% 50%";E.style.paddingRight="14px";E.style.marginBottom="4px";var K=document.createElement("div");K.setAttribute("title",mxResources.get("reset"));K.style.position="relative";K.style.left="-16px";K.style.width="12px";K.style.height="14px";K.style.cursor="pointer";K.style.display="inline-block";K.style.top="3px";K.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(K,"click",function(){E.value="";E.focus()});
var d=document.createElement("input");d.style.cssText="margin-right:8px;margin-bottom:8px;";d.setAttribute("value","url");d.setAttribute("type","radio");d.setAttribute("name","geLinkDialogOption");var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","geLinkDialogOption");var k=document.createElement("select");k.style.width="414px";var v=document.createElement("input");v.setAttribute("type",
-"checkbox");v.style.margin="0 6p 0 6px";null!=p&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);p=null!=p?p:"_blank";v.setAttribute("title",p);n&&(F.style.width="200px");if(l&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(F.setAttribute("value",e),d.setAttribute("checked","checked"),d.defaultChecked=!0);H.appendChild(d);H.appendChild(F);H.appendChild(K);n&&(H.appendChild(v),mxUtils.write(H,mxResources.get("openInNewWindow")));mxUtils.br(H);
+"checkbox");v.style.margin="0 6p 0 6px";null!=p&&(v.setAttribute("checked","checked"),v.defaultChecked=!0);p=null!=p?p:"_blank";v.setAttribute("title",p);n&&(E.style.width="200px");if(l&&null!=b.pages){null!=e&&Graph.isPageLink(e)?(g.setAttribute("checked","checked"),g.defaultChecked=!0):(E.setAttribute("value",e),d.setAttribute("checked","checked"),d.defaultChecked=!0);H.appendChild(d);H.appendChild(E);H.appendChild(K);n&&(H.appendChild(v),mxUtils.write(H,mxResources.get("openInNewWindow")));mxUtils.br(H);
H.appendChild(g);l=!1;for(n=0;n<b.pages.length;n++)K=document.createElement("option"),mxUtils.write(K,b.pages[n].getName()||mxResources.get("pageWithNumber",[n+1])),K.setAttribute("value","data:page/id,"+b.pages[n].getId()),e==K.getAttribute("value")&&(K.setAttribute("selected","selected"),l=!0),k.appendChild(K);if(!l&&g.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value",
-"pageNotFound");k.appendChild(t);mxEvent.addListener(k,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}H.appendChild(k)}else F.setAttribute("value",e),H.appendChild(F),H.appendChild(K);G.appendChild(H);var x=mxUtils.button(f,function(){b.hideDialog();c(g.checked?"pageNotFound"!==k.value?k.value:e:F.value,LinkDialog.selectedDocs,v.checked?p:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?k.focus():(F.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(F,"focus",function(){g.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});if(Graph.fileSupport){var D=G.parentNode,E=null;mxEvent.addListener(D,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});
-mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){try{null!=E&&(E.parentNode.removeChild(E),E=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(F.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),d.setAttribute("checked","checked"),d.checked=!0,x.click())}catch(V){b.handleError(V)}R.stopPropagation();
+"pageNotFound");k.appendChild(t);mxEvent.addListener(k,"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}H.appendChild(k)}else E.setAttribute("value",e),H.appendChild(E),H.appendChild(K);F.appendChild(H);var x=mxUtils.button(f,function(){b.hideDialog();c(g.checked?"pageNotFound"!==k.value?k.value:e:E.value,LinkDialog.selectedDocs,v.checked?p:null)});x.style.verticalAlign="middle";x.className="geBtn gePrimaryBtn";this.init=function(){g.checked?k.focus():(E.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(k,"focus",function(){d.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(E,"focus",function(){g.removeAttribute("checked");d.setAttribute("checked","checked");d.checked=!0});if(Graph.fileSupport){var D=F.parentNode,G=null;mxEvent.addListener(D,"dragleave",function(R){null!=G&&(G.parentNode.removeChild(G),G=null);R.stopPropagation();R.preventDefault()});
+mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(R){null==G&&(!mxClient.IS_IE||10<document.documentMode)&&(G=b.highlightElement(D));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(D,"drop",mxUtils.bind(this,function(R){try{null!=G&&(G.parentNode.removeChild(G),G=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(E.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),d.setAttribute("checked","checked"),d.checked=!0,x.click())}catch(V){b.handleError(V)}R.stopPropagation();
R.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="right";b.isOffline()||f.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));H=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});H.style.verticalAlign="middle";H.className="geBtn";b.editor.cancelFirst&&f.appendChild(H);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(D){if(D.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=D.docs;
-var E=D.docs[0].url;"application/mxe"==D.docs[0].mimeType||null!=D.docs[0].mimeType&&"application/vnd.jgraph."==D.docs[0].mimeType.substring(0,23)?E="https://www.draw.io/#G"+D.docs[0].id:"application/vnd.google-apps.folder"==D.docs[0].mimeType&&(E="https://drive.google.com/#folders/"+D.docs[0].id);F.value=E;F.focus()}else LinkDialog.selectedDocs=null;F.focus()};var A=document.createElement("select");A.className="geBtn";A.style.position="relative";A.style.top="1px";A.style.maxWidth="120px";var J={};
-l=document.createElement("option");mxUtils.write(l,mxResources.get("select")+"...");l.value="";A.appendChild(l);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&u("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var D=b.drive.createLinkPicker();b.linkPicker=D.setCallback(function(E){LinkDialog.filePicked(E)}).build()}b.linkPicker.setVisible(!0)}))});
-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&u("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(D){F.value=D[0].link;F.focus()}})});null!=b.oneDrive&&u("oneDrive",function(){b.oneDrive.pickFile(function(D,E){null!=E&&null!=E.value&&0<E.value.length&&(F.value=E.value[0].webUrl,F.focus())},!0)});null!=b.gitHub&&u("github",function(){b.gitHub.pickFile(function(D){if(null!=D){D=D.split("/");var E=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");
-F.value="https://github.com/"+E+"/"+R+"/blob/"+V+"/"+D;F.focus()}})});null!=b.gitLab&&u("gitlab",function(){b.gitLab.pickFile(function(D){if(null!=D){D=D.split("/");var E=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");F.value=DRAWIO_GITLAB_URL+"/"+E+"/"+R+"/blob/"+V+"/"+D;F.focus()}})});1<A.children.length&&(f.appendChild(A),mxEvent.addListener(A,"change",function(D){null!=J[A.value]&&(J[A.value](),A.value="")}));mxEvent.addListener(F,"keypress",function(D){13==D.keyCode&&x.click()});f.appendChild(x);
-b.editor.cancelFirst||f.appendChild(H);G.appendChild(f);this.container=G},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize="18px";n.style.marginBottom="18px";l.appendChild(n);n=document.createElement("div");mxUtils.write(n,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(n);var p=document.createElement("input");p.setAttribute("type",
-"text");p.style.marginTop="6px";p.style.width="600px";var u=mxUtils.button(mxResources.get("sendMessage"),function(){var K=F.value+(H.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;K.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=
+var G=D.docs[0].url;"application/mxe"==D.docs[0].mimeType||null!=D.docs[0].mimeType&&"application/vnd.jgraph."==D.docs[0].mimeType.substring(0,23)?G="https://www.draw.io/#G"+D.docs[0].id:"application/vnd.google-apps.folder"==D.docs[0].mimeType&&(G="https://drive.google.com/#folders/"+D.docs[0].id);E.value=G;E.focus()}else LinkDialog.selectedDocs=null;E.focus()};var A=document.createElement("select");A.className="geBtn";A.style.position="relative";A.style.top="1px";A.style.maxWidth="120px";var J={};
+l=document.createElement("option");mxUtils.write(l,mxResources.get("select")+"...");l.value="";A.appendChild(l);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&u("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var D=b.drive.createLinkPicker();b.linkPicker=D.setCallback(function(G){LinkDialog.filePicked(G)}).build()}b.linkPicker.setVisible(!0)}))});
+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&u("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(D){E.value=D[0].link;E.focus()}})});null!=b.oneDrive&&u("oneDrive",function(){b.oneDrive.pickFile(function(D,G){null!=G&&null!=G.value&&0<G.value.length&&(E.value=G.value[0].webUrl,E.focus())},!0)});null!=b.gitHub&&u("github",function(){b.gitHub.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");
+E.value="https://github.com/"+G+"/"+R+"/blob/"+V+"/"+D;E.focus()}})});null!=b.gitLab&&u("gitlab",function(){b.gitLab.pickFile(function(D){if(null!=D){D=D.split("/");var G=D[0],R=D[1],V=D[2];D=D.slice(3,D.length).join("/");E.value=DRAWIO_GITLAB_URL+"/"+G+"/"+R+"/blob/"+V+"/"+D;E.focus()}})});1<A.children.length&&(f.appendChild(A),mxEvent.addListener(A,"change",function(D){null!=J[A.value]&&(J[A.value](),A.value="")}));mxEvent.addListener(E,"keypress",function(D){13==D.keyCode&&x.click()});f.appendChild(x);
+b.editor.cancelFirst||f.appendChild(H);F.appendChild(f);this.container=F},FeedbackDialog=function(b,e,f,c){var l=document.createElement("div"),n=document.createElement("div");mxUtils.write(n,mxResources.get("sendYourFeedback"));n.style.fontSize="18px";n.style.marginBottom="18px";l.appendChild(n);n=document.createElement("div");mxUtils.write(n,mxResources.get("yourEmailAddress")+(f?"":" ("+mxResources.get("required")+")"));l.appendChild(n);var p=document.createElement("input");p.setAttribute("type",
+"text");p.style.marginTop="6px";p.style.width="600px";var u=mxUtils.button(mxResources.get("sendMessage"),function(){var K=E.value+(H.checked?"\nDiagram:\n"+(null!=c?c:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;K.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=
FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(p.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=e?e:"Feedback")+":\n"+K),function(d){b.spinner.stop();200<=d.getStatus()&&299>=d.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});u.className=
-"geBtn gePrimaryBtn";if(!f){u.setAttribute("disabled","disabled");var G=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(p,"change",function(){0<p.value.length&&0<G.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")});mxEvent.addListener(p,"keyup",function(){0<p.value.length&&G.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled",
+"geBtn gePrimaryBtn";if(!f){u.setAttribute("disabled","disabled");var F=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(p,"change",function(){0<p.value.length&&0<F.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")});mxEvent.addListener(p,"keyup",function(){0<p.value.length&&F.test(p.value)?u.removeAttribute("disabled"):u.setAttribute("disabled",
"disabled")})}l.appendChild(p);this.init=function(){p.focus()};var H=document.createElement("input");H.setAttribute("type","checkbox");H.setAttribute("checked","checked");H.defaultChecked=!0;f=document.createElement("p");f.style.marginTop="14px";f.appendChild(H);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(n);mxEvent.addListener(n,"click",function(K){H.checked=!H.checked;mxEvent.consume(K)});l.appendChild(f);n=document.createElement("div");
-mxUtils.write(n,mxResources.get("feedback"));l.appendChild(n);var F=document.createElement("textarea");F.style.resize="none";F.style.width="600px";F.style.height="140px";F.style.marginTop="6px";F.setAttribute("placeholder",mxResources.get("comments"));l.appendChild(F);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(u)):(f.appendChild(u),
+mxUtils.write(n,mxResources.get("feedback"));l.appendChild(n);var E=document.createElement("textarea");E.style.resize="none";E.style.width="600px";E.style.height="140px";E.style.marginTop="6px";E.setAttribute("placeholder",mxResources.get("comments"));l.appendChild(E);f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";b.editor.cancelFirst?(f.appendChild(n),f.appendChild(u)):(f.appendChild(u),
f.appendChild(n));l.appendChild(f);this.container=l};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,e,f){var c=document.createElement("div"),l=document.createElement("h3");l.style.marginTop="3px";mxUtils.write(l,mxResources.get("revisionHistory"));c.appendChild(l);l=document.createElement("div");l.style.position="absolute";l.style.overflow="auto";l.style.width="170px";l.style.height="378px";c.appendChild(l);var n=document.createElement("div");n.style.position="absolute";n.style.left="200px";n.style.width="470px";n.style.height="376px";n.style.overflow="hidden";n.style.borderWidth=
"1px";n.style.borderStyle="solid";var p=document.createElement("div");p.style.position="absolute";p.style.display="none";p.style.textAlign="center";p.style.padding="8px";p.style.borderRadius="8px";p.style.left="50%";p.style.top="50%";p.style.whiteSpace="nowrap";p.style.transform="translate(-50%, -50%)";p.style.background="inherit";p.style.border="1px solid";n.appendChild(p);mxEvent.disableContextMenu(n);c.appendChild(n);var u=new Graph(n);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=
-!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var G=0,H=null,F=0,K=u.getGlobalVariable;u.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[F]?H[F].getAttribute("name"):"pagenumber"==X?F+1:"pagecount"==X?null!=H?H.length:1:K.apply(this,arguments)};u.getLinkForCell=function(){return null};for(var d=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),k=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={},t=0;t<k.length;t++)v[k[t].getAttribute("id")]=k[t];var x=null,A=null,J=null,D=null,E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=J&&u.zoomIn()},20);E.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=J&&u.zoomOut()},20);R.setAttribute("disabled",
-"disabled");var V=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=J&&(1==u.view.scale?(u.maxFitScale=8,u.fit(8)):u.zoomActual(),u.center())},20);V.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);Q.setAttribute("disabled","disabled");var P=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);P.setAttribute("disabled","disabled");var q=n.cloneNode(!1);q.style.pointerEvent=
+!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var F=0,H=null,E=0,K=u.getGlobalVariable;u.getGlobalVariable=function(X){return"page"==X&&null!=H&&null!=H[E]?H[E].getAttribute("name"):"pagenumber"==X?E+1:"pagecount"==X?null!=H?H.length:1:K.apply(this,arguments)};u.getLinkForCell=function(){return null};for(var d=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),g=b.getCurrentFile(),k=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),v={},t=0;t<k.length;t++)v[k[t].getAttribute("id")]=k[t];var x=null,A=null,J=null,D=null,G=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=J&&u.zoomIn()},20);G.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=J&&u.zoomOut()},20);R.setAttribute("disabled",
+"disabled");var V=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=J&&(1==u.view.scale?(u.maxFitScale=8,u.fit(8)):u.zoomActual(),u.center())},20);V.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);Q.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);O.setAttribute("disabled","disabled");var q=n.cloneNode(!1);q.style.pointerEvent=
"none";n.parentNode.appendChild(q);var y=new Graph(q);y.setTooltips(!1);y.setEnabled(!1);y.setPanning(!0);y.panningHandler.ignoreCell=!0;y.panningHandler.useLeftButtonForPanning=!0;y.minFitScale=null;y.maxFitScale=null;y.centerZoom=!0;var B=document.createElement("div");B.style.textAlign="left";B.style.color="gray";B.style.backgroundColor="transparent";B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.style.whiteSpace="nowrap";B.style.cursor="default";B.style.height="100%";B.style.display=
-"inline-flex";B.style.alignItems="center";B.style.flexGrow="1";mxEvent.addListener(B,"click",function(){var X=mxUtils.getTextContent(B);""!=X&&b.alert(X)});var C=null;mxEvent.addGestureListeners(Q,function(X){try{var Z=null!=H[G]?v[H[G].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);p.innerText="";if(null==Z)p.style.display="inline-block",mxUtils.write(p,mxResources.get("pageNotFound"));else{C=B.innerHTML;B.innerHTML=mxResources.get("current");n.style.display="none";q.style.display="";q.style.backgroundColor=
+"inline-flex";B.style.alignItems="center";B.style.flexGrow="1";mxEvent.addListener(B,"click",function(){var X=mxUtils.getTextContent(B);""!=X&&b.alert(X)});var C=null;mxEvent.addGestureListeners(Q,function(X){try{var Z=null!=H[F]?v[H[F].getAttribute("id")]:null;mxUtils.setOpacity(Q,20);p.innerText="";if(null==Z)p.style.display="inline-block",mxUtils.write(p,mxResources.get("pageNotFound"));else{C=B.innerHTML;B.innerHTML=mxResources.get("current");n.style.display="none";q.style.display="";q.style.backgroundColor=
n.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,y.getModel());y.view.scaleAndTranslate(u.view.scale,u.view.translate.x,u.view.translate.y);y.mathEnabled="1"==Y.getAttribute("math");y.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&y.mathEnabled&&Editor.MathJaxRender(y.container)}}catch(ba){p.style.display="inline-block",p.innerText="",mxUtils.write(p,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(Q,
-60);p.style.display="none";p.innerText="";"none"==n.style.display&&(n.style.display="",B.innerHTML=C,q.style.display="none")});mxEvent.addListener(P,"click",mxUtils.bind(this,function(X){null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),
+60);p.style.display="none";p.innerText="";"none"==n.style.display&&(n.style.display="",B.innerHTML=C,q.style.display="none")});mxEvent.addListener(O,"click",mxUtils.bind(this,function(X){null!=J&&(X=b.getPagesForNode(J.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{g.patch(Y,null,!0,!0),b.hideDialog(),
b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var M=mxUtils.button(mxResources.get("restore"),function(X){null!=J&&null!=D&&b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(D):b.spinner.spin(document.body,mxResources.get("restoring"))&&(M.setAttribute("disabled","disabled"),g.save(!0,function(Z){b.spinner.stop();
M.removeAttribute("disabled");b.replaceFileData(D);b.hideDialog()},function(Z){b.spinner.stop();M.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var m=null;mxEvent.addListener(T,
"change",function(X){null!=m&&(m(X),mxEvent.consume(X))});var z=mxUtils.button(mxResources.get("open"),function(){null!=J&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(J.documentElement)),b.openLink(b.getUrl(),null,!0))});z.className="geBtn";z.setAttribute("disabled","disabled");var I=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});I.className="geBtn";I.setAttribute("disabled","disabled");null!=
f&&(z.style.display="none");k=document.createElement("div");k.style.position="absolute";k.style.top="482px";k.style.right="28px";k.style.left="32px";k.style.justifyContent="end";k.style.display="flex";var L=document.createElement("div");L.className="geToolbarContainer";L.style.backgroundColor="transparent";L.style.display="flex";L.style.alignItems="center";L.style.justifyContent="stretch";L.style.left="32px";L.style.right="32px";L.style.border="none";L.style.top="440px";L.style.height="28px";var N=
-null;if(null!=e&&0<e.length){n.style.cursor="move";var O=document.createElement("table");O.style.borderWidth="1px";O.style.borderStyle="solid";O.style.borderCollapse="collapse";O.style.borderSpacing="0px";O.style.width="100%";var S=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(G=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){d.stop();
+null;if(null!=e&&0<e.length){n.style.cursor="move";var P=document.createElement("table");P.style.borderWidth="1px";P.style.borderStyle="solid";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var S=document.createElement("tbody"),U=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(F=mxUtils.indexOf(b.pages,b.currentPage));for(t=e.length-1;0<=t;t--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){d.stop();
p.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(xa){null!=xa&&(xa=ia(Editor.parseDiagramNode(xa)));return xa},ia=function(xa){var qa=xa.getAttribute("background");if(null==qa||""==qa||qa==mxConstants.NONE)qa=u.defaultPageBackgroundColor;n.style.backgroundColor=mxUtils.getLightDarkColor(qa);(new mxCodec(xa.ownerDocument)).decode(xa,u.getModel());u.maxFitScale=1;u.fit(8);u.center();u.mathEnabled="1"==xa.getAttribute("math");
-u.setAdaptiveColors(xa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container);return xa};T.style.display="none";T.innerText="";J=fa;D=ca;H=parseSelectFunction=null;F=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");H=[];for(ca=0;ca<fa.length;ca++)H.push(fa[ca]);F=Math.min(G,H.length-1);0<H.length&&da(H[F]);if(1<H.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<H.length;ca++){fa=document.createElement("option");fa.setAttribute("title",
-pa+" ("+H[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=H[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(H[ca].getAttribute("id"));var oa="";if(null!=aa){var ha=new DiagramPage(H[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ha])&&(oa=" (M)")}else oa=" (X)";mxUtils.write(fa,pa+oa);ca==F&&fa.setAttribute("selected","selected");T.appendChild(fa)}m=function(){try{var xa=parseInt(T.value);F=G=xa;da(H[xa])}catch(qa){T.value=G,b.handleError(qa)}}}else ia(aa);
-pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));E.removeAttribute("disabled");R.removeAttribute("disabled");V.removeAttribute("disabled");Q.removeAttribute("disabled");P.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"));
-mxUtils.setOpacity(E,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(V,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(P,60)}else T.style.display="none",T.innerText="",B.innerText="",p.innerText="",mxUtils.write(B,mxResources.get("errorLoadingFile")),mxUtils.write(p,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=
+u.setAdaptiveColors(xa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container);return xa};T.style.display="none";T.innerText="";J=fa;D=ca;H=parseSelectFunction=null;E=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");H=[];for(ca=0;ca<fa.length;ca++)H.push(fa[ca]);E=Math.min(F,H.length-1);0<H.length&&da(H[E]);if(1<H.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<H.length;ca++){fa=document.createElement("option");fa.setAttribute("title",
+pa+" ("+H[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=H[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(H[ca].getAttribute("id"));var oa="";if(null!=aa){var ha=new DiagramPage(H[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ha])&&(oa=" (M)")}else oa=" (X)";mxUtils.write(fa,pa+oa);ca==E&&fa.setAttribute("selected","selected");T.appendChild(fa)}m=function(){try{var xa=parseInt(T.value);E=F=xa;da(H[xa])}catch(qa){T.value=F,b.handleError(qa)}}}else ia(aa);
+pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");B.innerText="";mxUtils.write(B,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());B.setAttribute("title",Y.getAttribute("title"));G.removeAttribute("disabled");R.removeAttribute("disabled");V.removeAttribute("disabled");Q.removeAttribute("disabled");O.removeAttribute("disabled");null!=g&&g.isRestricted()||(b.editor.graph.isEnabled()&&M.removeAttribute("disabled"),z.removeAttribute("disabled"),I.removeAttribute("disabled"));
+mxUtils.setOpacity(G,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(V,60);mxUtils.setOpacity(Q,60);mxUtils.setOpacity(O,60)}else T.style.display="none",T.innerText="",B.innerText="",p.innerText="",mxUtils.write(B,mxResources.get("errorLoadingFile")),mxUtils.write(p,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=
"6px";ea.style.whiteSpace="nowrap";X==e[e.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===U?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){A!=X&&(d.stop(),
-null!=x&&(x.style.backgroundColor=""),A=X,x=Y,x.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=J=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",n.style.backgroundColor=u.defaultPageBackgroundColor,p.innerText="",u.getModel().clear(),M.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"),z.setAttribute("disabled",
-"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(V,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(P,20),d.spin(n),X.getXml(function(fa){if(A==X)try{ba(fa)}catch(aa){B.innerText=mxResources.get("error")+": "+aa.message}},function(fa){d.stop();T.style.display="none";T.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(p,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,
-"dblclick",function(ca){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(e[t]);null!=W&&t==e.length-1&&(N=W)}O.appendChild(S);l.appendChild(O)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(n.style.display="none",L.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(n.style.display="none",L.style.display=
-"none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";L.appendChild(B);L.appendChild(Q);L.appendChild(R);L.appendChild(V);L.appendChild(E);L.appendChild(T);L.appendChild(P);b.editor.cancelFirst&&k.appendChild(l);k.appendChild(z);null!=g&&g.constructor==DriveFile&&k.appendChild(I);k.appendChild(M);b.editor.cancelFirst||k.appendChild(l);c.appendChild(k);c.appendChild(L);
-this.container=c},DraftDialog=function(b,e,f,c,l,n,p,u,G){var H=document.createElement("div"),F=document.createElement("div");F.style.marginTop="0px";F.style.whiteSpace="nowrap";F.style.overflow="auto";F.style.lineHeight="normal";mxUtils.write(F,e);H.appendChild(F);var K=document.createElement("select"),d=mxUtils.bind(this,function(){"-1"==K.value?(K.value=K.options[0].value,d(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this,P;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(P=
-0;P<G.length;P++)l.apply(Q,[P,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(A=mxUtils.parseXml(G[K.value].data),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,this.init())});if(null!=G){K.style.marginLeft="4px";for(e=0;e<G.length;e++){var g=document.createElement("option");g.setAttribute("value",e);var k=new Date(G[e].created),v=new Date(G[e].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "+
-(k.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());K.appendChild(g)}g=document.createElement("option");g.setAttribute("value","-1");mxUtils.write(g,mxResources.get("deleteAll"));K.appendChild(g);F.appendChild(K);mxEvent.addListener(K,"change",d)}null==f&&(f=G[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom=
-"74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);H.appendChild(t);var x=new Graph(t);x.setEnabled(!1);x.setPanning(!0);x.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var A=mxUtils.parseXml(f),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,E=null,R=x.getGlobalVariable;x.getGlobalVariable=function(Q){return"page"==Q&&null!=E&&null!=E[D]?E[D].getAttribute("name"):
-"pagenumber"==Q?D+1:"pagecount"==Q?null!=E?E.length:1:R.apply(this,arguments)};x.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){x.zoomIn()},20);F=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){x.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==x.view.scale?(x.maxFitScale=8,x.fit(8)):x.zoomActual();x.center()},20);p=mxUtils.button(p||mxResources.get("discard"),
-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(P){l.apply(Q,[K.value,mxUtils.bind(Q,function(){null!=K.parentNode&&(K.options[K.selectedIndex].parentNode.removeChild(K.options[K.selectedIndex]),1<K.options.length?(K.value=K.options[0].value,d()):b.hideDialog(!0))})]);P.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});p.className="geBtn";var V=document.createElement("select");
+null!=x&&(x.style.backgroundColor=""),A=X,x=Y,x.style.backgroundColor="light-dark(#ebf2f9, #000000)",D=J=null,B.removeAttribute("title"),B.innerText=mxResources.get("loading")+"...",n.style.backgroundColor=u.defaultPageBackgroundColor,p.innerText="",u.getModel().clear(),M.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),V.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),z.setAttribute("disabled",
+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(G,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(V,20),mxUtils.setOpacity(Q,20),mxUtils.setOpacity(O,20),d.spin(n),X.getXml(function(fa){if(A==X)try{ba(fa)}catch(aa){B.innerText=mxResources.get("error")+": "+aa.message}},function(fa){d.stop();T.style.display="none";T.innerText="";B.innerText="";mxUtils.write(B,mxResources.get("errorLoadingFile"));mxUtils.write(p,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,
+"dblclick",function(ca){z.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(e[t]);null!=W&&t==e.length-1&&(N=W)}P.appendChild(S);l.appendChild(P)}else null==g||null==b.drive&&g.constructor==window.DriveFile||null==b.dropbox&&g.constructor==window.DropboxFile?(n.style.display="none",L.style.display="none",mxUtils.write(l,mxResources.get("notAvailable"))):(n.style.display="none",L.style.display=
+"none",mxUtils.write(l,mxResources.get("noRevisions")));this.init=function(){null!=N&&N.click()};l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";L.appendChild(B);L.appendChild(Q);L.appendChild(R);L.appendChild(V);L.appendChild(G);L.appendChild(T);L.appendChild(O);b.editor.cancelFirst&&k.appendChild(l);k.appendChild(z);null!=g&&g.constructor==DriveFile&&k.appendChild(I);k.appendChild(M);b.editor.cancelFirst||k.appendChild(l);c.appendChild(k);c.appendChild(L);
+this.container=c},DraftDialog=function(b,e,f,c,l,n,p,u,F){var H=document.createElement("div"),E=document.createElement("div");E.style.marginTop="0px";E.style.whiteSpace="nowrap";E.style.overflow="auto";E.style.lineHeight="normal";mxUtils.write(E,e);H.appendChild(E);var K=document.createElement("select"),d=mxUtils.bind(this,function(){"-1"==K.value?(K.value=K.options[0].value,d(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this,O;return $jscomp.asyncExecutePromiseGeneratorProgram(function(q){for(O=
+0;O<F.length;O++)l.apply(Q,[O,mxUtils.bind(Q,function(){})]);b.hideDialog(!0);q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(A=mxUtils.parseXml(F[K.value].data),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,this.init())});if(null!=F){K.style.marginLeft="4px";for(e=0;e<F.length;e++){var g=document.createElement("option");g.setAttribute("value",e);var k=new Date(F[e].created),v=new Date(F[e].modified);mxUtils.write(g,k.toLocaleDateString()+" "+k.toLocaleTimeString()+" - "+
+(k.toDateString(),v.toDateString(),v.toLocaleDateString())+" "+v.toLocaleTimeString());K.appendChild(g)}g=document.createElement("option");g.setAttribute("value","-1");mxUtils.write(g,mxResources.get("deleteAll"));K.appendChild(g);E.appendChild(K);mxEvent.addListener(K,"change",d)}null==f&&(f=F[0].data);var t=document.createElement("div");t.style.position="absolute";t.style.border="1px solid lightGray";t.style.marginTop="10px";t.style.left="40px";t.style.right="40px";t.style.top="46px";t.style.bottom=
+"74px";t.style.overflow="hidden";mxEvent.disableContextMenu(t);H.appendChild(t);var x=new Graph(t);x.setEnabled(!1);x.setPanning(!0);x.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";x.panningHandler.ignoreCell=!0;x.panningHandler.useLeftButtonForPanning=!0;x.minFitScale=null;x.maxFitScale=null;x.centerZoom=!0;var A=mxUtils.parseXml(f),J=b.editor.extractGraphModel(A.documentElement,!0),D=0,G=null,R=x.getGlobalVariable;x.getGlobalVariable=function(Q){return"page"==Q&&null!=G&&null!=G[D]?G[D].getAttribute("name"):
+"pagenumber"==Q?D+1:"pagecount"==Q?null!=G?G.length:1:R.apply(this,arguments)};x.getLinkForCell=function(){return null};f=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){x.zoomIn()},20);E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){x.zoomOut()},20);e=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==x.view.scale?(x.maxFitScale=8,x.fit(8)):x.zoomActual();x.center()},20);p=mxUtils.button(p||mxResources.get("discard"),
+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var Q=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(O){l.apply(Q,[K.value,mxUtils.bind(Q,function(){null!=K.parentNode&&(K.options[K.selectedIndex].parentNode.removeChild(K.options[K.selectedIndex]),1<K.options.length?(K.value=K.options[0].value,d()):b.hideDialog(!0))})]);O.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});p.className="geBtn";var V=document.createElement("select");
V.style.maxWidth="80px";V.style.position="relative";V.style.top="-2px";V.style.verticalAlign="bottom";V.style.marginRight="6px";V.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[K.value])});n.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.right="40px";g.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function Q(B){if(null!=B){var C=B.getAttribute("background");if(null==C||""==C||C==mxConstants.NONE)C="light-dark(#ffffff, transparent)";t.style.backgroundColor=C;(new mxCodec(B.ownerDocument)).decode(B,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return B}function P(B){null!=B&&(B=Q(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(V,"change",function(B){D=parseInt(V.value);P(E[D]);mxEvent.consume(B)});if("mxfile"==J.nodeName){var q=J.getElementsByTagName("diagram");
-E=[];for(var y=0;y<q.length;y++)E.push(q[y]);0<E.length&&P(E[D]);V.innerText="";if(1<E.length)for(V.style.display="",y=0;y<E.length;y++)q=document.createElement("option"),mxUtils.write(q,E[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==D&&q.setAttribute("selected","selected"),V.appendChild(q);else V.style.display="none"}else Q(J)};k.appendChild(V);k.appendChild(f);k.appendChild(F);k.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
+this.init=function(){function Q(B){if(null!=B){var C=B.getAttribute("background");if(null==C||""==C||C==mxConstants.NONE)C="light-dark(#ffffff, transparent)";t.style.backgroundColor=C;(new mxCodec(B.ownerDocument)).decode(B,x.getModel());x.maxFitScale=1;x.fit(8);x.center()}return B}function O(B){null!=B&&(B=Q(Editor.parseDiagramNode(B)));return B}mxEvent.addListener(V,"change",function(B){D=parseInt(V.value);O(G[D]);mxEvent.consume(B)});if("mxfile"==J.nodeName){var q=J.getElementsByTagName("diagram");
+G=[];for(var y=0;y<q.length;y++)G.push(q[y]);0<G.length&&O(G[D]);V.innerText="";if(1<G.length)for(V.style.display="",y=0;y<G.length;y++)q=document.createElement("option"),mxUtils.write(q,G[y].getAttribute("name")||mxResources.get("pageWithNumber",[y+1])),q.setAttribute("value",y),y==D&&q.setAttribute("selected","selected"),V.appendChild(q);else V.style.display="none"}else Q(J)};k.appendChild(V);k.appendChild(f);k.appendChild(E);k.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
f.className="geBtn";u=null!=u?mxUtils.button(mxResources.get("ignore"),u):null;null!=u&&(u.className="geBtn");b.editor.cancelFirst?(g.appendChild(f),null!=u&&g.appendChild(u),g.appendChild(p),g.appendChild(n)):(g.appendChild(n),g.appendChild(p),null!=u&&g.appendChild(u),g.appendChild(f));H.appendChild(g);H.appendChild(k);this.container=H},FindWindow=function(b,e,f,c,l,n){function p(m,z,I){if("object"===typeof z.value&&null!=z.value.attributes){z=z.value.attributes;for(var L=0;L<z.length;L++)if("label"!=
-z[L].nodeName){var N=mxUtils.trim(z[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==m&&0<=N.indexOf(I)||null!=m&&m.test(N))return!0}}return!1}function u(){g?(C.removeAttribute("disabled"),M.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));D.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function G(m,z,I){y.innerText="";var L=F.model.getDescendants(F.model.getRoot()),N=D.value.toLowerCase(),
-O=R.checked?new RegExp(N):null,S=null;v=null;K!=N&&(K=N,d=null,k=!1);var U=null==d;if(0<N.length){if(k){k=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;d=null;do k=!1,L=b.pages[m],F=b.createTemporaryGraph(F.getStylesheet()),b.updatePageRoot(L),F.model.setRoot(L.root),m=(m+1)%b.pages.length;while(!G(!0,z,I)&&m!=W);d&&(d=null,I?b.editor.graph.model.execute(new SelectPage(b,L)):b.selectPage(L));k=!1;F=b.editor.graph;return G(!0,z,I)}for(X=0;X<L.length;X++){W=
-F.view.getState(L[X]);z&&(U=U||W==d);if(null!=W&&null!=W.cell.value&&(U||null==S)&&(F.model.isVertex(W.cell)||F.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=F.sanitizeHtml(F.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=F.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&n&&W==d&&(label=label.substr(t),Z=t);var Y=""==E.value;if(null==O&&(0<=label.indexOf(N)||Y&&p(O,W.cell,N))||null!=O&&(O.test(label)||
-Y&&p(O,W.cell,N)))if(n&&(null!=O?(Y=label.match(O),null!=Y&&0<Y.length&&(v=Y[0].toLowerCase(),t=Z+Y.index+v.length)):(v=N,t=Z+label.indexOf(N)+v.length)),U){S=W;break}else null==S&&(S=W)}U=U||W==d}}if(null!=S){if(X==L.length&&V.checked)return d=null,k=!0,G(!0,z,I);d=S;F.scrollCellToVisible(d.cell);F.isEnabled()&&!F.isCellLocked(d.cell)?I||F.getSelectionCell()==d.cell&&1==F.getSelectionCount()||F.setSelectionCell(d.cell):F.highlightCell(d.cell)}else{if(!m&&V.checked)return k=!0,G(!0,z,I);F.isEnabled()&&
-!I&&F.clearSelection()}g=null!=S;n&&!m&&u();return 0==N.length||null!=S}var H=b.actions.get("findReplace"),F=b.editor.graph,K=null,d=null,g=!1,k=!1,v=null,t=0,x=1,A=document.createElement("div");A.style.userSelect="none";A.style.overflow="hidden";A.style.padding="10px";A.style.height="100%";var J=n?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=J;
-D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";A.appendChild(D);mxUtils.br(A);if(n){var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("replaceWith"));E.setAttribute("type","text");E.style.marginTop="4px";E.style.marginBottom="6px";E.style.width=J;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";A.appendChild(E);mxUtils.br(A);mxEvent.addListener(E,"input",u)}var R=document.createElement("input");R.setAttribute("id",
+z[L].nodeName){var N=mxUtils.trim(z[L].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==m&&0<=N.indexOf(I)||null!=m&&m.test(N))return!0}}return!1}function u(){g?(C.removeAttribute("disabled"),M.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));D.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function F(m,z,I){y.innerText="";var L=E.model.getDescendants(E.model.getRoot()),N=D.value.toLowerCase(),
+P=R.checked?new RegExp(N):null,S=null;v=null;K!=N&&(K=N,d=null,k=!1);var U=null==d;if(0<N.length){if(k){k=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}m=(W+1)%b.pages.length;d=null;do k=!1,L=b.pages[m],E=b.createTemporaryGraph(E.getStylesheet()),b.updatePageRoot(L),E.model.setRoot(L.root),m=(m+1)%b.pages.length;while(!F(!0,z,I)&&m!=W);d&&(d=null,I?b.editor.graph.model.execute(new SelectPage(b,L)):b.selectPage(L));k=!1;E=b.editor.graph;return F(!0,z,I)}for(X=0;X<L.length;X++){W=
+E.view.getState(L[X]);z&&(U=U||W==d);if(null!=W&&null!=W.cell.value&&(U||null==S)&&(E.model.isVertex(W.cell)||E.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(Q.innerHTML=E.sanitizeHtml(E.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([Q])):label=E.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;z&&n&&W==d&&(label=label.substr(t),Z=t);var Y=""==G.value;if(null==P&&(0<=label.indexOf(N)||Y&&p(P,W.cell,N))||null!=P&&(P.test(label)||
+Y&&p(P,W.cell,N)))if(n&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(v=Y[0].toLowerCase(),t=Z+Y.index+v.length)):(v=N,t=Z+label.indexOf(N)+v.length)),U){S=W;break}else null==S&&(S=W)}U=U||W==d}}if(null!=S){if(X==L.length&&V.checked)return d=null,k=!0,F(!0,z,I);d=S;E.scrollCellToVisible(d.cell);E.isEnabled()&&!E.isCellLocked(d.cell)?I||E.getSelectionCell()==d.cell&&1==E.getSelectionCount()||E.setSelectionCell(d.cell):E.highlightCell(d.cell)}else{if(!m&&V.checked)return k=!0,F(!0,z,I);E.isEnabled()&&
+!I&&E.clearSelection()}g=null!=S;n&&!m&&u();return 0==N.length||null!=S}var H=b.actions.get("findReplace"),E=b.editor.graph,K=null,d=null,g=!1,k=!1,v=null,t=0,x=1,A=document.createElement("div");A.style.userSelect="none";A.style.overflow="hidden";A.style.padding="10px";A.style.height="100%";var J=n?"260px":"200px",D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("find"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=J;
+D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";A.appendChild(D);mxUtils.br(A);if(n){var G=document.createElement("input");G.setAttribute("placeholder",mxResources.get("replaceWith"));G.setAttribute("type","text");G.style.marginTop="4px";G.style.marginBottom="6px";G.style.width=J;G.style.fontSize="12px";G.style.borderRadius="4px";G.style.padding="6px";A.appendChild(G);mxUtils.br(A);mxEvent.addListener(G,"input",u)}var R=document.createElement("input");R.setAttribute("id",
"geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";A.appendChild(R);J=document.createElement("label");J.setAttribute("for","geFindWinRegExChck");A.appendChild(J);mxUtils.write(J,mxResources.get("regularExpression"));A.appendChild(J);J=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");J.style.position="relative";J.style.marginLeft="6px";J.style.top="3px";A.appendChild(J);mxUtils.br(A);var V=document.createElement("input");V.setAttribute("id","geFindWinAllPagesChck");
-V.setAttribute("type","checkbox");V.style.marginRight="4px";A.appendChild(V);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");A.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));A.appendChild(J);var Q=document.createElement("div");mxUtils.br(A);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop="6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";A.appendChild(J);var P=mxUtils.button(mxResources.get("reset"),
-function(){y.innerText="";D.value="";D.style.backgroundColor="";n&&(E.value="",u());K=d=null;k=!1;D.focus()});P.setAttribute("title",mxResources.get("reset"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";n||J.appendChild(P);var q=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",
-mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";J.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(n){var B=function(m,z,I,L,N){if(null==N||"1"!=N.html)return L=m.toLowerCase().indexOf(z,L),0>L?m:m.substr(0,L)+I+m.substr(L+z.length);var O=m;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var S=-1;for(m=m.replace(/<br>/ig,
-"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=m.indexOf("<",S+1));)N.push(S);S=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");L=m.toLowerCase().indexOf(z,L);if(0>L)return O;O=L+z.length;I=mxUtils.htmlEntities(I);m=m.substr(0,L)+I+m.substr(O);for(var U=0,W=0;W<N.length;W++){if(N[W]-U<L)m=m.substr(0,N[W])+S[W]+m.substr(N[W]);else{var X=N[W]-U<O?L+U:N[W]+(I.length-z.length);m=m.substr(0,X)+S[W]+m.substr(X)}U+=S[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,
-"$1").replace(/\n/g,"<br>")},C=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=F.getLabel(m);F.isCellEditable(m)&&F.model.setValue(m,B(z,v,E.value,t-v.length,F.getCurrentCellStyle(m)));D.style.backgroundColor=G(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(I){b.handleError(I)}});C.setAttribute("title",mxResources.get("replFind"));C.style.float="none";C.style.width="120px";C.style.marginTop="6px";C.style.marginLeft="8px";C.style.overflow="hidden";C.style.textOverflow=
-"ellipsis";C.className="geBtn gePrimaryBtn";C.setAttribute("disabled","disabled");J.appendChild(C);mxUtils.br(J);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=F.getLabel(m);F.model.setValue(m,B(z,v,E.value,t-v.length,F.getCurrentCellStyle(m)));C.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(I){b.handleError(I)}});M.setAttribute("title",mxResources.get("replace"));M.style.float="none";M.style.width="120px";M.style.marginTop=
-"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");J.appendChild(M);var T=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";K=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;F.getModel().beginUpdate();try{for(var I=0,L={};G(!1,!0,!0)&&100>I;){var N=d.cell,O=F.getLabel(N),S=L[N.id];if(S&&S.replAllMrk==x&&S.replAllPos>=t)break;L[N.id]=
-{replAllMrk:x,replAllPos:t};F.isCellEditable(N)&&(F.model.setValue(N,B(O,v,E.value,t-v.length,F.getCurrentCellStyle(N))),I++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[I]))}catch(U){b.handleError(U)}finally{F.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}x++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=
-"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(P);P=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));P.setAttribute("title",mxResources.get("close"));P.style.float="none";P.style.width="120px";P.style.marginTop="6px";P.style.marginLeft="8px";P.style.overflow="hidden";P.style.textOverflow="ellipsis";P.className="geBtn";
-J.appendChild(P);mxUtils.br(J);J.appendChild(y)}else P.style.width="90px",q.style.width="90px";mxEvent.addListener(D,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(K!=D.value.toLowerCase()||13==m.keyCode)try{D.style.backgroundColor=G()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(A,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&
+V.setAttribute("type","checkbox");V.style.marginRight="4px";A.appendChild(V);J=document.createElement("label");J.setAttribute("for","geFindWinAllPagesChck");A.appendChild(J);mxUtils.write(J,mxResources.get("allPages"));A.appendChild(J);var Q=document.createElement("div");mxUtils.br(A);J=document.createElement("div");J.style.left="0px";J.style.right="0px";J.style.marginTop="6px";J.style.padding="0 6px 0 6px";J.style.textAlign="center";A.appendChild(J);var O=mxUtils.button(mxResources.get("reset"),
+function(){y.innerText="";D.value="";D.style.backgroundColor="";n&&(G.value="",u());K=d=null;k=!1;D.focus()});O.setAttribute("title",mxResources.get("reset"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";n||J.appendChild(O);var q=mxUtils.button(mxResources.get("find"),function(){try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(m){b.handleError(m)}});q.setAttribute("title",
+mxResources.get("find")+" (Enter)");q.style.float="none";q.style.width="120px";q.style.marginTop="6px";q.style.marginLeft="8px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";q.className="geBtn gePrimaryBtn";J.appendChild(q);var y=document.createElement("div");y.style.marginTop="10px";if(n){var B=function(m,z,I,L,N){if(null==N||"1"!=N.html)return L=m.toLowerCase().indexOf(z,L),0>L?m:m.substr(0,L)+I+m.substr(L+z.length);var P=m;z=mxUtils.htmlEntities(z,!1,!1,!1);N=[];var S=-1;for(m=m.replace(/<br>/ig,
+"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=m.indexOf("<",S+1));)N.push(S);S=m.match(/<[^>]*>/g);m=m.replace(/<[^>]*>/g,"");L=m.toLowerCase().indexOf(z,L);if(0>L)return P;P=L+z.length;I=mxUtils.htmlEntities(I);m=m.substr(0,L)+I+m.substr(P);for(var U=0,W=0;W<N.length;W++){if(N[W]-U<L)m=m.substr(0,N[W])+S[W]+m.substr(N[W]);else{var X=N[W]-U<P?L+U:N[W]+(I.length-z.length);m=m.substr(0,X)+S[W]+m.substr(X)}U+=S[W].length}return m.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,
+"$1").replace(/\n/g,"<br>")},C=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=E.getLabel(m);E.isCellEditable(m)&&E.model.setValue(m,B(z,v,G.value,t-v.length,E.getCurrentCellStyle(m)));D.style.backgroundColor=F(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(I){b.handleError(I)}});C.setAttribute("title",mxResources.get("replFind"));C.style.float="none";C.style.width="120px";C.style.marginTop="6px";C.style.marginLeft="8px";C.style.overflow="hidden";C.style.textOverflow=
+"ellipsis";C.className="geBtn gePrimaryBtn";C.setAttribute("disabled","disabled");J.appendChild(C);mxUtils.br(J);var M=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=v&&null!=d){var m=d.cell,z=E.getLabel(m);E.model.setValue(m,B(z,v,G.value,t-v.length,E.getCurrentCellStyle(m)));C.setAttribute("disabled","disabled");M.setAttribute("disabled","disabled")}}catch(I){b.handleError(I)}});M.setAttribute("title",mxResources.get("replace"));M.style.float="none";M.style.width="120px";M.style.marginTop=
+"6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn gePrimaryBtn";M.setAttribute("disabled","disabled");J.appendChild(M);var T=mxUtils.button(mxResources.get("replaceAll"),function(){y.innerText="";K=null;var m=b.currentPage,z=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;E.getModel().beginUpdate();try{for(var I=0,L={};F(!1,!0,!0)&&100>I;){var N=d.cell,P=E.getLabel(N),S=L[N.id];if(S&&S.replAllMrk==x&&S.replAllPos>=t)break;L[N.id]=
+{replAllMrk:x,replAllPos:t};E.isCellEditable(N)&&(E.model.setValue(N,B(P,v,G.value,t-v.length,E.getCurrentCellStyle(N))),I++)}m!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,m));mxUtils.write(y,mxResources.get("matchesRepl",[I]))}catch(U){b.handleError(U)}finally{E.getModel().endUpdate(),b.editor.graph.setSelectionCells(z),b.editor.graph.rendering=!0}x++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=
+"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");J.appendChild(T);mxUtils.br(J);J.appendChild(O);O=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));O.setAttribute("title",mxResources.get("close"));O.style.float="none";O.style.width="120px";O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn";
+J.appendChild(O);mxUtils.br(J);J.appendChild(y)}else O.style.width="90px",q.style.width="90px";mxEvent.addListener(D,"keyup",function(m){if(91==m.keyCode||93==m.keyCode||17==m.keyCode)mxEvent.consume(m);else if(27==m.keyCode)H.funct();else if(K!=D.value.toLowerCase()||13==m.keyCode)try{D.style.backgroundColor=F()?"":"light-dark(#ffcfcf, #ff0000)"}catch(z){D.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(A,"keydown",function(m){70==m.keyCode&&b.keyHandler.isControlDown(m)&&
!mxEvent.isShiftDown(m)&&(H.funct(),mxEvent.consume(m))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),A,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null),
-null!=b.pages&&1<b.pages.length?V.removeAttribute("disabled"):(V.checked=!1,V.setAttribute("disabled","disabled"))):F.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,n){var p=b.editor.graph,u=document.createElement("div");u.style.textAlign="center";u.style.userSelect="none";u.style.overflow="hidden";u.style.height="100%";if(n){var G=function(){var k=p.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=
-mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&K.setAttribute("title",k))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=p.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";u.appendChild(H);p.freehand.setPerfectFreehandMode(H.checked);var F=document.createElement("label");F.setAttribute("for","geFreehandBrush");
-F.style.float="left";F.style.marginTop="10px";u.appendChild(F);mxUtils.write(F,mxResources.get("brush"));u.appendChild(F);var K=document.createElement("tempDiv");K.style.display="block";K.style.width="100%";K.style.height="100%";K.style.borderRadius="2px";K.style.boxSizing="border-box";K.style.border="1px solid black";K.style.backgroundColor=p.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){K.style.backgroundColor=p.freehand.getStrokeColor()});G();F=mxUtils.button("",mxUtils.bind(this,
-function(k){b.pickColor(p.freehand.getStrokeColor(!0),function(v){p.freehand.setStrokeColor(v);K.style.backgroundColor=p.freehand.getStrokeColor();G()},"default");mxEvent.consume(k)}));F.style.position="absolute";F.style.boxSizing="border-box";F.style.padding="2px";F.style.top="8px";F.style.right="8px";F.style.width="28px";F.style.height="18px";F.className="geColorBtn";F.innerText="";F.appendChild(K);u.appendChild(F);F=document.createElement("img");F.setAttribute("title",mxResources.get("settings"));
-F.setAttribute("src",Editor.gearImage);F.className="geToolbarButton geAdaptiveAsset";F.style.position="absolute";F.style.boxSizing="border-box";F.style.padding="2px";F.style.top="8px";F.style.right="38px";F.style.width="18px";F.style.height="18px";F.style.opacity="0.6";u.appendChild(F);mxEvent.addListener(F,"click",mxUtils.bind(this,function(k){k=p.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(v){!isNaN(v)&&0<v&&20>=v&&p.freehand.setSmoothing(parseInt(v))})}));
-mxUtils.br(u);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",p.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";u.appendChild(d);mxUtils.br(u);F=function(){p.freehand.setPerfectFreehandMode(H.checked);d.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",F);F();mxEvent.addListener(d,"change",function(){p.freehand.setBrushSize(parseInt(this.value))})}var g=
+null!=b.pages&&1<b.pages.length?V.removeAttribute("disabled"):(V.checked=!1,V.setAttribute("disabled","disabled"))):E.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,e,f,c,l,n){var p=b.editor.graph,u=document.createElement("div");u.style.textAlign="center";u.style.userSelect="none";u.style.overflow="hidden";u.style.height="100%";if(n){var F=function(){var k=p.freehand.getStrokeColor(!0);null!=k&&k!=mxConstants.NONE&&1<k.length&&"string"===typeof k&&("default"==k?k=
+mxResources.get("useBlackAndWhite"):(k="#"==k.charAt(0)?k.substring(1).toUpperCase():k,k=ColorDialog.prototype.colorNames[k]),null!=k&&K.setAttribute("title",k))},H=document.createElement("input");H.setAttribute("id","geFreehandBrush");H.setAttribute("type","checkbox");H.checked=p.freehand.isPerfectFreehandMode();H.style.margin="10px 5px 0px 10px";H.style.float="left";u.appendChild(H);p.freehand.setPerfectFreehandMode(H.checked);var E=document.createElement("label");E.setAttribute("for","geFreehandBrush");
+E.style.float="left";E.style.marginTop="10px";u.appendChild(E);mxUtils.write(E,mxResources.get("brush"));u.appendChild(E);var K=document.createElement("tempDiv");K.style.display="block";K.style.width="100%";K.style.height="100%";K.style.borderRadius="2px";K.style.boxSizing="border-box";K.style.border="1px solid black";K.style.backgroundColor=p.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){K.style.backgroundColor=p.freehand.getStrokeColor()});F();E=mxUtils.button("",mxUtils.bind(this,
+function(k){b.pickColor(p.freehand.getStrokeColor(!0),function(v){p.freehand.setStrokeColor(v);K.style.backgroundColor=p.freehand.getStrokeColor();F()},"default");mxEvent.consume(k)}));E.style.position="absolute";E.style.boxSizing="border-box";E.style.padding="2px";E.style.top="8px";E.style.right="8px";E.style.width="28px";E.style.height="18px";E.className="geColorBtn";E.innerText="";E.appendChild(K);u.appendChild(E);E=document.createElement("img");E.setAttribute("title",mxResources.get("settings"));
+E.setAttribute("src",Editor.gearImage);E.className="geToolbarButton geAdaptiveAsset";E.style.position="absolute";E.style.boxSizing="border-box";E.style.padding="2px";E.style.top="8px";E.style.right="38px";E.style.width="18px";E.style.height="18px";E.style.opacity="0.6";u.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(k){k=p.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",k,function(v){!isNaN(v)&&0<v&&20>=v&&p.freehand.setSmoothing(parseInt(v))})}));
+mxUtils.br(u);var d=document.createElement("input");d.setAttribute("type","range");d.setAttribute("min","2");d.setAttribute("max","30");d.setAttribute("value",p.freehand.getBrushSize());d.style.width="90%";d.style.visibility="hidden";u.appendChild(d);mxUtils.br(u);E=function(){p.freehand.setPerfectFreehandMode(H.checked);d.style.visibility=H.checked?"visible":"hidden"};mxEvent.addListener(H,"change",E);E();mxEvent.addListener(d,"change",function(){p.freehand.setBrushSize(parseInt(this.value))})}var g=
mxUtils.button(mxResources.get("startDrawing"),function(){p.freehand.isDrawing()?p.freehand.stopDrawing():p.freehand.startDrawing()});g.setAttribute("title",mxResources.get("startDrawing")+" (X)");g.style.margin=n?"5px 0 0 0":"10px 0 0 0";g.style.width="90%";g.style.boxSizing="border-box";g.style.overflow="hidden";g.style.textOverflow="ellipsis";g.style.textAlign="center";g.className="geBtn gePrimaryBtn";u.appendChild(g);this.window=new mxWindow(mxResources.get("freehand"),u,e,f,c,l,!0,!0);this.window.destroyOnClose=
!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);p.addListener("freehandStateChanged",mxUtils.bind(this,function(){g.innerText="";mxUtils.write(g,mxResources.get(p.freehand.isDrawing()?"stopDrawing":"startDrawing"));var k=document.createElement("span");k.style.opacity="0.7";k.style["float"]="right";mxUtils.write(k,"X");g.appendChild(k);g.setAttribute("title",mxResources.get(p.freehand.isDrawing()?"stopDrawing":"startDrawing")+" (X)");g.className="geBtn"+(p.freehand.isDrawing()?
" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){p.freehand.isDrawing()&&p.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=document.createElement("div");p.style.userSelect="none";p.style.overflow="hidden";p.style.height="100%";var u=document.createElement("div");u.style.display="flex";u.style.alignItems="center";
-u.style.justifyContent="center";u.style.paddingTop="20px";var G=document.createElement("input");G.setAttribute("type","checkbox");G.style.marginRight="4px";G.checked=!0;var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var F=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(n.isSelectionEmpty()?n.getVerticesAndEdges():n.getSelectionCells(),G.checked,H.checked)}));
-F.setAttribute("title","Convert Colors");F.className="geBtn gePrimaryBtn";u.appendChild(F);p.appendChild(u);u=u.cloneNode(!1);u.appendChild(H);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("background"));p.appendChild(u);u=u.cloneNode(!1);u.appendChild(G);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("labels"));p.appendChild(u);this.window=new mxWindow(mxResources.get("adaptiveColors"),p,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);
-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function n(){P=!0;t.value=q;K.isSelectionEmpty()?(A.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):A.removeAttribute("disabled");b.isDiagramEmpty()?(x.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):x.removeAttribute("disabled");
-P=!1}function p(B,C,M){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==M?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,B);T.setAttribute("title",B);mxEvent.addListener(T,"click",C);return T}function u(B){var C=
-document.createElement("div");C.style.display="block";C.style.position="relative";C.style.backgroundColor="#e0e0e0";C.style.borderRadius="4px";C.style.wordWrap="break-word";C.style.textAlign="left";C.style.padding="6px";C.style.margin="12px";C.style.left="0px";C.style.right="0px";mxUtils.write(C,B);g.appendChild(C);return C}function G(B){var C=B.indexOf("<mxGraphModel "),M=B.indexOf("</mxGraphModel>");0>C&&(C=B.indexOf("<mxGraphModel>"));if(0<=C&&M>C){var T=mxUtils,m=T.trim,z=B.substring(0,C),I=z.indexOf("```");
+u.style.justifyContent="center";u.style.paddingTop="20px";var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginRight="4px";F.checked=!0;var H=document.createElement("input");H.setAttribute("type","checkbox");H.style.marginRight="4px";H.checked=!0;var E=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(n.isSelectionEmpty()?n.getVerticesAndEdges():n.getSelectionCells(),F.checked,H.checked)}));
+E.setAttribute("title","Convert Colors");E.className="geBtn gePrimaryBtn";u.appendChild(E);p.appendChild(u);u=u.cloneNode(!1);u.appendChild(H);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("background"));p.appendChild(u);u=u.cloneNode(!1);u.appendChild(F);u.style.paddingTop="8px";mxUtils.write(u,mxResources.get("labels"));p.appendChild(u);this.window=new mxWindow(mxResources.get("adaptiveColors"),p,e,f,c,l,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);
+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,e,f,c,l){function n(){O=!0;t.value=q;K.isSelectionEmpty()?(A.setAttribute("disabled","disabled"),"selectionOnly"==t.value&&(t.value="includeCopyOfMyDiagram")):A.removeAttribute("disabled");b.isDiagramEmpty()?(x.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==t.value&&(t.value="help")):x.removeAttribute("disabled");
+O=!1}function p(B,C,M){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==M?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,B);T.setAttribute("title",B);mxEvent.addListener(T,"click",C);return T}function u(B){var C=
+document.createElement("div");C.style.display="block";C.style.position="relative";C.style.backgroundColor="#e0e0e0";C.style.borderRadius="4px";C.style.wordWrap="break-word";C.style.textAlign="left";C.style.padding="6px";C.style.margin="12px";C.style.left="0px";C.style.right="0px";mxUtils.write(C,B);g.appendChild(C);return C}function F(B){var C=B.indexOf("<mxGraphModel "),M=B.indexOf("</mxGraphModel>");0>C&&(C=B.indexOf("<mxGraphModel>"));if(0<=C&&M>C){var T=mxUtils,m=T.trim,z=B.substring(0,C),I=z.indexOf("```");
0<=I&&(z=z.substring(z,0,I+6));T=m.call(T,z);C=B.substring(C,M+15);m=mxUtils;z=m.trim;B=B.substring(M+15);M=B.lastIndexOf("```");0<=M&&(B=B.substring(M+3));return[T,C,z.call(m,B)]}return null}function H(B){var C=u(B);C.style.cursor="pointer";C.style.marginBottom="2px";C.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(C,"click",function(U){Q.value=B;Q.focus()});var M=u("");M.style.marginTop="2px";var T=b.currentPage,m=B,z=[],I=null;if("includeCopyOfMyDiagram"==t.value||"selectionOnly"==
t.value){var L=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==t.value&&(L.isObjectIgnored=function(U){return U.constructor==mxCell&&!K.model.isRoot(U)&&!K.model.isLayer(U)&&!K.isCellSelected(U)&&!K.isAncestorSelected(U)});I=L.encode(K.getModel());L.document.appendChild(I);z.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(I)})}else"create"==
t.value?(m=D.value.replace(/([A-Z])/g," $1").toLowerCase(),m="Write the declaration code for a "+(""!=m?m:"graph")+' that shows "'+(""!=B?B:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):z.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});z.push({role:"user",content:m});var N={model:Editor.gptModel,
-messages:z},O=0;for(z=0;z<N.messages.length;z++)O+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var U=document.createElement("img");U.setAttribute("title","Processing "+O+" tokens");U.setAttribute("src",IMAGE_PATH+"/spin.gif");U.style.marginLeft="6px";M.appendChild(U);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=
+messages:z},P=0;for(z=0;z<N.messages.length;z++)P+=N.messages[z].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){M.innerHTML="";mxUtils.write(M,mxResources.get("loading")+"...");var U=document.createElement("img");U.setAttribute("title","Processing "+P+" tokens");U.setAttribute("src",IMAGE_PATH+"/spin.gif");U.style.marginLeft="6px";M.appendChild(U);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=
new mxXmlRequest(Editor.gptUrl,JSON.stringify(N),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();M.innerHTML="";mxUtils.write(M,ba.message);M.appendChild(p(mxResources.get("tryAgain"),S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=
-G(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ia=null;null!=I&&(fa=new mxCodec(I.ownerDocument),ia=new mxGraphModel,fa.decode(I,ia));fa=mxUtils.bind(this,function(pa){K.model.beginUpdate();try{if(null!=
+F(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ia=null;null!=I&&(fa=new mxCodec(I.ownerDocument),ia=new mxGraphModel,fa.decode(I,ia));fa=mxUtils.bind(this,function(pa){K.model.beginUpdate();try{if(null!=
ia&&null!=b.getPageIndex(T)){b.selectPage(T);var oa=b.diffCells(ia.root,da.root);b.patchPage(T,oa,null,!0)}else{var ha=da.getChildren(da.getChildAt(da.getRoot(),0));K.setSelectionCells(K.importCells(ha))}}finally{K.model.endUpdate()}mxEvent.consume(pa)});aa=K.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));
M.innerHTML="";C=M;0<ea[0].length&&(mxUtils.write(C,ea[0]),mxUtils.br(C));C.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(p(mxResources.get("tryAgain"),S,"flex"));ca.appendChild(p(mxResources.get(null!=I?"apply":"insert"),fa,"flex"));M.appendChild(ca);0<ea[2].length&&(mxUtils.br(C),mxUtils.write(C,ea[2]));C.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else M.innerHTML="",C=M,mxUtils.write(C,ba),
M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",N,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==t.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ia){Y(ia)})),b.generateMermaidImage(fa,null,function(){},
function(ia){mxMermaidToDrawio.resetListeners();Z(ia)})):(Y(ca),M.appendChild(p(mxResources.get("tryAgain"),S)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ia){}M.innerHTML="";mxUtils.write(M,aa);M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ia){Z(ia)}}),Z)}),function(W){M.innerHTML="";mxUtils.write(M,W.message);M.appendChild(p(mxResources.get("tryAgain"),
-S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function F(){""!=mxUtils.trim(Q.value)&&(H(Q.value),Q.value="")}var K=b.editor.graph,d=document.createElement("div");d.style.textAlign="center";d.style.overflow="hidden";d.style.height="100%";var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.top="0px";g.style.left="0px";g.style.right="0px";g.style.bottom="104px";d.appendChild(g);var k=document.createElement("div");k.style.position=
+S));M.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function E(){""!=mxUtils.trim(Q.value)&&(H(Q.value),Q.value="")}var K=b.editor.graph,d=document.createElement("div");d.style.textAlign="center";d.style.overflow="hidden";d.style.height="100%";var g=document.createElement("div");g.style.position="absolute";g.style.overflow="auto";g.style.top="0px";g.style.left="0px";g.style.right="0px";g.style.bottom="104px";d.appendChild(g);var k=document.createElement("div");k.style.position=
"absolute";k.style.boxSizing="border-box";k.style.borderRadius="4px";k.style.border="1px solid lightgray";k.style.margin="8px 8px 16px 8px";k.style.padding="8px";k.style.left="0px";k.style.right="0px";k.style.bottom="0px";k.style.padding="6px";k.style.height="80px";var v=document.createElement("div");v.style.display="flex";v.style.gap="6px";v.style.marginBottom="6px";var t=document.createElement("select");t.style.textOverflow="ellipsis";t.style.flexGrow="1";t.style.padding="4px";t.style.minWidth=
"0";k.appendChild(v);var x=document.createElement("option");x.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(x,mxResources.get("includeCopyOfMyDiagram"));t.appendChild(x);var A=document.createElement("option");A.setAttribute("value","selectionOnly");mxUtils.write(A,mxResources.get("selectionOnly"));t.appendChild(A);v.appendChild(t);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var J=document.createElement("option");J.setAttribute("value","create");mxUtils.write(J,
-mxResources.get("create"));t.appendChild(J)}J=document.createElement("option");J.setAttribute("value","help");mxUtils.write(J,mxResources.get("help"));t.appendChild(J);J=document.createElement("option");J.setAttribute("value","reset");mxUtils.write(J,mxResources.get("reset"));t.appendChild(J);var D=document.createElement("select");D.style.textOverflow="ellipsis";D.style.flexGrow="1";D.style.padding="4px";D.style.minWidth="0";for(J=0;J<EditorUi.mermaidDiagramTypes.length;J++){var E=document.createElement("option"),
-R=EditorUi.mermaidDiagramTypes[J],V=R;"erDiagram"==V&&(V="entityRelationshipDiagram");V=mxResources.get(V,null,V.charAt(0).toUpperCase()+V.substring(1).replace(/[A-Z]/g," $&"));E.setAttribute("value",R);mxUtils.write(E,V);D.appendChild(E)}v.appendChild(D);v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.textOverflow="clip";v.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";
+mxResources.get("create"));t.appendChild(J)}J=document.createElement("option");J.setAttribute("value","help");mxUtils.write(J,mxResources.get("help"));t.appendChild(J);J=document.createElement("option");J.setAttribute("value","reset");mxUtils.write(J,mxResources.get("reset"));t.appendChild(J);var D=document.createElement("select");D.style.textOverflow="ellipsis";D.style.flexGrow="1";D.style.padding="4px";D.style.minWidth="0";for(J=0;J<EditorUi.mermaidDiagramTypes.length;J++){var G=document.createElement("option"),
+R=EditorUi.mermaidDiagramTypes[J],V=R;"erDiagram"==V&&(V="entityRelationshipDiagram");V=mxResources.get(V,null,V.charAt(0).toUpperCase()+V.substring(1).replace(/[A-Z]/g," $&"));G.setAttribute("value",R);mxUtils.write(G,V);D.appendChild(G)}v.appendChild(D);v=document.createElement("div");v.style.whiteSpace="nowrap";v.style.textOverflow="clip";v.style.cursor="default";var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100%";Q.style.outline="none";Q.style.border="none";
Q.style.background="transparent";Q.style.padding="8px 26px 8px 8px";Q.style.boxSizing="border-box";v.appendChild(Q);J=document.createElement("img");J.setAttribute("src",Editor.sendImage);J.setAttribute("title",mxResources.get("sendMessage"));J.className="geAdaptiveAsset";J.style.position="relative";J.style.cursor="pointer";J.style.opacity="0.5";J.style.height="19px";J.style.left="-24px";J.style.top="5px";J.style.background="url('"+b.editor.transparentImage+"')";v.appendChild(J);k.appendChild(v);K.isSelectionEmpty()?
-b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var P=!1,q=t.value,y=function(){Q.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",D.style.display=""):(t.style.width="100%",D.style.display="none")};y();mxEvent.addListener(t,"change",function(){P||("reset"==t.value?(t.value=q,g.innerHTML=""):q=t.value,y())});K.selectionModel.addListener(mxEvent.CHANGE,n);K.getModel().addListener(mxEvent.CHANGE,
-n);n();mxEvent.addListener(J,"click",F);mxEvent.addListener(Q,"keydown",function(B){13!=B.keyCode||mxEvent.isShiftDown(B)||F()});d.appendChild(k);this.window=new mxWindow(mxResources.get("chatWindowTitle"),d,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){K.getModel().removeListener(n)}));this.window.addListener("show",
-mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)p=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var u=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(G,H){if(n.isEnabled()){var F=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=
-K.split(" ");for(var d=[],g=[],k=0;k<K.length;k++){var v=mxUtils.trim(K[k]);""!=v&&(g.push(v),0>mxUtils.indexOf(G,v)&&d.push(v))}n.isSelectionEmpty()?H(G.concat(d)):n.addTagsForCells(n.getSelectionCells(),g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(F.container,320,80,!0,!0);F.init()}},p);p=u.div;this.window=new mxWindow(mxResources.get("tags"),p,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
+b.isDiagramEmpty()?t.value="help":t.value="includeCopyOfMyDiagram":t.value="selectionOnly";var O=!1,q=t.value,y=function(){Q.setAttribute("placeholder",mxResources.get("create"==t.value?"describeYourDiagram":"askMeAnything"));"create"==t.value?(t.style.width="",D.style.display=""):(t.style.width="100%",D.style.display="none")};y();mxEvent.addListener(t,"change",function(){O||("reset"==t.value?(t.value=q,g.innerHTML=""):q=t.value,y())});K.selectionModel.addListener(mxEvent.CHANGE,n);K.getModel().addListener(mxEvent.CHANGE,
+n);n();mxEvent.addListener(J,"click",E);mxEvent.addListener(Q,"keydown",function(B){13!=B.keyCode||mxEvent.isShiftDown(B)||E()});d.appendChild(k);this.window=new mxWindow(mxResources.get("chatWindowTitle"),d,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){K.getModel().removeListener(n)}));this.window.addListener("show",
+mxUtils.bind(this,function(){this.window.fit();Q.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,e,f,c,l){var n=b.editor.graph,p=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)p=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var u=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(F,H){if(n.isEnabled()){var E=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=
+K.split(" ");for(var d=[],g=[],k=0;k<K.length;k++){var v=mxUtils.trim(K[k]);""!=v&&(g.push(v),0>mxUtils.indexOf(F,v)&&d.push(v))}n.isSelectionEmpty()?H(F.concat(d)):n.addTagsForCells(n.getSelectionCells(),g)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(E.container,320,80,!0,!0);E.init()}},p);p=u.div;this.window=new mxWindow(mxResources.get("tags"),p,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){u.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("authorizationRequired"));var p="Unknown",
u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(p=mxResources.get("oneDrive"),u.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),
-u.src=IMAGE_PATH+"/gitlab-logo.svg",u.style.width="32px"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[p]));var G=document.createElement("input");G.setAttribute("type","checkbox");p=mxUtils.button(mxResources.get("authorize"),function(){c(G.checked)});p.insertBefore(u,p.firstChild);p.style.marginTop="6px";p.className="geBigButton";p.style.fontSize="18px";p.style.padding="14px";
-l.appendChild(n);l.appendChild(b);l.appendChild(p);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(G),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),l.appendChild(f),G.checked=!0,G.defaultChecked=!0,mxEvent.addListener(n,"click",function(H){G.checked=!G.checked;mxEvent.consume(H)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var n=
-0;n<b.sidebar.customEntries.length;n++){for(var p=b.sidebar.customEntries[n]||{},u={title:b.getResource(p.title),entries:[]},G=0;null!=p.entries&&G<p.entries.length;G++){var H=p.entries[G];u.entries.push({id:H.id,title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<u.entries.length&&l.push(u)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)l.push(f[n]);else{u={title:f[n].title,entries:[]};for(G=0;G<f[n].entries.length;G++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-f[n].entries[G].id)&&u.entries.push(f[n].entries[G]);0<u.entries.length&&l.push(u)}f=l;if(e){n=mxUtils.bind(this,function(R){for(var V=0;V<R.length;V++)(function(Q){var P=k.cloneNode(!1);P.style.fontWeight="bold";P.style.backgroundColor="light-dark(#e5e5e5, #505759)";P.style.padding="6px 0px 6px 20px";mxUtils.write(P,Q.title);F.appendChild(P);for(var q=0;q<Q.entries.length;q++)(function(y){var B=k.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";
-B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.setAttribute("title",y.title+" ("+y.id+")");var C=document.createElement("input");C.setAttribute("type","checkbox");C.checked=b.sidebar.isEntryVisible(y.id);C.defaultChecked=C.checked;B.appendChild(C);mxUtils.write(B," "+y.title);F.appendChild(B);var M=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){K.style.textAlign="center";K.style.padding="0px";K.style.color="";K.innerText="";if(null!=y.desc){var m=document.createElement("pre");
+u.src=IMAGE_PATH+"/gitlab-logo.svg",u.style.width="32px"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[p]));var F=document.createElement("input");F.setAttribute("type","checkbox");p=mxUtils.button(mxResources.get("authorize"),function(){c(F.checked)});p.insertBefore(u,p.firstChild);p.style.marginTop="6px";p.className="geBigButton";p.style.fontSize="18px";p.style.padding="14px";
+l.appendChild(n);l.appendChild(b);l.appendChild(p);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(F),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),l.appendChild(f),F.checked=!0,F.defaultChecked=!0,mxEvent.addListener(n,"click",function(H){F.checked=!F.checked;mxEvent.consume(H)}));this.container=l},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),l=[];if(null!=b.sidebar.customEntries)for(var n=
+0;n<b.sidebar.customEntries.length;n++){for(var p=b.sidebar.customEntries[n]||{},u={title:b.getResource(p.title),entries:[]},F=0;null!=p.entries&&F<p.entries.length;F++){var H=p.entries[F];u.entries.push({id:H.id,title:b.getResource(H.title),desc:b.getResource(H.desc),image:H.preview})}0<u.entries.length&&l.push(u)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)l.push(f[n]);else{u={title:f[n].title,entries:[]};for(F=0;F<f[n].entries.length;F++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
+f[n].entries[F].id)&&u.entries.push(f[n].entries[F]);0<u.entries.length&&l.push(u)}f=l;if(e){n=mxUtils.bind(this,function(R){for(var V=0;V<R.length;V++)(function(Q){var O=k.cloneNode(!1);O.style.fontWeight="bold";O.style.backgroundColor="light-dark(#e5e5e5, #505759)";O.style.padding="6px 0px 6px 20px";mxUtils.write(O,Q.title);E.appendChild(O);for(var q=0;q<Q.entries.length;q++)(function(y){var B=k.cloneNode(!1);B.style.cursor="pointer";B.style.padding="4px 0px 4px 20px";B.style.whiteSpace="nowrap";
+B.style.overflow="hidden";B.style.textOverflow="ellipsis";B.setAttribute("title",y.title+" ("+y.id+")");var C=document.createElement("input");C.setAttribute("type","checkbox");C.checked=b.sidebar.isEntryVisible(y.id);C.defaultChecked=C.checked;B.appendChild(C);mxUtils.write(B," "+y.title);E.appendChild(B);var M=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){K.style.textAlign="center";K.style.padding="0px";K.style.color="";K.innerText="";if(null!=y.desc){var m=document.createElement("pre");
m.style.boxSizing="border-box";m.style.fontFamily="inherit";m.style.margin="20px";m.style.right="0px";m.style.textAlign="left";mxUtils.write(m,y.desc);K.appendChild(m)}null!=y.imageCallback?y.imageCallback(K):null!=y.image?(m=document.createElement("img"),m.setAttribute("border","0"),m.style.maxWidth="100%",m.setAttribute("src",y.image),K.appendChild(m)):null==y.desc&&(K.style.padding="20px",K.style.color="rgb(179, 179, 179)",mxUtils.write(K,mxResources.get("noPreview")));null!=d&&(d.style.backgroundColor=
-"");d=B;d.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(B,"click",M);mxEvent.addListener(B,"dblclick",function(T){C.checked=!C.checked;mxEvent.consume(T)});g.push(function(){return C.checked?y.id:null});0==V&&0==q&&M()})(Q.entries[q])})(R[V])});G=document.createElement("div");G.className="geDialogTitle";mxUtils.write(G,mxResources.get("shapes"));G.style.position="absolute";G.style.top="0px";G.style.left="0px";G.style.lineHeight="40px";G.style.height=
-"40px";G.style.right="0px";var F=document.createElement("div"),K=document.createElement("div");F.style.position="absolute";F.style.top="40px";F.style.left="0px";F.style.width="202px";F.style.bottom="60px";F.style.overflow="auto";K.style.position="absolute";K.style.left="202px";K.style.right="0px";K.style.top="40px";K.style.bottom="60px";K.style.overflow="auto";K.style.borderLeftStyle="solid";K.style.borderLeftWidth="1px";K.style.textAlign="center";var d=null,g=[],k=document.createElement("div");k.style.position=
-"relative";k.style.left="0px";k.style.right="0px";n(f);c.style.padding="30px";c.appendChild(G);c.appendChild(F);c.appendChild(K);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.position="relative";v.style.top="1px";v.checked=b.sidebar.sidebarTitles;
+"");d=B;d.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(B,"click",M);mxEvent.addListener(B,"dblclick",function(T){C.checked=!C.checked;mxEvent.consume(T)});g.push(function(){return C.checked?y.id:null});0==V&&0==q&&M()})(Q.entries[q])})(R[V])});F=document.createElement("div");F.className="geDialogTitle";mxUtils.write(F,mxResources.get("shapes"));F.style.position="absolute";F.style.top="0px";F.style.left="0px";F.style.lineHeight="40px";F.style.height=
+"40px";F.style.right="0px";var E=document.createElement("div"),K=document.createElement("div");E.style.position="absolute";E.style.top="40px";E.style.left="0px";E.style.width="202px";E.style.bottom="60px";E.style.overflow="auto";K.style.position="absolute";K.style.left="202px";K.style.right="0px";K.style.top="40px";K.style.bottom="60px";K.style.overflow="auto";K.style.borderLeftStyle="solid";K.style.borderLeftWidth="1px";K.style.textAlign="center";var d=null,g=[],k=document.createElement("div");k.style.position=
+"relative";k.style.left="0px";k.style.right="0px";n(f);c.style.padding="30px";c.appendChild(F);c.appendChild(E);c.appendChild(K);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.position="relative";v.style.top="1px";v.checked=b.sidebar.sidebarTitles;
v.defaultChecked=v.checked;f.appendChild(v);n=document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(R){v.checked=!v.checked;mxEvent.consume(R)});var t=document.createElement("input");t.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(t),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),
-t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(n,"click",function(R){mxEvent.getSource(R)!=t&&(t.checked=!t.checked,mxEvent.consume(R))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
-"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(V=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=V&&0<R.splice(V,1).length)&&b.toggleScratchpad(),V=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=V&&0<R.splice(V,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),t.checked,!0);b.setSidebarTitles(v.checked,t.checked)});G.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table");
-n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";G=document.createElement("tr");x.style.width="100%";e=document.createElement("td");l=document.createElement("td");p=document.createElement("td");var A=mxUtils.bind(this,function(R,V,Q){var P=document.createElement("input");P.type="checkbox";x.appendChild(P);P.checked=b.sidebar.isEntryVisible(Q);var q=document.createElement("span");mxUtils.write(q,V);V=document.createElement("div");V.style.display="block";V.appendChild(P);
-V.appendChild(q);mxEvent.addListener(q,"click",function(y){P.checked=!P.checked;mxEvent.consume(y)});R.appendChild(V);return function(){return P.checked?Q:null}});G.appendChild(e);G.appendChild(l);G.appendChild(p);n.appendChild(G);x.appendChild(n);g=[];var J=0;for(n=0;n<f.length;n++)for(G=0;G<f[n].entries.length;G++)J++;var D=[e,l,p],E=0;for(n=0;n<f.length;n++)(function(R){for(var V=0;V<R.entries.length;V++){var Q=R.entries[V];g.push(A(D[Math.floor(E/(J/3))],Q.title,Q.id));E++}})(f[n]);c.appendChild(x);
+t.style.position="relative",t.style.top="1px",t.checked=!0,t.defaultChecked=!0,mxEvent.addListener(n,"click",function(R){mxEvent.getSource(R)!=t&&(t.checked=!t.checked,mxEvent.consume(R))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
+"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(V=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=V&&0<R.splice(V,1).length)&&b.toggleScratchpad(),V=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=V&&0<R.splice(V,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),t.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),t.checked,!0);b.setSidebarTitles(v.checked,t.checked)});F.className="geBtn gePrimaryBtn"}else{var x=document.createElement("table");
+n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";F=document.createElement("tr");x.style.width="100%";e=document.createElement("td");l=document.createElement("td");p=document.createElement("td");var A=mxUtils.bind(this,function(R,V,Q){var O=document.createElement("input");O.type="checkbox";x.appendChild(O);O.checked=b.sidebar.isEntryVisible(Q);var q=document.createElement("span");mxUtils.write(q,V);V=document.createElement("div");V.style.display="block";V.appendChild(O);
+V.appendChild(q);mxEvent.addListener(q,"click",function(y){O.checked=!O.checked;mxEvent.consume(y)});R.appendChild(V);return function(){return O.checked?Q:null}});F.appendChild(e);F.appendChild(l);F.appendChild(p);n.appendChild(F);x.appendChild(n);g=[];var J=0;for(n=0;n<f.length;n++)for(F=0;F<f[n].entries.length;F++)J++;var D=[e,l,p],G=0;for(n=0;n<f.length;n++)(function(R){for(var V=0;V<R.entries.length;V++){var Q=R.entries[V];g.push(A(D[Math.floor(G/(J/3))],Q.title,Q.id));G++}})(f[n]);c.appendChild(x);
f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";t=document.createElement("input");isLocalStorage&&(t.setAttribute("type","checkbox"),t.checked=!0,t.defaultChecked=!0,f.appendChild(t),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(R){t.checked=!t.checked;mxEvent.consume(R)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
-n.className="geBtn";G=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}b.sidebar.showEntries(0<R.length?R.join(";"):"",t.checked);b.hideDialog()});G.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(G)):(f.appendChild(G),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,
-e,f,c){function l(){G=!0;if(0==u.length)p.innerText=mxResources.get("noPlugins");else{p.innerText="";for(var g=0;g<u.length;g++){var k=document.createElement("span");k.style.display="flex";k.style.alignItems="center";k.style.whiteSpace="nowrap";var v=document.createElement("img");v.src=Editor.trashImage;v.style.position="relative";v.style.cursor="pointer";v.style.marginRight="4px";v.style.display="inline-block";v.style.width="18px";v.setAttribute("title",mxResources.get("delete"));k.appendChild(v);
-mxUtils.write(k,u[g]);p.appendChild(k);mxUtils.br(p);mxEvent.addListener(v,"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+u[t]+'"?',function(){null!=f&&f(u[t]);u.splice(t,1);l()})}}(g))}}}var n=document.createElement("div"),p=document.createElement("div");p.style.height="180px";p.style.overflow="auto";var u=mxSettings.getPlugins().slice(),G=!1;n.appendChild(p);l();G=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(g){g&&0>mxUtils.indexOf(u,
+n.className="geBtn";F=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],V=0;V<g.length;V++){var Q=g[V].apply(this,arguments);null!=Q&&R.push(Q)}b.sidebar.showEntries(0<R.length?R.join(";"):"",t.checked);b.hideDialog()});F.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(F)):(f.appendChild(F),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,
+e,f,c){function l(){F=!0;if(0==u.length)p.innerText=mxResources.get("noPlugins");else{p.innerText="";for(var g=0;g<u.length;g++){var k=document.createElement("span");k.style.display="flex";k.style.alignItems="center";k.style.whiteSpace="nowrap";var v=document.createElement("img");v.src=Editor.trashImage;v.style.position="relative";v.style.cursor="pointer";v.style.marginRight="4px";v.style.display="inline-block";v.style.width="18px";v.setAttribute("title",mxResources.get("delete"));k.appendChild(v);
+mxUtils.write(k,u[g]);p.appendChild(k);mxUtils.br(p);mxEvent.addListener(v,"click",function(t){return function(){b.confirm(mxResources.get("delete")+' "'+u[t]+'"?',function(){null!=f&&f(u[t]);u.splice(t,1);l()})}}(g))}}}var n=document.createElement("div"),p=document.createElement("div");p.style.height="180px";p.style.overflow="auto";var u=mxSettings.getPlugins().slice(),F=!1;n.appendChild(p);l();F=!1;var H=mxUtils.button(mxResources.get("add"),null!=e?function(){e(function(g){g&&0>mxUtils.indexOf(u,
g)&&u.push(g);l()})}:function(){var g=document.createElement("div"),k=document.createElement("span");k.style.marginTop="6px";mxUtils.write(k,mxResources.get("builtinPlugins")+": ");g.appendChild(k);var v=document.createElement("select");v.style.width="150px";for(k=0;k<App.publicPlugin.length;k++){var t=document.createElement("option");mxUtils.write(t,App.publicPlugin[k]);t.value=App.publicPlugin[k];v.appendChild(t)}g.appendChild(v);mxUtils.br(g);mxUtils.br(g);k=mxUtils.button(mxResources.get("custom")+
-"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(A){b.hideDialog();if(null!=A&&0<A.length){A=A.split(";");for(var J=0;J<A.length;J++){var D=A[J],E=App.pluginRegistry[D];null!=E&&(D=E);0<D.length&&0>mxUtils.indexOf(u,D)&&u.push(D)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});k.className="geBtn";ALLOW_CUSTOM_PLUGINS||(k.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var x=
-App.pluginRegistry[v.value];0>mxUtils.indexOf(u,x)&&(u.push(x),l())}),null,null,null,k);b.showDialog(g.container,360,100,!0,!0)});H.className="geBtn";var F=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});F.className="geBtn";var K=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){G?(mxSettings.setPlugins(u),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});K.className="geBtn gePrimaryBtn";var d=document.createElement("div");
-d.style.marginTop="14px";d.style.textAlign="right";b.isOffline()||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||d.appendChild(F),d.appendChild(H),d.appendChild(K)):(d.appendChild(H),d.appendChild(K),c||d.appendChild(F));n.appendChild(d);this.container=n},CropImageDialog=function(b,e,f,c){function l(){var R=t.checked,V=x.checked,Q=g.geometry,P=G.width,q=G.height,y=(300-P)/2,B=(300-q)/2;Q.x<y?(Q.width-=y-Q.x,Q.x=y):Q.x+Q.width>y+P&&(Q.width=y+P-Q.x,
-Q.x=Math.min(Q.x,y+P));Q.y<B?(Q.height-=B-Q.y,Q.y=B):Q.y+Q.height>B+q&&(Q.height=B+q-Q.y,Q.y=Math.min(Q.y,B+q));var C=(Q.x-y)/P*100;P=100-(Q.x+Q.width-y)/P*100;y=(Q.y-B)/q*100;Q=100-(Q.y+Q.height-B)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(P)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(C)+"%"+(R?" round "+d+"%":V?" round 50%":"")+")"}function n(R){null!=F&&(!0!==R&&(F.model.setGeometry(g,K.clone()),d=5,J.value=d),F.model.setStyle(g,k+l()),F.selectAll(),A.style.visibility=t.checked?
-"visible":"hidden")}var p=document.createElement("div"),u=document.createElement("div");u.style.height="300px";u.style.width="300px";u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";u.style.position="absolute";var G=document.createElement("img");G.onload=function(){function R(){F.model.setStyle(g,k+l())}F=new Graph(H);F.autoExtend=!1;F.autoScroll=!1;F.setGridEnabled(!1);F.setEnabled(!0);F.setPanning(!1);F.setConnectable(!1);F.getRubberband().setEnabled(!1);
-F.graphHandler.allowLivePreview=!1;var V=F.createVertexHandler;F.createVertexHandler=function(){var O=V.apply(this,arguments);O.livePreview=!1;return O};if(null!=f)try{if("inset"==f.substring(0,5)){var Q=g.geometry,P=G.width,q=G.height,y=(300-P)/2,B=(300-q)/2,C=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(C[0]),T=parseFloat(C[1]),m=parseFloat(C[2]),z=parseFloat(C[3]);isFinite(M)&&isFinite(T)&&isFinite(m)&&isFinite(z)?(Q.x=z/100*P+y,Q.y=M/100*q+B,Q.width=(100-T)/100*P+y-Q.x,Q.height=(100-
-m)/100*q+B-Q.y,"round"==C[4]?"50%"==C[5]?x.setAttribute("checked","checked"):(d=parseInt(C[5]),J.value=d,t.setAttribute("checked","checked"),A.style.visibility="visible"):v.setAttribute("checked","checked")):f=null}else f=null}catch(O){}g.style=k+(f?f:l());g.vertex=!0;F.addCell(g,null,null,null,null);F.selectAll();F.addListener(mxEvent.CELLS_MOVED,R);F.addListener(mxEvent.CELLS_RESIZED,R);var I=F.graphHandler.mouseUp,L=F.graphHandler.mouseDown;F.graphHandler.mouseUp=function(){I.apply(this,arguments);
-H.style.backgroundColor="#fff9"};F.graphHandler.mouseDown=function(){L.apply(this,arguments);H.style.backgroundColor=""};F.dblClick=function(){};var N=F.getSelectionModel().changeSelection;F.getSelectionModel().changeSelection=function(){N.call(this,[g],[g])}};G.onerror=function(){G.onload=null;G.src=Editor.errorImage};G.setAttribute("src",e);G.style.maxWidth="300px";G.style.maxHeight="300px";u.appendChild(G);p.appendChild(u);var H=document.createElement("div");H.style.width="300px";H.style.height=
-"300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";p.appendChild(H);var F=null,K=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",K.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRect");v.setAttribute("name","croppingShape");v.setAttribute("checked","checked");v.style.margin="5px";p.appendChild(v);e=document.createElement("label");
+"...",function(){var x=new FilenameDialog(b,"",mxResources.get("add"),function(A){b.hideDialog();if(null!=A&&0<A.length){A=A.split(";");for(var J=0;J<A.length;J++){var D=A[J],G=App.pluginRegistry[D];null!=G&&(D=G);0<D.length&&0>mxUtils.indexOf(u,D)&&u.push(D)}l()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(x.container,300,80,!0,!0);x.init()});k.className="geBtn";ALLOW_CUSTOM_PLUGINS||(k.style.display="none");g=new CustomDialog(b,g,mxUtils.bind(this,function(){var x=
+App.pluginRegistry[v.value];0>mxUtils.indexOf(u,x)&&(u.push(x),l())}),null,null,null,k);b.showDialog(g.container,360,100,!0,!0)});H.className="geBtn";var E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";var K=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){F?(mxSettings.setPlugins(u),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});K.className="geBtn gePrimaryBtn";var d=document.createElement("div");
+d.style.marginTop="14px";d.style.textAlign="right";b.isOffline()||d.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(c||d.appendChild(E),d.appendChild(H),d.appendChild(K)):(d.appendChild(H),d.appendChild(K),c||d.appendChild(E));n.appendChild(d);this.container=n},CropImageDialog=function(b,e,f,c){function l(){var R=t.checked,V=x.checked,Q=g.geometry,O=F.width,q=F.height,y=(300-O)/2,B=(300-q)/2;Q.x<y?(Q.width-=y-Q.x,Q.x=y):Q.x+Q.width>y+O&&(Q.width=y+O-Q.x,
+Q.x=Math.min(Q.x,y+O));Q.y<B?(Q.height-=B-Q.y,Q.y=B):Q.y+Q.height>B+q&&(Q.height=B+q-Q.y,Q.y=Math.min(Q.y,B+q));var C=(Q.x-y)/O*100;O=100-(Q.x+Q.width-y)/O*100;y=(Q.y-B)/q*100;Q=100-(Q.y+Q.height-B)/q*100;return"inset("+mxUtils.format(y)+"% "+mxUtils.format(O)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(C)+"%"+(R?" round "+d+"%":V?" round 50%":"")+")"}function n(R){null!=E&&(!0!==R&&(E.model.setGeometry(g,K.clone()),d=5,J.value=d),E.model.setStyle(g,k+l()),E.selectAll(),A.style.visibility=t.checked?
+"visible":"hidden")}var p=document.createElement("div"),u=document.createElement("div");u.style.height="300px";u.style.width="300px";u.style.display="inline-flex";u.style.justifyContent="center";u.style.alignItems="center";u.style.position="absolute";var F=document.createElement("img");F.onload=function(){function R(){E.model.setStyle(g,k+l())}E=new Graph(H);E.autoExtend=!1;E.autoScroll=!1;E.setGridEnabled(!1);E.setEnabled(!0);E.setPanning(!1);E.setConnectable(!1);E.getRubberband().setEnabled(!1);
+E.graphHandler.allowLivePreview=!1;var V=E.createVertexHandler;E.createVertexHandler=function(){var P=V.apply(this,arguments);P.livePreview=!1;return P};if(null!=f)try{if("inset"==f.substring(0,5)){var Q=g.geometry,O=F.width,q=F.height,y=(300-O)/2,B=(300-q)/2,C=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),M=parseFloat(C[0]),T=parseFloat(C[1]),m=parseFloat(C[2]),z=parseFloat(C[3]);isFinite(M)&&isFinite(T)&&isFinite(m)&&isFinite(z)?(Q.x=z/100*O+y,Q.y=M/100*q+B,Q.width=(100-T)/100*O+y-Q.x,Q.height=(100-
+m)/100*q+B-Q.y,"round"==C[4]?"50%"==C[5]?x.setAttribute("checked","checked"):(d=parseInt(C[5]),J.value=d,t.setAttribute("checked","checked"),A.style.visibility="visible"):v.setAttribute("checked","checked")):f=null}else f=null}catch(P){}g.style=k+(f?f:l());g.vertex=!0;E.addCell(g,null,null,null,null);E.selectAll();E.addListener(mxEvent.CELLS_MOVED,R);E.addListener(mxEvent.CELLS_RESIZED,R);var I=E.graphHandler.mouseUp,L=E.graphHandler.mouseDown;E.graphHandler.mouseUp=function(){I.apply(this,arguments);
+H.style.backgroundColor="#fff9"};E.graphHandler.mouseDown=function(){L.apply(this,arguments);H.style.backgroundColor=""};E.dblClick=function(){};var N=E.getSelectionModel().changeSelection;E.getSelectionModel().changeSelection=function(){N.call(this,[g],[g])}};F.onerror=function(){F.onload=null;F.src=Editor.errorImage};F.setAttribute("src",e);F.style.maxWidth="300px";F.style.maxHeight="300px";u.appendChild(F);p.appendChild(u);var H=document.createElement("div");H.style.width="300px";H.style.height=
+"300px";H.style.overflow="hidden";H.style.backgroundColor="#fff9";p.appendChild(H);var E=null,K=new mxGeometry(100,100,100,100),d=5,g=new mxCell("",K.clone(),""),k="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",v=document.createElement("input");v.setAttribute("type","radio");v.setAttribute("id","croppingRect");v.setAttribute("name","croppingShape");v.setAttribute("checked","checked");v.style.margin="5px";p.appendChild(v);e=document.createElement("label");
e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));p.appendChild(e);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id","croppingRounded");t.setAttribute("name","croppingShape");t.style.margin="5px";p.appendChild(t);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));p.appendChild(e);var x=document.createElement("input");x.setAttribute("type","radio");x.setAttribute("id",
"croppingEllipse");x.setAttribute("name","croppingShape");x.style.margin="5px";p.appendChild(x);e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));p.appendChild(e);mxEvent.addListener(v,"change",n);mxEvent.addListener(t,"change",n);mxEvent.addListener(x,"change",n);var A=document.createElement("div");A.style.textAlign="center";A.style.visibility="hidden";var J=document.createElement("input");J.setAttribute("type","range");J.setAttribute("min",
"1");J.setAttribute("max","49");J.setAttribute("value",d);J.setAttribute("title",mxResources.get("arcSize"));A.appendChild(J);p.appendChild(A);mxEvent.addListener(J,"change",function(){d=this.value;n(!0)});e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});e.className="geBtn";u=mxUtils.button(mxResources.get("apply"),function(){c(l(),g.geometry.width,g.geometry.height);b.hideDialog()});u.className="geBtn gePrimaryBtn";var D=mxUtils.button(mxResources.get("reset"),function(){c(null,
-G.width,G.height);b.hideDialog()});D.className="geBtn";var E=document.createElement("div");E.style.marginTop="10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(e),E.appendChild(D),E.appendChild(u)):(E.appendChild(D),E.appendChild(u),E.appendChild(e));p.appendChild(E);this.container=p},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),n=document.createElement("table"),p=document.createElement("tbody"),
-u=document.createElement("tr"),G=document.createElement("td"),H=document.createElement("td");n.style.paddingLeft="6px";mxUtils.write(G,mxResources.get("relative")+":");var F=document.createElement("input");F.setAttribute("type","checkbox");null!=c&&c.relative&&(F.setAttribute("checked","checked"),F.defaultChecked=!0);this.init=function(){F.focus()};H.appendChild(F);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");
-mxUtils.write(G,mxResources.get("left")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=null!=c?c.x:"";H.appendChild(K);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.y:"";H.appendChild(d);u.appendChild(G);
-u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(g);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("dy")+
-":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(k);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.width:"";H.appendChild(v);u.appendChild(G);u.appendChild(H);
-p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";H.appendChild(t);u.appendChild(G);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");H=document.createElement("td");mxUtils.write(G,mxResources.get("rotation")+":");var x=document.createElement("input");
-x.setAttribute("type","text");x.style.width="100px";x.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(x);u.appendChild(G);u.appendChild(H);p.appendChild(u);n.appendChild(p);l.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var D=f.getCellGeometry(e[J]);null!=
-D&&(D=D.clone(),f.isCellMovable(e[J])&&(D.relative=F.checked,0<mxUtils.trim(K.value).length&&(D.x=Number(K.value)),0<mxUtils.trim(d.value).length&&(D.y=Number(d.value)),0<mxUtils.trim(g.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(k.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(v.value).length&&(D.width=Number(v.value)),0<mxUtils.trim(t.value).length&&(D.height=Number(t.value))),
+F.width,F.height);b.hideDialog()});D.className="geBtn";var G=document.createElement("div");G.style.marginTop="10px";G.style.textAlign="right";b.editor.cancelFirst?(G.appendChild(e),G.appendChild(D),G.appendChild(u)):(G.appendChild(D),G.appendChild(u),G.appendChild(e));p.appendChild(G);this.container=p},EditGeometryDialog=function(b,e){var f=b.editor.graph,c=1==e.length?f.getCellGeometry(e[0]):null,l=document.createElement("div"),n=document.createElement("table"),p=document.createElement("tbody"),
+u=document.createElement("tr"),F=document.createElement("td"),H=document.createElement("td");n.style.paddingLeft="6px";mxUtils.write(F,mxResources.get("relative")+":");var E=document.createElement("input");E.setAttribute("type","checkbox");null!=c&&c.relative&&(E.setAttribute("checked","checked"),E.defaultChecked=!0);this.init=function(){E.focus()};H.appendChild(E);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");
+mxUtils.write(F,mxResources.get("left")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.width="100px";K.value=null!=c?c.x:"";H.appendChild(K);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("top")+":");var d=document.createElement("input");d.setAttribute("type","text");d.style.width="100px";d.value=null!=c?c.y:"";H.appendChild(d);u.appendChild(F);
+u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("dx")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c&&null!=c.offset?c.offset.x:"";H.appendChild(g);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("dy")+
+":");var k=document.createElement("input");k.setAttribute("type","text");k.style.width="100px";k.value=null!=c&&null!=c.offset?c.offset.y:"";H.appendChild(k);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("width")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.width:"";H.appendChild(v);u.appendChild(F);u.appendChild(H);
+p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";H.appendChild(t);u.appendChild(F);u.appendChild(H);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");H=document.createElement("td");mxUtils.write(F,mxResources.get("rotation")+":");var x=document.createElement("input");
+x.setAttribute("type","text");x.style.width="100px";x.value=1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";H.appendChild(x);u.appendChild(F);u.appendChild(H);p.appendChild(u);n.appendChild(p);l.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var A=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var J=0;J<e.length;J++){var D=f.getCellGeometry(e[J]);null!=
+D&&(D=D.clone(),f.isCellMovable(e[J])&&(D.relative=E.checked,0<mxUtils.trim(K.value).length&&(D.x=Number(K.value)),0<mxUtils.trim(d.value).length&&(D.y=Number(d.value)),0<mxUtils.trim(g.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.x=Number(g.value)),0<mxUtils.trim(k.value).length&&(null==D.offset&&(D.offset=new mxPoint),D.offset.y=Number(k.value))),f.isCellResizable(e[J])&&(0<mxUtils.trim(v.value).length&&(D.width=Number(v.value)),0<mxUtils.trim(t.value).length&&(D.height=Number(t.value))),
f.getModel().setGeometry(e[J],D));0<mxUtils.trim(x.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(x.value),[e[J]])}}finally{f.getModel().endUpdate()}});A.className="geBtn gePrimaryBtn";mxEvent.addListener(l,"keypress",function(J){13==J.keyCode&&A.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(A)):(n.appendChild(A),n.appendChild(c));l.appendChild(n);this.container=l},LibraryDialog=function(b,
-e,f,c,l,n,p){function u(Q){for(Q=document.elementFromPoint(Q.clientX,Q.clientY);null!=Q&&Q.parentNode!=k;)Q=Q.parentNode;var P=null;if(null!=Q){var q=k.firstChild;for(P=0;null!=q&&q!=Q;)q=q.nextSibling,P++}return P}function G(Q,P,q,y,B,C,M,T,m){try{if(b.spinner.stop(),null==P||"image/"==P.substring(0,6))if(null==Q&&null!=M||null==t[Q]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?
-Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};k.style.backgroundImage="";v.style.display="none";var I=B,L=C;if(B>b.maxImageSize||C>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,B)),b.maxImageSize/Math.max(1,C));B*=N;C*=N}I>L?(L=Math.round(100*L/I),I=100):(I=Math.round(100*I/L),L=100);var O=document.createElement("div");O.setAttribute("draggable","true");O.style.display="inline-block";O.style.position="relative";O.style.padding=
-"0 12px";O.style.cursor="move";mxUtils.setPrefixedStyle(O.style,"transition","transform .1s ease-in-out");if(null!=Q){var S=document.createElement("img");S.setAttribute("src",D.convert(Q));S.style.width=I+"px";S.style.height=L+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-L)/2)+"px";S.style.paddingLeft=Math.floor((100-I)/2)+"px";O.appendChild(S)}else if(null!=M){var U=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<U.length&&(b.sidebar.createThumb(U,100,100,
-O,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),O.firstChild.style.display="inline-block",O.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});
-(function(fa,aa,da){mxEvent.addListener(W,"click",function(ia){t[aa]=null;for(var pa=0;pa<K.length;pa++)if(null!=K[pa].data&&K[pa].data==aa||null!=K[pa].xml&&null!=da&&K[pa].xml==da.xml){K.splice(pa,1);break}O.parentNode.removeChild(fa);0==K.length&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(O,Q,M);O.appendChild(W);O.style.marginBottom="30px";var X=document.createElement("div");
+e,f,c,l,n,p){function u(Q){for(Q=document.elementFromPoint(Q.clientX,Q.clientY);null!=Q&&Q.parentNode!=k;)Q=Q.parentNode;var O=null;if(null!=Q){var q=k.firstChild;for(O=0;null!=q&&q!=Q;)q=q.nextSibling,O++}return O}function F(Q,O,q,y,B,C,M,T,m){try{if(b.spinner.stop(),null==O||"image/"==O.substring(0,6))if(null==Q&&null!=M||null==t[Q]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?
+Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};k.style.backgroundImage="";v.style.display="none";var I=B,L=C;if(B>b.maxImageSize||C>b.maxImageSize){var N=Math.min(1,Math.min(b.maxImageSize/Math.max(1,B)),b.maxImageSize/Math.max(1,C));B*=N;C*=N}I>L?(L=Math.round(100*L/I),I=100):(I=Math.round(100*I/L),L=100);var P=document.createElement("div");P.setAttribute("draggable","true");P.style.display="inline-block";P.style.position="relative";P.style.padding=
+"0 12px";P.style.cursor="move";mxUtils.setPrefixedStyle(P.style,"transition","transform .1s ease-in-out");if(null!=Q){var S=document.createElement("img");S.setAttribute("src",D.convert(Q));S.style.width=I+"px";S.style.height=L+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-L)/2)+"px";S.style.paddingLeft=Math.floor((100-I)/2)+"px";P.appendChild(S)}else if(null!=M){var U=b.stringToCells("<"==M.xml.charAt(0)?M.xml:Graph.decompress(M.xml));0<U.length&&(b.sidebar.createThumb(U,100,100,
+P,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),P.firstChild.style.display="inline-block",P.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});
+(function(fa,aa,da){mxEvent.addListener(W,"click",function(ia){t[aa]=null;for(var pa=0;pa<K.length;pa++)if(null!=K[pa].data&&K[pa].data==aa||null!=K[pa].xml&&null!=da&&K[pa].xml==da.xml){K.splice(pa,1);break}P.parentNode.removeChild(fa);0==K.length&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(ia)});mxEvent.addListener(W,"dblclick",function(ia){mxEvent.consume(ia)})})(P,Q,M);P.appendChild(W);P.style.marginBottom="30px";var X=document.createElement("div");
X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=Q?(Z={data:Q,w:B,h:C,title:m},null!=T&&(Z.aspect=T),t[Q]=S,K.push(Z)):null!=M&&(M.aspect="fixed",K.push(M),Z=M);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=J&&(J(),J=null,mxEvent.consume(fa))});
-z();O.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});U=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,z())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=
-J&&(J(),J=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);J=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=X.innerHTML;z()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",U);mxEvent.addListener(O,"dblclick",U);k.appendChild(O);
-mxEvent.addListener(O,"dragstart",function(fa){null==J&&(null==Q&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&fa.dataTransfer.setData("Text",M.xml),x=u(fa),mxClient.IS_GC&&(O.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(O.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(O,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(O,"dragend",function(fa){"hidden"==W.style.visibility&&(W.style.visibility=
-"",X.style.visibility="");x=null;mxUtils.setOpacity(O,100);mxUtils.setPrefixedStyle(O.style,"transform",null)})}else E||(E=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(I=mxUtils.parseXml(Q),"mxlibrary"==I.documentElement.nodeName){L=JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=L&&0<L.length)for(var Y=0;Y<L.length;Y++)null!=L[Y].xml?G(null,null,0,0,0,0,L[Y]):G(L[Y].data,null,0,0,L[Y].w,L[Y].h,null,"fixed",L[Y].title);B=!0}else if("mxfile"==I.documentElement.nodeName){var ba=
-I.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);U=b.stringToCells(ea);if(0<U.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(U);null!=ca&&G(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}B=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}B||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&console.log("Error in library dialog: "+
-fa)}return null}function H(Q){Q.dataTransfer.dropEffect=null!=x?"move":"copy";Q.stopPropagation();Q.preventDefault()}function F(Q){Q.stopPropagation();Q.preventDefault();E=!1;A=u(Q);if(null!=x)null!=A&&A<k.children.length?(K.splice(A>x?A-1:A,0,K.splice(x,1)[0]),k.insertBefore(k.children[x],k.children[A])):(K.push(K.splice(x,1)[0]),k.appendChild(k.children[x]));else if(0<Q.dataTransfer.files.length)b.importFiles(Q.dataTransfer.files,0,0,b.maxImageSize,R(Q));else if(0<=mxUtils.indexOf(Q.dataTransfer.types,
-"text/uri-list")){var P=decodeURIComponent(Q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(P)||/(\.png)($|\?)/i.test(P)||/(\.gif)($|\?)/i.test(P)||/(\.svg)($|\?)/i.test(P))&&b.loadImage(P,function(q){G(P,null,0,0,q.width,q.height);k.scrollTop=k.scrollHeight})}Q.stopPropagation();Q.preventDefault()}var K=[];f=document.createElement("div");f.style.height="100%";var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.height="40px";f.appendChild(d);mxUtils.write(d,mxResources.get("filename")+
-":");null==e&&(e=b.defaultLibraryName+".xml");var g=document.createElement("input");g.setAttribute("value",e);g.style.marginRight="20px";g.style.marginLeft="10px";g.style.width="500px";null==l||l.isRenamable()||g.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};d.appendChild(g);Editor.enableUncompressedLibraries&&(g.style.width="420px",e=document.createElement("input"),
-e.setAttribute("type","checkbox"),e.style.marginRight="10px",d.appendChild(e),mxUtils.write(d,mxResources.get("compressed")));var k=document.createElement("div");k.style.borderWidth="1px 0px 1px 0px";k.style.borderColor="#d3d3d3";k.style.borderStyle="solid";k.style.marginTop="6px";k.style.overflow="auto";k.style.height="340px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";0==K.length&&Graph.fileSupport&&(k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");
-var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));f.appendChild(v);var t={},x=null,A=null,J=null;d=function(Q){"true"!=mxEvent.getSource(Q).getAttribute("contentEditable")&&null!=J&&(J(),J=null,mxEvent.consume(Q))};mxEvent.addListener(k,"mousedown",d);mxEvent.addListener(k,"pointerdown",d);mxEvent.addListener(k,"touchstart",
-d);var D=new mxUrlConverter,E=!1;if(null!=c)for(d=0;d<c.length;d++)e=c[d],G(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(k,"dragleave",function(Q){v.style.cursor="";for(var P=mxEvent.getSource(Q);null!=P;){if(P==k||P==v){Q.stopPropagation();Q.preventDefault();break}P=P.parentNode}});var R=function(Q){return function(P,q,y,B,C,M,T,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(I){G(I,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,
-T.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(P,z.name)?b.isExternalDataComms()?b.parseFile(z,mxUtils.bind(this,function(I){4==I.readyState&&(b.spinner.stop(),200<=I.status&&299>=I.status&&(G(I.responseText,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(G(P,q,y,B,C,M,T,"fixed",
-mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight)}};mxEvent.addListener(k,"dragover",H);mxEvent.addListener(k,"drop",F);mxEvent.addListener(v,"dragover",H);mxEvent.addListener(v,"drop",F);f.appendChild(k);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&c.appendChild(d);
-"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(l,function(Q){if(null!=Q){var P=b.getSearch("create title mode url drive splash state clibs ui".split(" "));P+=(0==P.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(Q);Q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+P,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(Q.container,
-450,240,!0);Q.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var Q=b.createLibraryDataFromImages(K),P=g.value;/(\.xml)$/i.test(P)||
-(P+=".xml");b.isLocalFileSave()?b.saveLocalFile(Q,P,"text/xml",null,null,null!=p?p:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(P)+"&format=xml&xml="+encodeURIComponent(Q))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var V=document.createElement("input");V.setAttribute("multiple","multiple");V.setAttribute("type","file");mxEvent.addListener(V,"change",function(Q){E=
-!1;b.importFiles(V.files,0,0,b.maxImageSize,function(P,q,y,B,C,M,T,m,z){null!=V.files&&(R(Q)(P,q,y,B,C,M,T,m,z),V.type="",V.type="file",V.value="")});k.scrollTop=k.scrollHeight});V.style.display="none";document.body.appendChild(V);b.libDlgFileInputElt=V}e=mxUtils.button(mxResources.get("import"),function(){null!=J&&(J(),J=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),function(){null!=J&&(J(),
-J=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(Q,P,q){E=!1;if(null!=Q){if("data:image/"==Q.substring(0,11)){var y=Q.indexOf(",");0<y&&(Q=Q.substring(0,y)+";base64,"+Q.substring(y+1))}G(Q,null,0,0,P,q);k.scrollTop=k.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(Q,P,q,y){b.saveLibrary(Q,P,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=J&&(J(),J=null);this.saveBtnClickHandler(g.value,
-K,l,n)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";var u=document.createElement("tr");var G=document.createElement("td");G.setAttribute("colspan","2");G.style.fontSize="10pt";mxUtils.write(G,f);u.appendChild(G);p.appendChild(u);
-u=document.createElement("tr");G=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize="none";H.style.width=c-200+"px";H.style.height=l+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};G.appendChild(H);u.appendChild(G);G=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=l+4+"px";f.style.overflow="hidden";
-f.style.marginBottom="16px";mxEvent.disableContextMenu(f);G.appendChild(f);var F=new Graph(f);F.setEnabled(!1);var K=b.editor.graph.cloneCell(e);F.addCells([K]);f=F.view.getState(K);var d="";null!=f.shape&&null!=f.shape.stencil&&(d=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,d||"");f=F.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);F.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);u.appendChild(G);p.appendChild(u);u=document.createElement("tr");G=document.createElement("td");
-G.setAttribute("colspan","2");G.style.paddingTop="2px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),l.className="geBtn",G.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&G.appendChild(l);var g=function(k,v,t){var x=H.value,A=mxUtils.parseXml(x);x=mxUtils.getPrettyXml(A.documentElement);
-A=A.documentElement.getElementsByTagName("parsererror");if(null!=A&&0<A.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(t&&b.hideDialog(),A=!k.model.contains(v),!t||A||x!=d){x=Graph.compress(x);k.getModel().beginUpdate();try{if(A){var J=b.editor.graph.getFreeInsertPoint();v.geometry.x=J.x;v.geometry.y=J.y;k.addCell(v)}k.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+x+")",[v])}catch(D){throw D;}finally{k.getModel().endUpdate()}A&&
-(k.setSelectionCell(v),k.scrollCellToVisible(v))}};f=mxUtils.button(mxResources.get("preview"),function(){g(F,K,!1)});f.className="geBtn";G.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";G.appendChild(f);b.editor.cancelFirst||G.appendChild(l);u.appendChild(G);p.appendChild(u);n.appendChild(p);this.container=n},CustomDialog=function(b,e,f,c,l,n,p,u,G,H,F,K){var d=document.createElement("div");d.appendChild(e);var g=document.createElement("div");
-g.style.marginTop=null!=K?K:"30px";g.style.textAlign="right";null!=p&&g.appendChild(p);b.isOffline()||null==n||g.appendChild(b.createHelpIcon(n));e=mxUtils.button(G||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";u&&(e.style.display="none");b.editor.cancelFirst&&g.appendChild(e);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var k=f();if("string"===typeof k){b.showError(mxResources.get("error"),
-k);return}}H&&b.hideDialog(null,null,this.container)}));g.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(e);if(null!=F)for(u=0;u<F.length;u++)(function(k,v,t){k=mxUtils.button(k,function(x){v(x)});null!=t&&k.setAttribute("title",t);k.className="geBtn";g.appendChild(k)})(F[u][0],F[u][1],F[u][2]);d.appendChild(g);this.cancelBtn=e;this.okButton=l;this.container=d},BtnDialog=function(b,e,f,c){var l=document.createElement("div");l.style.textAlign="center";var n=document.createElement("p");
-n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var p="Unknown",u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(p=mxResources.get("oneDrive"),u.src=
-IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),u.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[p],"You are now authorized in {1}"));f=mxUtils.button(f,c);f.insertBefore(u,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";
-f.style.fontSize="18px";f.style.padding="14px";l.appendChild(n);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function n(J){this.style.border="";13==J.keyCode&&A.click()}var p=document.createElement("table"),u=document.createElement("tbody");p.style.marginTop="8px";var G=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var F=document.createElement("input");
-F.style.cssText="margin-right:8px;margin-bottom:8px;";F.setAttribute("value","sysfonts");F.setAttribute("type","radio");F.setAttribute("name","current-fontdialog");F.setAttribute("id","fontdialog-sysfonts");H.appendChild(F);var K=document.createElement("label");K.setAttribute("for","fontdialog-sysfonts");mxUtils.write(K,mxResources.get("sysFonts",null,"System Fonts"));H.appendChild(K);G.appendChild(H);u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace=
-"nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");G.appendChild(H);var d=document.createElement("input");"s"==c&&d.setAttribute("value",e);d.style.marginLeft="4px";d.style.width="250px";d.className="dlg_fontName_s";H=document.createElement("td");H.appendChild(d);G.appendChild(H);u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize=
-"10pt";H.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");H.appendChild(g);K=document.createElement("label");K.setAttribute("for","fontdialog-googlefonts");mxUtils.write(K,mxResources.get("googleFonts",null,"Google Fonts"));H.appendChild(K);if(!b.isOffline()||EditorUi.isElectronApp)K=
-b.createHelpIcon("https://fonts.google.com/"),H.appendChild(K);G.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");G.appendChild(H);var k=document.createElement("input");"g"==c&&k.setAttribute("value",e);k.style.marginLeft="4px";k.style.width="250px";k.className=
-"dlg_fontName_g";H=document.createElement("td");H.appendChild(k);G.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id",
-"fontdialog-webfonts");H.appendChild(v);K=document.createElement("label");K.setAttribute("for","fontdialog-webfonts");mxUtils.write(K,mxResources.get("webfonts",null,"Web Fonts"));H.appendChild(K);G.appendChild(H);Editor.enableWebFonts&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");G.appendChild(H);var t=
-document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",e):d.setAttribute("value",e));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(t);G.appendChild(H);Editor.enableWebFonts&&u.appendChild(G);G=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontUrl",
-null,"Font URL")+":");G.appendChild(H);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";H=document.createElement("td");H.appendChild(x);G.appendChild(H);Editor.enableWebFonts&&u.appendChild(G);this.init=function(){var J=d;"g"==c?J=k:"w"==c&&Editor.enableWebFonts&&(J=t);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",!1,null)};G=document.createElement("tr");
-H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){if(F.checked){var J=d.value;var D="s"}else if(g.checked){J=k.value;var E=Editor.GOOGLE_FONTS+
-encodeURIComponent(J).replace(/%20/g,"+");D="g"}else v.checked&&(J=t.value,E=x.value,D="w");var R=J;var V=E,Q=D,P=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=p.querySelector(".dlg_fontName_"+Q);null==q||null!=R&&0!=R.length?(q=p.querySelector(".dlg_fontUrl"),null==q||"w"!=Q||P.test(V)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(J,E,D),b.hideDialog())});A.className="geBtn gePrimaryBtn";mxEvent.addListener(d,"keypress",
-n);mxEvent.addListener(k,"keypress",n);mxEvent.addListener(t,"keypress",n);mxEvent.addListener(x,"keypress",n);mxEvent.addListener(d,"focus",function(){F.setAttribute("checked","checked");F.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(t,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});H.appendChild(A);b.editor.cancelFirst||
-H.appendChild(e);G.appendChild(H);u.appendChild(G);p.appendChild(u);this.container=p};
+z();P.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});U=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,z())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=
+J&&(J(),J=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);J=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);z()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",U);mxEvent.addListener(P,"dblclick",
+U);k.appendChild(P);mxEvent.addListener(P,"dragstart",function(fa){null==J&&(null==Q&&null!=M&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=M.xml&&fa.dataTransfer.setData("Text",M.xml),x=u(fa),mxClient.IS_GC&&(P.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(P,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(P,"dragend",function(fa){"hidden"==W.style.visibility&&
+(W.style.visibility="",X.style.visibility="");x=null;mxUtils.setOpacity(P,100);mxUtils.setPrefixedStyle(P.style,"transform",null)})}else G||(G=!0,b.handleError({message:mxResources.get("fileExists")}));else{B=!1;try{if(I=mxUtils.parseXml(Q),"mxlibrary"==I.documentElement.nodeName){L=JSON.parse(mxUtils.getTextContent(I.documentElement));if(null!=L&&0<L.length)for(var Y=0;Y<L.length;Y++)null!=L[Y].xml?F(null,null,0,0,0,0,L[Y]):F(L[Y].data,null,0,0,L[Y].w,L[Y].h,null,"fixed",L[Y].title);B=!0}else if("mxfile"==
+I.documentElement.nodeName){var ba=I.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);U=b.stringToCells(ea);if(0<U.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(U);null!=ca&&F(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}B=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}B||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&
+console.log("Error in library dialog: "+fa)}return null}function H(Q){Q.dataTransfer.dropEffect=null!=x?"move":"copy";Q.stopPropagation();Q.preventDefault()}function E(Q){Q.stopPropagation();Q.preventDefault();G=!1;A=u(Q);if(null!=x)null!=A&&A<k.children.length?(K.splice(A>x?A-1:A,0,K.splice(x,1)[0]),k.insertBefore(k.children[x],k.children[A])):(K.push(K.splice(x,1)[0]),k.appendChild(k.children[x]));else if(0<Q.dataTransfer.files.length)b.importFiles(Q.dataTransfer.files,0,0,b.maxImageSize,R(Q));
+else if(0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")){var O=decodeURIComponent(Q.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(O)||/(\.png)($|\?)/i.test(O)||/(\.gif)($|\?)/i.test(O)||/(\.svg)($|\?)/i.test(O))&&b.loadImage(O,function(q){F(O,null,0,0,q.width,q.height);k.scrollTop=k.scrollHeight})}Q.stopPropagation();Q.preventDefault()}var K=[];f=document.createElement("div");f.style.height="100%";var d=document.createElement("div");d.style.whiteSpace="nowrap";d.style.height=
+"40px";f.appendChild(d);mxUtils.write(d,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var g=document.createElement("input");g.setAttribute("value",e);g.style.marginRight="20px";g.style.marginLeft="10px";g.style.width="500px";null==l||l.isRenamable()||g.setAttribute("disabled","true");this.init=function(){if(null==l||l.isRenamable())g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};d.appendChild(g);Editor.enableUncompressedLibraries&&
+(g.style.width="420px",e=document.createElement("input"),e.setAttribute("type","checkbox"),e.style.marginRight="10px",d.appendChild(e),mxUtils.write(d,mxResources.get("compressed")));var k=document.createElement("div");k.style.borderWidth="1px 0px 1px 0px";k.style.borderColor="#d3d3d3";k.style.borderStyle="solid";k.style.marginTop="6px";k.style.overflow="auto";k.style.height="340px";k.style.backgroundPosition="center center";k.style.backgroundRepeat="no-repeat";0==K.length&&Graph.fileSupport&&(k.style.backgroundImage=
+"url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));f.appendChild(v);var t={},x=null,A=null,J=null;d=function(Q){"true"!=mxEvent.getSource(Q).getAttribute("contentEditable")&&null!=J&&(J(),J=null,mxEvent.consume(Q))};mxEvent.addListener(k,"mousedown",d);mxEvent.addListener(k,"pointerdown",
+d);mxEvent.addListener(k,"touchstart",d);var D=new mxUrlConverter,G=!1;if(null!=c)for(d=0;d<c.length;d++)e=c[d],F(e.data,null,0,0,e.w,e.h,e,e.aspect,e.title);mxEvent.addListener(k,"dragleave",function(Q){v.style.cursor="";for(var O=mxEvent.getSource(Q);null!=O;){if(O==k||O==v){Q.stopPropagation();Q.preventDefault();break}O=O.parentNode}});var R=function(Q){return function(O,q,y,B,C,M,T,m,z){null!=z&&EditorUi.isVisioFilename(z.name)?b.importVisio(z,mxUtils.bind(this,function(I){F(I,q,y,B,C,M,T,"fixed",
+mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=z&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(O,z.name)?b.isExternalDataComms()?b.parseFile(z,mxUtils.bind(this,function(I){4==I.readyState&&(b.spinner.stop(),200<=I.status&&299>=I.status&&(F(I.responseText,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(F(O,q,y,B,C,M,T,"fixed",mxEvent.isAltDown(Q)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),k.scrollTop=k.scrollHeight)}};mxEvent.addListener(k,"dragover",H);mxEvent.addListener(k,"drop",E);mxEvent.addListener(v,"dragover",H);mxEvent.addListener(v,"drop",E);f.appendChild(k);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";b.editor.cancelFirst&&
+c.appendChild(d);"draw.io"!=b.getServiceName()||null==l||l.constructor!=DriveLibrary&&l.constructor!=GitHubLibrary||(e=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(l,function(Q){if(null!=Q){var O=b.getSearch("create title mode url drive splash state clibs ui".split(" "));O+=(0==O.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(Q);Q=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+O,null,null,null,null,"Check out the library I made using @drawio");
+b.showDialog(Q.container,450,240,!0);Q.init()}else l.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(l.getId(),l)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),e.className="geBtn",c.appendChild(e));e=mxUtils.button(mxResources.get("export"),function(){var Q=b.createLibraryDataFromImages(K),
+O=g.value;/(\.xml)$/i.test(O)||(O+=".xml");b.isLocalFileSave()?b.saveLocalFile(Q,O,"text/xml",null,null,null!=p?p:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(O)+"&format=xml&xml="+encodeURIComponent(Q))).simulate(document,"_blank")});e.setAttribute("id","btnDownload");e.className="geBtn";c.appendChild(e);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var V=document.createElement("input");V.setAttribute("multiple","multiple");V.setAttribute("type","file");mxEvent.addListener(V,
+"change",function(Q){G=!1;b.importFiles(V.files,0,0,b.maxImageSize,function(O,q,y,B,C,M,T,m,z){null!=V.files&&(R(Q)(O,q,y,B,C,M,T,m,z),V.type="",V.type="file",V.value="")});k.scrollTop=k.scrollHeight});V.style.display="none";document.body.appendChild(V);b.libDlgFileInputElt=V}e=mxUtils.button(mxResources.get("import"),function(){null!=J&&(J(),J=null);b.libDlgFileInputElt.click()});e.setAttribute("id","btnAddImage");e.className="geBtn";c.appendChild(e)}e=mxUtils.button(mxResources.get("addImages"),
+function(){null!=J&&(J(),J=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(Q,O,q){G=!1;if(null!=Q){if("data:image/"==Q.substring(0,11)){var y=Q.indexOf(",");0<y&&(Q=Q.substring(0,y)+";base64,"+Q.substring(y+1))}F(Q,null,0,0,O,q);k.scrollTop=k.scrollHeight}})});e.setAttribute("id","btnAddImageUrl");e.className="geBtn";c.appendChild(e);this.saveBtnClickHandler=function(Q,O,q,y){b.saveLibrary(Q,O,q,y)};e=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=J&&
+(J(),J=null);this.saveBtnClickHandler(g.value,K,l,n)}));e.setAttribute("id","btnSave");e.className="geBtn gePrimaryBtn";c.appendChild(e);b.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,l){c=null!=c?c:300;l=null!=l?l:120;var n=document.createElement("table"),p=document.createElement("tbody");n.style.cellPadding="4px";var u=document.createElement("tr");var F=document.createElement("td");F.setAttribute("colspan","2");F.style.fontSize="10pt";
+mxUtils.write(F,f);u.appendChild(F);p.appendChild(u);u=document.createElement("tr");F=document.createElement("td");var H=document.createElement("textarea");H.style.outline="none";H.style.resize="none";H.style.width=c-200+"px";H.style.height=l+"px";this.textarea=H;this.init=function(){H.focus();H.scrollTop=0};F.appendChild(H);u.appendChild(F);F=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";
+f.style.height=l+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);F.appendChild(f);var E=new Graph(f);E.setEnabled(!1);var K=b.editor.graph.cloneCell(e);E.addCells([K]);f=E.view.getState(K);var d="";null!=f.shape&&null!=f.shape.stencil&&(d=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(H,d||"");f=E.getGraphBounds();l=Math.min(160/f.width,(l-40)/f.height);E.view.scaleAndTranslate(l,20/l-f.x,20/l-f.y);u.appendChild(F);p.appendChild(u);u=document.createElement("tr");
+F=document.createElement("td");F.setAttribute("colspan","2");F.style.paddingTop="2px";F.style.whiteSpace="nowrap";F.setAttribute("align","right");b.isOffline()||(l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),l.className="geBtn",F.appendChild(l));l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&F.appendChild(l);var g=function(k,v,t){var x=H.value,A=mxUtils.parseXml(x);
+x=mxUtils.getPrettyXml(A.documentElement);A=A.documentElement.getElementsByTagName("parsererror");if(null!=A&&0<A.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(t&&b.hideDialog(),A=!k.model.contains(v),!t||A||x!=d){x=Graph.compress(x);k.getModel().beginUpdate();try{if(A){var J=b.editor.graph.getFreeInsertPoint();v.geometry.x=J.x;v.geometry.y=J.y;k.addCell(v)}k.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+x+")",[v])}catch(D){throw D;
+}finally{k.getModel().endUpdate()}A&&(k.setSelectionCell(v),k.scrollCellToVisible(v))}};f=mxUtils.button(mxResources.get("preview"),function(){g(E,K,!1)});f.className="geBtn";F.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){g(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";F.appendChild(f);b.editor.cancelFirst||F.appendChild(l);u.appendChild(F);p.appendChild(u);n.appendChild(p);this.container=n},CustomDialog=function(b,e,f,c,l,n,p,u,F,H,E,K){var d=document.createElement("div");
+d.appendChild(e);var g=document.createElement("div");g.style.marginTop=null!=K?K:"30px";g.style.textAlign="right";null!=p&&g.appendChild(p);b.isOffline()||null==n||g.appendChild(b.createHelpIcon(n));e=mxUtils.button(F||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});e.className="geBtn";u&&(e.style.display="none");b.editor.cancelFirst&&g.appendChild(e);l=mxUtils.button(l||mxResources.get("ok"),mxUtils.bind(this,function(){H||b.hideDialog(null,null,this.container);if(null!=f){var k=
+f();if("string"===typeof k){b.showError(mxResources.get("error"),k);return}}H&&b.hideDialog(null,null,this.container)}));g.appendChild(l);l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(e);if(null!=E)for(u=0;u<E.length;u++)(function(k,v,t){k=mxUtils.button(k,function(x){v(x)});null!=t&&k.setAttribute("title",t);k.className="geBtn";g.appendChild(k)})(E[u][0],E[u][1],E[u][2]);d.appendChild(g);this.cancelBtn=e;this.okButton=l;this.container=d},BtnDialog=function(b,e,f,c){var l=document.createElement("div");
+l.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var p="Unknown",u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.marginRight="10px";e==b.drive?(p=mxResources.get("googleDrive"),u.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?(p=mxResources.get("dropbox"),u.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
+e==b.oneDrive?(p=mxResources.get("oneDrive"),u.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(p=mxResources.get("github"),u.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(p=mxResources.get("gitlab"),u.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(p=mxResources.get("trello"),u.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[p],"You are now authorized in {1}"));f=mxUtils.button(f,c);f.insertBefore(u,f.firstChild);
+f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";l.appendChild(n);l.appendChild(b);l.appendChild(f);this.container=l},FontDialog=function(b,e,f,c,l){function n(J){this.style.border="";13==J.keyCode&&A.click()}var p=document.createElement("table"),u=document.createElement("tbody");p.style.marginTop="8px";var F=document.createElement("tr");var H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight=
+"bold";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","sysfonts");E.setAttribute("type","radio");E.setAttribute("name","current-fontdialog");E.setAttribute("id","fontdialog-sysfonts");H.appendChild(E);var K=document.createElement("label");K.setAttribute("for","fontdialog-sysfonts");mxUtils.write(K,mxResources.get("sysFonts",null,"System Fonts"));H.appendChild(K);F.appendChild(H);u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");
+H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");F.appendChild(H);var d=document.createElement("input");"s"==c&&d.setAttribute("value",e);d.style.marginLeft="4px";d.style.width="250px";d.className="dlg_fontName_s";H=document.createElement("td");H.appendChild(d);F.appendChild(H);u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace=
+"nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","googlefonts");g.setAttribute("type","radio");g.setAttribute("name","current-fontdialog");g.setAttribute("id","fontdialog-googlefonts");H.appendChild(g);K=document.createElement("label");K.setAttribute("for","fontdialog-googlefonts");mxUtils.write(K,mxResources.get("googleFonts",null,"Google Fonts"));H.appendChild(K);if(!b.isOffline()||
+EditorUi.isElectronApp)K=b.createHelpIcon("https://fonts.google.com/"),H.appendChild(K);F.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",null,"Font Name")+":");F.appendChild(H);var k=document.createElement("input");"g"==c&&k.setAttribute("value",e);k.style.marginLeft="4px";
+k.style.width="250px";k.className="dlg_fontName_g";H=document.createElement("td");H.appendChild(k);F.appendChild(H);"0"!=urlParams.isGoogleFontsEnabled&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","webfonts");v.setAttribute("type","radio");v.setAttribute("name",
+"current-fontdialog");v.setAttribute("id","fontdialog-webfonts");H.appendChild(v);K=document.createElement("label");K.setAttribute("for","fontdialog-webfonts");mxUtils.write(K,mxResources.get("webfonts",null,"Web Fonts"));H.appendChild(K);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";mxUtils.write(H,mxResources.get("fontname",
+null,"Font Name")+":");F.appendChild(H);var t=document.createElement("input");"w"==c&&(Editor.enableWebFonts?t.setAttribute("value",e):d.setAttribute("value",e));t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontName_w";H=document.createElement("td");H.appendChild(t);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);F=document.createElement("tr");H=document.createElement("td");H.style.whiteSpace="nowrap";H.style.fontSize="10pt";H.style.width="120px";H.style.paddingLeft="15px";
+mxUtils.write(H,mxResources.get("fontUrl",null,"Font URL")+":");F.appendChild(H);var x=document.createElement("input");x.setAttribute("value",f||"");x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontUrl";H=document.createElement("td");H.appendChild(x);F.appendChild(H);Editor.enableWebFonts&&u.appendChild(F);this.init=function(){var J=d;"g"==c?J=k:"w"==c&&Editor.enableWebFonts&&(J=t);J.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?J.select():document.execCommand("selectAll",
+!1,null)};F=document.createElement("tr");H=document.createElement("td");H.colSpan=2;H.style.paddingTop="20px";H.style.whiteSpace="nowrap";H.setAttribute("align","right");b.isOffline()||H.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();l()});e.className="geBtn";b.editor.cancelFirst&&H.appendChild(e);var A=mxUtils.button(mxResources.get("apply"),function(){if(E.checked){var J=d.value;var D="s"}else if(g.checked){J=
+k.value;var G=Editor.GOOGLE_FONTS+encodeURIComponent(J).replace(/%20/g,"+");D="g"}else v.checked&&(J=t.value,G=x.value,D="w");var R=J;var V=G,Q=D,O=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,q=p.querySelector(".dlg_fontName_"+Q);null==q||null!=R&&0!=R.length?(q=p.querySelector(".dlg_fontUrl"),null==q||"w"!=Q||O.test(V)?R=!0:(q.style.border="1px solid red",R=!1)):(q.style.border="1px solid red",R=!1);R&&(l(J,G,D),b.hideDialog())});A.className="geBtn gePrimaryBtn";
+mxEvent.addListener(d,"keypress",n);mxEvent.addListener(k,"keypress",n);mxEvent.addListener(t,"keypress",n);mxEvent.addListener(x,"keypress",n);mxEvent.addListener(d,"focus",function(){E.setAttribute("checked","checked");E.checked=!0});mxEvent.addListener(k,"focus",function(){g.setAttribute("checked","checked");g.checked=!0});mxEvent.addListener(t,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=
+!0});H.appendChild(A);b.editor.cancelFirst||H.appendChild(e);F.appendChild(H);u.appendChild(F);p.appendChild(u);this.container=p};
function AspectDialog(b,e,f,c,l){this.aspect={pageId:e||(b.pages?b.pages[0].getId():null),layerIds:f||[]};e=document.createElement("div");var n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("pages"));e.appendChild(n);f=document.createElement("div");f.className="geAspectDlgList";e.appendChild(f);n=document.createElement("h5");n.style.margin="0 0 10px";mxUtils.write(n,mxResources.get("layers"));e.appendChild(n);n=document.createElement("div");n.className="geAspectDlgList";
e.appendChild(n);this.pagesContainer=f;this.layersContainer=n;this.ui=b;f=document.createElement("div");f.style.marginTop="16px";f.style.textAlign="center";n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=l&&l()});n.className="geBtn";b.editor.cancelFirst&&f.appendChild(n);var p=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();c({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));f.appendChild(p);p.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||f.appendChild(n);p.setAttribute("disabled","disabled");this.okBtn=p;e.appendChild(f);this.container=e}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var e=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(e.getId(),e.getName(),e.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -12668,34 +12671,34 @@ AspectDialog.prototype.createPageItem=function(b,e,f){var c=document.createEleme
this.selectedPage=b;c.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var n=l.model;n=n.getChildCells(n.getRoot());for(var p=0;p<n.length;p++)this.createLayerItem(n[p],b,l,f)});mxEvent.addListener(c,"click",e);this.aspect.pageId==b&&e()};
AspectDialog.prototype.createLayerItem=function(b,e,f,c){e=f.convertValueToString(b)||mxResources.get("background")||"Background";var l=document.createElement("div");l.setAttribute("data-layer-id",b.id);l.className="geAspectDlgListItem";l.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(e)+"</div>";this.layersContainer.appendChild(l);this.createViewer(l.childNodes[0],c,b.id);c=mxUtils.bind(this,function(){0<=l.className.indexOf("geAspectDlgListItemSelected")?
(l.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(l.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(l,"click",c);-1!=this.aspect.layerIds.indexOf(b.id)&&c()};
-var FilePropertiesDialog=function(b,e){function f(D){var E=H;H=function(R,V){try{D(function(){E(R,V)},V)}catch(Q){V(Q)}}}var c=document.createElement("table"),l=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var n=b.getCurrentFile(),p=null!=n&&null!=n.getTitle()?n.getTitle():b.defaultFilename,u=/(\.png)$/i.test(p),G=/(\.svg)$/i.test(p),H=function(D,E){D()},F=null!=n?n.isLocked():!1;var K=document.createElement("tr");var d=document.createElement("td");
-d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("locked")+":");K.appendChild(d);var g=document.createElement("input");g.setAttribute("type","checkbox");F&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(g);K.appendChild(d);l.appendChild(K);this.init=function(){g.focus()};f(function(D,E){null!=b.fileNode&&F!=g.checked?window.setTimeout(function(){null!=
-n&&n.setLocked(g.checked);D()},0):D()});if(u||G){p=1;u=0;K=b.fileNode;null!=K&&(K.hasAttribute("scale")&&(p=parseFloat(K.getAttribute("scale"))),K.hasAttribute("border")&&(u=parseInt(K.getAttribute("border"))));K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("zoom")+":");K.appendChild(d);var k=document.createElement("input");k.setAttribute("value",100*p+"%");k.style.marginLeft="4px";k.style.width="100%";
+var FilePropertiesDialog=function(b,e){function f(D){var G=H;H=function(R,V){try{D(function(){G(R,V)},V)}catch(Q){V(Q)}}}var c=document.createElement("table"),l=document.createElement("tbody");c.style.width="100%";c.style.marginTop="8px";c.style.tableLayout="fixed";var n=b.getCurrentFile(),p=null!=n&&null!=n.getTitle()?n.getTitle():b.defaultFilename,u=/(\.png)$/i.test(p),F=/(\.svg)$/i.test(p),H=function(D,G){D()},E=null!=n?n.isLocked():!1;var K=document.createElement("tr");var d=document.createElement("td");
+d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("locked")+":");K.appendChild(d);var g=document.createElement("input");g.setAttribute("type","checkbox");E&&(g.setAttribute("checked","checked"),g.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(g);K.appendChild(d);l.appendChild(K);this.init=function(){g.focus()};f(function(D,G){null!=b.fileNode&&E!=g.checked?window.setTimeout(function(){null!=
+n&&n.setLocked(g.checked);D()},0):D()});if(u||F){p=1;u=0;K=b.fileNode;null!=K&&(K.hasAttribute("scale")&&(p=parseFloat(K.getAttribute("scale"))),K.hasAttribute("border")&&(u=parseInt(K.getAttribute("border"))));K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("zoom")+":");K.appendChild(d);var k=document.createElement("input");k.setAttribute("value",100*p+"%");k.style.marginLeft="4px";k.style.width="100%";
d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(k);K.appendChild(d);l.appendChild(K);K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("borderWidth")+":");K.appendChild(d);var v=document.createElement("input");v.setAttribute("value",u);v.style.marginLeft="4px";v.style.width="100%";d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(v);K.appendChild(d);l.appendChild(K);
-this.init=this.init||function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f(function(D,E){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(k.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(v.value))),null!=n&&n.fileChanged());D()})}else if(!/(\.html)$/i.test(p)&&!/(\.svg)$/i.test(p)){var t=null!=n?n.isCompressed():Editor.defaultCompressed;K=document.createElement("tr");d=document.createElement("td");
-d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("compressed")+":");K.appendChild(d);var x=document.createElement("input");x.setAttribute("type","checkbox");t&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(x);K.appendChild(d);l.appendChild(K);this.init=this.init||function(){x.focus()};f(function(D,E){null!=b.fileNode&&t!=
+this.init=this.init||function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)};f(function(D,G){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(k.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(v.value))),null!=n&&n.fileChanged());D()})}else if(!/(\.html)$/i.test(p)&&!/(\.svg)$/i.test(p)){var t=null!=n?n.isCompressed():Editor.defaultCompressed;K=document.createElement("tr");d=document.createElement("td");
+d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("compressed")+":");K.appendChild(d);var x=document.createElement("input");x.setAttribute("type","checkbox");t&&(x.setAttribute("checked","checked"),x.defaultChecked=!0);d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(x);K.appendChild(d);l.appendChild(K);this.init=this.init||function(){x.focus()};f(function(D,G){null!=b.fileNode&&t!=
x.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",x.checked?"true":"false");null!=n&&(n.compressionChanged(x.checked),n.fileChanged());D()},0):D()})}if(null!=n&&n.isRealtimeOptional()){K=document.createElement("tr");d=document.createElement("td");d.style.whiteSpace="nowrap";d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("realtimeCollaboration")+":");K.appendChild(d);var A=document.createElement("input");A.setAttribute("type",
-"checkbox");var J=n.isRealtimeEnabled();if(J="disabled"!=b.drive.getCustomProperty(n.desc,"collaboration"))A.setAttribute("checked","checked"),A.defaultChecked=!0;f(function(D,E){A.checked!=J?n.setRealtimeEnabled(A.checked,D,E):D()});this.init=null!=this.init?this.init:function(){A.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(A);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));K.appendChild(d);l.appendChild(K)}null!=n&&
+"checkbox");var J=n.isRealtimeEnabled();if(J="disabled"!=b.drive.getCustomProperty(n.desc,"collaboration"))A.setAttribute("checked","checked"),A.defaultChecked=!0;f(function(D,G){A.checked!=J?n.setRealtimeEnabled(A.checked,D,G):D()});this.init=null!=this.init?this.init:function(){A.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(A);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));K.appendChild(d);l.appendChild(K)}null!=n&&
"draw.io"==b.getServiceName()&&0<n.getSize()&&"1"!=urlParams.embed&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize="10pt",mxUtils.write(d,mxResources.get("size")+":"),K.appendChild(d),d=b.formatFileSize(n.getSize()),p=document.createElement("input"),p.setAttribute("title",d),p.setAttribute("value",d),p.setAttribute("disabled","disabled"),p.style.marginLeft="4px",p.style.width="100%",
d=document.createElement("td"),d.style.whiteSpace="nowrap",d.appendChild(p),K.appendChild(d),l.appendChild(K));null!=e&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize="10pt",mxUtils.write(d,mxResources.get("publicDiagramUrl")+":"),K.appendChild(d),p=document.createElement("a"),p.setAttribute("href",e),p.setAttribute("title",e),p.style.whiteSpace="nowrap",p.style.overflow="hidden",
p.style.textOverflow="ellipsis",p.style.display="block",p.style.margin="2px 0px 2px 8px",p.style.fontSize="10pt",mxUtils.write(p,e),mxEvent.addListener(p,"click",function(D){b.openLink(e);mxEvent.consume(D)}),d=document.createElement("td"),d.appendChild(p),K.appendChild(d),l.appendChild(K));null!=n&&null!=n.fileObject&&null!=n.fileObject.path&&(K=document.createElement("tr"),d=document.createElement("td"),d.style.whiteSpace="nowrap",d.style.overflow="hidden",d.style.textOverflow="ellipsis",d.style.fontSize=
"10pt",mxUtils.write(d,mxResources.get("pathFilename")+":"),K.appendChild(d),p=document.createElement("input"),p.setAttribute("title",n.fileObject.path),p.setAttribute("value",n.fileObject.path),p.setAttribute("disabled","disabled"),p.style.marginLeft="4px",p.style.width="100%",d=document.createElement("td"),d.appendChild(p),K.appendChild(d),l.appendChild(K));this.init=null!=this.init?this.init:function(){};p=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
H(function(){b.spinner.stop();b.hideDialog()},function(D){b.spinner.stop();b.handleError(D,mxResources.get("error"))})});p.className="geBtn gePrimaryBtn";K=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","right");u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst&&d.appendChild(u);d.appendChild(p);b.editor.cancelFirst||d.appendChild(u);K.appendChild(d);
l.appendChild(K);c.appendChild(l);this.container=c},ConnectionPointsDialog=function(b,e){function f(){null!=l&&l.destroy()}var c=document.createElement("div");c.style.userSelect="none";var l=null;this.init=function(){function n(B,C,M){B=new mxCell("",new mxGeometry(B,C,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");B.vertex=!0;B.cp=!0;B.constObj=M;return K.addCell(B)}function p(B){B=K.getSelectionCells();K.deleteCells(B)}
-function u(){var B=parseInt(Q.value)||0;B=0>B?0:100<B?100:B;Q.value=B;var C=parseInt(q.value)||0;C=0>C?0:100<C?100:C;q.value=C;var M=parseInt(P.value)||0,T=parseInt(y.value)||0;M=new mxConnectionConstraint(new mxPoint(B/100,C/100),!1,null,M,T);B=K.getConnectionPoint(k,M);C=K.getSelectionCell();if(null!=C){C.constObj=M;M=C.geometry.clone();T=K.view.scale;var m=K.view.translate;M.x=(B.x-3*T)/T-m.x;M.y=(B.y-3*T)/T-m.y;K.model.setGeometry(C,M)}}function G(B){if(B.constObj)return{x:B.constObj.point.x,
-y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var C=0,M=0,T=d.geometry,m=mxUtils.format((B.geometry.x+3-T.x)/T.width);B=mxUtils.format((B.geometry.y+3-T.y)/T.height);0>m?(C=m*T.width,m=0):1<m&&(C=(m-1)*T.width,m=1);0>B?(M=B*T.height,B=0):1<B&&(M=(B-1)*T.height,B=1);return{x:m,y:B,dx:parseInt(C),dy:parseInt(M)}}function H(B){if(1==K.getSelectionCount()){var C=K.getSelectionCell();B&&(C.constObj=null);B=G(C);Q.value=100*B.x;q.value=100*B.y;P.value=B.dx;y.value=B.dy;V.style.visibility=""}else V.style.visibility=
-"hidden"}var F=document.createElement("div");F.style.width="350px";F.style.height="350px";F.style.overflow="hidden";F.style.border="1px solid lightGray";F.style.boxSizing="border-box";mxEvent.disableContextMenu(F);c.appendChild(F);var K=new Graph(F);K.transparentBackground=!1;K.autoExtend=!1;K.autoScroll=!1;K.setGridEnabled(!1);K.setEnabled(!0);K.setPanning(!0);K.setConnectable(!1);K.setTooltips(!1);K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;K.maxFitScale=2;F=e.geometry;var d=new mxCell(e.value,
-new mxGeometry(0,0,F.width,F.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");d.vertex=!0;K.addCell(d);K.dblClick=function(B,C){if(null!=C&&C!=d)K.setSelectionCell(C);else{C=mxUtils.convertPoint(K.container,mxEvent.getClientX(B),mxEvent.getClientY(B));mxEvent.consume(B);B=K.view.scale;var M=K.view.translate;K.setSelectionCell(n((C.x-3*B)/B-M.x,(C.y-3*B)/B-M.y))}};l=new mxKeyHandler(K);l.bindKey(46,p);l.bindKey(8,p);K.getRubberband().isForceRubberbandEvent=
-function(B){return 0==B.evt.button&&(null==B.getCell()||B.getCell()==d)};K.panningHandler.isForcePanningEvent=function(B){return 2==B.evt.button};var g=K.isCellSelectable;K.isCellSelectable=function(B){return B==d?!1:g.apply(this,arguments)};K.getLinkForCell=function(){return null};var k=K.view.getState(d);F=K.getAllConnectionConstraints(k);for(var v=0;null!=F&&v<F.length;v++){var t=K.getConnectionPoint(k,F[v]);n(t.x-3,t.y-3,F[v])}K.fit(8);K.center();v=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function u(){var B=parseInt(Q.value)||0;B=0>B?0:100<B?100:B;Q.value=B;var C=parseInt(q.value)||0;C=0>C?0:100<C?100:C;q.value=C;var M=parseInt(O.value)||0,T=parseInt(y.value)||0;M=new mxConnectionConstraint(new mxPoint(B/100,C/100),!1,null,M,T);B=K.getConnectionPoint(k,M);C=K.getSelectionCell();if(null!=C){C.constObj=M;M=C.geometry.clone();T=K.view.scale;var m=K.view.translate;M.x=(B.x-3*T)/T-m.x;M.y=(B.y-3*T)/T-m.y;K.model.setGeometry(C,M)}}function F(B){if(B.constObj)return{x:B.constObj.point.x,
+y:B.constObj.point.y,dx:B.constObj.dx,dy:B.constObj.dy};var C=0,M=0,T=d.geometry,m=mxUtils.format((B.geometry.x+3-T.x)/T.width);B=mxUtils.format((B.geometry.y+3-T.y)/T.height);0>m?(C=m*T.width,m=0):1<m&&(C=(m-1)*T.width,m=1);0>B?(M=B*T.height,B=0):1<B&&(M=(B-1)*T.height,B=1);return{x:m,y:B,dx:parseInt(C),dy:parseInt(M)}}function H(B){if(1==K.getSelectionCount()){var C=K.getSelectionCell();B&&(C.constObj=null);B=F(C);Q.value=100*B.x;q.value=100*B.y;O.value=B.dx;y.value=B.dy;V.style.visibility=""}else V.style.visibility=
+"hidden"}var E=document.createElement("div");E.style.width="350px";E.style.height="350px";E.style.overflow="hidden";E.style.border="1px solid lightGray";E.style.boxSizing="border-box";mxEvent.disableContextMenu(E);c.appendChild(E);var K=new Graph(E);K.transparentBackground=!1;K.autoExtend=!1;K.autoScroll=!1;K.setGridEnabled(!1);K.setEnabled(!0);K.setPanning(!0);K.setConnectable(!1);K.setTooltips(!1);K.minFitScale=null;K.maxFitScale=null;K.centerZoom=!0;K.maxFitScale=2;E=e.geometry;var d=new mxCell(e.value,
+new mxGeometry(0,0,E.width,E.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");d.vertex=!0;K.addCell(d);K.dblClick=function(B,C){if(null!=C&&C!=d)K.setSelectionCell(C);else{C=mxUtils.convertPoint(K.container,mxEvent.getClientX(B),mxEvent.getClientY(B));mxEvent.consume(B);B=K.view.scale;var M=K.view.translate;K.setSelectionCell(n((C.x-3*B)/B-M.x,(C.y-3*B)/B-M.y))}};l=new mxKeyHandler(K);l.bindKey(46,p);l.bindKey(8,p);K.getRubberband().isForceRubberbandEvent=
+function(B){return 0==B.evt.button&&(null==B.getCell()||B.getCell()==d)};K.panningHandler.isForcePanningEvent=function(B){return 2==B.evt.button};var g=K.isCellSelectable;K.isCellSelectable=function(B){return B==d?!1:g.apply(this,arguments)};K.getLinkForCell=function(){return null};var k=K.view.getState(d);E=K.getAllConnectionConstraints(k);for(var v=0;null!=E&&v<E.length;v++){var t=K.getConnectionPoint(k,E[v]);n(t.x-3,t.y-3,E[v])}K.fit(8);K.center();v=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
function(){K.zoomIn()},20);t=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){K.zoomOut()},20);var x=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==K.view.scale?(K.maxFitScale=8,K.fit(8)):K.zoomActual();K.center()},20),A=function(){b.prompt(mxResources.get("gridSize"),K.gridSize,function(B){!isNaN(B)&&0<B&&(K.setGridSize(B),K.setGridEnabled(!0),K.refresh())})},J=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(B){mxEvent.isShiftDown(B)?
-A():(K.setGridEnabled(!K.isGridEnabled()),K.refresh())},20);mxEvent.addListener(J,"dblclick",A);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),p,20);mxUtils.setOpacity(D,10);F=document.createElement("div");F.style.display="flex";F.style.alignItems="center";F.style.paddingTop="6px";F.appendChild(v);F.appendChild(t);F.appendChild(x);F.appendChild(J);F.appendChild(D);c.appendChild(F);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("min","1");
-E.setAttribute("value","1");E.style.width="45px";E.style.position="relative";E.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";t=["left","right","top","bottom"];for(v=0;v<t.length;v++)x=t[v],J=document.createElement("option"),mxUtils.write(J,mxResources.get(x)),J.value=x,R.appendChild(J);v=mxUtils.button(mxResources.get("add"),function(){var B=parseInt(E.value);B=1>B?1:100<B?100:B;E.value=B;for(var C=R.value,M=d.geometry,T=[],m=0;m<B;m++){switch(C){case "left":var z=
-M.x;var I=M.y+(m+1)*M.height/(B+1);break;case "right":z=M.x+M.width;I=M.y+(m+1)*M.height/(B+1);break;case "top":z=M.x+(m+1)*M.width/(B+1);I=M.y;break;case "bottom":z=M.x+(m+1)*M.width/(B+1),I=M.y+M.height}T.push(n(z-3,I-3))}K.setSelectionCells(T)});v.style.marginLeft="auto";F.appendChild(v);F.appendChild(E);F.appendChild(R);var V=document.createElement("div");V.style.margin="4px 0px 8px 0px";V.style.whiteSpace="nowrap";V.style.height="24px";F=document.createElement("span");mxUtils.write(F,mxResources.get("dx"));
-V.appendChild(F);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";V.appendChild(Q);mxUtils.write(V,"%");var P=document.createElement("input");P.setAttribute("type","number");P.style.width="45px";P.style.margin="0 4px 0 4px";V.appendChild(P);mxUtils.write(V,"pt");F=document.createElement("span");mxUtils.write(F,mxResources.get("dy"));F.style.marginLeft="12px";V.appendChild(F);
+A():(K.setGridEnabled(!K.isGridEnabled()),K.refresh())},20);mxEvent.addListener(J,"dblclick",A);var D=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),p,20);mxUtils.setOpacity(D,10);E=document.createElement("div");E.style.display="flex";E.style.alignItems="center";E.style.paddingTop="6px";E.appendChild(v);E.appendChild(t);E.appendChild(x);E.appendChild(J);E.appendChild(D);c.appendChild(E);var G=document.createElement("input");G.setAttribute("type","number");G.setAttribute("min","1");
+G.setAttribute("value","1");G.style.width="45px";G.style.position="relative";G.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";t=["left","right","top","bottom"];for(v=0;v<t.length;v++)x=t[v],J=document.createElement("option"),mxUtils.write(J,mxResources.get(x)),J.value=x,R.appendChild(J);v=mxUtils.button(mxResources.get("add"),function(){var B=parseInt(G.value);B=1>B?1:100<B?100:B;G.value=B;for(var C=R.value,M=d.geometry,T=[],m=0;m<B;m++){switch(C){case "left":var z=
+M.x;var I=M.y+(m+1)*M.height/(B+1);break;case "right":z=M.x+M.width;I=M.y+(m+1)*M.height/(B+1);break;case "top":z=M.x+(m+1)*M.width/(B+1);I=M.y;break;case "bottom":z=M.x+(m+1)*M.width/(B+1),I=M.y+M.height}T.push(n(z-3,I-3))}K.setSelectionCells(T)});v.style.marginLeft="auto";E.appendChild(v);E.appendChild(G);E.appendChild(R);var V=document.createElement("div");V.style.margin="4px 0px 8px 0px";V.style.whiteSpace="nowrap";V.style.height="24px";E=document.createElement("span");mxUtils.write(E,mxResources.get("dx"));
+V.appendChild(E);var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.setAttribute("max","100");Q.style.width="45px";Q.style.margin="0 4px 0 4px";V.appendChild(Q);mxUtils.write(V,"%");var O=document.createElement("input");O.setAttribute("type","number");O.style.width="45px";O.style.margin="0 4px 0 4px";V.appendChild(O);mxUtils.write(V,"pt");E=document.createElement("span");mxUtils.write(E,mxResources.get("dy"));E.style.marginLeft="12px";V.appendChild(E);
var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.setAttribute("max","100");q.style.width="45px";q.style.margin="0 4px 0 4px";V.appendChild(q);mxUtils.write(V,"%");var y=document.createElement("input");y.setAttribute("type","number");y.style.width="45px";y.style.margin="0 4px 0 4px";V.appendChild(y);mxUtils.write(V,"pt");c.appendChild(V);H();K.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<K.getSelectionCount()?mxUtils.setOpacity(D,60):
-mxUtils.setOpacity(D,10);H()});K.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(Q,"change",u);mxEvent.addListener(q,"change",u);mxEvent.addListener(P,"change",u);mxEvent.addListener(y,"change",u);F=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});F.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){var B=K.model.cells,C=[],M=[],T;for(T in B){var m=B[T];m.cp&&M.push(G(m))}M.sort(function(z,I){return z.x!=I.x?z.x-I.x:z.y!=I.y?z.y-I.y:z.dx!=I.dx?z.dx-
+mxUtils.setOpacity(D,10);H()});K.addListener(mxEvent.CELLS_MOVED,H);mxEvent.addListener(Q,"change",u);mxEvent.addListener(q,"change",u);mxEvent.addListener(O,"change",u);mxEvent.addListener(y,"change",u);E=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});E.className="geBtn";v=mxUtils.button(mxResources.get("apply"),function(){var B=K.model.cells,C=[],M=[],T;for(T in B){var m=B[T];m.cp&&M.push(F(m))}M.sort(function(z,I){return z.x!=I.x?z.x-I.x:z.y!=I.y?z.y-I.y:z.dx!=I.dx?z.dx-
I.dx:z.dy-I.dy});for(B=0;B<M.length;B++)0<B&&M[B].x==M[B-1].x&&M[B].y==M[B-1].y&&M[B].dx==M[B-1].dx&&M[B].dy==M[B-1].dy||C.push("["+M[B].x+","+M[B].y+",0,"+M[B].dx+","+M[B].dy+"]");b.editor.graph.setCellStyles("points","["+C.join(",")+"]",[e]);f();b.hideDialog()});v.className="geBtn gePrimaryBtn";t=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[e]);f();b.hideDialog()});t.className="geBtn";x=document.createElement("div");x.style.marginTop="10px";x.style.textAlign=
-"right";b.isOffline()||x.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&x.appendChild(F);x.appendChild(t);x.appendChild(v);b.editor.cancelFirst||x.appendChild(F);c.appendChild(x)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
+"right";b.isOffline()||x.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&x.appendChild(E);x.appendChild(t);x.appendChild(v);b.editor.cancelFirst||x.appendChild(E);c.appendChild(x)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
Editor.thinGestureImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI4IDQxLjZxLTIuNSAwLTQuMDc1LTEuNjUtMS41NzUtMS42NS0xLjU3NS00LjM1IDAtMi4zNSAxLjEtNC4xIDEuMS0xLjc1IDIuODI1LTIuOTUgMS43MjUtMS4yIDMuNy0xLjgyNVQzMy42NSAyNnEtLjE1LTMuMDUtMS4yNS00LjQyNVQyOS4yNSAyMC4ycS0yLjMgMC00LjE3NSAxLjV0LTQuNDI1IDQuOTVxLTIuNjUgMy40NS00LjYgNS4xLTEuOTUgMS42NS00LjM1IDEuNjUtMi4xIDAtMy42NS0xLjM3NVE2LjUgMzAuNjUgNi41IDI3LjQ1cTAtMiAxLjItNC41MjUgMS4yLTIuNTI1IDMuNS02LjE3NSAxLjMtMS44NSAxLjk3NS0zLjIyNXQuNjc1LTIuMzc1cTAtLjctLjM1LTEuMDUtLjM1LS4zNS0xLjA1LS4zNS0uNzUgMC0xLjYuNDc1UTEwIDEwLjcgOSAxMS45TDcgOS44cTEuMzUtMS41NSAyLjcyNS0yLjI3NVExMS4xIDYuOCAxMi41IDYuOHExLjkgMCAzLjEgMS4yNSAxLjIgMS4yNSAxLjIgMy4yIDAgMS44LS45NzUgMy41NzVRMTQuODUgMTYuNiAxMy4wNSAxOS4zcS0xLjk1IDIuOTUtMi43NzUgNC43dC0uODI1IDMuNjVxMCAxLjYuNzUgMi4yLjc1LjYgMS43NS42IDEuNDUgMCAyLjgyNS0xLjMgMS4zNzUtMS4zIDMuNTc1LTQuMTUgMi45NS0zLjggNS41MjUtNS43NzUgMi41NzUtMS45NzUgNS42NzUtMS45NzUgMy4xNSAwIDUgMi4zMjVUMzYuNiAyNS45aDQuOXYyLjk1aC00LjlxLS40NSA3LjM1LTMuMiAxMC4wNS0yLjc1IDIuNy01LjQgMi43Wm0uMS0yLjk1cTEuODUgMCAzLjY1LTIuMjUgMS44LTIuMjUgMi03LjUtMi44LjE1LTUuNjI1IDIuMDI1VDI1LjMgMzUuOXEwIDEuMy43NSAyLjAyNS43NS43MjUgMi4wNS43MjVaIi8+PC9zdmc+";
Editor.thinShapesImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0iTTI5Ljc1IDI5Ljc1Wm0tMTMgNS40NXEuNC4wNS43NS4wNUgxOS4wNXY0LjY1cTAgLjI1LjE3NS40MjV0LjQyNS4xNzVIMzkuOXEuMjUgMCAuNDI1LS4xNzV0LjE3NS0uNDI1VjE5LjY1cTAtLjI1LS4xNzUtLjQyNXQtLjQyNS0uMTc1aC00LjY1VjE3LjVxMC0uMzUtLjA1LS43NWg0LjdxMS4xNSAwIDIgLjg3NS44NS44NzUuODUgMi4wMjVWMzkuOXEwIDEuMTUtLjg1IDItLjg1Ljg1LTIgLjg1SDE5LjY1cS0xLjE1IDAtMi4wMjUtLjg1dC0uODc1LTJabTEuNS0zLjk1cS01LjQ1IDAtOS4yMjUtMy44LTMuNzc1LTMuOC0zLjc3NS05LjIgMC01LjQ1IDMuNzc1LTkuMjI1UTEyLjggNS4yNSAxOC4yNSA1LjI1cTUuNCAwIDkuMiAzLjc3NSAzLjggMy43NzUgMy44IDkuMjI1IDAgNS40LTMuOCA5LjItMy44IDMuOC05LjIgMy44Wm0tLjA1LTIuM3E0LjQ1IDAgNy42LTMuMTI1IDMuMTUtMy4xMjUgMy4xNS03LjU3NXQtMy4xMjUtNy42UTIyLjcgNy41IDE4LjI1IDcuNXQtNy42IDMuMTI1UTcuNSAxMy43NSA3LjUgMTguMnQzLjEyNSA3LjZxMy4xMjUgMy4xNSA3LjU3NSAzLjE1Wm0uMDUtMTAuN1oiLz48L3N2Zz4=";
@@ -12775,166 +12778,166 @@ type:"bool",defVal:!1,isVisible:function(m,z){z=z.editorUi.editor.graph.model;re
defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",
type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(m,z){var I=mxUtils.getValue(m.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||z.editorUi.editor.graph.isSwimlane(m.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(m.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(m.style,mxConstants.STYLE_OPACITY,100)||null!=m.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
type:"bool",defVal:!1,isVisible:function(m,z){return 0<m.vertices.length&&z.editorUi.editor.graph.isContainer(m.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(I){var L=I.sets||[];I=I.options||this.getDefaultOptions();for(var N=0;N<L.length;N++){var O=L[N];switch(O.type){case "path":null!=I.stroke&&this._drawToContext(m,O,I);break;case "fillPath":this._drawToContext(m,O,I);break;case "fillSketch":this.fillSketch(m,O,I)}}};z.fillSketch=function(I,L,N){var O=m.state.strokeColor,S=m.state.strokeWidth,U=m.state.strokeAlpha,W=m.state.dashed,X=N.fillWeight;
-0>X&&(X=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(I,L,N);m.setDashed(W);m.setStrokeWidth(S);m.setStrokeColor(O);m.setStrokeAlpha(U)};z._drawToContext=function(I,L,N){I.begin();for(var O=0;O<L.ops.length;O++){var S=L.ops[O],U=S.data;switch(S.op){case "move":I.moveTo(U[0],U[1]);break;case "bcurveTo":I.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":I.lineTo(U[0],U[1])}}I.end();"fillPath"===L.type&&
-N.filled?I.fill():I.stroke()};return z};(function(){function m(O,S,U){this.canvas=O;this.rc=S;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+Editor.createRoughCanvas=function(m){var z=rough.canvas({getContext:function(){return m}});z.draw=function(I){var L=I.sets||[];I=I.options||this.getDefaultOptions();for(var N=0;N<L.length;N++){var P=L[N];switch(P.type){case "path":null!=I.stroke&&this._drawToContext(m,P,I);break;case "fillPath":this._drawToContext(m,P,I);break;case "fillSketch":this.fillSketch(m,P,I)}}};z.fillSketch=function(I,L,N){var P=m.state.strokeColor,S=m.state.strokeWidth,U=m.state.strokeAlpha,W=m.state.dashed,X=N.fillWeight;
+0>X&&(X=N.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(N.fill||"");m.setStrokeWidth(X);m.setDashed(!1);this._drawToContext(I,L,N);m.setDashed(W);m.setStrokeWidth(S);m.setStrokeColor(P);m.setStrokeAlpha(U)};z._drawToContext=function(I,L,N){I.begin();for(var P=0;P<L.ops.length;P++){var S=L.ops[P],U=S.data;switch(S.op){case "move":I.moveTo(U[0],U[1]);break;case "bcurveTo":I.curveTo(U[0],U[1],U[2],U[3],U[4],U[5]);break;case "lineTo":I.lineTo(U[0],U[1])}}I.end();"fillPath"===L.type&&
+N.filled?I.fill():I.stroke()};return z};(function(){function m(P,S,U){this.canvas=P;this.rc=S;this.shape=U;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,m.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,m.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,m.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,m.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,m.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
m.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,m.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,m.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,m.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,m.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,m.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(O,S){var U=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)U=(U<<5)-U+W.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};W=this.rc.getDefaultOptions();U.stroke=O?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
-mxConstants.NONE;O=null;(U.filled=S)?(U.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,O=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",
+this.path=[];this.passThrough=!1}m.prototype.moveOp="M";m.prototype.lineOp="L";m.prototype.quadOp="Q";m.prototype.curveOp="C";m.prototype.closeOp="Z";m.prototype.getStyle=function(P,S){var U=1;if(null!=this.shape.state){var W=this.shape.state.cell.id;if(null!=W)for(var X=0;X<W.length;X++)U=(U<<5)-U+W.charCodeAt(X)<<0}U={strokeWidth:this.canvas.state.strokeWidth,seed:U,preserveVertices:!0};W=this.rc.getDefaultOptions();U.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":this.canvas.state.strokeColor:
+mxConstants.NONE;P=null;(U.filled=S)?(U.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):U.fill="";U.bowing=mxUtils.getValue(this.shape.style,"bowing",W.bowing);U.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",W.hachureAngle);U.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",W.curveFitting);U.roughness=mxUtils.getValue(this.shape.style,"jiggle",
W.roughness);U.simplification=mxUtils.getValue(this.shape.style,"simplification",W.simplification);U.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",W.disableMultiStroke);U.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",W.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);U.hachureGap="auto"==S?-1:S;U.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);U.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",
-S);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);U.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=U.fill&&(null!=O||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(U.fill)))?
-"solid":W.fillStyle);U.fillStyle=S;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var O=2;O<arguments.length;O+=2)this.lastX=arguments[O-1],this.lastY=arguments[O],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-m.prototype.lineTo=function(O,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,O,S),this.lastX=O,this.lastY=S)};m.prototype.moveTo=function(O,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,O,S),this.lastX=O,this.lastY=S,this.firstX=O,this.firstY=S)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(O,S,U,W){this.passThrough?
-this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,O,S,U,W),this.lastX=U,this.lastY=W)};m.prototype.curveTo=function(O,S,U,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,O,S,U,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(O,S,U,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,O,S,U,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=
-6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(O,S,U,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(O,S,U,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(O,S,U,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(O+U/2,S+W/2,U,W,this.getStyle(!0,!0)))};m.prototype.roundrect=
-function(O,S,U,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(O+X,S),this.lineTo(O+U-X,S),this.quadTo(O+U,S,O+U,S+Z),this.lineTo(O+U,S+W-Z),this.quadTo(O+U,S+W,O+U-X,S+W),this.lineTo(O+X,S+W),this.quadTo(O,S+W,O,S+W-Z),this.lineTo(O,S+Z),this.quadTo(O,S,O+X,S))};m.prototype.drawPath=function(O){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),O)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in O)this.nextShape.options[S]=
-O[S];O.stroke!=mxConstants.NONE&&null!=O.stroke||delete this.nextShape.options.stroke;O.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?
+S);U.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);U.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==S&&(S="auto");"auto"==S&&(S=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&S.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&S.push(mxUtils.hex2rgb(Editor.darkColor)),S=null!=U.fill&&(null!=P||0<=mxUtils.indexOf(S,mxUtils.hex2rgb(U.fill)))?
+"solid":W.fillStyle);U.fillStyle=S;return U};m.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};m.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};m.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+m.prototype.lineTo=function(P,S){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,P,S),this.lastX=P,this.lastY=S)};m.prototype.moveTo=function(P,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,S),this.lastX=P,this.lastY=S,this.firstX=P,this.firstY=S)};m.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};m.prototype.quadTo=function(P,S,U,W){this.passThrough?
+this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,S,U,W),this.lastX=U,this.lastY=W)};m.prototype.curveTo=function(P,S,U,W,X,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,S,U,W,X,Z),this.lastX=X,this.lastY=Z)};m.prototype.arcTo=function(P,S,U,W,X,Z,Y){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ba=mxUtils.arcToCurves(this.lastX,this.lastY,P,S,U,W,X,Z,Y);if(null!=ba)for(var ea=0;ea<ba.length;ea+=
+6)this.curveTo(ba[ea],ba[ea+1],ba[ea+2],ba[ea+3],ba[ea+4],ba[ea+5]);this.lastX=Z;this.lastY=Y}};m.prototype.rect=function(P,S,U,W){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,S,U,W,this.getStyle(!0,!0)))};m.prototype.ellipse=function(P,S,U,W){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+U/2,S+W/2,U,W,this.getStyle(!0,!0)))};m.prototype.roundrect=
+function(P,S,U,W,X,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(P+X,S),this.lineTo(P+U-X,S),this.quadTo(P+U,S,P+U,S+Z),this.lineTo(P+U,S+W-Z),this.quadTo(P+U,S+W,P+U-X,S+W),this.lineTo(P+X,S+W),this.quadTo(P,S+W,P,S+W-Z),this.lineTo(P,S+Z),this.quadTo(P,S,P+X,S))};m.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(U){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in P)this.nextShape.options[S]=
+P[S];P.stroke!=mxConstants.NONE&&null!=P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};m.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};m.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};m.prototype.fillAndStroke=function(){this.passThrough?
this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};m.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;
-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(O){return new m(O,Editor.createRoughCanvas(O),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(O){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(O):this.createRoughCanvas(O)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(O,S,U,W,X){null!=O.handJiggle&&O.handJiggle.passThrough||I.apply(this,arguments)};var L=mxShape.prototype.paint;mxShape.prototype.paint=function(O){var S=O.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=O.handJiggle&&O.handJiggle.constructor==m&&!this.outline){O.save();
-var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=O.setStrokeColor;O.setStrokeColor=function(){};var ba=O.setFillColor;O.setFillColor=function(){};U||null==W||(this.configurePointerEvents=function(){});O.handJiggle.passThrough=!0;L.apply(this,arguments);O.handJiggle.passThrough=!1;O.setFillColor=ba;O.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;O.restore();U&&null!=W&&(O.addTolerance=function(){})}L.apply(this,arguments);O.addTolerance=
-S};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(O,S,U,W,X,Z){null!=O.handJiggle&&O.handJiggle.constructor==m?(O.handJiggle.passThrough=!0,N.apply(this,arguments),O.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),
-{to:"string"})};Editor.extractGraphModel=function(m,z,I){if(null!=m&&"undefined"!==typeof pako){var L=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=L&&0<L.length)for(var O=0;O<L.length;O++)if("mxgraph"==L[O].getAttribute("class")){N.push(L[O]);break}0<N.length&&(L=N[0].getAttribute("data-mxgraph"),null!=L?(N=JSON.parse(L),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(L=mxUtils.getTextContent(N[0]),L=Graph.decompress(L,
+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new m(P,Editor.createRoughCanvas(P),this)};var z=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?z.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
+"sketchStyle","rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,S,U,W,X){null!=P.handJiggle&&P.handJiggle.passThrough||I.apply(this,arguments)};var L=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var S=P.addTolerance,U=!0;null!=this.style&&(U="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==m&&!this.outline){P.save();
+var W=this.fill,X=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,Y=P.setStrokeColor;P.setStrokeColor=function(){};var ba=P.setFillColor;P.setFillColor=function(){};U||null==W||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;L.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=ba;P.setStrokeColor=Y;this.configurePointerEvents=Z;this.stroke=X;this.fill=W;P.restore();U&&null!=W&&(P.addTolerance=function(){})}L.apply(this,arguments);P.addTolerance=
+S};var N=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,S,U,W,X,Z){null!=P.handJiggle&&P.handJiggle.constructor==m?(P.handJiggle.passThrough=!0,N.apply(this,arguments),P.handJiggle.passThrough=!1):N.apply(this,arguments)}})();Editor.fastCompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:Graph.arrayBufferToString(pako.deflateRaw(m))};Editor.fastDecompress=function(m){return null==m||0==m.length||"undefined"===typeof pako?m:pako.inflateRaw(Graph.stringToArrayBuffer(atob(m)),
+{to:"string"})};Editor.extractGraphModel=function(m,z,I){if(null!=m&&"undefined"!==typeof pako){var L=m.ownerDocument.getElementsByTagName("div"),N=[];if(null!=L&&0<L.length)for(var P=0;P<L.length;P++)if("mxgraph"==L[P].getAttribute("class")){N.push(L[P]);break}0<N.length&&(L=N[0].getAttribute("data-mxgraph"),null!=L?(N=JSON.parse(L),null!=N&&null!=N.xml&&(m=mxUtils.parseXml(N.xml),m=m.documentElement)):(N=N[0].getElementsByTagName("div"),0<N.length&&(L=mxUtils.getTextContent(N[0]),L=Graph.decompress(L,
null,I),0<L.length&&(m=mxUtils.parseXml(L),m=m.documentElement))))}if(null!=m&&"svg"==m.nodeName)if(L=m.getAttribute("content"),null!=L&&"<"!=L.charAt(0)&&"%"!=L.charAt(0)&&(L=unescape(window.atob?atob(L):Base64.decode(cont,L))),null!=L&&"%"==L.charAt(0)&&(L=decodeURIComponent(L)),null!=L&&0<L.length)m=mxUtils.parseXml(L).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==m||z||(N=null,"diagram"==m.nodeName?N=m:"mxfile"==m.nodeName&&(L=m.getElementsByTagName("diagram"),0<
L.length&&(N=L[Math.max(0,Math.min(L.length-1,urlParams.page||0))])),null!=N&&(m=Editor.parseDiagramNode(N,I)));null==m||"mxGraphModel"==m.nodeName||z&&"mxfile"==m.nodeName||(m=null);return m};Editor.parseDiagramNode=function(m,z,I){Editor.validateDiagramNode(m);var L=mxUtils.trim(mxUtils.getTextContent(m)),N=null;0<L.length?(z=Graph.decompress(L,null,z),null!=z&&0<z.length&&(N=mxUtils.parseXml(z).documentElement)):(m=mxUtils.getChildNodes(m),0<m.length&&(N=m[0],I&&(N=Editor.parseDiagramNode(N,z,
!1)),z=mxUtils.createXmlDocument(),z.appendChild(z.importNode(N,!0)),N=z.documentElement));return N};Editor.getDiagramNodeXml=function(m){Editor.validateDiagramNode(m);var z=mxUtils.getNodeValue(m),I=null;0<z.length?I=Graph.decompress(z):(m=m.getElementsByTagName("mxGraphModel"),null!=m&&0<m.length&&(I=mxUtils.getXml(m[0])));return I};Editor.validateDiagramNode=function(m){if(0==mxUtils.trim(mxUtils.getTextContent(m)).length&&0==mxUtils.getChildNodes(m).length){var z=new mxCodec,I=new mxGraphModel;
m.appendChild(z.encode(I))}return m};Editor.extractGraphModelFromPdf=function(m){var z=null;m=m.substring(m.indexOf(",")+1);m=window.atob&&!mxClient.IS_SF?atob(m):Base64.decode(m,!0);if("%PDF-1.7"==m.substring(0,8)){var I=m.indexOf("EmbeddedFile");if(-1<I){var L=m.indexOf("stream",I)+9;if(0<m.substring(I,L).indexOf("application#2Fvnd.jgraph.mxfile")){var N=m.indexOf("endstream",L-1);return pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"})}}for(I=m.indexOf("/ObjStm");0<I;){L=
-m.indexOf("stream",I)+9;N=m.indexOf("endstream",L-1);L=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"});N=L.indexOf("/Subject <");if(0<N){I=L.substring(N+14,L.indexOf(">",N));if(null!=I){z=I;I=[];for(L=0;L<z.length;L+=2)N=z.substr(L,2),"00"!=N&&I.push(String.fromCharCode(parseInt(N,16)));z=I.join("")}break}I=m.indexOf("/ObjStm",I+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){I="";N=L=0;for(var O=[],S=null;N<m.length;){var U=m.charCodeAt(N);N+=1;10!=U&&(I+=String.fromCharCode(U));
-U=="/Subject (%3Cmxfile".charCodeAt(L)?L++:L=0;if(19==L){var W=m.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=m.substring(N,W);break}}10==U&&("endobj"==I?S=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(S=[],O[I.split(" ")[0]]=S):null!=S&&S.push(I),I="")}}null==z&&null!=O&&(z=Editor.extractGraphModelFromXref(O));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,I=null;null!=
+m.indexOf("stream",I)+9;N=m.indexOf("endstream",L-1);L=pako.inflateRaw(Graph.stringToArrayBuffer(m.substring(L,N)),{to:"string"});N=L.indexOf("/Subject <");if(0<N){I=L.substring(N+14,L.indexOf(">",N));if(null!=I){z=I;I=[];for(L=0;L<z.length;L+=2)N=z.substr(L,2),"00"!=N&&I.push(String.fromCharCode(parseInt(N,16)));z=I.join("")}break}I=m.indexOf("/ObjStm",I+1)}}if(null==z&&"%PDF-1.4"==m.substring(0,8)){I="";N=L=0;for(var P=[],S=null;N<m.length;){var U=m.charCodeAt(N);N+=1;10!=U&&(I+=String.fromCharCode(U));
+U=="/Subject (%3Cmxfile".charCodeAt(L)?L++:L=0;if(19==L){var W=m.indexOf("%3C%2Fmxfile%3E",N)+15;N-=9;if(W>N){z=m.substring(N,W);break}}10==U&&("endobj"==I?S=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(S=[],P[I.split(" ")[0]]=S):null!=S&&S.push(I),I="")}}null==z&&null!=P&&(z=Editor.extractGraphModelFromXref(P));null!=z&&(z=decodeURIComponent(z.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return z};Editor.extractGraphModelFromXref=function(m){var z=m.trailer,I=null;null!=
z&&(z=/.* \/Info (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(z=m[z[1]],null!=z&&(z=/.* \/Subject (\d+) (\d+) R/g.exec(z.join("\n")),null!=z&&0<z.length&&(m=m[z[1]],null!=m&&(m=m.join("\n"),I=m.substring(1,m.length-1))))));return I};Editor.extractParserError=function(m,z){var I=null;m=null!=m?m.getElementsByTagName("parsererror"):null;null!=m&&0<m.length&&(I=z||mxResources.get("invalidChars"),z=m[0].getElementsByTagName("div"),0<z.length&&(I=mxUtils.getTextContent(z[0])));return null!=
I?mxUtils.trim(I):I};Editor.addRetryToError=function(m,z){null!=m&&(m=null!=m.error?m.error:m,null==m.retry&&(m.retry=z))};Editor.mermaidToDrawio=function(m,z,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(m,z,I)};Editor.configure=function(m){if(null!=m){Editor.config=m;Editor.configVersion=m.version;m.debug&&(urlParams.test="1");null!=m.defaultFonts&&(Menus.prototype.defaultFonts=m.defaultFonts);null!=m.presetColors&&(ColorDialog.prototype.presetColors=m.presetColors);null!=
m.defaultColors&&(ColorDialog.prototype.defaultColors=m.defaultColors);null!=m.colorNames&&(ColorDialog.prototype.colorNames=m.colorNames);null!=m.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.defaultColorSchemes);null!=m.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=m.defaultEdgeLength);null!=m.selectParentLayer&&(Graph.selectParentLayer=m.selectParentLayer);null!=m.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=m.autosaveDelay);null!=m.templateFile&&(EditorUi.templateFile=
m.templateFile);null!=m.styles&&(Array.isArray(m.styles)?Editor.styles=m.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=m.globalVars&&(Editor.globalVars=m.globalVars);null!=m.compressXml&&(Editor.defaultCompressed=m.compressXml,Editor.compressXml=m.compressXml);null!=m.includeDiagram&&(Editor.defaultIncludeDiagram=m.includeDiagram);null!=m.simpleLabels&&(Editor.simpleLabels=m.simpleLabels);null!=m.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=m.oneDriveInlinePicker);
-null!=m.defaultAdaptiveColors?Graph.defaultAdaptiveColors=m.defaultAdaptiveColors:0==m.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=m.darkColor&&(Editor.darkColor=m.darkColor);null!=m.darkColorVar&&(Editor.darkColorVar=m.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor=
-"light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=m.settingsName&&(Editor.configurationKey="."+m.settingsName+"-configuration",Editor.settingsKey="."+m.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=m.customFonts&&(Menus.prototype.defaultFonts=m.customFonts.concat(Menus.prototype.defaultFonts));null!=m.customPresetColors&&(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=
-m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){var z=document.createElement("style");z.setAttribute("type","text/css");z.appendChild(document.createTextNode(m.css));var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(z,I)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=m.expandLibraries);null!=m.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=m.appendCustomLibraries);null!=m.libraries&&(Sidebar.prototype.customEntries=
-m.libraries);null!=m.enabledLibraries&&(Array.isArray(m.enabledLibraries)?Sidebar.prototype.enabledLibraries=m.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=m.defaultLibraries&&(Sidebar.prototype.defaultEntries=m.defaultLibraries);null!=m.defaultCustomLibraries&&(Editor.defaultCustomLibraries=m.defaultCustomLibraries);null!=m.enableCustomLibraries&&(Editor.enableCustomLibraries=m.enableCustomLibraries);null!=m.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
-m.defaultVertexStyle);null!=m.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=m.defaultEdgeStyle);null!=m.defaultPageVisible&&(Graph.prototype.defaultPageVisible=m.defaultPageVisible);null!=m.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=m.defaultGridEnabled);null!=m.zoomWheel&&(Graph.zoomWheel=m.zoomWheel);null!=m.zoomFactor&&(z=parseFloat(m.zoomFactor),!isNaN(z)&&1<z?Graph.prototype.zoomFactor=z:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=m.defaultGridSize&&
-(z=parseInt(m.defaultGridSize),!isNaN(z)&&0<z?mxGraph.prototype.gridSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=m.gridSteps&&(z=parseInt(m.gridSteps),!isNaN(z)&&0<z?mxGraphView.prototype.gridSteps=z:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=m.pageFormat&&(z=parseInt(m.pageFormat.width),I=parseInt(m.pageFormat.height),!isNaN(z)&&0<z&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,z,I),mxGraph.prototype.pageFormat=
-mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=m.emptyLibraryXml);null!=m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=m.emptyDiagramXml);null!=m.sidebarWidth&&(EditorUi.prototype.hsplitPosition=m.sidebarWidth);null!=m.updateDefaultStyle&&
-(EditorUi.prototype.updateDefaultStyle=m.updateDefaultStyle);null!=m.sidebarTitles&&(Sidebar.prototype.sidebarTitles=m.sidebarTitles);null!=m.sidebarTitleSize&&(z=parseInt(m.sidebarTitleSize),!isNaN(z)&&0<z?Sidebar.prototype.sidebarTitleSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=m.fontCss&&("string"===typeof m.fontCss?Editor.configureFontCss(m.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=m.autosaveDelay&&(z=parseInt(m.autosaveDelay),
-!isNaN(z)&&0<z?DrawioFile.prototype.autosaveDelay=z:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors);null!=m.restrictExport&&(DrawioFile.RESTRICT_EXPORT=
-m.restrictExport);null!=m.replaceSvgDataUris&&(Editor.replaceSvgDataUris=m.replaceSvgDataUris);null!=m.foreignObjectImages&&(Editor.foreignObjectImages=m.foreignObjectImages);null!=m.shadowColor&&(mxConstants.SHADOW_COLOR=m.shadowColor);null!=m.shadowOpacity&&(mxConstants.SHADOW_OPACITY=m.shadowOpacity);null!=m.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=m.shadowOffsetX);null!=m.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=m.shadowOffsetY);null!=m.shadowBlur&&(mxConstants.SHADOW_BLUR=m.shadowBlur);
-null!=m.enableAnimations&&(Editor.enableAnimations=m.enableAnimations);null!=m.enableChatGpt&&(Editor.enableChatGpt=m.enableChatGpt);null!=m.gptApiKey&&(Editor.gptApiKey=m.gptApiKey);null!=m.gptModel&&(Editor.gptModel=m.gptModel);null!=m.gptUrl&&(Editor.gptUrl=m.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var z=document.getElementsByTagName("script")[0];
-if(null!=z&&null!=z.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(m));z.parentNode.insertBefore(I,z);m=m.split("url(");for(I=1;I<m.length;I++){var L=m[I].indexOf(")");L=Editor.trimCssUrl(m[I].substring(0,L));var N=document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",L);N.setAttribute("as","font");N.setAttribute("crossorigin","");z.parentNode.insertBefore(N,z)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+",
-"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;for(var z=[],I=0;I<m;I++)z.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return z.join("")};Editor.updateStatusInterval=
-1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",
-title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(m){m=null!=m&&"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var z=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[m],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==m.nodeName){z=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+z+".xml").getDocumentElement(),null!=I&&(L=new mxCodec(I.ownerDocument),L.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=I){var L=new mxCodec(I.ownerDocument);L.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));z=m.getAttribute("backgroundImage");null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(z=m.getAttribute("extFonts"))try{for(z=z.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),I=0;I<z.length;I++)this.graph.addExtFont(z[I].name,z[I].url)}catch(N){console.log("ExtFonts format error: "+N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
-"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,z){m=null!=m?m:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var L=this.graph.getBackgroundImageObject(this.graph.backgroundImage,z);null!=L&&I.setAttribute("backgroundImage",JSON.stringify(L));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(L=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),I.setAttribute("extFonts",L.join("|")));return I};Editor.prototype.isDataSvg=function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=
-unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var I=mxUtils.parseXml(z).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=function(m,z,I){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);
-this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===
-typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){L=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var L=null;Editor.doMathJaxRender=function(S){try{null==L?(MathJax.typesetClear([S]),MathJax.typeset([S]),I()):L!=S&&Editor.mathJaxQueue.push(S)}catch(U){MathJax.typesetClear([S]),null!=U.retry?(L=S,U.retry.then(function(){MathJax.typesetPromise([S]).then(I)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+
-W.toString());I()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};
-Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,arguments);var S=mxUtils.bind(this,function(U,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");
-if(null!=z&&0<z.length){var O=document.createElement("script");O.setAttribute("type","text/javascript");O.setAttribute("src",m);z[0].parentNode.appendChild(O)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z="",I=[""],L=0,N=!0,O;m=$jscomp.makeIterator(m);for(O=m.next();!O.done;O=m.next())O=O.value,'"'===O?(N&&O===z&&(I[L]+=O),N=!N):","===O&&N?O=I[++L]="":I[L]+=O,z=O;return I}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
-!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var I="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+"&"+I+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
-return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,I=this;m.convert=function(L){null!=L&&navigator.onLine&&("http://"!=L.substring(0,7)&&"https://"!=L.substring(0,8)||L.substring(0,m.baseUrl.length)==m.baseUrl||I.crossOriginImages&&
-I.isCorsEnabledForUrl(L)?"chrome-extension://"!=L.substring(0,19)&&(L=z.apply(this,arguments)):L=PROXY_URL+"?url="+encodeURIComponent(L));return L};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,I,L,N){try{var O=!0,S=window.setTimeout(mxUtils.bind(this,function(){O=!1;z(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=L?this.convertImageToDataUri(m,z,I,L,!0):z(m)});if(/(\.svg)$/i.test(m)&&
-!N)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(S);O&&(200>X.getStatus()||299<X.getStatus()?U():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);O&&U()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(O)try{L=null!=L&&N?L:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(L,L);X.height=W.height*L;X.width=W.width*L;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};
-W.onerror=function(){window.clearTimeout(S);O&&(null!=I?I():z(m))};W.src=m}}catch(X){null!=I?I():z(m)}};Editor.prototype.convertImages=function(m,z,I,L){function N(){0<O.length?O.shift()():z(m)}null==L&&(L=this.createImageUrlConverter());var O=[],S=I||{};I=mxUtils.bind(this,function(U,W){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(Z){O.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=L.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=
-S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,Y),N()}}catch(ea){N()}}))})(U[X])});I("image","xlink:href");I("img","src");N()};Editor.base64Encode=function(m){for(var z="",I=0,L=m.length,N,O,S;I<L;){N=m.charCodeAt(I++)&255;if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4);z+="==";break}O=m.charCodeAt(I++);if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2);z+="=";break}S=m.charCodeAt(I++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
-3)<<4|(O&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((O&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};Editor.prototype.loadUrl=function(m,z,I,L,N,O,S,U){try{var W=!S&&(L||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
-299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}O=null!=O?O:"data:image/png;base64,";Y=O+Editor.base64Encode(Y)}z(Y)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?I({message:mxResources.get("fileNotFound"),
-code:Z.getStatus()},Z):I({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:X})},U)});X()}catch(Z){null!=I&&I(Z)}};Editor.prototype.getErrorMessage=function(m){var z=mxResources.get("error")+" "+m.getStatus();try{var I=m.getText(),L=JSON.parse(I);null!=L&&null!=L.error&&null!=L.error.message&&(z=L.error.message+" ("+z+")")}catch(N){}return z};Editor.prototype.absoluteCssFonts=
-function(m){var z=null;if(null!=m){var I=m.split("url(");if(0<I.length){z=[I[0]];m=window.location.pathname;var L=null!=m?m.lastIndexOf("/"):-1;0<=L&&(m=m.substring(0,L+1));L=document.getElementsByTagName("base");var N=null;null!=L&&0<L.length&&(N=L[0].getAttribute("href"));for(var O=1;O<I.length;O++)if(L=I[O].indexOf(")"),0<L){var S=Editor.trimCssUrl(I[O].substring(0,L));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);
-z.push('url("'+S+'"'+I[O].substring(L))}else z.push(I[O])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,I){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+encodeURIComponent(z));I(m,z)};Editor.prototype.embedCssFonts=function(m,z){var I=m.split("url("),L=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==L){for(var W=[I[0]],X=1;X<I.length;X++){var Z=I[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(I[X].substring(0,
-Z))]);W.push('"'+I[X].substring(Z))}z(W.join(""))}});if(0<I.length){for(m=1;m<I.length;m++){var O=I[m].indexOf(")"),S=null,U=I[m].indexOf("format(",O);0<U&&(S=Editor.trimCssUrl(I[m].substring(U+7,I[m].indexOf(")",U))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;L++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==
-S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;L--;N()}),mxUtils.bind(this,function(ba){L--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[m].substring(0,
-O)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var I=[],L=0;null==this.cachedGoogleFonts&&
-(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==L&&this.embedCssFonts(I.join(""),m)}),O=0;O<z.length;O++)mxUtils.bind(this,function(S,U){Graph.isCssFontUrl(U)?null==this.cachedGoogleFonts[U]?(L++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(W){this.cachedGoogleFonts[U]=W;I.push(W+"\n");L--;N()}),mxUtils.bind(this,function(W){L--;I.push("@import url("+U+");\n");N()}))):I.push(this.cachedGoogleFonts[U]+"\n"):I.push('@font-face {font-family: "'+
-S+'";src: url("'+U+'")}\n')})(z[O].name,z[O].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),I=0;I<z.length;I++){var L=mxUtils.getTextContent(z[I]);0>L.indexOf("mxPageSelector")&&0<L.indexOf("MathJax")&&m[0].appendChild(z[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var I=mxUtils.getSvgDefs(m),L=z.split("\n");
-z=[];for(var N=[],O=0;O<L.length;O++)"@import"==L[O].substring(0,7)?z.push(L[O]):N.push(L[O]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),I.appendChild(m));0<N.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,N.join("\n")),I.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};
-Editor.prototype.getMaxCanvasScale=function(m,z,I){var L=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(L/m,L/z))};Editor.prototype.exportToCanvas=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{O=null!=O?O:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=L);null==ia&&0==W&&(ia="dark"==fa?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,
-function(pa){try{var oa=new Image;oa.onload=mxUtils.bind(this,function(){try{var xa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(oa,0,0);m(qa,pa)},0):(ja.drawImage(oa,0,0),m(qa,pa))},qa=document.createElement("canvas"),ua=parseInt(pa.getAttribute("width")),ya=parseInt(pa.getAttribute("height"));U=null!=U?U:1;null!=z&&(U=O?Math.min(1,Math.min(3*z/(4*ya),z/ua)):z/ua);U=this.getMaxCanvasScale(ua,ya,U);ua=Math.ceil(U*ua);ya=Math.ceil(U*ya);qa.setAttribute("width",ua);qa.setAttribute("height",
-ya);var ja=qa.getContext("2d");null!=ia&&(ja.beginPath(),ja.rect(0,0,ua,ya),ja.fillStyle=ia,ja.fill());1!=U&&ja.scale(U,U);if(ca){var ma=Y.view,ka=ma.scale;ma.scale=1;var Ba=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=ka;Ba="data:image/svg+xml;base64,"+Ba;var sa=Y.gridSize*ma.gridSteps*U,Ea=Y.getGraphBounds(),wa=ma.translate.x*ka,Ca=ma.translate.y*ka,Da=wa+(Ea.x-wa)/ka-ba,Ka=Ca+(Ea.y-Ca)/ka-ba,Aa=new Image;Aa.onload=function(){try{for(var Fa=-Math.round(sa-mxUtils.mod((wa-
-Da)*U,sa)),Ja=-Math.round(sa-mxUtils.mod((Ca-Ka)*U,sa));Fa<ua;Fa+=sa)for(var Ra=Ja;Ra<ya;Ra+=sa)ja.drawImage(Aa,Fa/U,Ra/U);xa()}catch(Sa){null!=N&&N(Sa)}};Aa.onerror=function(Fa){null!=N&&N(Fa)};Aa.src=Ba}else xa()}catch(Fa){null!=N&&N(Fa)}});oa.onerror=function(xa){null!=N&&N(xa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ha=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),oa.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(xa){null!=
-N&&N(xa)}});this.embedExtFonts(mxUtils.bind(this,function(xa){try{null!=xa&&this.addFontCss(pa,xa),this.loadFonts(ha)}catch(qa){null!=N&&N(qa)}}))}catch(xa){null!=N&&N(xa)}}),I,Z)}catch(pa){null!=N&&N(pa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var n=l,p=0;8>p;p++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[l]=n;Editor.updateCRC=function(m,z,I,L){for(var N=0;N<L;N++)m=Editor.crcTable[(m^z.charCodeAt(I+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,I=0;I<m.length;I++)z=
-z>>>8^Editor.crcTable[(z^m.charCodeAt(I))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,I,L,N){function O(Z,Y){var ba=W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=O(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function U(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(O(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,
-10,26,10))null!=N&&N();else if(O(m,4),"IHDR"!=O(m,4))null!=N&&N();else{O(m,17);N=m.substring(0,W);do{var X=S(m);if("IDAT"==O(m,4)){N=m.substring(0,W-8);"pHYs"==z&&"dpi"==I?(I=Math.round(L/.0254),I=U(I)+U(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+L;L=4294967295;L=Editor.updateCRC(L,z,0,4);L=Editor.updateCRC(L,I,0,I.length);N+=U(I.length)+z+I+U(L^4294967295);N+=m.substring(W-8,m.length);break}N+=m.substring(W-8,W-4+X);O(m,X);O(m,4)}while(X);return"data:image/png;base64,"+
-(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var G=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){G.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==
-typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var I=null;null!=m.editor.graph.getModel().getParent(z)?I=z.getId():null!=m.currentPage&&(I=m.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var F=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||
-this.editorUi.editor.chromeless?F.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var K=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=K.apply(this,arguments);var z=this.editorUi,I=z.editor.graph;if(I.isEnabled()){var L=z.getCurrentFile();null!=L&&L.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),
-function(){return z.editor.autosave},function(S){z.editor.setAutosave(S);z.editor.autosave&&L.isModified()&&L.fileChanged()},{install:function(S){this.listener=function(){S(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(S){z.actions.get("mathematicalTypesetting").funct()},
-{install:function(S){this.listener=function(){S(I.mathEnabled)};z.addListener("mathEnabledChanged",this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(N);if(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var O=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");O.style.position="absolute";O.style.left="85%";N.appendChild(O)}}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,
-defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",
-dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(m){return"1"==
-mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",
-dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
-min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},
-{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},
-{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",
-type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=
-[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];
-mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",
-type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",
-type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",
-dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(m,z,I,L){if(null!=z){var N=mxUtils.bind(this,function(S){if(null!=S)if(I)for(var U=0;U<S.length;U++){if("function"!==typeof S[U].isVisible||S[U].isVisible(L,this))z[S[U].name]=S[U]}else for(var W in z){var X=!1;for(U=0;U<
-S.length;U++)if(S[U].name==W&&S[U].type==z[W].type){X=!0;break}X||delete z[W]}}),O=this.editorUi.editor.graph.view.getState(m);null!=O&&null!=O.shape&&(O.shape.commonCustomPropAdded||(O.shape.commonCustomPropAdded=!0,O.shape.customProperties=O.shape.customProperties||[],O.cell.vertex?Array.prototype.push.apply(O.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(O.shape.customProperties,Editor.commonEdgeProperties)),N(O.shape.customProperties));m=m.getAttribute("customProperties");
-if(null!=m)try{N(JSON.parse(m))}catch(S){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var z={},I=m.vertices,L=m.edges,N=0;N<I.length;N++)this.findCommonProperties(I[N],z,
-0==N,m);for(N=0;N<L.length;N++)this.findCommonProperties(L[N],z,0==I.length&&0==N,m);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var g=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(m){var z=this.editorUi.getSelectionState();1==z.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);g.apply(this,
-arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,z,I,L){function N(ja,ma,ka,Ba,sa){if(null!=ka.valueChanged)ka.valueChanged(ma,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ea=[];if(null!=ka.index){for(var wa=[],Ca=ka.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ja;)wa.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ka.index<wa.length?null!=Ba?wa.splice(Ba,1):wa[ka.index]=ma:wa.push(ma);null!=ka.size&&wa.length>
-ka.size&&(wa=wa.slice(0,ka.size));ma=wa.join(",");null!=ka.countProperty&&(ba.setCellStyles(ka.countProperty,wa.length,ba.getSelectionCells()),sa.push(ka.countProperty),Ea.push(wa.length))}ba.setCellStyles(ja,ma,ba.getSelectionCells());sa.push(ja);Ea.push(ma);if(null!=ka.dependentProps)for(ja=0;ja<ka.dependentProps.length;ja++){var Da=ka.dependentPropsDefVal[ja],Ka=ka.dependentPropsVals[ja];if(Ka.length>ma)Ka=Ka.slice(0,ma);else for(var Aa=Ka.length;Aa<ma;Aa++)Ka.push(Da);Ka=Ka.join(",");ba.setCellStyles(ka.dependentProps[ja],
-Ka,ba.getSelectionCells());sa.push(ka.dependentProps[ja]);Ea.push(Ka)}if("function"==typeof ka.onChange)ka.onChange(ba,ma);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ea,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}function O(ja,ma,ka){var Ba=mxUtils.getOffset(m,!0),sa=mxUtils.getOffset(ja,!0);ma.style.position="absolute";ma.style.left=sa.x-Ba.x+"px";ma.style.top=sa.y-Ba.y+"px";ma.style.width=ja.offsetWidth+"px";ma.style.height=ja.offsetHeight-
-(ka?4:0)+"px";ma.style.zIndex=5}function S(ja,ma,ka){function Ba(Ea){if(null==Ea||Ea==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ea)sa.style.background="";else{var wa=mxUtils.getLightDarkColor(Ea);mxUtils.isLightDarkColor(Ea)&&wa.light!=wa.dark?sa.style.background="linear-gradient(to right bottom, "+wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(wa).cssText+" 50.3%)":sa.style.background=Ea}}var sa=document.createElement("div");sa.style.width=
-"32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Ba(ma);btn=mxUtils.button("",mxUtils.bind(Y,function(Ea){this.editorUi.pickColor(ma,function(wa){N(ja,wa,ka);Ba(wa)});mxEvent.consume(Ea)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function U(ja,ma,ka,Ba,sa,Ea,wa){null!=ma&&(ma=ma.split(","),ea.push({name:ja,values:ma,type:ka,
-defVal:Ba,countProperty:sa,parentRow:Ea,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ca){for(var Da=Ea,Ka=0;null!=Da.nextSibling;)if(Da.nextSibling.getAttribute("data-pName")==ja)Da=Da.nextSibling,Ka++;else break;var Aa={type:ka,parentRow:Ea,index:Ka,isDeletable:!0,defVal:Ba,countProperty:sa};Ka=Z(ja,"",Aa,0==Ka%2,wa);N(ja,Ba,Aa);Da.parentNode.insertBefore(Ka,Da.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";
-return btn}function W(ja,ma,ka,Ba,sa,Ea,wa){if(0<sa){var Ca=Array(sa);ma=null!=ma?ma.split(","):[];for(var Da=0;Da<sa;Da++)Ca[Da]=null!=ma[Da]?ma[Da]:null!=Ba?Ba:"";ea.push({name:ja,values:Ca,type:ka,defVal:Ba,parentRow:Ea,flipBkg:wa,size:sa})}return document.createElement("div")}function X(ja,ma,ka){var Ba=document.createElement("input");Ba.type="checkbox";Ba.checked="1"==ma;mxEvent.addListener(Ba,"change",function(){N(ja,Ba.checked?"1":"0",ka)});return Ba}function Z(ja,ma,ka,Ba,sa){var Ea=ka.dispName,
-wa=ka.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(sa?"Dark":"")+(Ba?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ja);Ca.setAttribute("data-pValue",ma);Ba=!1;null!=ka.index&&(Ca.setAttribute("data-index",ka.index),Ea=(null!=Ea?Ea:"")+"["+ka.index+"]",Ba=!0);var Da=document.createElement("td");Da.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Da,Ea);Da.setAttribute("title",Ea);Ba&&(Da.style.textAlign="right");Ca.appendChild(Da);Da=document.createElement("td");
-Da.className="gePropRowCell";Da.setAttribute("title",null!=ma?ma:mxResources.get("none"));if("color"==wa)Da.appendChild(S(ja,ma,ka));else if("bool"==wa||"boolean"==wa)Da.appendChild(X(ja,ma,ka));else if("enum"==wa){var Ka=ka.enumList;for(sa=0;sa<Ka.length;sa++)if(Ea=Ka[sa],Ea.val==ma){mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Aa=document.createElement("select"),Fa=null;O(Da,Aa);for(var Ja=0;Ja<Ka.length;Ja++){var Ra=
-Ka[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Aa.appendChild(Sa);null==Ra.val&&(Sa.value="null",Fa=Sa)}Aa.value=null==ma&&null!=Fa?"null":ma;m.appendChild(Aa);mxEvent.addListener(Aa,"change",function(){var ab=mxUtils.htmlEntities(Aa.value);if(Aa[Aa.selectedIndex]==Fa||"null"==ab.value)ab=null;N(ja,ab,ka)});Aa.focus();mxEvent.addListener(Aa,"blur",function(){m.removeChild(Aa)})}))}else"dynamicArr"==wa?
-Da.appendChild(U(ja,ma,ka.subType,ka.subDefVal,ka.countProperty,Ca,sa)):"staticArr"==wa?Da.appendChild(W(ja,ma,ka.subType,ka.subDefVal,ka.size,Ca,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ma,sa.style.borderWidth="0px","id"==ja?(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ca.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",ma),
-Ca.firstChild.appendChild(sa)):(sa.style.width="96px",Da.appendChild(sa))):(Da.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ma)),mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){function Aa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=wa&&"numbers"!=wa?0:Ja;ka.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",wa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ka.min&&Ja<ka.min?Ja=ka.min:null!=ka.max&&Ja>ka.max&&(Ja=ka.max);var Ra=null;try{Ra="numbers"==wa?Ja.match(/\d+/g).map(Number).join(" "):
-encodeURIComponent(("int"==wa?parseInt(Ja):Ja)+"")}catch(Sa){}N(ja,Ra,ka,null,Fa)}var Fa=document.createElement("input");O(Da,Fa,!0);Fa.value=decodeURIComponent(ma);Fa.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(Fa.type="number",Fa.step="int"==wa?"1":"any",null!=ka.min&&(Fa.min=parseFloat(ka.min)),null!=ka.max&&(Fa.max=parseFloat(ka.max)));m.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Aa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Aa()})})));
-ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(Aa){N(ja,"",ka,ka.index);mxEvent.consume(Aa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Da.appendChild(sa));Ca.appendChild(Da);return Ca}var Y=this,ba=this.editorUi.editor.graph,ea=[];m.style.position="relative";m.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");
-fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ma="none";for(var ka=m.childNodes.length-
-1;0<=ka;ka--)try{var Ba=m.childNodes[ka],sa=Ba.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||m.removeChild(Ba)}catch(Ea){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ma="";for(ka=0;ka<ja.length;ka++)ja[ka].style.display=ma};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));
-fa.appendChild(ia);ca.appendChild(fa);var pa=ia=!1;fa=null;1==I.vertices.length&&0==I.edges.length?fa=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(fa=I.edges[0].id);null==fa||L||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),{dispName:"id",type:"readOnly"},!0,!1));for(var oa in z)if(L=z[oa],"function"!=typeof L.isVisible||L.isVisible(I,this)){var ha=null!=L.getValue?L.getValue():null!=I.style[oa]?mxUtils.htmlEntities(I.style[oa]+""):null!=L.getDefaultValue?L.getDefaultValue(I,this):
-L.defVal;if("separator"==L.type)pa=!pa;else{if("staticArr"==L.type)L.size=parseInt(I.style[L.sizeProperty]||z[L.sizeProperty].defVal)||0;else if(null!=L.dependentProps){var xa=L.dependentProps,qa=[],ua=[];for(fa=0;fa<xa.length;fa++){var ya=I.style[xa[fa]];ua.push(z[xa[fa]].subDefVal);qa.push(null!=ya?ya.split(","):[])}L.dependentPropsDefVal=ua;L.dependentPropsVals=qa}ca.appendChild(Z(oa,ha,L,ia,pa));ia=!ia}}for(fa=0;fa<ea.length;fa++)for(L=ea[fa],z=L.parentRow,I=0;I<L.values.length;I++)oa=Z(L.name,
-L.values[I],{type:L.type,parentRow:L.parentRow,isDeletable:L.isDeletable,index:I,defVal:L.defVal,countProperty:L.countProperty,size:L.size},0==I%2,L.flipBkg),z.parentNode.insertBefore(oa,z.nextSibling),z=oa;m.appendChild(ca);da();return m};StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},I=this.editorUi,
-L=I.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var O=document.createElement("div");O.style.whiteSpace="nowrap";O.style.position="relative";O.style.textAlign="center";O.style.width="210px";for(var S=[],U=0;U<this.defaultColorSchemes.length;U++){var W=document.createElement("div");W.style.display="inline-block";W.style.width=
-"6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",mxUtils.bind(this,function(){X(ea)}))})(U);S.push(W);O.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),
-this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(L.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?
-ca[mxConstants.STYLE_FONTCOLOR]:"default";L.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ia=mxUtils.button("",mxUtils.bind(this,function(ha){L.getModel().beginUpdate();try{for(var xa=I.getSelectionState().cells,qa=0;qa<xa.length;qa++){var ua=L.getModel().getStyle(xa[qa]);null!=da?(mxEvent.isShiftDown(ha)||(ua=""==da.fill||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,da.fill),ua=""==da.gradient||
-null==da.gradient?mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!L.getModel().isVertex(xa[qa])||(ua=""==da.font||null==da.font?mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ha)||(ua=""==da.stroke||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ua,
-mxConstants.STYLE_STROKECOLOR,da.stroke))):(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null),L.getModel().isVertex(xa[qa])&&(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null)));L.getModel().setStyle(xa[qa],ua)}}finally{L.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin=
-"0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+" 100%)";else if(da.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;
-else{var oa=mxUtils.getLightDarkColor(da.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+oa.cssText+" 50%, "+oa.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ia.style.border=pa+" transparent":""==da.stroke?ia.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(oa=mxUtils.getLightDarkColor(da.stroke),ia.style.border=pa+" "+oa.cssText,ia.style.borderRightColor=oa.light,ia.style.borderBottomColor=
-ia.style.borderRightColor);null!=da.title&&ia.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),oa=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=pa,ia.style.border="1px solid "+oa;ia.style.borderRadius="0";N.appendChild(ia);null!=da&&null!=da.gradient&&(pa=ia.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+
-mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",N.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ia.click()}))});N.innerText="";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(N),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);U=
-10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+U+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+null!=m.defaultAdaptiveColors?Graph.defaultAdaptiveColors=m.defaultAdaptiveColors:0==m.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=m.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=m.enableLightDarkColors);null!=m.darkColor&&(Editor.darkColor=m.darkColor);null!=m.darkColorVar&&(Editor.darkColorVar=m.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor=
+"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=m.settingsName&&(Editor.configurationKey="."+m.settingsName+"-configuration",Editor.settingsKey="."+m.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=m.customFonts&&(Menus.prototype.defaultFonts=m.customFonts.concat(Menus.prototype.defaultFonts));null!=m.customPresetColors&&(ColorDialog.prototype.presetColors=m.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=m.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=m.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=m.css){var z=document.createElement("style");z.setAttribute("type","text/css");z.appendChild(document.createTextNode(m.css));var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(z,I)}null!=m.expandLibraries&&(Sidebar.prototype.expandLibraries=m.expandLibraries);null!=m.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=
+m.appendCustomLibraries);null!=m.libraries&&(Sidebar.prototype.customEntries=m.libraries);null!=m.enabledLibraries&&(Array.isArray(m.enabledLibraries)?Sidebar.prototype.enabledLibraries=m.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=m.defaultLibraries&&(Sidebar.prototype.defaultEntries=m.defaultLibraries);null!=m.defaultCustomLibraries&&(Editor.defaultCustomLibraries=m.defaultCustomLibraries);null!=m.enableCustomLibraries&&(Editor.enableCustomLibraries=
+m.enableCustomLibraries);null!=m.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=m.defaultVertexStyle);null!=m.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=m.defaultEdgeStyle);null!=m.defaultPageVisible&&(Graph.prototype.defaultPageVisible=m.defaultPageVisible);null!=m.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=m.defaultGridEnabled);null!=m.zoomWheel&&(Graph.zoomWheel=m.zoomWheel);null!=m.zoomFactor&&(z=parseFloat(m.zoomFactor),!isNaN(z)&&1<z?Graph.prototype.zoomFactor=
+z:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=m.defaultGridSize&&(z=parseInt(m.defaultGridSize),!isNaN(z)&&0<z?mxGraph.prototype.gridSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=m.gridSteps&&(z=parseInt(m.gridSteps),!isNaN(z)&&0<z?mxGraphView.prototype.gridSteps=z:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=m.pageFormat&&(z=parseInt(m.pageFormat.width),I=parseInt(m.pageFormat.height),
+!isNaN(z)&&0<z&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,z,I),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=m.thumbWidth&&(Sidebar.prototype.thumbWidth=m.thumbWidth);null!=m.thumbHeight&&(Sidebar.prototype.thumbHeight=m.thumbHeight);null!=m.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=m.emptyLibraryXml);null!=m.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=
+m.emptyDiagramXml);null!=m.sidebarWidth&&(EditorUi.prototype.hsplitPosition=m.sidebarWidth);null!=m.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=m.updateDefaultStyle);null!=m.sidebarTitles&&(Sidebar.prototype.sidebarTitles=m.sidebarTitles);null!=m.sidebarTitleSize&&(z=parseInt(m.sidebarTitleSize),!isNaN(z)&&0<z?Sidebar.prototype.sidebarTitleSize=z:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=m.fontCss&&("string"===typeof m.fontCss?Editor.configureFontCss(m.fontCss):
+EditorUi.debug("Configuration Error: String expected for fontCss"));null!=m.autosaveDelay&&(z=parseInt(m.autosaveDelay),!isNaN(z)&&0<z?DrawioFile.prototype.autosaveDelay=z:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=m.maxImageBytes&&(EditorUi.prototype.maxImageBytes=m.maxImageBytes);null!=m.maxImageSize&&(EditorUi.prototype.maxImageSize=m.maxImageSize);null!=m.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=m.shareCursorPosition);null!=m.showRemoteCursors&&
+(EditorUi.prototype.showRemoteCursors=m.showRemoteCursors);null!=m.restrictExport&&(DrawioFile.RESTRICT_EXPORT=m.restrictExport);null!=m.replaceSvgDataUris&&(Editor.replaceSvgDataUris=m.replaceSvgDataUris);null!=m.foreignObjectImages&&(Editor.foreignObjectImages=m.foreignObjectImages);null!=m.shadowColor&&(mxConstants.SHADOW_COLOR=m.shadowColor);null!=m.shadowOpacity&&(mxConstants.SHADOW_OPACITY=m.shadowOpacity);null!=m.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=m.shadowOffsetX);null!=m.shadowOffsetY&&
+(mxConstants.SHADOW_OFFSET_Y=m.shadowOffsetY);null!=m.shadowBlur&&(mxConstants.SHADOW_BLUR=m.shadowBlur);null!=m.enableAnimations&&(Editor.enableAnimations=m.enableAnimations);null!=m.enableChatGpt&&(Editor.enableChatGpt=m.enableChatGpt);null!=m.gptApiKey&&(Editor.gptApiKey=m.gptApiKey);null!=m.gptModel&&(Editor.gptModel=m.gptModel);null!=m.gptUrl&&(Editor.gptUrl=m.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
+Editor.configureFontCss=function(m){if(null!=m){Editor.prototype.fontCss=m;var z=document.getElementsByTagName("script")[0];if(null!=z&&null!=z.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(m));z.parentNode.insertBefore(I,z);m=m.split("url(");for(I=1;I<m.length;I++){var L=m[I].indexOf(")");L=Editor.trimCssUrl(m[I].substring(0,L));var N=document.createElement("link");N.setAttribute("rel","preload");N.setAttribute("href",L);
+N.setAttribute("as","font");N.setAttribute("crossorigin","");z.parentNode.insertBefore(N,z)}}}};Editor.trimCssUrl=function(m){return m.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(m){m=null!=m?m:Editor.GUID_LENGTH;
+for(var z=[],I=0;I<m;I++)z.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return z.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];
+Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(m){m=null!=m&&
+"mxlibrary"!=m.nodeName?this.extractGraphModel(m):null;if(null!=m){var z=Editor.extractParserError(m,mxResources.get("invalidOrMissingFile"));if(z)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[m],"cause",[z]),Error(mxResources.get("notADiagramFile")+" ("+z+")");if("mxGraphModel"==m.nodeName){z=m.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=z&&""!=z)z!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[z]:mxUtils.load(STYLE_PATH+"/"+
+z+".xml").getDocumentElement(),null!=I&&(L=new mxCodec(I.ownerDocument),L.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var L=new mxCodec(I.ownerDocument);L.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=z;this.graph.mathEnabled="1"==urlParams.math||"1"==m.getAttribute("math");this.graph.setAdaptiveColors(m.getAttribute("adaptiveColors"));z=m.getAttribute("backgroundImage");
+null!=z?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(z)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==m.getAttribute("shadow"),!1);if(z=m.getAttribute("extFonts"))try{for(z=z.split("|").map(function(N){N=N.split("^");return{name:N[0],url:N[1]}}),I=0;I<z.length;I++)this.graph.addExtFont(z[I].name,z[I].url)}catch(N){console.log("ExtFonts format error: "+
+N.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(m,z){m=null!=m?m:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var L=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+z);null!=L&&I.setAttribute("backgroundImage",JSON.stringify(L));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(L=this.graph.extFonts.map(function(N){return N.name+"^"+N.url}),I.setAttribute("extFonts",L.join("|")));return I};Editor.prototype.isDataSvg=
+function(m){try{var z=mxUtils.parseXml(m).documentElement.getAttribute("content");if(null!=z&&(null!=z&&"<"!=z.charAt(0)&&"%"!=z.charAt(0)&&(z=unescape(window.atob?atob(z):Base64.decode(cont,z))),null!=z&&"%"==z.charAt(0)&&(z=decodeURIComponent(z)),null!=z&&0<z.length)){var I=mxUtils.parseXml(z).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(L){}return!1};Editor.prototype.extractGraphModel=function(m,z,I){return Editor.extractGraphModel.apply(this,arguments)};var f=
+Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);this.graph.useCssTransforms=
+!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(m,z){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){L=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};m=null!=m?m:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var L=null;Editor.doMathJaxRender=function(S){try{null==L?(MathJax.typesetClear([S]),
+MathJax.typeset([S]),I()):L!=S&&Editor.mathJaxQueue.push(S)}catch(U){MathJax.typesetClear([S]),null!=U.retry?(L=S,U.retry.then(function(){MathJax.typesetPromise([S]).then(I)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+W.toString());I()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+U.toString())}};window.MathJax=null!=z?z:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var N=Editor.prototype.init;Editor.prototype.init=function(){N.apply(this,
+arguments);var S=mxUtils.bind(this,function(U,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};z=document.getElementsByTagName("script");if(null!=z&&0<z.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",m);z[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(m){if(0<m.length){var z=
+"",I=[""],L=0,N=!0,P;m=$jscomp.makeIterator(m);for(P=m.next();!P.done;P=m.next())P=P.value,'"'===P?(N&&P===z&&(I[L]+=P),N=!N):","===P&&N?P=I[++L]="":I[L]+=P,z=P;return I}return[]};Editor.prototype.getProxiedUrl=function(m){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(m)){var z=EditorUi.isVisioFilename(m);z=/\.png$/i.test(m)||/\.pdf$/i.test(m)||z;var I="t="+(new Date).getTime();m=PROXY_URL+"?url="+encodeURIComponent(m)+
+"&"+I+(z?"&base64=1":"")}return m};Editor.prototype.isCorsEnabledForUrl=function(m){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||m.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(m)||"https://raw.githubusercontent.com/"===m.substring(0,34)||"https://fonts.googleapis.com/"===m.substring(0,29)||"https://fonts.gstatic.com/"===
+m.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var m=new mxUrlConverter;m.updateBaseUrl();var z=m.convert,I=this;m.convert=function(L){null!=L&&navigator.onLine&&("http://"!=L.substring(0,7)&&"https://"!=L.substring(0,8)||L.substring(0,m.baseUrl.length)==m.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(L)?"chrome-extension://"!=L.substring(0,19)&&(L=z.apply(this,arguments)):L=PROXY_URL+"?url="+encodeURIComponent(L));return L};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+
+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,z,I,L,N){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;z(m)}),this.timeout),U=mxUtils.bind(this,function(){null!=L?this.convertImageToDataUri(m,z,I,L,!0):z(m)});if(/(\.svg)$/i.test(m)&&!N)mxUtils.get(m,mxUtils.bind(this,function(X){window.clearTimeout(S);P&&(200>X.getStatus()||299<X.getStatus()?U():z(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);
+P&&U()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(P)try{L=null!=L&&N?L:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(L,L);X.height=W.height*L;X.width=W.width*L;Z.drawImage(W,0,0);z(X.toDataURL())}catch(Y){z(m)}};W.onerror=function(){window.clearTimeout(S);P&&(null!=I?I():z(m))};W.src=m}}catch(X){null!=I?I():z(m)}};Editor.prototype.convertImages=function(m,z,I,L){function N(){0<P.length?P.shift()():
+z(m)}null==L&&(L=this.createImageUrlConverter());var P=[],S=I||{};I=mxUtils.bind(this,function(U,W){U=m.getElementsByTagName(U);for(var X=0;X<U.length;X++)mxUtils.bind(this,function(Z){P.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=L.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));N()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),N())}else null!=Y&&Z.setAttribute(W,
+Y),N()}}catch(ea){N()}}))})(U[X])});I("image","xlink:href");I("img","src");N()};Editor.base64Encode=function(m){for(var z="",I=0,L=m.length,N,P,S;I<L;){N=m.charCodeAt(I++)&255;if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4);z+="==";break}P=m.charCodeAt(I++);if(I==L){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&
+3)<<4|(P&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);z+="=";break}S=m.charCodeAt(I++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(N>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((N&3)<<4|(P&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};
+Editor.prototype.loadUrl=function(m,z,I,L,N,P,S,U){try{var W=!S&&(L||/(\.png)($|\?)/i.test(m)||/(\.jpe?g)($|\?)/i.test(m)||/(\.gif)($|\?)/i.test(m)||/(\.pdf)($|\?)/i.test(m));N=null!=N?N:!0;var X=mxUtils.bind(this,function(){mxUtils.get(m,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}P=null!=P?P:"data:image/png;base64,";Y=P+Editor.base64Encode(Y)}z(Y)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?I({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):I({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){N&&null!=I&&I({code:App.ERROR_TIMEOUT,
+retry:X})},U)});X()}catch(Z){null!=I&&I(Z)}};Editor.prototype.getErrorMessage=function(m){var z=mxResources.get("error")+" "+m.getStatus();try{var I=m.getText(),L=JSON.parse(I);null!=L&&null!=L.error&&null!=L.error.message&&(z=L.error.message+" ("+z+")")}catch(N){}return z};Editor.prototype.absoluteCssFonts=function(m){var z=null;if(null!=m){var I=m.split("url(");if(0<I.length){z=[I[0]];m=window.location.pathname;var L=null!=m?m.lastIndexOf("/"):-1;0<=L&&(m=m.substring(0,L+1));L=document.getElementsByTagName("base");
+var N=null;null!=L&&0<L.length&&(N=L[0].getAttribute("href"));for(var P=1;P<I.length;P++)if(L=I[P].indexOf(")"),0<L){var S=Editor.trimCssUrl(I[P].substring(0,L));this.graph.isRelativeUrl(S)&&(S=null!=N?N+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":m)+S);z.push('url("'+S+'"'+I[P].substring(L))}else z.push(I[P])}else z=[m]}return null!=z?z.join(""):null};Editor.prototype.mapFontUrl=function(m,z,I){/^https?:\/\//.test(z)&&!this.isCorsEnabledForUrl(z)&&(z=PROXY_URL+"?url="+
+encodeURIComponent(z));I(m,z)};Editor.prototype.embedCssFonts=function(m,z){var I=m.split("url("),L=0;null==this.cachedFonts&&(this.cachedFonts={});var N=mxUtils.bind(this,function(){if(0==L){for(var W=[I[0]],X=1;X<I.length;X++){var Z=I[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(I[X].substring(0,Z))]);W.push('"'+I[X].substring(Z))}z(W.join(""))}});if(0<I.length){for(m=1;m<I.length;m++){var P=I[m].indexOf(")"),S=null,U=I[m].indexOf("format(",P);0<U&&(S=Editor.trimCssUrl(I[m].substring(U+
+7,I[m].indexOf(")",U))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;L++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";
+else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;L--;N()}),mxUtils.bind(this,function(ba){L--;N()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[m].substring(0,P)),S)}N()}else z(m)};Editor.prototype.loadFonts=function(m){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(z){this.resolvedFontCss=
+z;null!=m&&m()})):null!=m&&m()};Editor.prototype.createGoogleFontCache=function(){var m={},z;for(z in Graph.fontMapping)Graph.isCssFontUrl(z)&&(m[z]=Graph.fontMapping[z]);return m};Editor.prototype.embedExtFonts=function(m){var z=this.graph.getCustomFonts();if(0<z.length){var I=[],L=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var N=mxUtils.bind(this,function(){0==L&&this.embedCssFonts(I.join(""),m)}),P=0;P<z.length;P++)mxUtils.bind(this,function(S,U){Graph.isCssFontUrl(U)?
+null==this.cachedGoogleFonts[U]?(L++,this.loadUrl(Graph.rewriteGoogleFontUrl(U),mxUtils.bind(this,function(W){this.cachedGoogleFonts[U]=W;I.push(W+"\n");L--;N()}),mxUtils.bind(this,function(W){L--;I.push("@import url("+U+");\n");N()}))):I.push(this.cachedGoogleFonts[U]+"\n"):I.push('@font-face {font-family: "'+S+'";src: url("'+U+'")}\n')})(z[P].name,z[P].url);N()}else m()};Editor.prototype.addMathCss=function(m){m=m.getElementsByTagName("defs");if(null!=m&&0<m.length)for(var z=document.getElementsByTagName("style"),
+I=0;I<z.length;I++){var L=mxUtils.getTextContent(z[I]);0>L.indexOf("mxPageSelector")&&0<L.indexOf("MathJax")&&m[0].appendChild(z[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(m,z){z=null!=z?z:this.absoluteCssFonts(this.fontCss);if(null!=z){var I=mxUtils.getSvgDefs(m),L=z.split("\n");z=[];for(var N=[],P=0;P<L.length;P++)"@import"==L[P].substring(0,7)?z.push(L[P]):N.push(L[P]);m=m.ownerDocument;m=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"style"):m.createElement("style");
+m.setAttribute("type","text/css");0<z.length&&(mxUtils.setTextContent(m,z.join("\n")),I.appendChild(m));0<N.length&&(m=m.cloneNode(!1),mxUtils.setTextContent(m,N.join("\n")),I.appendChild(m))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(m,z,I){var L=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(L/m,L/z))};Editor.prototype.exportToCanvas=function(m,z,I,L,N,P,S,U,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{P=
+null!=P?P:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ia=W?null:Y.background;ia==mxConstants.NONE&&(ia=null);null==ia&&(ia=L);null==ia&&0==W&&(ia="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var oa=new Image;oa.onload=mxUtils.bind(this,function(){try{var xa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(oa,0,0);m(qa,pa)},
+0):(ja.drawImage(oa,0,0),m(qa,pa))},qa=document.createElement("canvas"),ua=parseInt(pa.getAttribute("width")),ya=parseInt(pa.getAttribute("height"));U=null!=U?U:1;null!=z&&(U=P?Math.min(1,Math.min(3*z/(4*ya),z/ua)):z/ua);U=this.getMaxCanvasScale(ua,ya,U);ua=Math.ceil(U*ua);ya=Math.ceil(U*ya);qa.setAttribute("width",ua);qa.setAttribute("height",ya);var ja=qa.getContext("2d");null!=ia&&(ja.beginPath(),ja.rect(0,0,ua,ya),ja.fillStyle=ia,ja.fill());1!=U&&ja.scale(U,U);if(ca){var ma=Y.view,ka=ma.scale;
+ma.scale=1;var Ba=btoa(unescape(encodeURIComponent(ma.createSvgGrid(ma.gridColor))));ma.scale=ka;Ba="data:image/svg+xml;base64,"+Ba;var sa=Y.gridSize*ma.gridSteps*U,Ea=Y.getGraphBounds(),wa=ma.translate.x*ka,Ca=ma.translate.y*ka,Da=wa+(Ea.x-wa)/ka-ba,Ka=Ca+(Ea.y-Ca)/ka-ba,Aa=new Image;Aa.onload=function(){try{for(var Fa=-Math.round(sa-mxUtils.mod((wa-Da)*U,sa)),Ja=-Math.round(sa-mxUtils.mod((Ca-Ka)*U,sa));Fa<ua;Fa+=sa)for(var Ra=Ja;Ra<ya;Ra+=sa)ja.drawImage(Aa,Fa/U,Ra/U);xa()}catch(Sa){null!=N&&N(Sa)}};
+Aa.onerror=function(Fa){null!=N&&N(Fa)};Aa.src=Ba}else xa()}catch(Fa){null!=N&&N(Fa)}});oa.onerror=function(xa){null!=N&&N(xa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ha=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),oa.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(xa){null!=N&&N(xa)}});this.embedExtFonts(mxUtils.bind(this,function(xa){try{null!=xa&&this.addFontCss(pa,xa),this.loadFonts(ha)}catch(qa){null!=
+N&&N(qa)}}))}catch(xa){null!=N&&N(xa)}}),I,Z)}catch(pa){null!=N&&N(pa)}};Editor.crcTable=[];for(var l=0;256>l;l++)for(var n=l,p=0;8>p;p++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[l]=n;Editor.updateCRC=function(m,z,I,L){for(var N=0;N<L;N++)m=Editor.crcTable[(m^z.charCodeAt(I+N))&255]^m>>>8;return m};Editor.crc32=function(m){for(var z=-1,I=0;I<m.length;I++)z=z>>>8^Editor.crcTable[(z^m.charCodeAt(I))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(m,z,I,L,N){function P(Z,Y){var ba=
+W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function U(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}m=m.substring(m.indexOf(",")+1);m=window.atob?atob(m):Base64.decode(m,!0);var W=0;if(P(m,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=N&&N();else if(P(m,4),"IHDR"!=P(m,4))null!=N&&N();else{P(m,17);N=m.substring(0,W);do{var X=S(m);if("IDAT"==P(m,4)){N=m.substring(0,
+W-8);"pHYs"==z&&"dpi"==I?(I=Math.round(L/.0254),I=U(I)+U(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+L;L=4294967295;L=Editor.updateCRC(L,z,0,4);L=Editor.updateCRC(L,I,0,I.length);N+=U(I.length)+z+I+U(L^4294967295);N+=m.substring(W-8,m.length);break}N+=m.substring(W-8,W-4+X);P(m,X);P(m,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(N):Base64.encode(N,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
+var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(m,z){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var F=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){F.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(m,z){var I=null;null!=m.editor.graph.getModel().getParent(z)?I=z.getId():
+null!=m.currentPage&&(I=m.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var H=Format.prototype.init;Format.prototype.init=function(){H.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var E=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?E.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(m){return"simple"==
+Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var K=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(m){m=K.apply(this,arguments);var z=this.editorUi,I=z.editor.graph;if(I.isEnabled()){var L=z.getCurrentFile();null!=L&&L.isAutosaveOptional()&&m.appendChild(this.createOption(mxResources.get("autosave"),function(){return z.editor.autosave},function(S){z.editor.setAutosave(S);z.editor.autosave&&L.isModified()&&L.fileChanged()},
+{install:function(S){this.listener=function(){S(z.editor.autosave)};z.editor.addListener("autosaveChanged",this.listener)},destroy:function(){z.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var N=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(S){z.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(I.mathEnabled)};z.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){z.removeListener(this.listener)}});m.appendChild(N);if(!z.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var P=z.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");P.style.position="absolute";P.style.left="85%";N.appendChild(P)}}return m};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
+type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
+type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
+{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize",
+"0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(m){return"0"==mxUtils.getValue(m.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(m){return"1"==mxUtils.getValue(m.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];
+mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",
+dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",
+min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},
+{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(m,z,I,L){if(null!=z){var N=mxUtils.bind(this,function(S){if(null!=S)if(I)for(var U=0;U<S.length;U++){if("function"!==typeof S[U].isVisible||S[U].isVisible(L,this))z[S[U].name]=S[U]}else for(var W in z){var X=!1;for(U=0;U<S.length;U++)if(S[U].name==W&&S[U].type==z[W].type){X=!0;break}X||delete z[W]}}),P=this.editorUi.editor.graph.view.getState(m);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],
+P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),N(P.shape.customProperties));m=m.getAttribute("customProperties");if(null!=m)try{N(JSON.parse(m))}catch(S){}}};var d=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var m=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=m.style.shape&&
+!m.containsLabel&&0<m.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));d.apply(this,arguments);if(Editor.enableCustomProperties){for(var z={},I=m.vertices,L=m.edges,N=0;N<I.length;N++)this.findCommonProperties(I[N],z,0==N,m);for(N=0;N<L.length;N++)this.findCommonProperties(L[N],z,0==I.length&&0==N,m);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(z).length&&this.container.appendChild(this.addProperties(this.createPanel(),z,m))}};var g=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(m){var z=this.editorUi.getSelectionState();1==z.cells.length?this.addActions(m,["copyStyle","pasteStyle"]):1<=z.cells.length&&this.addActions(m,["pasteStyle","pasteData"]);g.apply(this,arguments);return m};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(m,z,I,L){function N(ja,ma,ka,Ba,sa){if(null!=ka.valueChanged)ka.valueChanged(ma,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ea=[];if(null!=ka.index){for(var wa=
+[],Ca=ka.parentRow.nextSibling;Ca&&Ca.getAttribute("data-pName")==ja;)wa.push(Ca.getAttribute("data-pValue")),Ca=Ca.nextSibling;ka.index<wa.length?null!=Ba?wa.splice(Ba,1):wa[ka.index]=ma:wa.push(ma);null!=ka.size&&wa.length>ka.size&&(wa=wa.slice(0,ka.size));ma=wa.join(",");null!=ka.countProperty&&(ba.setCellStyles(ka.countProperty,wa.length,ba.getSelectionCells()),sa.push(ka.countProperty),Ea.push(wa.length))}ba.setCellStyles(ja,ma,ba.getSelectionCells());sa.push(ja);Ea.push(ma);if(null!=ka.dependentProps)for(ja=
+0;ja<ka.dependentProps.length;ja++){var Da=ka.dependentPropsDefVal[ja],Ka=ka.dependentPropsVals[ja];if(Ka.length>ma)Ka=Ka.slice(0,ma);else for(var Aa=Ka.length;Aa<ma;Aa++)Ka.push(Da);Ka=Ka.join(",");ba.setCellStyles(ka.dependentProps[ja],Ka,ba.getSelectionCells());sa.push(ka.dependentProps[ja]);Ea.push(Ka)}if("function"==typeof ka.onChange)ka.onChange(ba,ma);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ea,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}
+function P(ja,ma,ka){var Ba=mxUtils.getOffset(m,!0),sa=mxUtils.getOffset(ja,!0);ma.style.position="absolute";ma.style.left=sa.x-Ba.x+"px";ma.style.top=sa.y-Ba.y+"px";ma.style.width=ja.offsetWidth+"px";ma.style.height=ja.offsetHeight-(ka?4:0)+"px";ma.style.zIndex=5}function S(ja,ma,ka){function Ba(Ea){if(null==Ea||Ea==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ea)sa.style.background="";else{var wa=mxUtils.getLightDarkColor(Ea);mxUtils.isLightDarkColor(Ea)&&
+wa.light!=wa.dark?sa.style.background="linear-gradient(to right bottom, "+wa.cssText+" 50%, "+mxUtils.invertLightDarkColor(wa).cssText+" 50.3%)":sa.style.background=Ea}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Ba(ma);btn=mxUtils.button("",mxUtils.bind(Y,function(Ea){this.editorUi.pickColor(ma,function(wa){N(ja,wa,ka);Ba(wa)});mxEvent.consume(Ea)}));btn.style.height="18px";btn.style.width=
+"40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function U(ja,ma,ka,Ba,sa,Ea,wa){null!=ma&&(ma=ma.split(","),ea.push({name:ja,values:ma,type:ka,defVal:Ba,countProperty:sa,parentRow:Ea,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ca){for(var Da=Ea,Ka=0;null!=Da.nextSibling;)if(Da.nextSibling.getAttribute("data-pName")==ja)Da=Da.nextSibling,Ka++;else break;var Aa={type:ka,parentRow:Ea,index:Ka,isDeletable:!0,
+defVal:Ba,countProperty:sa};Ka=Z(ja,"",Aa,0==Ka%2,wa);N(ja,Ba,Aa);Da.parentNode.insertBefore(Ka,Da.nextSibling);mxEvent.consume(Ca)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ja,ma,ka,Ba,sa,Ea,wa){if(0<sa){var Ca=Array(sa);ma=null!=ma?ma.split(","):[];for(var Da=0;Da<sa;Da++)Ca[Da]=null!=ma[Da]?ma[Da]:null!=Ba?Ba:"";ea.push({name:ja,values:Ca,type:ka,defVal:Ba,parentRow:Ea,flipBkg:wa,size:sa})}return document.createElement("div")}function X(ja,
+ma,ka){var Ba=document.createElement("input");Ba.type="checkbox";Ba.checked="1"==ma;mxEvent.addListener(Ba,"change",function(){N(ja,Ba.checked?"1":"0",ka)});return Ba}function Z(ja,ma,ka,Ba,sa){var Ea=ka.dispName,wa=ka.type,Ca=document.createElement("tr");Ca.className="gePropRow"+(sa?"Dark":"")+(Ba?"Alt":"")+" gePropNonHeaderRow";Ca.setAttribute("data-pName",ja);Ca.setAttribute("data-pValue",ma);Ba=!1;null!=ka.index&&(Ca.setAttribute("data-index",ka.index),Ea=(null!=Ea?Ea:"")+"["+ka.index+"]",Ba=
+!0);var Da=document.createElement("td");Da.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Da,Ea);Da.setAttribute("title",Ea);Ba&&(Da.style.textAlign="right");Ca.appendChild(Da);Da=document.createElement("td");Da.className="gePropRowCell";Da.setAttribute("title",null!=ma?ma:mxResources.get("none"));if("color"==wa)Da.appendChild(S(ja,ma,ka));else if("bool"==wa||"boolean"==wa)Da.appendChild(X(ja,ma,ka));else if("enum"==wa){var Ka=ka.enumList;for(sa=0;sa<Ka.length;sa++)if(Ea=Ka[sa],
+Ea.val==ma){mxUtils.write(Da,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){var Aa=document.createElement("select"),Fa=null;P(Da,Aa);for(var Ja=0;Ja<Ka.length;Ja++){var Ra=Ka[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));Aa.appendChild(Sa);null==Ra.val&&(Sa.value="null",Fa=Sa)}Aa.value=null==ma&&null!=Fa?"null":ma;m.appendChild(Aa);mxEvent.addListener(Aa,
+"change",function(){var ab=mxUtils.htmlEntities(Aa.value);if(Aa[Aa.selectedIndex]==Fa||"null"==ab.value)ab=null;N(ja,ab,ka)});Aa.focus();mxEvent.addListener(Aa,"blur",function(){m.removeChild(Aa)})}))}else"dynamicArr"==wa?Da.appendChild(U(ja,ma,ka.subType,ka.subDefVal,ka.countProperty,Ca,sa)):"staticArr"==wa?Da.appendChild(W(ja,ma,ka.subType,ka.subDefVal,ka.size,Ca,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ma,sa.style.borderWidth="0px","id"==ja?
+(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ca.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",ma),Ca.firstChild.appendChild(sa)):(sa.style.width="96px",Da.appendChild(sa))):(Da.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ma)),mxEvent.addListener(Da,"click",mxUtils.bind(Y,function(){function Aa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=wa&&"numbers"!=wa?0:Ja;ka.allowAuto&&
+(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",wa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ka.min&&Ja<ka.min?Ja=ka.min:null!=ka.max&&Ja>ka.max&&(Ja=ka.max);var Ra=null;try{Ra="numbers"==wa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==wa?parseInt(Ja):Ja)+"")}catch(Sa){}N(ja,Ra,ka,null,Fa)}var Fa=document.createElement("input");P(Da,Fa,!0);Fa.value=decodeURIComponent(ma);Fa.className="gePropEditor";"int"!=wa&&"float"!=wa||ka.allowAuto||(Fa.type="number",
+Fa.step="int"==wa?"1":"any",null!=ka.min&&(Fa.min=parseFloat(ka.min)),null!=ka.max&&(Fa.max=parseFloat(ka.max)));m.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Aa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Aa()})})));ka.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(Aa){N(ja,"",ka,ka.index);mxEvent.consume(Aa)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Da.appendChild(sa));Ca.appendChild(Da);
+return Ca}var Y=this,ba=this.editorUi.editor.graph,ea=[];m.style.position="relative";m.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,
+mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var ma="none";for(var ka=m.childNodes.length-1;0<=ka;ka--)try{var Ba=m.childNodes[ka],sa=Ba.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||m.removeChild(Ba)}catch(Ea){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",ma="";for(ka=0;ka<ja.length;ka++)ja[ka].style.display=
+ma};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ia=document.createElement("th");ia.className="gePropHeaderCell";ia.style.paddingLeft="4px";mxUtils.write(ia,mxResources.get("value"));fa.appendChild(ia);ca.appendChild(fa);var pa=ia=!1;fa=null;1==I.vertices.length&&0==I.edges.length?fa=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(fa=I.edges[0].id);null==fa||L||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),
+{dispName:"id",type:"readOnly"},!0,!1));for(var oa in z)if(L=z[oa],"function"!=typeof L.isVisible||L.isVisible(I,this)){var ha=null!=L.getValue?L.getValue():null!=I.style[oa]?mxUtils.htmlEntities(I.style[oa]+""):null!=L.getDefaultValue?L.getDefaultValue(I,this):L.defVal;if("separator"==L.type)pa=!pa;else{if("staticArr"==L.type)L.size=parseInt(I.style[L.sizeProperty]||z[L.sizeProperty].defVal)||0;else if(null!=L.dependentProps){var xa=L.dependentProps,qa=[],ua=[];for(fa=0;fa<xa.length;fa++){var ya=
+I.style[xa[fa]];ua.push(z[xa[fa]].subDefVal);qa.push(null!=ya?ya.split(","):[])}L.dependentPropsDefVal=ua;L.dependentPropsVals=qa}ca.appendChild(Z(oa,ha,L,ia,pa));ia=!ia}}for(fa=0;fa<ea.length;fa++)for(L=ea[fa],z=L.parentRow,I=0;I<L.values.length;I++)oa=Z(L.name,L.values[I],{type:L.type,parentRow:L.parentRow,isDeletable:L.isDeletable,index:I,defVal:L.defVal,countProperty:L.countProperty,size:L.size},0==I%2,L.flipBkg),z.parentNode.insertBefore(oa,z.nextSibling),z=oa;m.appendChild(ca);da();return m};
+StyleFormatPanel.prototype.addStyles=function(m){if(null!=this.defaultColorSchemes){var z=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},I=this.editorUi,L=I.editor.graph,N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.paddingLeft="24px";N.style.paddingRight="20px";m.style.paddingLeft="16px";m.style.paddingBottom="6px";m.style.position="relative";m.appendChild(N);var P=document.createElement("div");
+P.style.whiteSpace="nowrap";P.style.position="relative";P.style.textAlign="center";P.style.width="210px";for(var S=[],U=0;U<this.defaultColorSchemes.length;U++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",
+mxUtils.bind(this,function(){X(ea)}))})(U);S.push(W);P.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(L.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=
+null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";L.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ia=mxUtils.button("",mxUtils.bind(this,function(ha){L.getModel().beginUpdate();try{for(var xa=I.getSelectionState().cells,
+qa=0;qa<xa.length;qa++){var ua=L.getModel().getStyle(xa[qa]);null!=da?(mxEvent.isShiftDown(ha)||(ua=""==da.fill||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,da.fill),ua=""==da.gradient||null==da.gradient?mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ha)||mxClient.IS_MAC&&mxEvent.isMetaDown(ha)||!L.getModel().isVertex(xa[qa])||(ua=
+""==da.font||null==da.font?mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ha)||(ua=""==da.stroke||null==da.fill?mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,da.stroke))):(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FILLCOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_STROKECOLOR,null),ua=mxUtils.setStyle(ua,mxConstants.STYLE_GRADIENTCOLOR,null),L.getModel().isVertex(xa[qa])&&
+(ua=mxUtils.setStyle(ua,mxConstants.STYLE_FONTCOLOR,null)));L.getModel().setStyle(xa[qa],ua)}}finally{L.getModel().endUpdate()}}));ia.className="geStyleButton";ia.style.width="36px";ia.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ia.style.margin="0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ia.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+
+" 100%)";else if(da.fill==mxConstants.NONE)ia.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ia.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var oa=mxUtils.getLightDarkColor(da.fill);ia.style.backgroundImage="linear-gradient(to right bottom, "+oa.cssText+" 50%, "+oa.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ia.style.border=pa+" transparent":""==da.stroke?ia.style.border=
+"1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(oa=mxUtils.getLightDarkColor(da.stroke),ia.style.border=pa+" "+oa.cssText,ia.style.borderRightColor=oa.light,ia.style.borderBottomColor=ia.style.borderRightColor);null!=da.title&&ia.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),oa=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ia.style.backgroundColor=pa,ia.style.border="1px solid "+
+oa;ia.style.borderRadius="0";N.appendChild(ia);null!=da&&null!=da.gradient&&(pa=ia.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",N.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ia.click()}))});N.innerText=
+"";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(N),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);U=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+U+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+U+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(m.appendChild(Y),m.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(O)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};
+1<this.defaultColorSchemes.length&&(m.appendChild(Y),m.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));z(Y);z(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&m.appendChild(P)}return m}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};
Graph.customFontElements={};Graph.isGoogleFontUrl=function(m){return m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||m.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(m){return Graph.isGoogleFontUrl(m)};Graph.rewriteGoogleFontUrl=function(m){null!=m&&m.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(m=Editor.GOOGLE_FONTS_CSS2+m.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return m};Graph.createFontElement=
function(m,z){var I=Graph.fontMapping[z];null==I&&Graph.isCssFontUrl(z)?(m=document.createElement("link"),m.setAttribute("rel","stylesheet"),m.setAttribute("type","text/css"),m.setAttribute("charset","UTF-8"),m.setAttribute("href",Graph.rewriteGoogleFontUrl(z))):(null==I&&(I='@font-face {\nfont-family: "'+m+'";\nsrc: url("'+z+'");\n}'),m=document.createElement("style"),mxUtils.write(m,I));return m};Graph.addRecentCustomFont=function(m,z){};Graph.addFont=function(m,z,I){if(null!=m&&0<m.length&&null!=
z&&0<z.length){var L=m.toLowerCase();if("helvetica"!=L&&"arial"!=m&&"sans-serif"!=L){var N=Graph.customFontElements[L];null!=N&&N.url!=z&&(N.elt.parentNode.removeChild(N.elt),N=null);null==N?(N=z,"http:"==z.substring(0,5)&&(N=PROXY_URL+"?url="+encodeURIComponent(z)),N={name:m,url:z,elt:Graph.createFontElement(m,N)},Graph.customFontElements[L]=N,z=document.getElementsByTagName("head")[0],null!=I&&("link"==N.elt.nodeName.toLowerCase()?(N.elt.onload=I,N.elt.onerror=I):I()),null!=z&&z.appendChild(N.elt)):
null!=I&&I()}else null!=I&&I()}else null!=I&&I();return m};Graph.getFontUrl=function(m,z){m=Graph.customFontElements[m.toLowerCase()];null!=m&&(z=m.url);return z};Graph.processFontAttributes=function(m){m=m.getElementsByTagName("*");for(var z=0;z<m.length;z++){var I=m[z].getAttribute("data-font-src");if(null!=I){var L="FONT"==m[z].nodeName?m[z].getAttribute("face"):m[z].style.fontFamily;null!=L&&Graph.addFont(L,I)}}};Graph.processFontStyle=function(m){if(null!=m){var z=mxUtils.getValue(m,"fontSource",
null);if(null!=z){var I=mxUtils.getValue(m,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(z))}catch(L){}}}return m};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=
"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var k=Graph.prototype.init;Graph.prototype.init=function(){function m(N){z=N}k.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",m);mxEvent.addListener(this.container,"mousemove",m);mxEvent.addListener(this.container,"mouseleave",function(N){z=null});this.isMouseInsertPoint=function(){return null!=
-z};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):I.apply(this,arguments)};var L=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var O=this.graph.getCellStyle(N);if(null!=O&&"rack"==O.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=O.rackUnitSize?parseFloat(O.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=O.marginLeft||0;S.marginRight=O.marginRight||0;S.marginTop=
-O.marginTop||0;S.marginBottom=O.marginBottom||0;S.allowGaps=O.allowGaps||0;S.horizontal="1"==mxUtils.getValue(O,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return L.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(v.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,I,L,N,O,S,U,W,X,
-Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,I,L){function N(){for(var fa=U.getSelectionCells(),aa=[],da=0;da<fa.length;da++)U.isCellVisible(fa[da])&&aa.push(fa[da]);U.setSelectionCells(aa)}function O(fa){U.setHiddenTags(fa?[]:W.slice());N();U.refresh()}function S(fa,
+z};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):I.apply(this,arguments)};var L=this.layoutManager.getLayout;this.layoutManager.getLayout=function(N){var P=this.graph.getCellStyle(N);if(null!=P&&"rack"==P.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=P.marginLeft||0;S.marginRight=P.marginRight||0;S.marginTop=
+P.marginTop||0;S.marginBottom=P.marginBottom||0;S.allowGaps=P.allowGaps||0;S.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return L.apply(this,arguments)};this.updateGlobalUrlVariables()};var v=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(m,z){return Graph.processFontStyle(v.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(m,z,I,L,N,P,S,U,W,X,
+Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(m,z,I,L){function N(){for(var fa=U.getSelectionCells(),aa=[],da=0;da<fa.length;da++)U.isCellVisible(fa[da])&&aa.push(fa[da]);U.setSelectionCells(aa)}function P(fa){U.setHiddenTags(fa?[]:W.slice());N();U.refresh()}function S(fa,
aa){Z.innerText="";if(0<fa.length){var da=document.createElement("table");da.setAttribute("cellpadding","2");da.style.boxSizing="border-box";da.style.tableLayout="fixed";da.style.width="100%";var ia=document.createElement("tbody");if(null!=fa&&0<fa.length)for(var pa=0;pa<fa.length;pa++)(function(oa){function ha(){var ma=U.getCellsForTags([oa],null,null,!0);U.isEnabled()?U.setSelectionCells(ma):U.highlightCells(ma,null,null,70)}var xa=0>mxUtils.indexOf(U.hiddenTags,oa),qa=document.createElement("tr"),
ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";var ya=document.createElement("img");ya.setAttribute("src",xa?Editor.visibleImage:Editor.hiddenImage);ya.setAttribute("title",mxResources.get(xa?"hideIt":"show",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";ua.appendChild(ya);mxEvent.addListener(ya,"click",function(ma){mxEvent.isShiftDown(ma)?
-O(0<=mxUtils.indexOf(U.hiddenTags,oa)):(U.toggleHiddenTag(oa),N(),U.refresh());mxEvent.consume(ma)});qa.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter=
-"invert(100%)";mxEvent.addListener(ya,"click",function(ma){O(!0);ha();mxEvent.consume(ma)});ua.appendChild(ya);qa.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",oa);a=document.createElement("a");mxUtils.write(a,oa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,xa?100:40);ua.appendChild(a);mxEvent.addListener(ua,
-"click",function(ma){if(mxEvent.isShiftDown(ma))O(!0),ha();else if(xa&&0<U.hiddenTags.length)O(!0);else{var ka=W.slice(),Ba=mxUtils.indexOf(ka,oa);ka.splice(Ba,1);U.setHiddenTags(ka);N();U.refresh()}mxEvent.consume(ma)});qa.appendChild(ua);if(U.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==aa){ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.trashImage);
+P(0<=mxUtils.indexOf(U.hiddenTags,oa)):(U.toggleHiddenTag(oa),N(),U.refresh());mxEvent.consume(ma)});qa.appendChild(ua);ua=document.createElement("td");ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.selectImage);ya.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter=
+"invert(100%)";mxEvent.addListener(ya,"click",function(ma){P(!0);ha();mxEvent.consume(ma)});ua.appendChild(ya);qa.appendChild(ua);ua=document.createElement("td");ua.style.overflow="hidden";ua.style.whiteSpace="nowrap";ua.style.textOverflow="ellipsis";ua.style.verticalAlign="middle";ua.style.cursor="pointer";ua.setAttribute("title",oa);a=document.createElement("a");mxUtils.write(a,oa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,xa?100:40);ua.appendChild(a);mxEvent.addListener(ua,
+"click",function(ma){if(mxEvent.isShiftDown(ma))P(!0),ha();else if(xa&&0<U.hiddenTags.length)P(!0);else{var ka=W.slice(),Ba=mxUtils.indexOf(ka,oa);ka.splice(Ba,1);U.setHiddenTags(ka);N();U.refresh()}mxEvent.consume(ma)});qa.appendChild(ua);if(U.isEnabled()){ua=document.createElement("td");ua.style.verticalAlign="middle";ua.style.textAlign="center";ua.style.width="18px";if(null==aa){ua.style.align="center";ua.style.width="16px";ya=document.createElement("img");ya.setAttribute("src",Editor.trashImage);
ya.setAttribute("title",mxResources.get("removeIt",[oa]));mxUtils.setOpacity(ya,xa?75:25);ya.className="geAdaptiveAsset";ya.style.verticalAlign="middle";ya.style.cursor="pointer";ya.style.width="16px";if(z||Editor.isDarkMode())ya.style.filter="invert(100%)";mxEvent.addListener(ya,"click",function(ma){var ka=mxUtils.indexOf(W,oa);0<=ka&&W.splice(ka,1);U.removeTagsForCells(U.model.getDescendants(U.model.getRoot()),[oa]);U.refresh();mxEvent.consume(ma)});ua.appendChild(ya)}else{var ja=document.createElement("input");
ja.setAttribute("type","checkbox");ja.style.margin="0px";ja.defaultChecked=null!=aa&&0<=mxUtils.indexOf(aa,oa);ja.checked=ja.defaultChecked;ja.style.background="transparent";ja.setAttribute("title",mxResources.get(ja.defaultChecked?"removeIt":"add",[oa]));mxEvent.addListener(ja,"change",function(ma){ja.checked?U.addTagsForCells(U.getSelectionCells(),[oa]):U.removeTagsForCells(U.getSelectionCells(),[oa]);mxEvent.consume(ma)});ua.appendChild(ja)}qa.appendChild(ua)}ia.appendChild(qa)})(fa[pa]);da.appendChild(ia);
Z.appendChild(da)}}var U=this,W=U.hiddenTags.slice(),X=document.createElement("div");X.style.userSelect="none";X.style.overflow="hidden";X.style.padding="10px";X.style.height="100%";var Z=document.createElement("div");Z.style.position="absolute";Z.style.boxSizing="border-box";Z.style.userSelect="none";Z.style.overflow="auto";Z.style.padding="3px";Z.style.left="0px";Z.style.right="0px";Z.style.top="0px";Z.style.bottom="0px";X.appendChild(Z);U.addListener(mxEvent.ROOT,function(){W=U.hiddenTags.slice()});
@@ -12942,37 +12945,37 @@ var Y=mxUtils.bind(this,function(fa,aa){if(m()){fa=U.getAllTags();for(aa=0;aa<fa
"0px";ba.style.right="0px";ba.style.height="26px";ba.style.overflow="hidden";ba.style.padding="3px 4px 4px 4px";ba.style.borderWidth="1px 0px 0px 0px";ba.style.borderStyle="solid";ba.style.whiteSpace="nowrap";if(U.isEnabled()){Z.style.bottom="34px";var ea=document.createElement("a");ea.className="geToolbarButton geAdaptiveAsset geToggleItem";ea.style.width="16px";ea.style.height="18px";ea.style.backgroundPosition="center center";ea.style.backgroundRepeat="no-repeat";ea.style.backgroundSize="20px";
ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){U.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=U.hiddenTags.slice());N();U.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=I&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),
mxEvent.addListener(ea,"click",function(fa){I(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=L&&ba.appendChild(L);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var m=this.extFonts;m=null!=m?m.slice():[];for(var z in Graph.customFontElements){var I=Graph.customFontElements[z];m.push({name:I.name,url:I.url})}return m};Graph.prototype.setFont=function(m,z){Graph.addFont(m,z);var I=Editor.guid();document.execCommand("fontname",!1,I);for(var L=
-this.cellEditor.textarea.getElementsByTagName("font"),N=!1,O=0;O<L.length;O++)L[O].getAttribute("face")==I&&(N=!0,L[O].setAttribute("face",m),null!=z?L[O].setAttribute("data-font-src",z):L[O].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,m)};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;
+this.cellEditor.textarea.getElementsByTagName("font"),N=!1,P=0;P<L.length;P++)L[P].getAttribute("face")==I&&(N=!0,L[P].setAttribute("face",m),null!=z?L[P].setAttribute("data-font-src",z):L[P].removeAttribute("data-font-src"));N||document.execCommand("fontname",!1,m)};var A=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return A.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;
if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var m=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=m)for(var z in m)this.globalVars[z]=m[z]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var J=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(m){var z=J.apply(this,arguments);
-null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,I,L,N,O,S,U,W,X,Z,Y,ba,ea,ca,fa){var aa=D.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");
-null==da&&(da="");Y="auto"==Y?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();if(Z&&0<ia.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var oa="",ha="",xa=0;xa<ia.length;xa++){var qa=ia[xa].name,ua=ia[xa].url;Graph.isCssFontUrl(ua)?
-oa+="@import url("+Graph.rewriteGoogleFontUrl(ua)+");\n":ha+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+ua+'");\n}\n'}da.appendChild(pa.createTextNode(oa+ha));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),null!=
-da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var E=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){E.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=
+null==z&&null!=this.globalVars&&(z=this.globalVars[m]);return z};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var m=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(m.ownerDocument)).decode(m)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(m,z,I,L,N,P,S,U,W,X,Z,Y,ba,ea,ca,fa){var aa=D.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");
+null==da&&(da="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ia=this.getCustomFonts();if(Z&&0<ia.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var oa="",ha="",xa=0;xa<ia.length;xa++){var qa=ia[xa].name,
+ua=ia[xa].url;Graph.isCssFontUrl(ua)?oa+="@import url("+Graph.rewriteGoogleFontUrl(ua)+");\n":ha+='@font-face {\nfont-family: "'+qa+'";\nsrc: url("'+ua+'");\n}\n'}da.appendChild(pa.createTextNode(oa+ha));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),
+null!=da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var G=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(m){G.apply(this,arguments);null!=m.secondLabel&&(m.secondLabel.destroy(),m.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(m){return[m.shape,m.text,m.secondLabel,m.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=
0};var V=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return V.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=
function(m){var z="1"==mxUtils.getValue(m.style,"enumerate",0);z&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):z||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);z=m.secondLabel;if(null!=z){var I=m.view.scale,L=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?
-new mxRectangle(m.x+m.width-4*I,m.y+4*I,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==L&&z.scale==I||(z.bounds=m,z.value=L,z.scale=I,z.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var P=
-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){P.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),
-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,N=0,O=0,S=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(O<m.length){var Z=this.stoppingCustomActions,Y=m[O++],ba=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,
+new mxRectangle(m.x+m.width-4*I,m.y+4*I,0,0):mxRectangle.fromPoint(m.view.getPoint(m));z.bounds.equals(m)&&z.value==L&&z.scale==I||(z.bounds=m,z.value=L,z.scale=I,z.redraw())}};var Q=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();Q.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var O=
+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){O.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(m,z){"data:action/json,"==m.substring(0,17)&&(m=JSON.parse(m.substring(17)),null!=m.actions&&this.executeCustomActions(m.actions,null,z))};Graph.prototype.executeCustomActions=function(m,z,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),
+null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var L=!1,N=0,P=0,S=mxUtils.bind(this,function(){L||(L=!0,this.model.beginUpdate())}),U=mxUtils.bind(this,function(){L&&(L=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<N&&N--;0==N&&X()}),X=mxUtils.bind(this,function(){if(P<m.length){var Z=this.stoppingCustomActions,Y=m[P++],ba=[];if(null!=Y.open)if(U(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,
I))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),N++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),U());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,
!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(N++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),
1);this.setCellsVisible(ea,!0)}null!=Y.hide&&(S(),ea=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&&(S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ea=[];null!=
Y.select&&this.isEnabled()&&(ea=this.getCellsForAction(Y.select),this.setSelectionCells(ea));null!=Y.highlight&&(ea=this.getCellsForAction(Y.highlight),this.highlightCells(ea,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity));null!=Y.scroll&&(ea=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);null!=I&&null!=Y.explore&&Graph.exploreFromCell(this,I,Y.explore);if(null!=Y.tags){if(null!=Y.tags.toggle){var ca=
Y.tags.toggle;0==ca.length&&(ca=this.getAllTags());for(ea=0;ea<ca.length;ea++)this.toggleHiddenTag(ca[ea])}ca=null;null!=Y.tags.hidden&&(null==ca&&(ca=[]),ca=ca.concat(Y.tags.hidden));if(null!=Y.tags.visible){null==ca&&(ca=[]);var fa=this.getAllTags();for(ea=0;ea<fa.length;ea++)0>mxUtils.indexOf(Y.tags.visible,fa[ea])&&0>mxUtils.indexOf(ca,fa[ea])&&ca.push(fa[ea])}null!=ca&&this.setHiddenTags(ca);this.refresh()}0<ba.length&&(N++,this.executeAnimations(ba,W,Z?1:Y.steps,Z?0:Y.delay));0==N?X():U()}else this.stoppingCustomActions=
-this.executingCustomActions=!1,U(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var I=this.getLinkForCell(z);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,I));if(this.isHtmlLabel(z)){var L=document.createElement("div");L.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=L.getElementsByTagName("a"),O=!1,S=0;S<N.length;S++)I=N[S].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(N[S].setAttribute("href",
-this.updateCustomLink(m,I)),O=!0);O&&this.labelChanged(z,L.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var I=JSON.parse(z.substring(17));null!=I.actions&&(this.updateCustomLinkActions(m,I.actions),z="data:action/json,"+JSON.stringify(I))}catch(L){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var I=0;I<z.length;I++){var L=z[I],N;for(N in L)this.updateCustomLinkAction(m,L[N],"cells"),this.updateCustomLinkAction(m,L[N],
-"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,I){if(null!=z&&null!=z[I]){for(var L=[],N=0;N<z[I].length;N++)if("*"==z[I][N])L.push(z[I][N]);else{var O=m[z[I][N]];null!=O?""!=O&&L.push(O):L.push(z[I][N])}z[I]=L}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var I=[],L=0;L<z.length;L++)0>m.excludeCells.indexOf(z[L].id)&&I.push(z[L]);z=I}return z};Graph.prototype.getCellsById=
-function(m){var z=[];if(null!=m)for(var I=0;I<m.length;I++)if("*"==m[I]){var L=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(O){return O!=L},L))}else{var N=this.model.getCell(m[I]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+this.executingCustomActions=!1,U(),null!=z&&z()});X()}};Graph.prototype.doUpdateCustomLinksForCell=function(m,z){var I=this.getLinkForCell(z);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(z,this.updateCustomLink(m,I));if(this.isHtmlLabel(z)){var L=document.createElement("div");L.innerHTML=Graph.sanitizeHtml(this.getLabel(z));for(var N=L.getElementsByTagName("a"),P=!1,S=0;S<N.length;S++)I=N[S].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(N[S].setAttribute("href",
+this.updateCustomLink(m,I)),P=!0);P&&this.labelChanged(z,L.innerHTML)}};Graph.prototype.updateCustomLink=function(m,z){if("data:action/json,"==z.substring(0,17))try{var I=JSON.parse(z.substring(17));null!=I.actions&&(this.updateCustomLinkActions(m,I.actions),z="data:action/json,"+JSON.stringify(I))}catch(L){}return z};Graph.prototype.updateCustomLinkActions=function(m,z){for(var I=0;I<z.length;I++){var L=z[I],N;for(N in L)this.updateCustomLinkAction(m,L[N],"cells"),this.updateCustomLinkAction(m,L[N],
+"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(m,z,I){if(null!=z&&null!=z[I]){for(var L=[],N=0;N<z[I].length;N++)if("*"==z[I][N])L.push(z[I][N]);else{var P=m[z[I][N]];null!=P?""!=P&&L.push(P):L.push(z[I][N])}z[I]=L}};Graph.prototype.getCellsForAction=function(m,z){z=this.getCellsById(m.cells).concat(this.getCellsForTags(m.tags,null,z));if(null!=m.excludeCells){for(var I=[],L=0;L<z.length;L++)0>m.excludeCells.indexOf(z[L].id)&&I.push(z[L]);z=I}return z};Graph.prototype.getCellsById=
+function(m){var z=[];if(null!=m)for(var I=0;I<m.length;I++)if("*"==m[I]){var L=this.model.getRoot();z=z.concat(this.model.filterDescendants(function(P){return P!=L},L))}else{var N=this.model.getCell(m[I]);null!=N&&z.push(N)}return z};var q=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(m){return q.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(m))};Graph.prototype.setHiddenTags=function(m){this.hiddenTags=m;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
Graph.prototype.toggleHiddenTag=function(m){var z=mxUtils.indexOf(this.hiddenTags,m);0>z?this.hiddenTags.push(m):0<=z&&this.hiddenTags.splice(z,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(m){if(null==m||0==m.length||0==this.hiddenTags.length)return!1;m=m.split(" ");if(m.length>this.hiddenTags.length)return!1;for(var z=0;z<m.length;z++)if(0>mxUtils.indexOf(this.hiddenTags,m[z]))return!1;return!0};Graph.prototype.getCellsForTags=function(m,z,I,
-L){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var O=0,S={},U=0;U<m.length;U++)0<m[U].length&&(S[m[U]]=!0,O++);for(U=0;U<z.length;U++)if(I&&this.model.getParent(z[U])==this.model.root||this.model.isVertex(z[U])||this.model.isEdge(z[U])){var W=this.getTagsForCell(z[U]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<O;Z++)null!=S[W[Z]]&&X++;X=X==O}X&&(1!=L||this.isCellVisible(z[U]))&&N.push(z[U])}}return N};Graph.prototype.getAllTags=
-function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,I=[],L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);I=[];if(0<N.length){N=N.split(" ");for(var O={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])O[N[S]]=!0,I.push(N[S]);z=O}else return[]}return I};Graph.prototype.getTagsForCells=function(m){for(var z=[],I={},L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);if(0<N.length){N=N.split(" ");for(var O=
-0;O<N.length;O++)null==I[N[O]]&&(I[N[O]]=!0,z.push(N[O]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){for(var L=this.getTagsForCell(m[I]),N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.trim(z[S]);""!=U&&0>mxUtils.indexOf(N,U)&&(L=0<L.length?L+" "+U:U,O=!0)}O&&this.setAttributeForCell(m[I],"tags",L)}}finally{this.model.endUpdate()}}};
-Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){var L=this.getTagsForCell(m[I]);if(0<L.length){for(var N=L.split(" "),O=!1,S=0;S<z.length;S++){var U=mxUtils.indexOf(N,z[S]);0<=U&&(N.splice(U,1),O=!0)}O&&this.setAttributeForCell(m[I],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};
-Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var I=0;I<m.length;I++)this.model.setVisible(m[I],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,I,L){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,I,L)};Graph.prototype.highlightCell=function(m,z,I,L,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;m=this.view.getState(m);var O=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,
-1)+N),O=new mxCellHighlight(this,z,N,!1),null!=L&&(O.opacity=L),O.highlight(m),window.setTimeout(function(){null!=O.shape&&(mxUtils.setPrefixedStyle(O.shape.node.style,"transition","all 1200ms ease-in-out"),O.shape.node.style.opacity=0);window.setTimeout(function(){O.destroy()},1200)},I));return O};Graph.prototype.addSvgShadow=function(m,z,I,L){I=null!=I?I:!1;L=null!=L?L:!0;var N=m.ownerDocument,O=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");O.setAttribute("id",
-this.shadowId);var S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
-"offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
-S.setAttribute("result","offsetBlur");O.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");O.appendChild(S);S=m.getElementsByTagName("defs");0==S.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=S[0];N.appendChild(O);I||(z=null!=z?z:m.getElementsByTagName("g")[0],
-null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&L&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return O};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=
+L){var N=[];if(null!=m){z=null!=z?z:this.model.getDescendants(this.model.getRoot());for(var P=0,S={},U=0;U<m.length;U++)0<m[U].length&&(S[m[U]]=!0,P++);for(U=0;U<z.length;U++)if(I&&this.model.getParent(z[U])==this.model.root||this.model.isVertex(z[U])||this.model.isEdge(z[U])){var W=this.getTagsForCell(z[U]),X=!1;if(0<W.length&&(W=W.split(" "),W.length>=m.length)){for(var Z=X=0;Z<W.length&&X<P;Z++)null!=S[W[Z]]&&X++;X=X==P}X&&(1!=L||this.isCellVisible(z[U]))&&N.push(z[U])}}return N};Graph.prototype.getAllTags=
+function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(m){for(var z=null,I=[],L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);I=[];if(0<N.length){N=N.split(" ");for(var P={},S=0;S<N.length;S++)if(null==z||null!=z[N[S]])P[N[S]]=!0,I.push(N[S]);z=P}else return[]}return I};Graph.prototype.getTagsForCells=function(m){for(var z=[],I={},L=0;L<m.length;L++){var N=this.getTagsForCell(m[L]);if(0<N.length){N=N.split(" ");for(var P=
+0;P<N.length;P++)null==I[N[P]]&&(I[N[P]]=!0,z.push(N[P]))}}return z};Graph.prototype.getTagsForCell=function(m){return this.getAttributeForCell(m,"tags","")};Graph.prototype.addTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){for(var L=this.getTagsForCell(m[I]),N=L.split(" "),P=!1,S=0;S<z.length;S++){var U=mxUtils.trim(z[S]);""!=U&&0>mxUtils.indexOf(N,U)&&(L=0<L.length?L+" "+U:U,P=!0)}P&&this.setAttributeForCell(m[I],"tags",L)}}finally{this.model.endUpdate()}}};
+Graph.prototype.removeTagsForCells=function(m,z){if(0<m.length&&0<z.length){this.model.beginUpdate();try{for(var I=0;I<m.length;I++){var L=this.getTagsForCell(m[I]);if(0<L.length){for(var N=L.split(" "),P=!1,S=0;S<z.length;S++){var U=mxUtils.indexOf(N,z[S]);0<=U&&(N.splice(U,1),P=!0)}P&&this.setAttributeForCell(m[I],"tags",N.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(m){this.model.beginUpdate();try{for(var z=0;z<m.length;z++)this.model.setVisible(m[z],!this.model.isVisible(m[z]))}finally{this.model.endUpdate()}};
+Graph.prototype.setCellsVisible=function(m,z){this.model.beginUpdate();try{for(var I=0;I<m.length;I++)this.model.setVisible(m[I],z)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(m,z,I,L){for(var N=0;N<m.length;N++)this.highlightCell(m[N],z,I,L)};Graph.prototype.highlightCell=function(m,z,I,L,N){z=null!=z?z:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;m=this.view.getState(m);var P=null;null!=m&&(N=null!=N?N:4,N=Math.max(N+1,mxUtils.getValue(m.style,mxConstants.STYLE_STROKEWIDTH,
+1)+N),P=new mxCellHighlight(this,z,N,!1),null!=L&&(P.opacity=L),P.highlight(m),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},I));return P};Graph.prototype.addSvgShadow=function(m,z,I,L){I=null!=I?I:!1;L=null!=L?L:!0;var N=m.ownerDocument,P=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"filter"):N.createElement("filter");P.setAttribute("id",
+this.shadowId);var S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):N.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feOffset"):N.createElement("feOffset");S.setAttribute("in","blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result",
+"offsetBlur");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feFlood"):N.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feComposite"):N.createElement("feComposite");S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");
+S.setAttribute("result","offsetBlur");P.appendChild(S);S=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"feBlend"):N.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");P.appendChild(S);S=m.getElementsByTagName("defs");0==S.length?(N=null!=N.createElementNS?N.createElementNS(mxConstants.NS_SVG,"defs"):N.createElement("defs"),null!=m.firstChild?m.insertBefore(N,m.firstChild):m.appendChild(N)):N=S[0];N.appendChild(P);I||(z=null!=z?z:m.getElementsByTagName("g")[0],
+null!=z&&(z.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(m.getAttribute("width")))&&L&&(m.setAttribute("width",parseInt(m.getAttribute("width"))+6),m.setAttribute("height",parseInt(m.getAttribute("height"))+6),z=m.getAttribute("viewBox"),null!=z&&0<z.length&&(z=z.split(" "),3<z.length&&(w=parseFloat(z[2])+6,h=parseFloat(z[3])+6,m.setAttribute("viewBox",z[0]+" "+z[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(m,z){mxClient.IS_SVG&&!mxClient.IS_SF&&(z=
null!=z?z:!0,(this.shadowVisible=m)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),z&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var m=this.model.getChildCount(this.model.root),
z=0;do var I=this.model.getChildAt(this.model.root,z);while(z++<m&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+
"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+
@@ -12986,33 +12989,33 @@ STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PAT
[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",
STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];
mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=
-[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,I,L,N,O,S,U,W,X){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,
-z,I,L,N,O){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,I){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function N(Aa){m.lastPrintPagesRadioChecked=Y.checked;m.lastPrintSelectionOnlyChecked=fa.checked;m.lastPrintCropRadioChecked=
+[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(m){var z=null;null!=m&&0<m.length&&("ER"==m.substring(0,2)?z="mxgraph.er":"sysML"==m.substring(0,5)&&(z="mxgraph.sysml"));return z};var y=mxMarker.createMarker;mxMarker.createMarker=function(m,z,I,L,N,P,S,U,W,X){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=Z&&mxStencilRegistry.getStencil(Z)}return y.apply(this,arguments)};var B=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(m,
+z,I,L,N,P){"1"==mxUtils.getValue(z.style,"lineShape",null)&&m.setFillColor(mxUtils.getValue(z.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return B.apply(this,arguments)};PrintDialog.prototype.create=function(m,z,I){function L(){ea.value=Math.max(1,Math.min(X,Math.max(parseInt(ea.value),parseInt(ba.value))));ba.value=Math.max(1,Math.min(X,Math.min(parseInt(ea.value),parseInt(ba.value))))}function N(Aa){m.lastPrintPagesRadioChecked=Y.checked;m.lastPrintSelectionOnlyChecked=fa.checked;m.lastPrintCropRadioChecked=
da.checked;m.lastPrintFitRadioChecked=ia.checked;Y.checked&&ba.value<ea.value?(m.lastPrintPagesFromInput=ba.value,m.lastPrintPagesToInput=ea.value):(m.lastPrintPagesFromInput=null,m.lastPrintPagesToInput=null);sa.value=Math.max(1,Math.min(1600,parseInt(sa.value)))+"%";m.lastPrintZoom=sa.value;m.lastPrintBorder=Ba.value;m.lastPrintGrid=Ea.checked;m.lastPrintTransparent=wa.checked;m.lastPrintInclude=Ca.checked;m.lastPrintSheetsAcross=ma.value;m.lastPrintSheetsDown=ka.value;var Fa={};Fa.border=parseInt(Ba.value);
-Fa.scale=parseInt(sa.value)/100;Fa.grid=Ea.checked;Fa.transparent=wa.checked;Fa.includeCopy=Ca.checked;Fa.sheetsAcross=parseInt(ma.value);Fa.sheetsDown=parseInt(ka.value);Fa.pagesFrom=parseInt(ba.value);Fa.pagesTo=parseInt(ea.value);Fa.allPages=Z.checked;Fa.selection=fa.checked;Fa.pageView=aa.checked;Fa.crop=da.checked;Fa.fit=ia.checked;return null!=I?I(!Aa,Fa):m.print(!Aa,Fa)}var O=m.editor.graph,S=document.createElement("div"),U=document.createElement("h3");U.style.width="100%";U.style.textAlign=
+Fa.scale=parseInt(sa.value)/100;Fa.grid=Ea.checked;Fa.transparent=wa.checked;Fa.includeCopy=Ca.checked;Fa.sheetsAcross=parseInt(ma.value);Fa.sheetsDown=parseInt(ka.value);Fa.pagesFrom=parseInt(ba.value);Fa.pagesTo=parseInt(ea.value);Fa.allPages=Z.checked;Fa.selection=fa.checked;Fa.pageView=aa.checked;Fa.crop=da.checked;Fa.fit=ia.checked;return null!=I?I(!Aa,Fa):m.print(!Aa,Fa)}var P=m.editor.graph,S=document.createElement("div"),U=document.createElement("h3");U.style.width="100%";U.style.textAlign=
"center";U.style.marginTop="0px";mxUtils.write(U,z||mxResources.get("print"));S.appendChild(U);var W=1,X=1;U=document.createElement("div");U.style.whiteSpace="nowrap";var Z=document.createElement("input");Z.style.marginRight="8px";Z.style.marginBottom="8px";Z.setAttribute("type","radio");Z.setAttribute("name","pages-printdialog");U.appendChild(Z);z=document.createElement("span");mxUtils.write(z,mxResources.get("allPages"));mxEvent.addListener(z,"click",function(){Z.checked=!0});U.appendChild(z);mxUtils.br(U);
var Y=Z.cloneNode(!0);U.appendChild(Y);z=document.createElement("span");mxUtils.write(z,mxResources.get("pages")+":");U.appendChild(z);mxEvent.addListener(z,"click",function(){Y.checked=!0});var ba=document.createElement("input");ba.style.margin="0 4px";ba.setAttribute("value","1");ba.setAttribute("type","number");ba.setAttribute("min","1");ba.style.width="40px";U.appendChild(ba);z=document.createElement("span");mxUtils.write(z,mxResources.get("to"));U.appendChild(z);var ea=ba.cloneNode(!0);U.appendChild(ea);
mxEvent.addListener(ba,"focus",function(){Y.checked=!0});mxEvent.addListener(ea,"focus",function(){Y.checked=!0});mxEvent.addListener(ba,"change",L);mxEvent.addListener(ea,"change",L);if(null!=m.pages&&(X=m.pages.length,null!=m.currentPage))for(var ca=0;ca<X;ca++)if(m.currentPage==m.pages[ca]){W=ca+1;break}null!=m.lastPrintPagesFromInput&&null!=m.lastPrintPagesToInput?(ba.value=Math.min(X,Math.max(1,m.lastPrintPagesFromInput)),ea.value=Math.min(X,Math.max(1,m.lastPrintPagesToInput))):(ba.value=W,
ea.value=W);ba.setAttribute("max",X);ea.setAttribute("max",X);ca=mxUtils.button(mxResources.get("currentPage"),function(Aa){ba.value=W;ea.value=W;Y.checked=!0});ca.setAttribute("title",mxResources.get("currentPage"));ca.style.marginLeft="4px";ca.style.maxWidth="100px";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.whiteSpace="nowrap";U.appendChild(ca);1<X&&S.appendChild(U);U=document.createElement("div");U.style.borderBottom="1px solid lightGray";U.style.paddingBottom="12px";
-U.style.marginBottom="12px";U.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";O.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");O.isEnabled()&&(U.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),U.appendChild(z));(O.isEnabled()||1<X)&&S.appendChild(U);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Y.checked=
-!0:!O.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;O.isSelectionEmpty()||mxEvent.addListener(z,"click",function(){fa.checked=!fa.checked});O=document.createElement("div");O.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");O.appendChild(aa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));O.appendChild(z);
-mxEvent.addListener(O,"click",function(){aa.checked=!0});S.appendChild(O);O=document.createElement("div");O.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");O.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));O.appendChild(z);mxEvent.addListener(O,"click",function(){da.checked=!0});S.appendChild(O);O=document.createElement("div");
-O.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(ia);O.appendChild(z);U=document.createElement("table");U.style.display="inline-block";U.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),
-oa=pa.cloneNode(!0),ha=document.createElement("td"),xa=ha.cloneNode(!0),qa=ha.cloneNode(!0),ua=ha.cloneNode(!0),ya=ha.cloneNode(!0),ja=ha.cloneNode(!0);ha.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ha,mxResources.get("fitTo"));mxEvent.addListener(O,"click",function(Aa){mxEvent.getSource(Aa)!=ia&&(ia.checked=!ia.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",m.lastPrintSheetsAcross||"1");ma.setAttribute("min",
+U.style.marginBottom="12px";U.style.whiteSpace="nowrap";var fa=document.createElement("input");fa.setAttribute("name","pages-printdialog");fa.setAttribute("type",1==X?"checkbox":"radio");fa.style.marginRight="8px";P.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");P.isEnabled()&&(U.appendChild(fa),z=document.createElement("span"),mxUtils.write(z,mxResources.get("selectionOnly")),U.appendChild(z));(P.isEnabled()||1<X)&&S.appendChild(U);!m.isPagesEnabled()||m.lastPrintPagesRadioChecked?Y.checked=
+!0:!P.isSelectionEmpty()&&m.lastPrintSelectionOnlyChecked?fa.checked=!0:Z.checked=!0;P.isSelectionEmpty()||mxEvent.addListener(z,"click",function(){fa.checked=!fa.checked});P=document.createElement("div");P.style.whiteSpace="nowrap";var aa=document.createElement("input");aa.style.marginBottom="8px";aa.style.marginRight="8px";aa.setAttribute("type","radio");aa.setAttribute("name","printSize");P.appendChild(aa);z=document.createElement("span");mxUtils.write(z,mxResources.get("pageView"));P.appendChild(z);
+mxEvent.addListener(P,"click",function(){aa.checked=!0});S.appendChild(P);P=document.createElement("div");P.style.whiteSpace="nowrap";var da=document.createElement("input");da.style.marginBottom="8px";da.style.marginRight="8px";da.setAttribute("type","radio");da.setAttribute("name","printSize");P.appendChild(da);z=document.createElement("span");mxUtils.write(z,mxResources.get("crop"));P.appendChild(z);mxEvent.addListener(P,"click",function(){da.checked=!0});S.appendChild(P);P=document.createElement("div");
+P.style.whiteSpace="nowrap";var ia=document.createElement("input");ia.style.marginBottom="8px";ia.style.marginRight="8px";ia.setAttribute("type","radio");ia.setAttribute("name","printSize");z=document.createElement("div");z.style.display="inline-block";z.style.verticalAlign="top";z.style.paddingTop="2px";z.appendChild(ia);P.appendChild(z);U=document.createElement("table");U.style.display="inline-block";U.style.borderSpacing="0";ca=document.createElement("tbody");var pa=document.createElement("tr"),
+oa=pa.cloneNode(!0),ha=document.createElement("td"),xa=ha.cloneNode(!0),qa=ha.cloneNode(!0),ua=ha.cloneNode(!0),ya=ha.cloneNode(!0),ja=ha.cloneNode(!0);ha.style.textAlign="right";ua.style.textAlign="right";mxUtils.write(ha,mxResources.get("fitTo"));mxEvent.addListener(P,"click",function(Aa){mxEvent.getSource(Aa)!=ia&&(ia.checked=!ia.checked)});var ma=document.createElement("input");ma.style.margin="0 2px";ma.style.boxSizing="border-box";ma.setAttribute("value",m.lastPrintSheetsAcross||"1");ma.setAttribute("min",
"1");ma.setAttribute("type","number");ma.style.width="40px";xa.appendChild(ma);z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsAcross"));qa.appendChild(z);mxUtils.write(ua,mxResources.get("fitToBy"));var ka=ma.cloneNode(!0);ka.setAttribute("value",m.lastPrintSheetsDown||"1");ya.appendChild(ka);mxEvent.addListener(ma,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});mxEvent.addListener(ka,"click",function(Aa){ia.checked=!0;mxEvent.consume(Aa)});m.lastPrintCropRadioChecked?
-da.checked=!0:m.lastPrintFitRadioChecked?ia.checked=!0:aa.checked=!0;z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));ja.appendChild(z);pa.appendChild(ha);pa.appendChild(xa);pa.appendChild(qa);oa.appendChild(ua);oa.appendChild(ya);oa.appendChild(ja);ca.appendChild(pa);ca.appendChild(oa);U.appendChild(ca);O.appendChild(U);S.appendChild(O);O=document.createElement("div");O.style.borderTop="1px solid lightGray";O.style.whiteSpace="nowrap";O.style.paddingTop="12px";
-O.style.marginTop="12px";O.style.paddingLeft="8px";mxUtils.write(O,mxResources.get("borderWidth")+":");var Ba=document.createElement("input");Ba.setAttribute("type","number");Ba.setAttribute("min","0");Ba.style.width="40px";Ba.style.marginLeft="4px";Ba.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;O.appendChild(Ba);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");O.appendChild(z);var sa=document.createElement("input");
-sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";O.appendChild(sa);mxUtils.br(O);var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;O.appendChild(Ea);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));O.appendChild(z);mxEvent.addListener(z,"click",function(Aa){Ea.checked=!0;
-mxEvent.consume(Aa)});var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=I&&(O.appendChild(wa),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){wa.checked=!0;mxEvent.consume(Aa)}));var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");
-Ca.style.marginTop="10px";Ca.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(O),O.appendChild(Ca),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),O.appendChild(z),mxEvent.addListener(z,"click",function(Aa){Ca.checked=!0;mxEvent.consume(Aa)}));S.appendChild(O);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign=
-"right";z.style.whiteSpace="nowrap";m.isOffline()||null!=I||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));O=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});O.className="geBtn";m.editor.cancelFirst&&z.appendChild(O);PrintDialog.previewEnabled&&null==I&&(U=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),N(!1)}catch(Aa){m.handleError(Aa)}}),U.className="geBtn",z.appendChild(U));U=mxUtils.button(mxResources.get(null!=I?"export":
-PrintDialog.previewEnabled?"print":"ok"),function(){try{m.hideDialog(),N(!0)}catch(Aa){m.handleError(Aa)}});U.className="geBtn gePrimaryBtn";z.appendChild(U);m.editor.cancelFirst||z.appendChild(O);S.appendChild(z);if(m.editor.isChromelessView()){var Da=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Da);Da();var Ka=function(Aa,Fa){Aa=Fa.getProperty("dialog");S.parentNode==
+da.checked=!0:m.lastPrintFitRadioChecked?ia.checked=!0:aa.checked=!0;z=document.createElement("span");mxUtils.write(z,mxResources.get("fitToSheetsDown"));ja.appendChild(z);pa.appendChild(ha);pa.appendChild(xa);pa.appendChild(qa);oa.appendChild(ua);oa.appendChild(ya);oa.appendChild(ja);ca.appendChild(pa);ca.appendChild(oa);U.appendChild(ca);P.appendChild(U);S.appendChild(P);P=document.createElement("div");P.style.borderTop="1px solid lightGray";P.style.whiteSpace="nowrap";P.style.paddingTop="12px";
+P.style.marginTop="12px";P.style.paddingLeft="8px";mxUtils.write(P,mxResources.get("borderWidth")+":");var Ba=document.createElement("input");Ba.setAttribute("type","number");Ba.setAttribute("min","0");Ba.style.width="40px";Ba.style.marginLeft="4px";Ba.value=null!=m.lastPrintBorder?m.lastPrintBorder:mxPrintPreview.prototype.pageMargin;P.appendChild(Ba);z=document.createElement("span");z.style.marginLeft="8px";mxUtils.write(z,mxResources.get("zoom")+":");P.appendChild(z);var sa=document.createElement("input");
+sa.style.width="60px";sa.style.marginLeft="4px";sa.value=null!=m.lastPrintZoom?m.lastPrintZoom:"100%";P.appendChild(sa);mxUtils.br(P);var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.marginTop="12px";Ea.checked=null!=m.lastPrintGrid?m.lastPrintGrid:!1;P.appendChild(Ea);z=document.createElement("span");z.style.marginLeft="4px";z.style.marginRight="8px";mxUtils.write(z,mxResources.get("grid"));P.appendChild(z);mxEvent.addListener(z,"click",function(Aa){Ea.checked=!0;
+mxEvent.consume(Aa)});var wa=document.createElement("input");wa.setAttribute("type","checkbox");wa.style.marginTop="10px";wa.checked=null!=m.lastPrintTransparent?m.lastPrintTransparent:!1;null!=I&&(P.appendChild(wa),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("transparentBackground")),P.appendChild(z),mxEvent.addListener(z,"click",function(Aa){wa.checked=!0;mxEvent.consume(Aa)}));var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");
+Ca.style.marginTop="10px";Ca.checked=null!=m.lastPrintInclude?m.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=m.getServiceName()||(mxUtils.br(P),P.appendChild(Ca),z=document.createElement("span"),z.style.marginLeft="4px",mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram")),P.appendChild(z),mxEvent.addListener(z,"click",function(Aa){Ca.checked=!0;mxEvent.consume(Aa)}));S.appendChild(P);z=document.createElement("div");z.style.marginTop="40px";z.style.textAlign=
+"right";z.style.whiteSpace="nowrap";m.isOffline()||null!=I||z.appendChild(m.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));P=mxUtils.button(mxResources.get("cancel"),function(){m.hideDialog()});P.className="geBtn";m.editor.cancelFirst&&z.appendChild(P);PrintDialog.previewEnabled&&null==I&&(U=mxUtils.button(mxResources.get("preview"),function(){try{m.hideDialog(),N(!1)}catch(Aa){m.handleError(Aa)}}),U.className="geBtn",z.appendChild(U));U=mxUtils.button(mxResources.get(null!=I?"export":
+PrintDialog.previewEnabled?"print":"ok"),function(){try{m.hideDialog(),N(!0)}catch(Aa){m.handleError(Aa)}});U.className="geBtn gePrimaryBtn";z.appendChild(U);m.editor.cancelFirst||z.appendChild(P);S.appendChild(z);if(m.editor.isChromelessView()){var Da=function(){Editor.isDarkMode()?(S.classList.add("geDarkMode"),S.style.colorScheme="dark"):(S.classList.remove("geDarkMode"),S.style.colorScheme="light")};m.addListener("darkModeChanged",Da);Da();var Ka=function(Aa,Fa){Aa=Fa.getProperty("dialog");S.parentNode==
Aa.container&&(m.editor.removeListener(Ka),m.removeListener(Da))};m.editor.addListener("hideDialog",Ka)}this.container=S};var C=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var m=this.image;null!=m&&null!=m.src&&Graph.isPageLink(m.src)&&(m={originalSrc:m.src});this.page.viewState.backgroundImage=
m}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else C.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&
this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(m=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=m?m:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var M=document.createElement("canvas"),T=new Image;T.onload=function(){try{M.getContext("2d").drawImage(T,
0,0);var m=M.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=m&&6<m.length}catch(z){}};T.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;c.previousAdaptiveColors=c.adaptiveColors;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
@@ -13022,7 +13025,7 @@ function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(k){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],g=0;g<arguments.length;g++)d.push(arguments[g]);console.log.apply(console,d)}}catch(k){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.embedSvgImages=function(d){d=d.getElementsByTagName("image");
for(var g=[],k=0;k<d.length;k++)g.push(d[k]);for(k=0;k<g.length;k++)EditorUi.replaceSvgImage(g[k])};EditorUi.replaceSvgImage=function(d){try{var g=null;g=null==d.getAttributeNS?d.getAttribute("xlink:href"):d.getAttributeNS(mxConstants.NS_XLINK,"href");var k=EditorUi.getSvgSubtree(g);if(null!=k&&"svg"==k.nodeName){k.setAttribute("x",d.getAttribute("x"));k.setAttribute("y",d.getAttribute("y"));k.setAttribute("width",d.getAttribute("width"));k.setAttribute("height",d.getAttribute("height"));k.style.fontFamily=
"initial";var v=mxUtils.createElementNs(k.ownerDocument,mxConstants.NS_SVG,"g");v.appendChild(k);d.hasAttribute("transform")&&v.setAttribute("transform",d.getAttribute("transform"));d.parentNode.replaceChild(v,d)}}catch(t){}};EditorUi.getSvgSubtree=function(d){var g=Graph.getSvgFromDataUri(d);d=null;if(null!=g){d=Graph.sanitizeNode(mxUtils.parseXml(g).documentElement);g=d.getElementsByTagName("style");if(0<g.length){var k="svg-image-"+Editor.guid();d.setAttribute("id",k);for(var v=document.implementation.createHTMLDocument(""),
-t=document.createElement("style"),x=0;x<g.length;x++){t.textContent=g[x].textContent;v.body.appendChild(t);for(var A="",J=0;J<t.sheet.cssRules.length;J++){var D=t.sheet.cssRules[J];if(null!=D.selectorText){for(var E=D.selectorText.split(","),R=0;R<E.length;R++)E[R]="#"+k+" "+E[R];D.selectorText=E.join(",")}A+=D.cssText+"\n"}g[x].textContent=A}}g=d.getElementsByTagName("*");for(k=0;k<g.length;k++)g[k].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+t=document.createElement("style"),x=0;x<g.length;x++){t.textContent=g[x].textContent;v.body.appendChild(t);for(var A="",J=0;J<t.sheet.cssRules.length;J++){var D=t.sheet.cssRules[J];if(null!=D.selectorText){for(var G=D.selectorText.split(","),R=0;R<G.length;R++)G[R]="#"+k+" "+G[R];D.selectorText=G.join(",")}A+=D.cssText+"\n"}g[x].textContent=A}}g=d.getElementsByTagName("*");for(k=0;k<g.length;k++)g[k].removeAttribute("data-cell-id")}return d};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(t){}try{var g=document.createElement("canvas"),
@@ -13032,10 +13035,10 @@ g,k)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalDat
EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){var g=this.editor.graph;g.mathEnabled=d;null!=g.view.backgroundImage&&(g.view.backgroundImage.destroy(),g.view.backgroundImage=null);this.editor.updateGraphComponents();
g.refresh();g.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(d){this.editor.graph.setAdaptiveColors(d);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=
function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(d,g,k){var v=null==d||null==g;k=null!=k?k:24;var t=new Spinner({lines:12,length:k,width:Math.round(k/3),radius:Math.round(k/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,A=t.spin,J=null,D=null,E=mxUtils.bind(this,function(V){null!=V&&V()});t.spin=function(V,Q,P,q){q=null!=q?q:x;var y=!1;if(!this.active){var B=Date.now();null!=P&&(J=window.setTimeout(function(){t.stop();J=null;P({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},q));A.call(this,V);this.active=!0;null!=Q&&(v&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),x=this.timeout,A=t.spin,J=null,D=null,G=mxUtils.bind(this,function(V){null!=V&&V()});t.spin=function(V,Q,O,q){q=null!=q?q:x;var y=!1;if(!this.active){var B=Date.now();null!=O&&(J=window.setTimeout(function(){t.stop();J=null;O({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:D})},q));A.call(this,V);this.active=!0;null!=Q&&(v&&(g=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/
2-2),y=document.createElement("div"),y.className="geSpinnerStatus",y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,d)+"px",y.style.top=Math.max(0,g+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform",
-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),y.innerHTML=mxUtils.htmlEntities(Q),V.appendChild(y),t.status=y);this.pause=mxUtils.bind(this,function(){var C=E;this.active&&(q=Math.max(0,q-(Date.now()-B)),C=mxUtils.bind(this,function(M){this.spin(V,Q,P,q);if(null!=M)try{M(),D=mxUtils.bind(this,function(){this.spin(V,Q,P,q);try{M()}catch(T){null!=P&&P(T)}})}catch(T){null!=
-P&&P(T)}}));this.stop();return C});y=!0}return y};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=J&&(window.clearTimeout(J),J=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return E};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(v){}return!1};
+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=Q.substring(Q.length-3,Q.length)&&"!"!=Q.charAt(Q.length-1)&&(Q+="..."),y.innerHTML=mxUtils.htmlEntities(Q),V.appendChild(y),t.status=y);this.pause=mxUtils.bind(this,function(){var C=G;this.active&&(q=Math.max(0,q-(Date.now()-B)),C=mxUtils.bind(this,function(M){this.spin(V,Q,O,q);if(null!=M)try{M(),D=mxUtils.bind(this,function(){this.spin(V,Q,O,q);try{M()}catch(T){null!=O&&O(T)}})}catch(T){null!=
+O&&O(T)}}));this.stop();return C});y=!0}return y};var R=t.stop;t.stop=function(){R.call(this);this.active&&(this.active=!1,null!=J&&(window.clearTimeout(J),J=null),null!=t.status&&null!=t.status.parentNode&&t.status.parentNode.removeChild(t.status),t.status=null)};t.pause=function(){return G};return t};EditorUi.prototype.isCompatibleString=function(d){try{var g=mxUtils.parseXml(d),k=this.editor.extractGraphModel(g.documentElement,!0);return null!=k&&0==k.getElementsByTagName("parsererror").length}catch(v){}return!1};
EditorUi.isVisioFilename=function(d){return/(\.v(dx|sdx?))($|\?)/i.test(d)||/(\.vs(x|sx?))($|\?)/i.test(d)};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};
EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(d){var g=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var k=
g.getFunction,v=this.editor.graph,t=this;g.getFunction=function(x){if(v.isSelectionEmpty()&&null!=t.pages&&0<t.pages.length){var A=t.getSelectedPageIndex();if(mxEvent.isShiftDown(x)){if(37==x.keyCode)return function(){0<A&&t.movePage(A,A-1)};if(38==x.keyCode)return function(){0<A&&t.movePage(A,0)};if(39==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,A+1)};if(40==x.keyCode)return function(){A<t.pages.length-1&&t.movePage(A,t.pages.length-1)}}else if(mxEvent.isControlDown(x)||mxClient.IS_MAC&&
@@ -13044,12 +13047,12 @@ arguments):null}}return g};var e=EditorUi.prototype.extractGraphModelFromHtml;Ed
g=null!=x?mxUtils.getXml(x):""}}catch(A){}return g};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var g=d.indexOf('<meta charset="utf-8">');0<=g&&(d=d.slice(0,g)+'<meta charset="utf-8"/>'+d.slice(g+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d,g){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[d],"patches",g);d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var k=null!=d?this.editor.extractGraphModel(d,
!0):null;null!=k&&(d=k);if(null!=d){k=this.editor.graph;k.model.beginUpdate();try{var v=null!=this.pages?this.pages.slice():null,t=d.getElementsByTagName("diagram");if(1<t.length||1==t.length&&t[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var x=t.length-1;0<=x;x--){var A=this.updatePageRoot(new DiagramPage(t[x]));null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[x+1]));k.model.execute(new ChangePage(this,A,0==x?A:null,0))}}else null==this.fileNode&&
(this.fileNode=d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,k.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=v)for(x=0;x<v.length;x++)k.model.execute(new ChangePage(this,
-v[x],null));var J=this.getCurrentFile();null!=J&&J.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;R=null!=R?R:!Editor.defaultCompressed;var P=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else P=q=v;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(R){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",
-mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());B.appendChild(d)}else{B=Graph.zapGremlins(mxUtils.getXml(d));y=Graph.compress(B);if(Graph.decompress(y)!=B)return B;B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());mxUtils.setTextContent(B,y)}y=d.ownerDocument.createElement("mxfile");y.appendChild(B)}E?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),
+v[x],null));var J=this.getCurrentFile();null!=J&&J.fileReplaced(g)}finally{k.model.endUpdate()}}};EditorUi.prototype.createFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){g=null!=g?g:this.editor.graph;t=null!=t?t:!1;D=null!=D?D:!0;R=null!=R?R:!Editor.defaultCompressed;var O=null;if(null==k||k.getMode()==App.MODE_DEVICE||k.getMode()==App.MODE_BROWSER)var q="_blank";else O=q=v;if(null==d)return"";var y=d;if("mxfile"!=y.nodeName.toLowerCase()){if(R){var B=d.ownerDocument.createElement("diagram");B.setAttribute("name",
+mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());B.appendChild(d)}else{B=Graph.zapGremlins(mxUtils.getXml(d));y=Graph.compress(B);if(Graph.decompress(y)!=B)return B;B=d.ownerDocument.createElement("diagram");B.setAttribute("name",mxResources.get("pageWithNumber",[1]));B.setAttribute("id",Editor.guid());mxUtils.setTextContent(B,y)}y=d.ownerDocument.createElement("mxfile");y.appendChild(B)}G?(y=y.cloneNode(!0),y.removeAttribute("modified"),y.removeAttribute("host"),y.removeAttribute("agent"),
y.removeAttribute("etag"),y.removeAttribute("userAgent"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("type")):(y.removeAttribute("userAgent"),y.removeAttribute("modified"),y.removeAttribute("version"),y.removeAttribute("editor"),y.removeAttribute("pages"),y.removeAttribute("type"),y.removeAttribute("etag"),mxClient.IS_CHROMEAPP?y.setAttribute("host","Chrome"):EditorUi.isElectronApp?y.setAttribute("host","Electron"):y.setAttribute("host",window.location.hostname),y.setAttribute("agent",
-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=V&&(y=y.cloneNode(!0),y.setAttribute("scale",V));null!=Q&&(y=y.cloneNode(!0),y.setAttribute("border",Q));d=R?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!x&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=k?k.getTitle():null,q,P);else if(x||
-!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(v=null),k=this.getSvgFileProperties(y),d=this.getEmbeddedSvg(d,g,v,null,J,D,P,null,null,k.scale,k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,v){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var E=D.getElementsByTagName("mxGraphModel"),
-R=0<E.length?E[0]:null;E=D;null==R&&k?(R=mxUtils.getNodeValue(D),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(E=D.cloneNode(!1),E.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||k?E=D.cloneNode(!0):(E=D.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(R)));t.appendChild(E)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],
+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),y.setAttribute("version",EditorUi.VERSION),1<y.getElementsByTagName("diagram").length&&null!=this.pages&&y.setAttribute("pages",this.pages.length));null!=V&&(y=y.cloneNode(!0),y.setAttribute("scale",V));null!=Q&&(y=y.cloneNode(!0),y.setAttribute("border",Q));d=R?mxUtils.getPrettyXml(y):mxUtils.getXml(y);if(!x&&!t&&(A||null!=k&&/(\.html)$/i.test(k.getTitle())))d=this.getHtml2(mxUtils.getXml(y),g,null!=k?k.getTitle():null,q,O);else if(x||
+!t&&null!=k&&/(\.svg)$/i.test(k.getTitle()))null==k||k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER||(v=null),k=this.getSvgFileProperties(y),d=this.getEmbeddedSvg(d,g,v,null,J,D,O,null,null,k.scale,k.border,null,Editor.svgFileTheme);return d};EditorUi.prototype.getXmlFileData=function(d,g,k,v){d=null!=d?d:!0;g=null!=g?g:!1;k=null!=k?k:!Editor.defaultCompressed;var t=this.editor.getGraphXml(d,v);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(D){var G=D.getElementsByTagName("mxGraphModel"),
+R=0<G.length?G[0]:null;G=D;null==R&&k?(R=mxUtils.getNodeValue(D),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(G=D.cloneNode(!1),G.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||k?G=D.cloneNode(!0):(G=D.cloneNode(!1),mxUtils.setTextContent(G,Graph.compressNode(R)));t.appendChild(G)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(t),t=this.fileNode.cloneNode(!1),g)d(this.currentPage.node);else for(g=0;g<this.pages.length;g++){var x=this.pages[g],
A=x.node;if(x!=this.currentPage)if(x.needsUpdate){var J=new mxCodec(mxUtils.createXmlDocument());J=J.encode(new mxGraphModel(x.root));this.editor.graph.saveViewState(x.viewState,J,null,v);EditorUi.removeChildNodes(A);A.appendChild(J);delete x.needsUpdate}else v&&(this.updatePageRoot(x),null!=x.viewState.backgroundImage&&(null!=x.viewState.backgroundImage.originalSrc?x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.originalSrc,x):Graph.isPageLink(x.viewState.backgroundImage.src)&&
(x.viewState.backgroundImage=this.createImageForPageLink(x.viewState.backgroundImage.src,x))),null!=x.viewState.backgroundImage&&null!=x.viewState.backgroundImage.originalSrc&&(J=new mxCodec(mxUtils.createXmlDocument()),J=J.encode(new mxGraphModel(x.root)),this.editor.graph.saveViewState(x.viewState,J,null,v),A=A.cloneNode(!1),A.appendChild(J)));d(A)}return t};EditorUi.prototype.anonymizeString=function(d,g){for(var k=[],v=0;v<d.length;v++){var t=d.charAt(v);0<=EditorUi.ignoredAnonymizedChars.indexOf(t)?
k.push(t):isNaN(parseInt(t))?t.toLowerCase()!=t?k.push(String.fromCharCode(65+Math.round(25*Math.random()))):t.toUpperCase()!=t?k.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(t)?k.push(" "):k.push("?"):k.push(g?"0":Math.round(9*Math.random()))}return k.join("")};EditorUi.prototype.anonymizePatch=function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var g=0;g<d[EditorUi.DIFF_INSERT].length;g++)try{var k=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][g].data).documentElement.cloneNode(!1);
@@ -13058,9 +13061,9 @@ null!=A[J].xmlValue&&(A[J].xmlValue="["+A[J].xmlValue.length+"]"),null!=A[J].sty
g){if(null!=d.attributes)for(var k=0;k<d.attributes.length;k++)"as"!=d.attributes[k].name&&d.setAttribute(d.attributes[k].name,this.anonymizeString(d.attributes[k].value,g));if(null!=d.childNodes)for(k=0;k<d.childNodes.length;k++)this.anonymizeAttributes(d.childNodes[k],g)};EditorUi.prototype.anonymizeNode=function(d,g){g=d.getElementsByTagName("mxCell");for(var k=0;k<g.length;k++)null!=g[k].getAttribute("value")&&g[k].setAttribute("value","["+g[k].getAttribute("value").length+"]"),null!=g[k].getAttribute("xmlValue")&&
g[k].setAttribute("xmlValue","["+g[k].getAttribute("xmlValue").length+"]"),null!=g[k].getAttribute("style")&&g[k].setAttribute("style","["+g[k].getAttribute("style").length+"]"),null!=g[k].parentNode&&"root"!=g[k].parentNode.nodeName&&null!=g[k].parentNode.parentNode&&(g[k].setAttribute("id",g[k].parentNode.getAttribute("id")),g[k].parentNode.parentNode.replaceChild(g[k],g[k].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var g=this.getCurrentFile();null!=g&&(g.savingFile?
this.handleError({message:mxResources.get("busy")}):!d&&g.invalidChecksum?g.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(g.clearAutosave(),this.editor.setStatus(""),d?g.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();g.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(k){this.spinner.stop();g.handleFileError(k,!0)})):g.synchronizeFile(mxUtils.bind(this,function(){g.handleFileSuccess("manual"==DrawioFile.SYNC)}),
-mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){t=null!=t?t:!0;x=null!=x?x:!1;E=null!=E?E:!Editor.defaultCompressed;var P=this.editor.graph;if((g||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());P.setBackgroundImage=this.editor.graph.setBackgroundImage;P.background=this.editor.graph.background;var y=
-null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?P.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&P.setBackgroundImage(y.viewState.backgroundImage);P.getGlobalVariable=function(B){return"page"==B&&null!=y?y.getName():"pagenumber"==B?1:q.apply(this,arguments)};document.body.appendChild(P.container);null!=y&&P.model.setRoot(y.root)}A=null!=A?A:this.getXmlFileData(t,x,E,R);D=null!=D?D:this.getCurrentFile();d=this.createFileData(A,P,D,window.location.href,
-d,g,k,v,t,J,E,V,Q);P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);return d};EditorUi.prototype.getHtml=function(d,g,k,v,t,x){x=null!=x?x:!0;var A=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var D=g.view.scale;x=Math.floor(A.x/D-g.view.translate.x);D=Math.floor(A.y/D-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(J=EditorUi.drawHost+"/embed.js?s="+g));
+mxUtils.bind(this,function(k){g.handleFileError(k,!0)}))))};EditorUi.prototype.getFileData=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){t=null!=t?t:!0;x=null!=x?x:!1;G=null!=G?G:!Editor.defaultCompressed;var O=this.editor.graph;if((g||!d&&null!=D&&/(\.svg)$/i.test(D.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var q=O.getGlobalVariable;O=this.createTemporaryGraph(O.getStylesheet());O.setBackgroundImage=this.editor.graph.setBackgroundImage;O.background=this.editor.graph.background;var y=
+null!=this.pages?this.pages[0]:null;null==y||this.currentPage==y?O.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&O.setBackgroundImage(y.viewState.backgroundImage);O.getGlobalVariable=function(B){return"page"==B&&null!=y?y.getName():"pagenumber"==B?1:q.apply(this,arguments)};document.body.appendChild(O.container);null!=y&&O.model.setRoot(y.root)}A=null!=A?A:this.getXmlFileData(t,x,G,R);D=null!=D?D:this.getCurrentFile();d=this.createFileData(A,O,D,window.location.href,
+d,g,k,v,t,J,G,V,Q);O!=this.editor.graph&&O.container.parentNode.removeChild(O.container);return d};EditorUi.prototype.getHtml=function(d,g,k,v,t,x){x=null!=x?x:!0;var A=null,J=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=g){A=x?g.getGraphBounds():g.getBoundingBox(g.getSelectionCells());var D=g.view.scale;x=Math.floor(A.x/D-g.view.translate.x);D=Math.floor(A.y/D-g.view.translate.y);A=g.background;null==t&&(g=this.getBasenames().join(";"),0<g.length&&(J=EditorUi.drawHost+"/embed.js?s="+g));
d.setAttribute("x0",x);d.setAttribute("y0",D)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=v&&d.setAttribute("edit",v));null!=t&&(t=t.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";v=Graph.compress(d);Graph.decompress(v)!=d&&(v=encodeURIComponent(d));return(null==t?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=t?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==t?null!=k?"<title>"+mxUtils.htmlEntities(k)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=t?'<meta http-equiv="refresh" content="0;URL=\''+t+"'\"/>\n":"")+"</head>\n<body"+(null==t&&null!=A&&A!=mxConstants.NONE?' style="background-color:'+A+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+v+"</div>\n</div>\n"+
(null==t?'<script type="text/javascript" src="'+J+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+t+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,g,k,v,t){g=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=t&&(t=t.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
@@ -13069,21 +13072,21 @@ t+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph"
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var g=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,k=Editor.extractParserError(g,mxResources.get("invalidOrMissingFile"));if(k)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[g],"cause",[k]),Error(mxResources.get("notADiagramFile")+" ("+k+")");d=null!=g?this.editor.extractGraphModel(g,!0):null;null!=d&&(g=d);if(null!=g&&"mxfile"==g.nodeName&&(d=g.getElementsByTagName("diagram"),
k={},0<d.length)){var v=this.getHashObject(),t=null;this.fileNode=g;this.pages=[];for(var x=0;x<d.length;x++){null==d[x].getAttribute("id")&&d[x].setAttribute("id",x);g=new DiagramPage(d[x]);null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[x+1]));this.pages.push(g);if(null==v.pageId&&null!=urlParams["page-id"]&&g.getId()==urlParams["page-id"]||null!=v.pageId&&g.getId()==v.pageId)t=g;if(null==k[g.getId()])k[g.getId()]=g;else throw Error(g.getId()+": Duplicate page ID");}this.currentPage=
null!=t?t:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];g=this.currentPage.node}null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(g.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(g);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),
-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var J=this.editor.graph.getModel(),D=J.getChildren(J.root);for(x=0;x<D.length;x++){var E=D[x];J.setVisible(E,g[E.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=
-g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!t),C=B+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+d;
-if("xml"==d){var M=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,t,null,null,null,g);this.saveData(C,d,M,"text/xml")}else if("html"==d)M=this.getHtml2(this.getFileData(!0),this.editor.graph,B),this.saveData(C,d,M,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?C=B+".png":"jpeg"==d&&(C=B+".jpg"),this.saveRequest(C,d,mxUtils.bind(this,function(L,N){try{return this.createDownloadRequest(L,d,v,N,A,t,J,D,E,R,V,void 0,
-void 0,!x,Q,P,q,y)}catch(O){this.handleError(O)}}));else{var T=null,m=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var z=this.editor.graph.background;if(A||z==mxConstants.NONE)z=null;var I=this.editor.graph.getSvg(z,null,null,null,null,v);k&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,
-mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();m(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else C=B+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();m(L)}),v)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y,B,C){d=this.downloadRequestBuilder(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y,B,C);g="";for(var M in d)k=d[M],null!=k&&(g+=M+"="+encodeURIComponent(k)+
-"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y,B,C){var M=this.editor.graph,T=M.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var m=null,z=null,I=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};E=E?"1":"0";"pdf"==g&&(null!=R?(m=R.from,z=R.to):0==x&&(I=
-"1"));"xmlpng"==g&&(E="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){m=x;break}x=M.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;t={globalVars:M.getExportVariables()};D&&(t.grid={size:M.gridSize,steps:M.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:M.view.gridColor});Graph.translateDiagram&&
-(t.diagramLanguage=Graph.diagramLanguage);return{format:g,from:m,to:z,allPages:I,bg:null!=x?x:mxConstants.NONE,base64:v,embedXml:E,xml:k,filename:null!=d?d:"",extras:JSON.stringify(t),scale:A,border:J,pageMargin:q,w:V&&isFinite(V)?V:null,h:Q&&isFinite(Q)?Q:null,crop:null!=P&&P?"1":"0",fit:null!=y&&y?"1":"0",sheetsAcross:B,sheetsDown:C}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));
+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var A=decodeURIComponent(urlParams["layer-ids"]).split(" ");g={};for(x=0;x<A.length;x++)g[A[x]]=!0;var J=this.editor.graph.getModel(),D=J.getChildren(J.root);for(x=0;x<D.length;x++){var G=D[x];J.setVisible(G,g[G.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=
+g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y){try{v=null!=v?v:this.editor.graph.isSelectionEmpty();var B=this.getBaseFilename(!t),C=B+("xml"==d||"pdf"==d&&R?".drawio":"")+"."+d;
+if("xml"==d){var M=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,v,t,null,null,null,g);this.saveData(C,d,M,"text/xml")}else if("html"==d)M=this.getHtml2(this.getFileData(!0),this.editor.graph,B),this.saveData(C,d,M,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==d?C=B+".png":"jpeg"==d&&(C=B+".jpg"),this.saveRequest(C,d,mxUtils.bind(this,function(L,N){try{return this.createDownloadRequest(L,d,v,N,A,t,J,D,G,R,V,void 0,
+void 0,!x,Q,O,q,y)}catch(P){this.handleError(P)}}));else{var T=null,m=mxUtils.bind(this,function(L){L.length<=MAX_REQUEST_SIZE?this.saveData(C,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var z=this.editor.graph.background;if(A||z==mxConstants.NONE)z=null;var I=this.editor.graph.getSvg(z,null,null,null,null,v);k&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,
+mxUtils.bind(this,mxUtils.bind(this,function(L){this.spinner.stop();m(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(L))})))}else C=B+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(L){this.spinner.stop();m(L)}),v)}}catch(L){this.handleError(L)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y,B,C){d=this.downloadRequestBuilder(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y,B,C);g="";for(var M in d)k=d[M],null!=k&&(g+=M+"="+encodeURIComponent(k)+
+"&");return new mxXmlRequest(EXPORT_URL,g)};EditorUi.prototype.downloadRequestBuilder=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y,B,C){var M=this.editor.graph,T=M.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==x?!1:"xmlpng"!=g,null,null,null,!Editor.defaultCompressed,"pdf"==g);var m=null,z=null,I=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||k.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==g&&(null!=R?(m=R.from,z=R.to):0==x&&(I=
+"1"));"xmlpng"==g&&(G="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(x=0;x<this.pages.length;x++)if(this.pages[x]==this.currentPage){m=x;break}x=M.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!t?t||null!=x&&x!=mxConstants.NONE||(x="#ffffff"):x=mxConstants.NONE;t={globalVars:M.getExportVariables()};D&&(t.grid={size:M.gridSize,steps:M.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==g?mxGraphView.prototype.defaultGridColor:M.view.gridColor});Graph.translateDiagram&&
+(t.diagramLanguage=Graph.diagramLanguage);return{format:g,from:m,to:z,allPages:I,bg:null!=x?x:mxConstants.NONE,base64:v,embedXml:G,xml:k,filename:null!=d?d:"",extras:JSON.stringify(t),scale:A,border:J,pageMargin:q,w:V&&isFinite(V)?V:null,h:Q&&isFinite(Q)?Q:null,crop:null!=O&&O?"1":"0",fit:null!=y&&y?"1":"0",sheetsAcross:B,sheetsDown:C}};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.getDiagramId=function(){var d=window.location.hash;null!=d&&0<d.length&&(d=d.substring(1));
if(null!=d&&1<d.length){var g=d.indexOf("#");0<=g&&(d=d.substring(0,g))}return d};EditorUi.prototype.getHashObject=function(){var d=window.location.hash,g={};if(null!=d&&0<d.length){var k=d.lastIndexOf("#");if(0<k){d=decodeURIComponent(d.substring(k+1));try{g=JSON.parse(d)}catch(v){}}}return g};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var d=this.getHashObject();d.pageId=this.currentPage.getId();this.setHashObject(d)}else this.setHashObject(null)};
EditorUi.prototype.setHashObject=function(d){if(Editor.enableHashObjects){var g=window.location.hash;if(null==g||""==g)g="#";var k=g.lastIndexOf("#");0<k&&(g=g.substring(0,k));try{null==d||mxUtils.isEmptyObject(d)||(g=g+"#"+encodeURIComponent(JSON.stringify(d)))}catch(v){}0<k&&0<g.lastIndexOf("#")?window.location.hash=g:window.location.replace(g)}};EditorUi.prototype.loadDescriptor=function(d,g,k){var v=window.location.hash,t=mxUtils.bind(this,function(A){var J=null!=d.data?d.data:"";null!=A&&0<A.length&&
-(0<J.length&&(J+="\n"),J+=A);A=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return v};this.fileLoaded(A);"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Q){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,E=null,R=mxUtils.bind(this,function(){var Q=this.currentPage;
-mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(P){Q===this.currentPage&&(200<=P.getStatus()&&300>=P.getStatus()?(this.updateDiagram(P.getText()),V()):this.handleError({message:mxResources.get("error")+" "+P.getStatus()}))}),mxUtils.bind(this,function(P){this.handleError(P)}))}),V=mxUtils.bind(this,function(){window.clearTimeout(E);E=window.setTimeout(R,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){V();
+(0<J.length&&(J+="\n"),J+=A);A=new LocalFile(this,"csv"!=d.format&&0<J.length?J:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);A.getHash=function(){return v};this.fileLoaded(A);"csv"==d.format&&this.importCsv(J,mxUtils.bind(this,function(Q){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var D=null!=d.interval?parseInt(d.interval):6E4,G=null,R=mxUtils.bind(this,function(){var Q=this.currentPage;
+mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(O){Q===this.currentPage&&(200<=O.getStatus()&&300>=O.getStatus()?(this.updateDiagram(O.getText()),V()):this.handleError({message:mxResources.get("error")+" "+O.getStatus()}))}),mxUtils.bind(this,function(O){this.handleError(O)}))}),V=mxUtils.bind(this,function(){window.clearTimeout(G);G=window.setTimeout(R,D)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){V();
R()}));V();R()}null!=g&&g()});if(null!=d.url&&0<d.url.length){var x=this.editor.getProxiedUrl(d.url);this.editor.loadUrl(x,mxUtils.bind(this,function(A){t(A)}),mxUtils.bind(this,function(A){null!=k&&k(A)}))}else t("")};EditorUi.prototype.updateDiagram=function(d){function g(T){var m=new mxCellOverlay(T.image||t.warningImage,T.tooltip,T.align,T.valign,T.offset);m.addListener(mxEvent.CLICK,function(z,I){v.alert(T.tooltip)});return m}var k=null,v=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=
-null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=x.getCell(d.getAttribute("id"));if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var E=mxUtils.parseXml(D).documentElement;if(null!=E)if("1"==E.getAttribute("replace-value"))x.setValue(J,E);else for(var R=E.attributes,V=0;V<R.length;V++)t.setAttributeForCell(J,R[V].nodeName,0<R[V].nodeValue.length?
-R[V].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+J.id+": "+T)}try{var Q=d.getAttribute("style");null!=Q&&t.model.setStyle(J,Q)}catch(T){null!=window.console&&console.log("Error in style for "+J.id+": "+T)}try{var P=d.getAttribute("icon");if(null!=P){var q=0<P.length?JSON.parse(P):null;null!=q&&q.append||t.removeCellOverlays(J);null!=q&&t.addCellOverlay(J,g(q))}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}try{var y=d.getAttribute("geometry");
+null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var t=this.editor.graph,x=t.getModel();x.beginUpdate();var A=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var J=x.getCell(d.getAttribute("id"));if(null!=J){try{var D=d.getAttribute("value");if(null!=D){var G=mxUtils.parseXml(D).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))x.setValue(J,G);else for(var R=G.attributes,V=0;V<R.length;V++)t.setAttributeForCell(J,R[V].nodeName,0<R[V].nodeValue.length?
+R[V].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+J.id+": "+T)}try{var Q=d.getAttribute("style");null!=Q&&t.model.setStyle(J,Q)}catch(T){null!=window.console&&console.log("Error in style for "+J.id+": "+T)}try{var O=d.getAttribute("icon");if(null!=O){var q=0<O.length?JSON.parse(O):null;null!=q&&q.append||t.removeCellOverlays(J);null!=q&&t.addCellOverlay(J,g(q))}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}try{var y=d.getAttribute("geometry");
if(null!=y){y=JSON.parse(y);var B=t.getCellGeometry(J);if(null!=B){B=B.clone();for(key in y){var C=parseFloat(y[key]);"dx"==key?B.x+=C:"dy"==key?B.y+=C:"dw"==key?B.width+=C:"dh"==key?B.height+=C:B[key]=parseFloat(y[key])}t.model.setGeometry(J,B)}}}catch(T){null!=window.console&&console.log("Error in icon for "+J.id+": "+T)}}}else if("model"==d.nodeName){for(var M=d.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(d.firstChild)).decode(M,x)}else if("view"==
d.nodeName){if(d.hasAttribute("scale")&&(t.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))t.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(A=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{x.endUpdate()}null!=A&&this.chromelessResize&&this.chromelessResize(!0,A)}return k};EditorUi.prototype.getCopyFilename=function(d,g){var k=null!=
d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var v=k.lastIndexOf(".");0<=v&&(d=k.substring(v),k=k.substring(0,v));if(g){g=k;var t=new Date;k=t.getFullYear();v=t.getMonth()+1;var x=t.getDate(),A=t.getHours(),J=t.getMinutes();t=t.getSeconds();k=g+(" "+(k+"-"+v+"-"+x+"-"+A+"-"+J+"-"+t))}return k=mxResources.get("copyOf",[k])+d};EditorUi.prototype.logIfModified=function(d,g){try{null!=d&&g&&EditorUi.debug("File.closed",[d])}catch(k){}};EditorUi.prototype.fileLoaded=function(d,g,k){var v=
@@ -13094,7 +13097,7 @@ this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDia
[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(J){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(J){}}catch(J){this.fileLoadedError=J;if(null!=d)try{d.close()}catch(D){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=v?this.fileLoaded(v)||x():x()});g?d():(null!=J.fallbackFileData&&(J.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var D=new LocalFile(this,J.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(D)})}),this.handleError(J,mxResources.get("errorLoadingFile"),d,!0,null,null,!0))}else x();return t};EditorUi.prototype.getHashValueForPages=function(d,g){var k=
0,v=new mxGraphModel,t=new mxCodec;null!=g&&(g.byteCount=0,g.attrCount=0,g.eltCount=0,g.nodeCount=0);for(var x=0;x<d.length;x++){this.updatePageRoot(d[x]);var A=d[x].node.cloneNode(!1);A.removeAttribute("name");v.root=d[x].root;var J=t.encode(v);this.editor.graph.saveViewState(d[x].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");A.appendChild(J);null!=g&&(g.eltCount+=A.getElementsByTagName("*").length,g.nodeCount+=A.getElementsByTagName("mxCell").length);k=(k<<5)-k+
-this.hashValue(A,function(D,E,R,V){return!V||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=E&&"y"!=E&&"width"!=E&&"height"!=E?V&&"mxCell"==D.nodeName&&"previous"==E?null:R:Math.round(R)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);
+this.hashValue(A,function(D,G,R,V){return!V||"mxGeometry"!=D.nodeName&&"mxPoint"!=D.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?V&&"mxCell"==D.nodeName&&"previous"==G?null:R:Math.round(R)},g)<<0}return k};EditorUi.prototype.hashValue=function(d,g,k){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,g,k));if(null!=d.attributes){null!=k&&(k.attrCount+=d.attributes.length);
for(var t=0;t<d.attributes.length;t++){var x=d.attributes[t].name,A=null!=g?g(d,x,d.attributes[t].value,!0):d.attributes[t].value;null!=A&&(v^=this.hashValue(x,g,k)+this.hashValue(A,g,k))}}if(null!=d.childNodes)for(t=0;t<d.childNodes.length;t++)v=(v<<5)-v+this.hashValue(d.childNodes[t],g,k)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);g=0;null!=k&&(k.byteCount+=d.length);for(t=0;t<d.length;t++)g=(g<<5)-g+d.charCodeAt(t)<<0;v^=g}return v};EditorUi.prototype.descriptorChanged=function(){};
EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,g,k,v,t,x,A){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCompressed)for(var g=0;g<d.length;g++)null!=d[g].xml&&"<"!=d[g].xml.charAt(0)&&(d[g].xml=mxUtils.trim(Graph.decompress(d[g].xml)));g=mxUtils.createXmlDocument();var k=g.createElement("mxlibrary");mxUtils.setTextContent(k,JSON.stringify(d,null,2));g.appendChild(k);return mxUtils.getXml(g,"\n")};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),
@@ -13102,50 +13105,50 @@ EditorUi.prototype.createLibraryDataFromImages=function(d){if(!Editor.defaultCom
d=null!=d?d:k.firstChild.nextSibling.nextSibling;g=k.lastChild;var v=g.previousSibling;k.insertBefore(g,d);k.insertBefore(v,g)}};EditorUi.prototype.loadLibrary=function(d,g){var k=mxUtils.parseXml(d.getData());if("mxlibrary"==k.documentElement.nodeName){var v=JSON.parse(mxUtils.getTextContent(k.documentElement));this.libraryLoaded(d,v,k.documentElement.getAttribute("title"),g)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.showSidebar=
function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(d,g,k,v){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());var t=null;if(d.constructor!=StorageLibrary||".scratchpad"!=d.title){null==this.openLibraries&&(this.openLibraries=[]);for(var x=0;x<this.openLibraries.length;x++)if(this.openLibraries[x].file.getHash()==d.getHash()){mxUtils.remove(this.openLibraries[x],
this.openLibraries);break}t={file:d,images:g,title:k,expand:v};this.openLibraries.push(t)}else this.scratchpad=d;x=this.sidebar.palettes[d.getHash()];x=null!=x?x[x.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var A=null,J=mxUtils.bind(this,function(C,M){0==C.length&&d.isEditable()?(null==A&&(A=document.createElement("div"),A.className="geDropTarget",mxUtils.write(A,mxResources.get("dragElementsHere"))),M.appendChild(A)):this.addLibraryEntries(C,M)});null!=this.sidebar&&null!=
-g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),k,null!=v?v:!0,mxUtils.bind(this,function(C){J(g,C)}));null!=t&&(t.div=D);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());v=D.parentNode.previousSibling;k=v.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&v.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var E=document.createElement("div");E.style.backgroundColor=
-"inherit";v.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var V=null;if(".scratchpad"!=d.title||this.closableScratchpad)E.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,
-function(C){if(!mxEvent.isConsumed(C)){var M=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(d)});null!=V?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(C)}}));if(d.isEditable()){var Q=this.editor.graph,P=null;k=mxUtils.bind(this,function(C){this.showLibraryDialog(d.getTitle(),D,g,d,d.getMode());mxEvent.consume(C)});var q=mxUtils.bind(this,function(C){d.setModified(!0);
-d.isAutosave()?(null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P),P=R.cloneNode(!1),P.setAttribute("src",Editor.spinImage),P.setAttribute("title",mxResources.get("saving")),P.style.cursor="default",P.style.marginRight="2px",P.style.marginTop="-2px",E.insertBefore(P,E.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=P&&null!=P.parentNode&&P.parentNode.removeChild(P)})):null==V&&(V=R.cloneNode(!1),V.setAttribute("src",Editor.saveImage),V.setAttribute("title",mxResources.get("save")),
-E.insertBefore(V,E.firstChild),mxEvent.addListener(V,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==V||d.isModified()||(V.parentNode.removeChild(V),V=null)});mxEvent.consume(M)})))}),y=mxUtils.bind(this,function(C,M,T,m){C=Q.cloneCells(mxUtils.sortCells(Q.model.getTopmostCells(C)));for(var z=0;z<C.length;z++){var I=Q.getCellGeometry(C[z]);null!=I&&I.translate(-M.x,-M.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(C,
+g&&this.sidebar.addEntries(g);null==k&&(k=d.getTitle(),null!=k&&/(\.xml)$/i.test(k)&&(k=k.substring(0,k.lastIndexOf("."))));var D=this.sidebar.addPalette(d.getHash(),k,null!=v?v:!0,mxUtils.bind(this,function(C){J(g,C)}));null!=t&&(t.div=D);this.repositionLibrary(x,"L.scratchpad"!=d.getHash());v=D.parentNode.previousSibling;k=v.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=d.title&&v.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+k);var G=document.createElement("div");G.style.backgroundColor=
+"inherit";v.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var V=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,
+function(C){if(!mxEvent.isConsumed(C)){var M=mxUtils.bind(this,function(){null!=t&&mxUtils.remove(t,this.openLibraries);this.closeLibrary(d)});null!=V?this.confirm(mxResources.get("allChangesLost"),null,M,mxResources.get("cancel"),mxResources.get("discardChanges")):M();mxEvent.consume(C)}}));if(d.isEditable()){var Q=this.editor.graph,O=null;k=mxUtils.bind(this,function(C){this.showLibraryDialog(d.getTitle(),D,g,d,d.getMode());mxEvent.consume(C)});var q=mxUtils.bind(this,function(C){d.setModified(!0);
+d.isAutosave()?(null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O),O=R.cloneNode(!1),O.setAttribute("src",Editor.spinImage),O.setAttribute("title",mxResources.get("saving")),O.style.cursor="default",O.style.marginRight="2px",O.style.marginTop="-2px",G.insertBefore(O,G.firstChild),this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=O&&null!=O.parentNode&&O.parentNode.removeChild(O)})):null==V&&(V=R.cloneNode(!1),V.setAttribute("src",Editor.saveImage),V.setAttribute("title",mxResources.get("save")),
+G.insertBefore(V,G.firstChild),mxEvent.addListener(V,"click",mxUtils.bind(this,function(M){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==V||d.isModified()||(V.parentNode.removeChild(V),V=null)});mxEvent.consume(M)})))}),y=mxUtils.bind(this,function(C,M,T,m){C=Q.cloneCells(mxUtils.sortCells(Q.model.getTopmostCells(C)));for(var z=0;z<C.length;z++){var I=Q.getCellGeometry(C[z]);null!=I&&I.translate(-M.x,-M.y)}D.appendChild(this.sidebar.createVertexTemplateFromCells(C,
M.width,M.height,m||"",!0,null,!1));C=mxUtils.getXml(this.editor.graph.encodeCells(C));Editor.defaultCompressed&&(C=Graph.compress(C));M={xml:C,w:M.width,h:M.height};null!=m&&(M.title=m);g.push(M);q(T);null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null)}),B=mxUtils.bind(this,function(C){if(Q.isSelectionEmpty())Q.getRubberband().isActive()?(Q.getRubberband().execute(C),Q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),
mxResources.get("ok"));else{var M=Q.getSelectionCells(),T=Q.view.getBounds(M);if(null!=T&&0<T.width&&0<T.height){var m=Q.view.scale;T.x/=m;T.y/=m;T.width/=m;T.height/=m;T.x-=Q.view.translate.x;T.y-=Q.view.translate.y;y(M,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(C)});mxEvent.addGestureListeners(D,function(){},mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler.first&&(Q.graphHandler.suspend(),
null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="hidden"),D.style.backgroundColor="light-dark(#fefefe, #000000)",D.style.cursor="copy",Q.panningManager.stop(),Q.autoScroll=!1,mxEvent.consume(C))}),mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.panningManager&&null!=Q.graphHandler&&(D.style.backgroundColor="",D.style.cursor="default",this.sidebar.showTooltips=!0,Q.panningManager.stop(),Q.graphHandler.reset(),Q.isMouseDown=!1,Q.autoScroll=!0,B(C),mxEvent.consume(C))}));mxEvent.addListener(D,
"mouseleave",mxUtils.bind(this,function(C){Q.isMouseDown&&null!=Q.graphHandler.first&&(Q.graphHandler.resume(),null!=Q.graphHandler.hint&&(Q.graphHandler.hint.style.visibility="visible"),D.style.backgroundColor="",D.style.cursor="",Q.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(D,"dragover",mxUtils.bind(this,function(C){D.style.backgroundColor="light-dark(#fefefe, #000000)";C.dataTransfer.dropEffect="copy";D.style.cursor="copy";this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()})),
-mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,T,m,z,I,L,N,O,S){if(null!=M&&"image/"==T.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,I,L),M)],M[0].vertex=!0,y(M,new mxRectangle(0,0,I,L),C,mxEvent.isAltDown(C)?
+mxEvent.addListener(D,"drop",mxUtils.bind(this,function(C){D.style.cursor="";D.style.backgroundColor="";0<C.dataTransfer.files.length&&this.importFiles(C.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(M,T,m,z,I,L,N,P,S){if(null!=M&&"image/"==T.substring(0,6))M="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(M),M=[new mxCell("",new mxGeometry(0,0,I,L),M)],M[0].vertex=!0,y(M,new mxRectangle(0,0,I,L),C,mxEvent.isAltDown(C)?
null:N.substring(0,N.lastIndexOf(".")).replace(/_/g," ")),null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),A=null);else{var U=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));J(Y,D);g=g.concat(Y);q(C);this.spinner.stop();U=!0}catch(fa){}else if("mxfile"==
X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&y(ea,new mxRectangle(0,0,ca.width,ca.height),C)}U=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}U||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=A&&null!=A.parentNode&&0<g.length&&(A.parentNode.removeChild(A),
A=null)});null!=S&&null!=N&&EditorUi.isVisioFilename(N)?this.importVisio(S,function(X){W(X,"text/xml")},null,N):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(M,N)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(M,T)}}));C.stopPropagation();C.preventDefault()})),mxEvent.addListener(D,"dragleave",function(C){D.style.cursor="";D.style.backgroundColor="";C.stopPropagation();C.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));E.insertBefore(R,E.firstChild);mxEvent.addListener(R,"click",k);k=R.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",
-mxResources.get("add"));E.insertBefore(k,E.firstChild);mxEvent.addListener(k,"click",B);".scratchpad"==d.title&&(this.addSelectionToScratchpad=B);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink),x=k.getElementsByTagName("img")[0],k.style.marginRight="1px",x.style.marginTop="-2px",x.style.opacity="",E.insertBefore(k,E.firstChild))}v.appendChild(E);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=
+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(M,T)}}));C.stopPropagation();C.preventDefault()})),mxEvent.addListener(D,"dragleave",function(C){D.style.cursor="";D.style.backgroundColor="";C.stopPropagation();C.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));G.insertBefore(R,G.firstChild);mxEvent.addListener(R,"click",k);k=R.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",
+mxResources.get("add"));G.insertBefore(k,G.firstChild);mxEvent.addListener(k,"click",B);".scratchpad"==d.title&&(this.addSelectionToScratchpad=B);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(k=this.createHelpIcon(EditorUi.scratchpadHelpLink),x=k.getElementsByTagName("img")[0],k.style.marginRight="1px",x.style.marginTop="-2px",x.style.opacity="",G.insertBefore(k,G.firstChild))}v.appendChild(G);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=
function(d,g){for(var k=0;k<d.length;k++)try{var v=d[k],t=v.data;if(null!=t){t="data:"==t.substring(0,5)?this.convertDataUri(t):t;var x="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==v.aspect&&(x+="aspect=fixed;");x=x+"image="+t+";";null!=v.style&&(x+=v.style);g.appendChild(this.sidebar.createVertexTemplate(x,v.w,v.h,"",v.title||"",!1,null,!0))}else if(null!=v.xml){var A=this.stringToCells("<"==v.xml.charAt(0)?v.xml:Graph.decompress(v.xml)),J=0==A.length?mxResources.get("drawingEmpty"):
null!=v.title?v.title:"";g.appendChild(this.sidebar.createVertexTemplateFromCells(A,v.w,v.h,J,!0,null,!0))}}catch(D){J=null!=D.message?mxResources.get("error")+": "+D.message:String(D),x=this.sidebar.createVertexTemplateFromCells(null,v.w,v.h,J,!0,null,!0),g.appendChild(x)}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=
function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=
".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,g,k,v,t,x,A){d=new ImageDialog(this,d,g,k,v,t,x,A);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showLocalStorageDialog=function(d,g,k,v,t,x){var A=localStorage.getItem(g);d=new TextareaDialog(this,d,null!=A?JSON.stringify(JSON.parse(A),null,2):"",mxUtils.bind(this,function(J){if(null!=J)try{if(null!=x&&
-x(J),J==A)this.hideDialog();else{if(0<J.length){var D=JSON.parse(J);localStorage.setItem(g,JSON.stringify(D))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(E){this.handleError(E)}}),null,mxResources.get("close"),null,null,null,!0,null,null,t,k,v);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,k,v){d=null!=d?d:mxUtils.bind(this,function(t,x,A,J){x||(t=new ChangePageSetup(this,
+x(J),J==A)this.hideDialog();else{if(0<J.length){var D=JSON.parse(J);localStorage.setItem(g,JSON.stringify(D))}else localStorage.removeItem(g);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(G){this.handleError(G)}}),null,mxResources.get("close"),null,null,null,!0,null,null,t,k,v);this.showDialog(d.container,660,480,!0,!1);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,g,k,v){d=null!=d?d:mxUtils.bind(this,function(t,x,A,J){x||(t=new ChangePageSetup(this,
v?A:null,t),t.ignoreColor=!v,null!=J&&v&&(t.shadowVisible=J),this.editor.graph.model.execute(t))});d=new BackgroundImageDialog(this,d,g,k,v);this.showDialog(d.container,400,v?240:220,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,g,k,v,t){d=new LibraryDialog(this,d,g,k,v,t);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(x){x&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var f=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
function(d){var g=f.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(k){this.editor.graph.isSelectionEmpty()&&g.refresh()}));return g};EditorUi.prototype.handleError=function(d,g,k,v,t,x,A){var J=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},D=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=d.message)try{A||EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,
-d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(Q){}if(null!=D||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var E=mxResources.get("ok"),R=null;g=null!=g?g:mxResources.get("error");if(null!=D){null!=D.retry&&(E=mxResources.get("cancel"),R=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
+d.filename,d.lineNumber,d.columnNumber,d,"INFO"),"1"!=urlParams.test&&!A||null==window.console||console.error("EditorUi.handleError:",d)}catch(Q){}if(null!=D||null!=g){A=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var G=mxResources.get("ok"),R=null;g=null!=g?g:mxResources.get("error");if(null!=D){null!=D.retry&&(G=mxResources.get("cancel"),R=function(){J();D.retry()});if(404==D.code||404==D.status||403==D.code){A=403==D.code?null!=D.message?mxUtils.htmlEntities(D.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
!1):null!=t?t:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var V=null!=t?null:null!=x?x:window.location.hash;if(null!=V&&("#G"==V.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==V.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||
-404==D.code||404==D.status)){V="#U"==V.substring(0,2)?V.substring(45,V.lastIndexOf("%26ex")):V.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+V);null!=v&&v()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){B.innerText="";for(var C=0;C<P.length;C++){var M=document.createElement("option");mxUtils.write(M,P[C].displayName);M.value=C;B.appendChild(M);M=document.createElement("option");
-M.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(M,"<"+P[C].email+">");M.setAttribute("disabled","disabled");B.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=P.length;B.appendChild(M)}var P=this.drive.getUsersList(),q=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");q.appendChild(y);var B=document.createElement("select");B.style.width="100%";Q();mxEvent.addListener(B,
-"change",mxUtils.bind(this,function(){var C=B.value,M=P.length!=C;M&&this.drive.setUser(P[C]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(P=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));q.appendChild(B);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),
+404==D.code||404==D.status)){V="#U"==V.substring(0,2)?V.substring(45,V.lastIndexOf("%26ex")):V.substring(2);this.showError(g,A,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+V);null!=v&&v()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Q(){B.innerText="";for(var C=0;C<O.length;C++){var M=document.createElement("option");mxUtils.write(M,O[C].displayName);M.value=C;B.appendChild(M);M=document.createElement("option");
+M.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(M,"<"+O[C].email+">");M.setAttribute("disabled","disabled");B.appendChild(M)}M=document.createElement("option");mxUtils.write(M,mxResources.get("addAccount"));M.value=O.length;B.appendChild(M)}var O=this.drive.getUsersList(),q=document.createElement("div"),y=document.createElement("div");y.style.marginBottom="6px";mxUtils.write(y,mxResources.get("changeUser")+": ");q.appendChild(y);var B=document.createElement("select");B.style.width="100%";Q();mxEvent.addListener(B,
+"change",mxUtils.bind(this,function(){var C=B.value,M=O.length!=C;M&&this.drive.setUser(O[C]);this.drive.authorize(M,mxUtils.bind(this,function(){M||(O=this.drive.getUsersList(),Q())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));q.appendChild(B);q=new CustomDialog(this,q,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(q.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),
520,150);return}}null!=D.message?A=""==D.message&&null!=D.name?mxUtils.htmlEntities(D.name,!1):mxUtils.htmlEntities(D.message,!1):null!=D.response&&null!=D.response.error?A=mxUtils.htmlEntities(D.response.error,!1):"undefined"!==typeof window.App&&(D.code==App.ERROR_TIMEOUT?A=mxUtils.htmlEntities(mxResources.get("timeout"),!1):D.code==App.ERROR_BUSY?A=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof D&&0<D.length&&(A=mxUtils.htmlEntities(D,!1)))}t=d=null;null!=D&&null!=D.helpLink?
-(d=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(d=D.alternateAction.label,t=D.alternateAction.funct);this.showError(g,A,E,k,R,null,null,d,t,null,null,null,v?k:null)}else null!=k&&k()};EditorUi.prototype.alert=
+(d=mxResources.get("help"),t=mxUtils.bind(this,function(){return this.editor.graph.openLink(D.helpLink)})):null!=D&&null!=D.ownerEmail?(d=mxResources.get("contactOwner"),A+=mxUtils.htmlEntities(" ("+d+": "+D.ownerEmail+")",!1),t=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(D.ownerEmail))})):null!=D&&null!=D.alternateAction&&(d=D.alternateAction.label,t=D.alternateAction.funct);this.showError(g,A,G,k,R,null,null,d,t,null,null,null,v?k:null)}else null!=k&&k()};EditorUi.prototype.alert=
function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,g,k,v,t,x){d=null!=d?d:"";var A=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},J=Math.min(220,28*Math.ceil(Math.max(1,d.length)/50));d=new ConfirmDialog(this,d,function(){A();null!=g&&g()},function(){A();null!=k&&k()},v,t,null,null,null,null,J);this.showDialog(d.container,340,46+J,!0,x);d.init()};EditorUi.prototype.showBanner=
-function(d,g,k,v,t,x,A,J,D){var E=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){x=null!=x?x:"bottom:10px;left:50%;";A=null!=A?A:"translate(-50%,120%)";J=null!=J?J:"translate(-50%,0%)";var R=t?500:1E3;E=t?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var V=document.createElement("div");V.style.cssText="position:absolute;"+
-x+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+E;mxUtils.setPrefixedStyle(V.style,"transform",A);mxUtils.setPrefixedStyle(V.style,"transition","all "+R+"ms ease");V.className="geBtn gePrimaryBtn"+(t?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(V.style,"box-shadow","1px 1px 2px 0px #ddd");null!=D&&mxUtils.setPrefixedStyle(V.style,"transform-origin",D);if(!t){var Q=document.createElement("img");Q.setAttribute("src",IMAGE_PATH+"/logo.png");
+function(d,g,k,v,t,x,A,J,D){var G=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){x=null!=x?x:"bottom:10px;left:50%;";A=null!=A?A:"translate(-50%,120%)";J=null!=J?J:"translate(-50%,0%)";var R=t?500:1E3;G=t?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var V=document.createElement("div");V.style.cssText="position:absolute;"+
+x+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+G;mxUtils.setPrefixedStyle(V.style,"transform",A);mxUtils.setPrefixedStyle(V.style,"transition","all "+R+"ms ease");V.className="geBtn gePrimaryBtn"+(t?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(V.style,"box-shadow","1px 1px 2px 0px #ddd");null!=D&&mxUtils.setPrefixedStyle(V.style,"transform-origin",D);if(!t){var Q=document.createElement("img");Q.setAttribute("src",IMAGE_PATH+"/logo.png");
Q.setAttribute("border","0");Q.setAttribute("align","absmiddle");Q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";V.appendChild(Q);Q=document.createElement("img");Q.setAttribute("src",Dialog.prototype.closeImage);Q.setAttribute("title",mxResources.get(v?"doNotShowAgain":"close"));Q.setAttribute("border","0");Q.style.cssText=(t?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";V.appendChild(Q)}mxUtils.write(V,
-g);document.body.appendChild(V);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var P=document.createElement("input");P.setAttribute("type","checkbox");P.setAttribute("id","geDoNotShowAgainCheckbox");P.style.marginRight="6px";if(!v){g.appendChild(P);var q=document.createElement("label");q.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(q,
-mxResources.get("doNotShowAgain"));g.appendChild(q);V.style.paddingBottom=t?"16px":"30px";V.appendChild(g)}var y=mxUtils.bind(this,function(){null!=V.parentNode&&(V.parentNode.removeChild(V),this.bannerShowing=!1,P.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=Q&&mxEvent.addListener(Q,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,
-"transform",A);window.setTimeout(mxUtils.bind(this,function(){y()}),R)});mxEvent.addListener(V,"click",mxUtils.bind(this,function(C){var M=mxEvent.getSource(C);M!=P&&M!=q?(null!=k&&k(),y(),mxEvent.consume(C)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,"transform",J)}),R/2);window.setTimeout(B,t?4E3:3E4);E=!0}return E};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+g);document.body.appendChild(V);this.bannerShowing=!0;g=document.createElement("div");g.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var O=document.createElement("input");O.setAttribute("type","checkbox");O.setAttribute("id","geDoNotShowAgainCheckbox");O.style.marginRight="6px";if(!v){g.appendChild(O);var q=document.createElement("label");q.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(q,
+mxResources.get("doNotShowAgain"));g.appendChild(q);V.style.paddingBottom=t?"16px":"30px";V.appendChild(g)}var y=mxUtils.bind(this,function(){null!=V.parentNode&&(V.parentNode.removeChild(V),this.bannerShowing=!1,O.checked||v)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});null!=Q&&mxEvent.addListener(Q,"click",mxUtils.bind(this,function(C){mxEvent.consume(C);y()}));var B=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,
+"transform",A);window.setTimeout(mxUtils.bind(this,function(){y()}),R)});mxEvent.addListener(V,"click",mxUtils.bind(this,function(C){var M=mxEvent.getSource(C);M!=O&&M!=q?(null!=k&&k(),y(),mxEvent.consume(C)):B()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(V.style,"transform",J)}),R/2);window.setTimeout(B,t?4E3:3E4);G=!0}return G};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,g,k,v){d=d.toDataURL("image/"+k);if(null!=d&&6<d.length)null!=g&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(g))),0<v&&(d=Editor.writeGraphModelToPng(d,"pHYs","dpi",v));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,g,k,v,t){var x="jpeg"==k?"jpg":k;v=this.getBaseFilename(v)+(null!=g?".drawio":
"")+"."+x;d=this.createImageDataUri(d,g,k,t);this.saveData(v,x,d.substring(d.lastIndexOf(",")+1),"image/"+k,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,g){d=new TextareaDialog(this,d,g,null,null,mxResources.get("close"));
this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,g,k,v,t,x){"text/xml"!=k||/(\.drawio)$/i.test(g)||/(\.xml)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.html)$/i.test(g)||(g=g+"."+(null!=x?x:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)d=v?this.base64ToBlob(d,k):new Blob([d],{type:k}),navigator.msSaveOrOpenBlob(d,g);else if(mxClient.IS_IE)k=window.open("about:blank","_blank"),null==
k?mxUtils.popup(d,!0):(k.document.write(d),k.document.close(),k.document.execCommand("SaveAs",!0,g),k.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==k||"image/"!=k.substring(0,6)?this.showTextDialog(g+":",d):this.openInNewWindow(d,k,v);else{var A=document.createElement("a");x=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof A.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var J=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
x=65==(J?parseInt(J[2],10):!1)?!1:x}if(x||this.isOffline()){A.href=URL.createObjectURL(v?this.base64ToBlob(d,k):new Blob([d],{type:k}));x?A.download=g:A.setAttribute("target","_blank");document.body.appendChild(A);try{window.setTimeout(function(){URL.revokeObjectURL(A.href)},2E4),A.click(),A.parentNode.removeChild(A)}catch(D){}}else this.createEchoRequest(d,g,k,v,t).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,g,k,v,t,x){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,
-d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(v?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,v,t,x,A,J){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(R,V,Q,P){try{if("_blank"==V)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,v);else if(null!=k&&"text/html"==k.substring(0,9)){var q=new EmbedDialog(this,d);this.showDialog(q.container,
-450,240,!0,!0);q.init()}else{var y=window.open("about:blank");null==y?mxUtils.popup(d,!0):(y.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),y.document.close())}else if(V==App.MODE_DEVICE||"download"==V)this.doSaveLocalFile(d,R,k,v,null,J);else if(null!=R&&0<R.length){var B=mxUtils.bind(this,function(C){try{this.exportFile(d,R,k,v,V,C)}catch(M){this.handleError(M)}});null!=P?B(P):this.pickFolder(V,B)}}catch(C){this.handleError(C)}});t=[];x||t.push(App.MODE_BROWSER);A||t.push("_blank");
-var E=new SaveDialog(this,g,mxUtils.bind(this,function(R,V,Q){D(R.value,V,R,Q);this.hideDialog(null,null,E.container)}),t,d,k,v);this.showDialog(E.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));E.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var v=window.open("about:blank");if(null==v||null==v.document)mxUtils.popup(d,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;
+d+(null!=k?"&mime="+k:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(v?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(d,g,k,v,t,x,A,J){x=null!=x?x:!1;A=null!=A?A:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var D=mxUtils.bind(this,function(R,V,Q,O){try{if("_blank"==V)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(d,k,v);else if(null!=k&&"text/html"==k.substring(0,9)){var q=new EmbedDialog(this,d);this.showDialog(q.container,
+450,240,!0,!0);q.init()}else{var y=window.open("about:blank");null==y?mxUtils.popup(d,!0):(y.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),y.document.close())}else if(V==App.MODE_DEVICE||"download"==V)this.doSaveLocalFile(d,R,k,v,null,J);else if(null!=R&&0<R.length){var B=mxUtils.bind(this,function(C){try{this.exportFile(d,R,k,v,V,C)}catch(M){this.handleError(M)}});null!=O?B(O):this.pickFolder(V,B)}}catch(C){this.handleError(C)}});t=[];x||t.push(App.MODE_BROWSER);A||t.push("_blank");
+var G=new SaveDialog(this,g,mxUtils.bind(this,function(R,V,Q){D(R.value,V,R,Q);this.hideDialog(null,null,G.container)}),t,d,k,v);this.showDialog(G.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));G.init()};EditorUi.prototype.openInNewWindow=function(d,g,k){var v=window.open("about:blank");if(null==v||null==v.document)mxUtils.popup(d,!0);else{var t="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==g){var x=mxUtils.parseXml(d).documentElement.style.backgroundColor;
""!=x&&(t="background: "+x+";")}t='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+t+'">';"image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||k?(x=k?d:btoa(unescape(encodeURIComponent(d))),v.document.write(t+'<img style="max-width:100%;" src="data:'+g+";base64,"+x+'"/></body></html>')):v.document.write(t+d+"</body></html>"):v.document.write(t+"<pre>"+mxUtils.htmlEntities(d,!1)+"</pre></body></html>");v.document.close()}};var c=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var g=d(mxUtils.bind(this,function(v){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
@@ -13159,17 +13162,17 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(
speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});A.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",t);this.editor.exportToCanvas(mxUtils.bind(this,function(J){A.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var D=this.createImageDataUri(J,null,"png");J=document.createElement("img");J.style.maxWidth="140px";J.style.maxHeight="140px";
J.style.cursor="pointer";J.style.backgroundColor="white";J.setAttribute("title",mxResources.get("openInNewWindow"));J.setAttribute("border","0");J.setAttribute("src",D);this.exportDialog.appendChild(J);mxEvent.addListener(J,"click",mxUtils.bind(this,function(){this.openInNewWindow(D.substring(D.indexOf(",")+1),"image/png",!0);t.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(J){A.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
this.exportDialog=null);this.handleError(J)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(v)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,g,k,v,t){this.isLocalFileSave()?this.saveLocalFile(k,d,v,t,g):this.saveRequest(d,g,mxUtils.bind(this,function(x,A){return this.createEchoRequest(k,x,v,t,g,A)}),k,t,v)};EditorUi.prototype.saveRequest=function(d,g,k,v,t,x,A){A=null!=A?A:!mxClient.IS_IOS||!navigator.standalone;var J=mxUtils.bind(this,
-function(E,R,V,Q){if("_blank"==R||null!=E&&0<E.length){var P=k("_blank"==R?null:E,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=P&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?P.simulate(document,"_blank"):(V=mxUtils.bind(this,function(q){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=v)try{this.exportFile(v,E,x,!0,R,q)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),E,x,!0,R,q)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),null!=Q?V(Q):this.pickFolder(R,V)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,d,mxUtils.bind(this,function(E,R,V){J(E.value,R,E,V);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,
+function(G,R,V,Q){if("_blank"==R||null!=G&&0<G.length){var O=k("_blank"==R?null:G,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=O&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?O.simulate(document,"_blank"):(V=mxUtils.bind(this,function(q){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=v)try{this.exportFile(v,G,x,!0,R,q)}catch(y){this.handleError(y)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),G,x,!0,R,q)}catch(y){this.handleError(y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(y){this.spinner.stop();this.handleError(y)}))}),null!=Q?V(Q):this.pickFolder(R,V)))}});t=[App.MODE_BROWSER];A||t.push("_blank");var D=new SaveDialog(this,d,mxUtils.bind(this,function(G,R,V){J(G.value,R,G,V);this.hideDialog(null,null,D.container)}),t,null,"application/pdf");this.showDialog(D.container,
420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));D.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,v,t,x){};EditorUi.prototype.getServiceForName=function(d){return null};EditorUi.prototype.getTitleForService=function(d){return mxResources.get(d)};EditorUi.prototype.pickFolder=function(d,g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,v,t,x,
-A,J,D,E,R,V,Q,P){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(L){Editor.addRetryToError(L,mxUtils.bind(this,function(){this.exportSvg(d,g,k,v,t,x,A,J,D,E,R,V,Q,P)}));this.handleError(L)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
-(this.editor.graph.addForeignObjectWarning=function(){});var C=this.editor.graph.createSvgImageExport(t),M=this.editor.graph.getSvg(y,d,A,J,null,k,null,C,"blank"==E?"_blank":"self"==E?"_top":null,null,!Q,R,V);this.editor.graph.addForeignObjectWarning=B;v&&this.editor.graph.addSvgShadow(M);var T=this.getBaseFilename()+(t?".drawio":"")+".svg";P=null!=P?P:mxUtils.bind(this,function(L){this.isLocalFileSave()||L.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}))});var m=mxUtils.bind(this,function(L){this.spinner.stop();t&&L.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,d,A));P(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(L))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var z=mxUtils.bind(this,function(L){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(L);Editor.foreignObjectImages&&
-Q?this.replaceAlternateContent(L,R,m):m(L)}),I=mxUtils.bind(this,function(L){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(L,z,this.thumbImageCache)):z(L)});Q?this.embedFonts(M,I):(this.editor.addFontCss(M),I(M))}catch(L){this.handleError(L)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function v(V,Q,P,q,y){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",Q);B.setAttribute("y",
-P+.5);B.setAttribute("width",q.width);B.setAttribute("height",q.height);null==B.setAttributeNS?B.setAttribute("xlink:href",y):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);V.replaceChild(B,V.lastChild);J()}function t(){if(A<R.length)R[A++](t)}var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var J=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),D={},E={},R=[];for(A=0;A<g.length;A++)mxUtils.bind(this,
-function(V){var Q=V.getElementsByTagName("div");if(0<Q.length)try{var P=Q[0].cloneNode(!0),q=parseInt(P.style.marginLeft),y=parseInt(P.style.paddingTop),B=P.getElementsByTagName("div")[1],C=Q=!1,M=P.style.alignItems,T=P.style.justifyContent;if(null!=P.style.writingMode){var m=P.style.writingMode;C="vertical-"==m.substring(0,9);Q="-rl"==m.substring(m.length-3)}var z=!C&&"1px"==P.style.width||C&&"1px"==P.style.height;if(!C&&"1px"==P.style.height||C&&"1px"==P.style.width)P.style.alignItems=C&&Q?"unsafe flex-end":
-"unsafe flex-start";z&&(P.style.justifyContent="unsafe flex-start");P.style.paddingTop="";P.style.marginLeft="";var I=P.outerHTML,L=D[I];null==L&&(P.style.position="absolute",P.style.visibility="hidden",document.body.appendChild(P),m=1,m="1px"==P.style.width?B.offsetWidth:parseInt(P.style.width),z=1,z="1px"==P.style.height?B.offsetHeight:parseInt(P.style.height),document.body.removeChild(P),L=new mxRectangle(q,y,m,z),D[I]=L);"1px"==P.style.height&&("unsafe center"==M?y-=L.height/2:"unsafe flex-end"==
-M&&(y-=L.height));if("1px"==P.style.width)if(!C&&"unsafe center"==T||C&&"unsafe center"==M)q-=L.width/2;else if(!C&&"unsafe flex-end"==T||C&&(!Q&&"unsafe flex-end"==M||Q&&"unsafe flex-start"==M))q-=L.width;L=new mxRectangle(q,y,L.width,L.height+parseInt(B.style.fontSize)/4);R.push(mxUtils.bind(this,function(N){var O=E[I];null==O?Graph.htmlToPng(I,L.width,L.height,mxUtils.bind(this,function(S){v(V,q,y,L,S);E[I]=S;N()}),x):(v(V,q,y,L,O),N())}))}catch(N){J()}else J()})(g[A]);0==counter&&k(d);A=0;t()};
+A,J,D,G,R,V,Q,O){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(L){Editor.addRetryToError(L,mxUtils.bind(this,function(){this.exportSvg(d,g,k,v,t,x,A,J,D,G,R,V,Q,O)}));this.handleError(L)})))try{var q=this.editor.graph.isSelectionEmpty();k=null!=k?k:q;var y=g?null:this.editor.graph.background;y==mxConstants.NONE&&(y=null);null==y&&0==g&&(y=this.editor.graph.shapeBackgroundColor);var B=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
+(this.editor.graph.addForeignObjectWarning=function(){});var C=this.editor.graph.createSvgImageExport(t),M=this.editor.graph.getSvg(y,d,A,J,null,k,null,C,"blank"==G?"_blank":"self"==G?"_top":null,null,!Q,R,V);this.editor.graph.addForeignObjectWarning=B;v&&this.editor.graph.addSvgShadow(M);var T=this.getBaseFilename()+(t?".drawio":"")+".svg";O=null!=O?O:mxUtils.bind(this,function(L){this.isLocalFileSave()||L.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",L,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(L)}))});var m=mxUtils.bind(this,function(L){this.spinner.stop();t&&L.setAttribute("content",this.getFileData(!0,null,null,null,k,D,null,null,null,null,null,d,A));O(Graph.xmlDeclaration+"\n"+(t?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(L))});this.editor.graph.mathEnabled&&this.editor.addMathCss(M);var z=mxUtils.bind(this,function(L){Editor.replaceSvgDataUris&&x&&EditorUi.embedSvgImages(L);Editor.foreignObjectImages&&
+Q?this.replaceAlternateContent(L,R,m):m(L)}),I=mxUtils.bind(this,function(L){x&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(L,z,this.thumbImageCache)):z(L)});Q?this.embedFonts(M,I):(this.editor.addFontCss(M),I(M))}catch(L){this.handleError(L)}};EditorUi.prototype.replaceAlternateContent=function(d,g,k){function v(V,Q,O,q,y){var B=mxUtils.createElementNs(d.ownerDocument,mxConstants.NS_SVG,"image");B.setAttribute("x",Q);B.setAttribute("y",
+O+.5);B.setAttribute("width",q.width);B.setAttribute("height",q.height);null==B.setAttributeNS?B.setAttribute("xlink:href",y):B.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",y);V.replaceChild(B,V.lastChild);J()}function t(){if(A<R.length)R[A++](t)}var x="";g=d.getElementsByTagName("style");for(var A=0;A<g.length;A++)x+=g[A].innerHTML;g=d.getElementsByTagName("switch");counter=g.length;var J=mxUtils.bind(this,function(){counter--;0==counter&&k(d)}),D={},G={},R=[];for(A=0;A<g.length;A++)mxUtils.bind(this,
+function(V){var Q=V.getElementsByTagName("div");if(0<Q.length)try{var O=Q[0].cloneNode(!0),q=parseInt(O.style.marginLeft),y=parseInt(O.style.paddingTop),B=O.getElementsByTagName("div")[1],C=Q=!1,M=O.style.alignItems,T=O.style.justifyContent;if(null!=O.style.writingMode){var m=O.style.writingMode;C="vertical-"==m.substring(0,9);Q="-rl"==m.substring(m.length-3)}var z=!C&&"1px"==O.style.width||C&&"1px"==O.style.height;if(!C&&"1px"==O.style.height||C&&"1px"==O.style.width)O.style.alignItems=C&&Q?"unsafe flex-end":
+"unsafe flex-start";z&&(O.style.justifyContent="unsafe flex-start");O.style.paddingTop="";O.style.marginLeft="";var I=O.outerHTML,L=D[I];null==L&&(O.style.position="absolute",O.style.visibility="hidden",document.body.appendChild(O),m=1,m="1px"==O.style.width?B.offsetWidth:parseInt(O.style.width),z=1,z="1px"==O.style.height?B.offsetHeight:parseInt(O.style.height),document.body.removeChild(O),L=new mxRectangle(q,y,m,z),D[I]=L);"1px"==O.style.height&&("unsafe center"==M?y-=L.height/2:"unsafe flex-end"==
+M&&(y-=L.height));if("1px"==O.style.width)if(!C&&"unsafe center"==T||C&&"unsafe center"==M)q-=L.width/2;else if(!C&&"unsafe flex-end"==T||C&&(!Q&&"unsafe flex-end"==M||Q&&"unsafe flex-start"==M))q-=L.width;L=new mxRectangle(q,y,L.width,L.height+parseInt(B.style.fontSize)/4);R.push(mxUtils.bind(this,function(N){var P=G[I];null==P?Graph.htmlToPng(I,L.width,L.height,mxUtils.bind(this,function(S){v(V,q,y,L,S);G[I]=S;N()}),x):(v(V,q,y,L,P),N())}))}catch(N){J()}else J()})(g[A]);0==counter&&k(d);A=0;t()};
EditorUi.prototype.addRadiobox=function(d,g,k,v,t,x,A){return this.addCheckbox(d,k,v,t,x,A,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;var D=document.createElement("input");D.style.marginRight="8px";D.style.marginTop="16px";D.setAttribute("type",A?"radio":"checkbox");A="geCheckbox-"+Editor.guid();D.id=A;null!=J&&D.setAttribute("name",J);k&&(D.setAttribute("checked","checked"),D.defaultChecked=!0);v&&D.setAttribute("disabled","disabled");x&&(d.appendChild(D),k=document.createElement("label"),
mxUtils.write(k,g),k.setAttribute("for",A),d.appendChild(k),t||mxUtils.br(d));return D};EditorUi.prototype.addEditButton=function(d,g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var v=this.getCurrentFile(),t="";null!=v&&v.getMode()!=App.MODE_DEVICE&&v.getMode()!=App.MODE_BROWSER&&(t=window.location.href);var x=document.createElement("select");x.style.maxWidth="200px";x.style.width="auto";x.style.marginLeft="8px";x.style.marginRight="10px";x.className=
"geBtn";v=document.createElement("option");v.setAttribute("value","blank");mxUtils.write(v,mxResources.get("makeCopy"));x.appendChild(v);var A=document.createElement("option");A.setAttribute("value","custom");mxUtils.write(A,mxResources.get("custom")+"...");x.appendChild(A);d.appendChild(x);mxEvent.addListener(x,"change",mxUtils.bind(this,function(){if("custom"==x.value){var J=new FilenameDialog(this,t,mxResources.get("ok"),function(D){null!=D?(t=D,A.setAttribute("title",D)):(x.value="blank",A.removeAttribute("title"))},
@@ -13178,87 +13181,88 @@ document.createElement("div");J.style.width="100%";J.style.height="100%";J.style
v.style.marginLeft="8px";v.style.marginRight="10px";v.className="geBtn";var t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("openInNewWindow"));v.appendChild(t);t=document.createElement("option");t.setAttribute("value","self");mxUtils.write(t,mxResources.get("openInThisWindow"));v.appendChild(t);g&&(g=document.createElement("option"),
g.setAttribute("value","frame"),mxUtils.write(g,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),v.appendChild(g));d.appendChild(v);mxUtils.write(d,mxResources.get("borderColor")+":");var x="#0000ff",A=null;A=mxUtils.button("",mxUtils.bind(this,function(J){this.pickColor(x||"none",function(D){x=D;k()});mxEvent.consume(J)}));k();A.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";A.style.marginLeft="4px";A.style.height="22px";A.style.width="22px";A.style.position="relative";
A.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";A.className="geColorBtn";d.appendChild(A);mxUtils.br(d);return{getColor:function(){return x},getTarget:function(){return v.value},focus:function(){v.focus()}}};EditorUi.prototype.createUrlParameters=function(d,g,k,v,t,x){x=null!=x?x:[];k&&(x.push("lightbox=1"),"auto"!=d&&x.push("target="+d),null!=g&&g!=mxConstants.NONE&&x.push("highlight="+("#"==g.charAt(0)?g.substring(1):g)),null!=v&&0<v.length&&x.push("edit="+encodeURIComponent(v)),
-t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,v,t,x,A,J,D,E,R){var V=this.getCurrentFile();D=this.createUrlParameters(d,g,v,t,x,D);d=!0;null!=A?k="#U"+encodeURIComponent(A):J||null==V||""==V.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+V.getHash(),d=!1);d&&null!=V&&null!=V.getTitle()&&V.getTitle()!=
-this.defaultFilename&&D.push("title="+encodeURIComponent(V.getTitle()));E&&1<k.length&&(D.push("open="+k.substring(1)),k="");R&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());return(v&&(null!=A||null!=V&&V.getMode()!=App.MODE_GITHUB&&V.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=
-function(d,g,k,v,t,x,A,J,D,E,R,V,Q){this.getBasenames();var P={};""!=t&&t!=mxConstants.NONE&&(P.highlight=t);"auto"!==v&&(P.target=v);E||(P.lightbox=!1);P.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(P.zoom=k/100);k=[];A&&(k.push("pages"),P.resize=!0,null!=this.pages&&null!=this.currentPage&&(P.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),P.resize=!0);J&&k.push("layers");D&&k.push("tags");null!=Q&&(P["dark-mode"]=Q);0<k.length&&(E&&k.push("lightbox"),
-P.toolbar=k.join(" "));null!=R&&0<R.length&&(P.edit=R);null!=d?P.url=d:P.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(P))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";V(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?
-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,v){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);var A=document.createElement("div");A.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");x=J.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));A.appendChild(D);mxUtils.br(A);A.appendChild(J);D=
-document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var E=this.getCurrentFile();null==k&&null!=E&&E.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(E.getId(),E)})));x.setAttribute("checked","checked");null==
-k&&J.setAttribute("disabled","disabled");t.appendChild(A);A=380;var R=this.addLinkSection(t),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";V.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value",
-"auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");V.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+":");t.appendChild(V);mxUtils.br(t);A+=26;var Q=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value="100%";t.appendChild(P);
-var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(t,mxResources.get("allPages"),D,!D),B=this.addCheckbox(t,mxResources.get("layers"),!0),C=this.addCheckbox(t,mxResources.get("tags"),!0),M=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,M);var m=T.getEditInput();m.style.marginBottom="16px";A+=50;mxEvent.addListener(M,"change",function(){M.checked?m.removeAttribute("disabled"):
-m.setAttribute("disabled","disabled");m.checked&&M.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,t,mxUtils.bind(this,function(){v(J.checked?k:null,Q.checked,P.value,R.getTarget(),R.getColor(),q.checked,y.checked,B.checked,C.checked,M.checked,null!=T?T.getLink():null,null!=V?V.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,g,k,v,t,
-x,A,J,D){var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=document.createElement("h3");mxUtils.write(R,d||mxResources.get("publish"));R.style.width="100%";R.style.textAlign="center";R.style.marginTop="2px";R.style.marginBottom="20px";E.appendChild(R);var V=document.createElement("select");d=30;V.className="geBtn";V.style.marginBottom="8px";V.style.marginLeft="0px";V.style.width="100%";V.style.boxSizing="border-box";if(null==J||""==J.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",
-R=document.createElement("option"),mxUtils.write(R,mxResources.get("makeCopy")),R.setAttribute("value","copy"),V.appendChild(R);R=document.createElement("option");mxUtils.write(R,mxResources.get("authorizationRequired"));R.setAttribute("value","auth");V.appendChild(R);null!=J&&""!=J.getHash()||R.setAttribute("disabled","disabled");J=document.createElement("option");J.setAttribute("value","public");V.appendChild(J);null!=A?(mxUtils.write(J,mxResources.get("publicDiagramUrl")),J.setAttribute("title",
-A),V.value="public"):(mxUtils.write(J,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),J.setAttribute("disabled","disabled"));E.appendChild(V);mxUtils.br(E);V.focus();var Q=null,P=null;if(null!=g||null!=k)d+=30,mxUtils.write(E,mxResources.get("width")+":"),Q=document.createElement("input"),Q.setAttribute("type","text"),Q.style.marginRight="16px",Q.style.width="50px",Q.style.marginLeft="6px",Q.style.marginRight="16px",Q.style.marginBottom="10px",Q.value="100%",E.appendChild(Q),
-mxUtils.write(E,mxResources.get("height")+":"),P=document.createElement("input"),P.setAttribute("type","text"),P.style.width="50px",P.style.marginLeft="6px",P.style.marginBottom="10px",P.value=k+"px",E.appendChild(P),mxUtils.br(E);var q=this.addLinkSection(E,v),y=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),y=this.addCheckbox(E,mxResources.get("selectedPage")+
-": "+g));var B=this.addCheckbox(E,mxResources.get("lightbox"),!0,null,null,!v),C=this.addEditButton(E,B),M=C.getEditInput();v&&(M.style.marginLeft=B.style.marginLeft,B.style.display="none",d-=20);var T=this.addCheckbox(E,mxResources.get("layers"),!0);T.style.marginLeft=M.style.marginLeft;T.style.marginTop="8px";var m=this.addCheckbox(E,mxResources.get("tags"),!0);m.style.marginLeft=M.style.marginLeft;m.style.marginBottom="16px";m.style.marginTop="16px";mxEvent.addListener(B,"change",function(){B.checked?
-(T.removeAttribute("disabled"),M.removeAttribute("disabled"),m.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),m.setAttribute("disabled","disabled"));M.checked&&B.checked?C.getEditSelect().removeAttribute("disabled"):C.getEditSelect().setAttribute("disabled","disabled")});v=new CustomDialog(this,E,mxUtils.bind(this,function(){D(q.getTarget(),q.getColor(),null==y?!1:y.checked,B.checked,C.getLink(),T.checked,null!=Q?Q.value:null,null!=P?P.value:
-null,m.checked,V.value)}),null,mxResources.get("create"),t,x);this.showDialog(v.container,340,296+d,!0,!0);null!=Q?(Q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",!1,null)):null==V.parentNode;q.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(t?"10":"4")+"px";x.appendChild(A);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";x.appendChild(J);mxUtils.write(x,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=
-this.lastExportBorder||"0";x.appendChild(D);mxUtils.br(x)}var E=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=v?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);A=this.editor.graph;var V=v?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=V&&(V.style.marginBottom="16px");d=new CustomDialog(this,x,mxUtils.bind(this,function(){var Q=
-parseInt(J.value)/100||1,P=parseInt(D.value)||0;k(!E.checked,null!=R?R.checked:!1,null!=V?V.checked:!1,Q,P)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,g,k,v,t,x,A,J,D){A=null!=A?A:Editor.defaultIncludeDiagram;var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=this.editor.graph,V="jpeg"==J||"webp"==J?220:320,Q=document.createElement("h3");mxUtils.write(Q,d);Q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-E.appendChild(Q);mxUtils.write(E,mxResources.get("zoom")+":");var P=document.createElement("input");P.setAttribute("type","text");P.style.marginRight="16px";P.style.width="60px";P.style.marginLeft="4px";P.style.marginRight="12px";P.value=this.lastExportZoom||"100%";E.appendChild(P);mxUtils.write(E,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||
-"0";E.appendChild(q);mxUtils.br(E);var y=this.addCheckbox(E,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(Q=0;Q<d.length;Q++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[Q]){var M=
-document.createElement("option");mxUtils.write(M,mxResources.get(d[Q]));M.setAttribute("value",d[Q]);C.appendChild(M)}D?(mxUtils.write(E,mxResources.get("size")+":"),E.appendChild(C),mxUtils.br(E),V+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(y.checked=!0)})):x&&(E.appendChild(B),mxUtils.write(E,mxResources.get("crop")),mxUtils.br(E),V+=30,mxEvent.addListener(y,"change",function(){y.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?
-D&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",V-=30):(C.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(y,"change",function(){C.value=y.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(E,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J&&"webp"!=J),m=document.createElement("select");m.style.maxWidth="260px";m.style.marginLeft="8px";m.style.marginTop="16px";x=document.createElement("option");
-x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));m.appendChild(x);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));m.appendChild(D);"svg"==J?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected","selected"),m.appendChild(x)):Editor.isDarkMode()?D.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(E,
-mxResources.get("appearance")+":");E.appendChild(m);mxUtils.br(E);V+=26;var z=this.addCheckbox(E,mxResources.get("shadow"),R.shadowVisible),I=null;if("png"==J||"jpeg"==J||"webp"==J)I=this.addCheckbox(E,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),V+=30;var L=this.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram")+":",A,null,null,"jpeg"!=J&&"webp"!=J),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==J||"svg"==J?(A=function(){L.checked?
-N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),N.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),N.appendChild(R),L.style.marginBottom="12px",N.style.marginBottom="16px",E.appendChild(N),mxUtils.br(E),V+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(L,
-"change",A),A()):L.style.marginBottom="16px";var O=document.createElement("input");O.style.marginBottom="16px";O.style.marginRight="8px";O.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");g&&(O.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,E.appendChild(O),mxUtils.write(E,mxResources.get("embedImages")),mxUtils.br(E),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,
-E.appendChild(S),mxUtils.write(E,mxResources.get("embedFonts")),mxUtils.br(E),V+=50);var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));U.appendChild(x);A=document.createElement("option");A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));U.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");
-mxUtils.write(A,mxResources.get("openInThisWindow"));U.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display="none";"svg"==J&&(mxUtils.write(E,mxResources.get("links")+":"),E.appendChild(U),E.appendChild(A),mxUtils.br(E),mxUtils.br(E),V+=50);k=new CustomDialog(this,E,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=P.value;this.lastEmbedImages=O.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=
-N.value;t(P.value,T.checked,!y.checked,z.checked,L.checked,O.checked&&g,q.value,B.checked,("png"==J||"svg"==J)&&"currentPage"==N.value,U.value,null!=I?I.checked:null,null!=m?m.value:null,C.value,S.checked)}),null,k,v);this.showDialog(k.container,340,V,!0,!0,null,null,null,null,!0);P.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?P.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace=
-"nowrap";var A=this.editor.graph;if(null!=g){var J=document.createElement("h3");mxUtils.write(J,g);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";x.appendChild(J)}var D=this.addCheckbox(x,mxResources.get("fit"),!0),E=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&v,!v),R=this.addCheckbox(x,k),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),Q=this.addEditButton(x,V),P=Q.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),y=this.addCheckbox(x,
-mxResources.get("layers"),q,!q);y.style.marginLeft=P.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(V,"change",function(){V.checked?(q&&y.removeAttribute("disabled"),P.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));P.checked&&V.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(D.checked,
-E.checked,R.checked,V.checked,Q.getLink(),y.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,v,t,x,A,J){function D(P){var q=" ",y="";v&&(q=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",y+="cursor:pointer;");d&&(y+="max-width:100%;");var B="";k&&(B=' width="'+Math.round(E.width)+'" height="'+Math.round(E.height)+'"');A('<img src="'+P+'"'+B+(""!=y?' style="'+y+'"':"")+q+"/>")}var E=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(P){var q=v?this.getFileData(!0):null;P=
-this.createImageDataUri(P,q,"png");D(P)}),null,null,null,mxUtils.bind(this,function(P){J({message:mxResources.get("unknownError")})}),null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),E.width*E.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var V="";k&&(V="&w="+Math.round(2*E.width)+"&h="+Math.round(2*E.height));var Q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+V+"&xml="+encodeURIComponent(g));Q.send(mxUtils.bind(this,function(){200<=Q.getStatus()&&
-299>=Q.getStatus()?D("data:image/png;base64,"+Q.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,g,k,v,t,x,A){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=J.getElementsByTagName("a");if(null!=D)for(var E=0;E<D.length;E++){var R=D[E].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==D[E].getAttribute("target")&&D[E].removeAttribute("target")}v&&
-J.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(J);if(k){var V=" ",Q="";v&&(V="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(x?"&layers=1":
-"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(P){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(P))+'"'+(""!=Q?' style="'+Q+'"':"")+V+"/>")}))}else Q="",v&&(g=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));return x};EditorUi.prototype.createLink=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){var O=this.getCurrentFile();D=this.createUrlParameters(d,g,v,t,x,D);d=!0;null!=A?k="#U"+encodeURIComponent(A):J||null==O||""==O.getHash()?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+O.getHash(),d=!1);d&&null!=O&&null!=O.getTitle()&&O.getTitle()!=
+this.defaultFilename&&D.push("title="+encodeURIComponent(O.getTitle()));G&&1<k.length&&(D.push("open="+k.substring(1)),k="");R&&null!=this.currentPage&&D.push("page-id="+this.currentPage.getId());V&&D.push("transparent=1");null!=Q&&D.push("dark="+Q);return(v&&(null!=A||null!=O&&O.getMode()!=App.MODE_GITHUB&&O.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+
+"/"+(0<D.length?"?"+D.join("&"):"")+k};EditorUi.prototype.createHtml=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){this.getBasenames();var O={};""!=t&&t!=mxConstants.NONE&&(O.highlight=t);"auto"!==v&&(O.target=v);G||(O.lightbox=!1);O.nav=this.editor.graph.foldingEnabled;k=parseInt(k);isNaN(k)||100==k||(O.zoom=k/100);k=[];A&&(k.push("pages"),O.resize=!0,null!=this.pages&&null!=this.currentPage&&(O.page=mxUtils.indexOf(this.pages,this.currentPage)));g&&(k.push("zoom"),O.resize=!0);J&&k.push("layers");D&&k.push("tags");
+null!=Q&&(O["dark-mode"]=Q);0<k.length&&(G&&k.push("lightbox"),O.toolbar=k.join(" "));null!=R&&0<R.length&&(O.edit=R);null!=d?O.url=d:O.xml=this.getFileData(!0,null,null,null,null,!A);g='<div class="mxgraph" style="'+(x?"max-width:100%;":"")+(""!=k?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(O))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";V(g,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,g,k,v){var t=document.createElement("div");t.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("html"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";t.appendChild(x);
+var A=document.createElement("div");A.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var J=document.createElement("input");J.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";J.setAttribute("value","url");J.setAttribute("type","radio");J.setAttribute("name","type-embedhtmldialog");x=J.cloneNode(!0);x.setAttribute("value","copy");A.appendChild(x);var D=document.createElement("span");mxUtils.write(D,mxResources.get("includeCopyOfMyDiagram"));
+A.appendChild(D);mxUtils.br(A);A.appendChild(J);D=document.createElement("span");mxUtils.write(D,mxResources.get("publicDiagramUrl"));A.appendChild(D);var G=this.getCurrentFile();null==k&&null!=G&&G.constructor==window.DriveFile&&(D=document.createElement("a"),D.style.paddingLeft="12px",D.style.color="gray",D.style.cursor="pointer",mxUtils.write(D,mxResources.get("share")),A.appendChild(D),mxEvent.addListener(D,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId(),
+G)})));x.setAttribute("checked","checked");null==k&&J.setAttribute("disabled","disabled");t.appendChild(A);A=380;var R=this.addLinkSection(t),V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";V.style.marginTop="16px";D=document.createElement("option");D.setAttribute("value","light");mxUtils.write(D,mxResources.get("light"));V.appendChild(D);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,mxResources.get("dark"));V.appendChild(D);
+D=document.createElement("option");D.setAttribute("value","auto");mxUtils.write(D,mxResources.get("automatic"));D.setAttribute("selected","selected");V.appendChild(D);D.setAttribute("selected","selected");mxUtils.write(t,mxResources.get("appearance")+":");t.appendChild(V);mxUtils.br(t);A+=26;var Q=this.addCheckbox(t,mxResources.get("zoom"),!0,null,!0);mxUtils.write(t,":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft=
+"4px";O.style.marginRight="12px";O.value="100%";t.appendChild(O);var q=this.addCheckbox(t,mxResources.get("fit"),!0);D=null!=this.pages&&1<this.pages.length;var y=y=this.addCheckbox(t,mxResources.get("allPages"),D,!D),B=this.addCheckbox(t,mxResources.get("layers"),!0),C=this.addCheckbox(t,mxResources.get("tags"),!0),M=this.addCheckbox(t,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(t,M);var m=T.getEditInput();m.style.marginBottom="16px";A+=50;mxEvent.addListener(M,
+"change",function(){M.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");m.checked&&M.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,t,mxUtils.bind(this,function(){v(J.checked?k:null,Q.checked,O.value,R.getTarget(),R.getColor(),q.checked,y.checked,B.checked,C.checked,M.checked,null!=T?T.getLink():null,null!=V?V.value:null)}),null,d,g);this.showDialog(d.container,340,A,!0,!0);x.focus()};
+EditorUi.prototype.showPublishLinkDialog=function(d,g,k,v,t,x,A,J,D,G,R){var V=document.createElement("div");V.style.whiteSpace="nowrap";var Q=document.createElement("h3");mxUtils.write(Q,d||mxResources.get("publish"));Q.style.width="100%";Q.style.textAlign="center";Q.style.marginTop="2px";Q.style.marginBottom="20px";V.appendChild(Q);var O=document.createElement("select");d=30;O.className="geBtn";O.style.marginBottom="8px";O.style.marginLeft="0px";O.style.width="100%";O.style.boxSizing="border-box";
+if(null==J||""==J.getHash())t=null!=t?t:"https://www.drawio.com/doc/faq/publish-diagram-as-link",Q=document.createElement("option"),mxUtils.write(Q,mxResources.get("makeCopy")),Q.setAttribute("value","copy"),O.appendChild(Q);Q=document.createElement("option");mxUtils.write(Q,mxResources.get("authorizationRequired"));Q.setAttribute("value","auth");O.appendChild(Q);null!=J&&""!=J.getHash()||Q.setAttribute("disabled","disabled");J=document.createElement("option");J.setAttribute("value","public");O.appendChild(J);
+null!=A?(mxUtils.write(J,mxResources.get("publicDiagramUrl")),J.setAttribute("title",A),O.value="public"):(mxUtils.write(J,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),J.setAttribute("disabled","disabled"));V.appendChild(O);mxUtils.br(V);O.focus();var q=null,y=null;if(null!=g||null!=k)d+=30,mxUtils.write(V,mxResources.get("width")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.marginRight="16px",q.style.width="50px",q.style.marginLeft=
+"6px",q.style.marginRight="16px",q.style.marginBottom="10px",q.value="100%",V.appendChild(q),mxUtils.write(V,mxResources.get("height")+":"),y=document.createElement("input"),y.setAttribute("type","text"),y.style.width="50px",y.style.marginLeft="6px",y.style.marginBottom="10px",y.value=k+"px",V.appendChild(y),mxUtils.br(V);var B=this.addLinkSection(V,v),C=G?this.addCheckbox(V,mxResources.get("transparentBackground"),!1):null;null!=C&&(d+=20);var M=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&
+(d+=30,g=null!=this.currentPage?this.currentPage.getName():"",16<g.length&&(g=g.substring(0,16)+"..."),M=this.addCheckbox(V,mxResources.get("selectedPage")+": "+g));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginTop="16px";g=document.createElement("option");g.setAttribute("value","0");mxUtils.write(g,mxResources.get("light"));T.appendChild(g);g=document.createElement("option");g.setAttribute("value","1");mxUtils.write(g,mxResources.get("dark"));
+T.appendChild(g);g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));g.setAttribute("selected","selected");T.appendChild(g);R&&(mxUtils.write(V,mxResources.get("appearance")+":"),V.appendChild(T),mxUtils.br(V),d+=30);var m=this.addCheckbox(V,mxResources.get("lightbox"),!0,null,null,!v),z=this.addEditButton(V,m),I=z.getEditInput();v&&(I.style.marginLeft=m.style.marginLeft,m.style.display="none",d-=20);var L=this.addCheckbox(V,mxResources.get("layers"),
+!0);L.style.marginLeft=I.style.marginLeft;L.style.marginTop="8px";var N=this.addCheckbox(V,mxResources.get("tags"),!0);N.style.marginLeft=I.style.marginLeft;N.style.marginBottom="16px";N.style.marginTop="16px";mxEvent.addListener(m,"change",function(){m.checked?(L.removeAttribute("disabled"),I.removeAttribute("disabled"),N.removeAttribute("disabled")):(L.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));I.checked&&m.checked?z.getEditSelect().removeAttribute("disabled"):
+z.getEditSelect().setAttribute("disabled","disabled")});v=new CustomDialog(this,V,mxUtils.bind(this,function(){D(B.getTarget(),B.getColor(),null==M?!1:M.checked,m.checked,z.getLink(),L.checked,null!=q?q.value:null,null!=y?y.value:null,N.checked,O.value,null!=C?C.checked:!1,T.value)}),null,mxResources.get("create"),t,x);this.showDialog(v.container,340,296+d,!0,!0);null!=q?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)):null==
+O.parentNode;B.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("image"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(t?"10":"4")+"px";x.appendChild(A);if(t){mxUtils.write(x,mxResources.get("zoom")+":");var J=document.createElement("input");J.setAttribute("type","text");J.style.marginRight="16px";J.style.width="60px";
+J.style.marginLeft="4px";J.style.marginRight="12px";J.value=this.lastExportZoom||"100%";x.appendChild(J);mxUtils.write(x,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";x.appendChild(D);mxUtils.br(x)}var G=this.addCheckbox(x,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=v?null:this.addCheckbox(x,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram);A=this.editor.graph;var V=v?null:this.addCheckbox(x,mxResources.get("transparentBackground"),A.background==mxConstants.NONE||null==A.background);null!=V&&(V.style.marginBottom="16px");d=new CustomDialog(this,x,mxUtils.bind(this,function(){var Q=parseInt(J.value)/100||1,O=parseInt(D.value)||0;k(!G.checked,null!=R?R.checked:!1,null!=V?V.checked:!1,Q,O)}),null,d,g);this.showDialog(d.container,300,(t?25:0)+(v?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,
+g,k,v,t,x,A,J,D){A=null!=A?A:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var R=this.editor.graph,V="jpeg"==J||"webp"==J?220:320,Q=document.createElement("h3");mxUtils.write(Q,d);Q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(Q);mxUtils.write(G,mxResources.get("zoom")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft=
+"4px";O.style.marginRight="12px";O.value=this.lastExportZoom||"100%";G.appendChild(O);mxUtils.write(G,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";G.appendChild(q);mxUtils.br(G);var y=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight=
+"8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var C=document.createElement("select");C.style.marginTop="16px";C.style.marginLeft="8px";d=["selectionOnly","diagram","page"];for(Q=0;Q<d.length;Q++)if(!R.isSelectionEmpty()||"selectionOnly"!=d[Q]){var M=document.createElement("option");mxUtils.write(M,mxResources.get(d[Q]));M.setAttribute("value",d[Q]);C.appendChild(M)}D?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(C),mxUtils.br(G),
+V+=26,mxEvent.addListener(C,"change",function(){"selectionOnly"==C.value&&(y.checked=!0)})):x&&(G.appendChild(B),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),V+=30,mxEvent.addListener(y,"change",function(){y.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?D&&(y.style.display="none",y.nextSibling.style.display="none",y.nextSibling.nextSibling.style.display="none",V-=30):(C.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=
+!0,mxEvent.addListener(y,"change",function(){C.value=y.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=J&&"webp"!=J),m=document.createElement("select");m.style.maxWidth="260px";m.style.marginLeft="8px";m.style.marginTop="16px";x=document.createElement("option");x.setAttribute("value","light");mxUtils.write(x,mxResources.get("light"));m.appendChild(x);D=document.createElement("option");D.setAttribute("value","dark");mxUtils.write(D,
+mxResources.get("dark"));m.appendChild(D);"svg"==J?(x=document.createElement("option"),x.setAttribute("value","auto"),mxUtils.write(x,mxResources.get("automatic")),x.setAttribute("selected","selected"),m.appendChild(x)):Editor.isDarkMode()?D.setAttribute("selected","selected"):x.setAttribute("selected","selected");mxUtils.write(G,mxResources.get("appearance")+":");G.appendChild(m);mxUtils.br(G);V+=26;var z=this.addCheckbox(G,mxResources.get("shadow"),R.shadowVisible),I=null;if("png"==J||"jpeg"==J||
+"webp"==J)I=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),V+=30;var L=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram")+":",A,null,null,"jpeg"!=J&&"webp"!=J),N=document.createElement("select");N.style.maxWidth="260px";N.style.marginLeft="28px";"png"==J||"svg"==J?(A=function(){L.checked?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),
+N.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),N.appendChild(R),L.style.marginBottom="12px",N.style.marginBottom="16px",G.appendChild(N),mxUtils.br(G),V+=20,null!=this.lastEmbedInclude&&(N.value=this.lastEmbedInclude),mxEvent.addListener(L,"change",A),A()):L.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");
+var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");g&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,G.appendChild(P),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,G.appendChild(S),mxUtils.write(G,mxResources.get("embedFonts")),mxUtils.br(G),V+=50);var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";
+x=document.createElement("option");x.setAttribute("value","auto");mxUtils.write(x,mxResources.get("automatic"));U.appendChild(x);A=document.createElement("option");A.setAttribute("value","blank");mxUtils.write(A,mxResources.get("openInNewWindow"));U.appendChild(A);A=document.createElement("option");A.setAttribute("value","self");mxUtils.write(A,mxResources.get("openInThisWindow"));U.appendChild(A);A=document.createElement("div");mxUtils.write(A,mxResources.get("LinksLost"));A.style.margin="7px";A.style.display=
+"none";"svg"==J&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(U),G.appendChild(A),mxUtils.br(G),mxUtils.br(G),V+=50);k=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=O.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=N.value;t(O.value,T.checked,!y.checked,z.checked,L.checked,P.checked&&g,q.value,B.checked,("png"==J||"svg"==J)&&"currentPage"==N.value,U.value,null!=I?I.checked:null,null!=
+m?m.value:null,C.value,S.checked)}),null,k,v);this.showDialog(k.container,340,V,!0,!0,null,null,null,null,!0);O.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,v,t){var x=document.createElement("div");x.style.whiteSpace="nowrap";var A=this.editor.graph;if(null!=g){var J=document.createElement("h3");mxUtils.write(J,g);J.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+x.appendChild(J)}var D=this.addCheckbox(x,mxResources.get("fit"),!0),G=this.addCheckbox(x,mxResources.get("shadow"),A.shadowVisible&&v,!v),R=this.addCheckbox(x,k),V=this.addCheckbox(x,mxResources.get("lightbox"),!0),Q=this.addEditButton(x,V),O=Q.getEditInput(),q=1<A.model.getChildCount(A.model.getRoot()),y=this.addCheckbox(x,mxResources.get("layers"),q,!q);y.style.marginLeft=O.style.marginLeft;y.style.marginBottom="12px";y.style.marginTop="8px";mxEvent.addListener(V,"change",function(){V.checked?
+(q&&y.removeAttribute("disabled"),O.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"));O.checked&&V.checked?Q.getEditSelect().removeAttribute("disabled"):Q.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,x,mxUtils.bind(this,function(){d(D.checked,G.checked,R.checked,V.checked,Q.getLink(),y.checked)}),null,mxResources.get("embed"),t);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(d,g,k,v,t,x,A,J){function D(O){var q=" ",y="";v&&(q=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",y+=
+"cursor:pointer;");d&&(y+="max-width:100%;");var B="";k&&(B=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');A('<img src="'+O+'"'+B+(""!=y?' style="'+y+'"':"")+q+"/>")}var G=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(O){var q=v?this.getFileData(!0):null;O=this.createImageDataUri(O,q,"png");D(O)}),null,null,null,mxUtils.bind(this,function(O){J({message:mxResources.get("unknownError")})}),
+null,!0,k?2:1,null,g,null,null,Editor.defaultBorder);else if(g=this.getFileData(!0),G.width*G.height<=MAX_AREA&&g.length<=MAX_REQUEST_SIZE){var V="";k&&(V="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var Q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(v?"1":"0")+V+"&xml="+encodeURIComponent(g));Q.send(mxUtils.bind(this,function(){200<=Q.getStatus()&&299>=Q.getStatus()?D("data:image/png;base64,"+Q.getText()):J({message:mxResources.get("unknownError")})}))}else J({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(d,g,k,v,t,x,A){var J=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!k,"auto"),D=J.getElementsByTagName("a");if(null!=D)for(var G=0;G<D.length;G++){var R=D[G].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==D[G].getAttribute("target")&&D[G].removeAttribute("target")}v&&J.setAttribute("content",this.getFileData(!0));g&&this.editor.graph.addSvgShadow(J);if(k){var V=" ",Q="";v&&(V="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}})(this);\"",Q+="cursor:pointer;");d&&(Q+="max-width:100%;");this.editor.convertImages(J,mxUtils.bind(this,function(O){A('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(O))+'"'+(""!=Q?' style="'+Q+'"':"")+V+"/>")}))}else Q="",v&&(g=this.getSelectedPageIndex(),J.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=g?"&page="+g:"")+(t?"&edit=_blank":"")+(x?"&layers=1":"")+"');}}})(this);"),Q+="cursor:pointer;"),d&&(d=parseInt(J.getAttribute("width")),t=parseInt(J.getAttribute("height")),J.setAttribute("viewBox","-0.5 -0.5 "+d+" "+t),Q+="max-width:100%;max-height:"+t+"px;",J.removeAttribute("height")),""!=Q&&J.setAttribute("style",Q),this.editor.addFontCss(J),this.editor.graph.mathEnabled&&this.editor.addMathCss(J),A(mxUtils.getXml(J))};EditorUi.prototype.timeSince=function(d){d=
Math.floor((new Date-d)/1E3);var g=Math.floor(d/31536E3);if(1<g)return g+" "+mxResources.get("years");g=Math.floor(d/2592E3);if(1<g)return g+" "+mxResources.get("months");g=Math.floor(d/86400);if(1<g)return g+" "+mxResources.get("days");g=Math.floor(d/3600);if(1<g)return g+" "+mxResources.get("hours");g=Math.floor(d/60);return 1<g?g+" "+mxResources.get("minutes"):1==g?g+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,g){if(null!=d){var k=null;if("diagram"==d.nodeName)k=
d;else if("mxfile"==d.nodeName){var v=d.getElementsByTagName("diagram");if(0<v.length){k=v[0];var t=g.getGlobalVariable;g.getGlobalVariable=function(x){return"page"==x?k.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==x?1:t.apply(this,arguments)}}}null!=k&&(d=Editor.parseDiagramNode(k))}v=this.editor.graph;try{this.editor.graph=g,this.editor.setGraphXml(d)}catch(x){}finally{this.editor.graph=v}return d};EditorUi.prototype.getSvgFileProperties=function(d){return this.getPngFileProperties(d)};
EditorUi.prototype.getPngFileProperties=function(d){var g=1,k=0;if(null!=d){if(d.hasAttribute("scale")){var v=parseFloat(d.getAttribute("scale"));!isNaN(v)&&0<v&&(g=v)}d.hasAttribute("border")&&(v=parseInt(d.getAttribute("border")),!isNaN(v)&&0<v&&(k=v))}return{scale:g,border:k}};EditorUi.prototype.getEmbeddedPng=function(d,g,k,v,t){try{var x=this.editor.graph,A=null;if(null!=k&&0<k.length)x=this.createTemporaryGraph(x.getStylesheet()),document.body.appendChild(x.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(k).documentElement,
-!0),x),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var J=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&x.setBackgroundImage(D.viewState.backgroundImage);x.getGlobalVariable=function(E){return"page"==E?D.getName():"pagenumber"==E?1:J.apply(this,arguments)};document.body.appendChild(x.container);
-x.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(E){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=E.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(A));d(R.substring(R.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(V){null!=g&&g(V)}}),null,null,null,mxUtils.bind(this,function(E){null!=g&&g(E)}),null,null,v,null,x.shadowVisible,null,x,t,null,
-null,null,"diagram",null)}catch(E){null!=g&&g(E)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){J=null!=J?J:!0;R=null!=R?R:0;A=null!=D?D:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,E,R,null,null,x,null,D,null,g.shadowVisible||V,null,Q,"diagram");(g.shadowVisible||V)&&g.addSvgShadow(x,null,null,0==R);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",
-k);var P=mxUtils.bind(this,function(q){q=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){J?this.editor.convertImages(q,mxUtils.bind(this,function(y){P(y)})):P(q)}));else return P(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(v){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(d,g,k,v,t,x,A,J,D,E,R,V,Q)}));this.handleError(q)}))){var P=this.editor.graph.isSelectionEmpty();
-k=null!=k?k:P;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,d,x):null,D,null==this.pages||0==this.pages.length,R)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,d||1,g,v,null,null,x,A,E,V,Q)}catch(q){this.spinner.stop(),this.handleError(q)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,v,t,x,A){g=null!=g?g:0;k=null!=k?k:0;var J=[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var E=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(E.documentElement,
-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var V=R.getElementsByTagName("diagram");if(1==V.length&&!x){if(R=Editor.parseDiagramNode(V[0]),null!=this.currentPage&&(d[V[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Q=V[0].getAttribute("name");null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,Q))}}else if(0<V.length){x=[];var P=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[V[0].getAttribute("id")]=
-this.pages[0].getId(),Q=V[0].getAttribute("name"),null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],Q)),R=Editor.parseDiagramNode(V[0]),v=!1,P=1);for(;P<V.length;P++){var q=V[P].getAttribute("id");V[P].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(V[P]));d[q]=V[P].getAttribute("id");var B=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[B+1]));D.model.execute(new ChangePage(this,y,y,B,!0));x.push(y)}this.updatePageLinks(d,
-x)}}if(null!=R&&"mxGraphModel"===R.nodeName){J=D.importGraphModel(R,g,k,v);if(null!=J)for(this.addLocalPagesToMapping(d),P=0;P<J.length;P++)this.updatePageLinksForCell(d,J[P]);var C=D.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(d,C);var M=new ChangePageSetup(this,null,C);M.ignoreColor=!0;D.model.execute(M)}}A&&D.pasteCellStyles(D.includeDescendants(J),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(T){if(t)throw T;
+!0),x),A=k;else if(null!=this.pages&&this.currentPage!=this.pages[0]){x=this.createTemporaryGraph(x.getStylesheet());var J=x.getGlobalVariable;x.setBackgroundImage=this.editor.graph.setBackgroundImage;var D=this.pages[0];this.currentPage==D?x.setBackgroundImage(this.editor.graph.backgroundImage):null!=D.viewState&&null!=D.viewState&&x.setBackgroundImage(D.viewState.backgroundImage);x.getGlobalVariable=function(G){return"page"==G?D.getName():"pagenumber"==G?1:J.apply(this,arguments)};document.body.appendChild(x.container);
+x.model.setRoot(D.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{null==A&&(A=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=G.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(A));d(R.substring(R.lastIndexOf(",")+1));x!=this.editor.graph&&x.container.parentNode.removeChild(x.container)}catch(V){null!=g&&g(V)}}),null,null,null,mxUtils.bind(this,function(G){null!=g&&g(G)}),null,null,v,null,x.shadowVisible,null,x,t,null,
+null,null,"diagram",null)}catch(G){null!=g&&g(G)}};EditorUi.prototype.getEmbeddedSvg=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){J=null!=J?J:!0;R=null!=R?R:0;A=null!=D?D:g.background;A==mxConstants.NONE&&(A=null);null==A&&"none"==g.getAdaptiveColors()&&(A="#ffffff");D=this.editor.graph.createSvgImageExport(null!=d);x=g.getSvg(A,G,R,null,null,x,null,D,null,g.shadowVisible||V,null,Q,"diagram");(g.shadowVisible||V)&&g.addSvgShadow(x,null,null,0==R);null!=d&&x.setAttribute("content",d);null!=k&&x.setAttribute("resource",
+k);var O=mxUtils.bind(this,function(q){q=(v?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(q);null!=t&&t(q);return q});g.mathEnabled&&this.editor.addMathCss(x);if(null!=t)this.embedFonts(x,mxUtils.bind(this,function(q){J?this.editor.convertImages(q,mxUtils.bind(this,function(y){O(y)})):O(q)}));else return O(x)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(k){try{null!=k&&this.editor.addFontCss(d,k),g(d)}catch(v){g(d)}}))}catch(k){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){D=null!=D?D:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(q){Editor.addRetryToError(q,mxUtils.bind(this,function(){this.exportImage(d,g,k,v,t,x,A,J,D,G,R,V,Q)}));this.handleError(q)}))){var O=this.editor.graph.isSelectionEmpty();
+k=null!=k?k:O;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(q){this.spinner.stop();try{this.saveCanvas(q,t?this.getFileData(!0,null,null,null,k,J,null,null,null,null,null,d,x):null,D,null==this.pages||0==this.pages.length,R)}catch(y){this.handleError(y)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(q){this.spinner.stop();this.handleError(q)}),null,k,d||1,g,v,null,null,x,A,G,V,Q)}catch(q){this.spinner.stop(),this.handleError(q)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.addLocalPagesToMapping=function(d){d=null!=d?d:{};if(null!=this.pages)for(var g=0;g<this.pages.length;g++)d[this.pages[g].getId()]=this.pages[g].getId();return d};EditorUi.prototype.importXml=function(d,g,k,v,t,x,A){g=null!=g?g:0;k=null!=k?k:0;var J=[];try{var D=this.editor.graph;if(null!=d&&0<d.length){D.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var R=this.editor.extractGraphModel(G.documentElement,
+null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var V=R.getElementsByTagName("diagram");if(1==V.length&&!x){if(R=Editor.parseDiagramNode(V[0]),null!=this.currentPage&&(d[V[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var Q=V[0].getAttribute("name");null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,Q))}}else if(0<V.length){x=[];var O=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[V[0].getAttribute("id")]=
+this.pages[0].getId(),Q=V[0].getAttribute("name"),null!=Q&&""!=Q&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],Q)),R=Editor.parseDiagramNode(V[0]),v=!1,O=1);for(;O<V.length;O++){var q=V[O].getAttribute("id");V[O].removeAttribute("id");var y=this.updatePageRoot(new DiagramPage(V[O]));d[q]=V[O].getAttribute("id");var B=this.pages.length;null==y.getName()&&y.setName(mxResources.get("pageWithNumber",[B+1]));D.model.execute(new ChangePage(this,y,y,B,!0));x.push(y)}this.updatePageLinks(d,
+x)}}if(null!=R&&"mxGraphModel"===R.nodeName){J=D.importGraphModel(R,g,k,v);if(null!=J)for(this.addLocalPagesToMapping(d),O=0;O<J.length;O++)this.updatePageLinksForCell(d,J[O]);var C=D.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=C&&null!=C.originalSrc){this.updateBackgroundPageLink(d,C);var M=new ChangePageSetup(this,null,C);M.ignoreColor=!0;D.model.execute(M)}}A&&D.pasteCellStyles(D.includeDescendants(J),D.defaultVertexStyle,D.defaultEdgeStyle)}finally{D.model.endUpdate()}}}catch(T){if(t)throw T;
this.handleError(T)}return J};EditorUi.prototype.updatePageLinks=function(d,g){for(var k=0;k<g.length;k++)this.updatePageLinksForCell(d,g[k].root),null!=g[k].viewState&&this.updateBackgroundPageLink(d,g[k].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,g){try{if(null!=g&&Graph.isPageLink(g.originalSrc)){var k=d[g.originalSrc.substring(g.originalSrc.indexOf(",")+1)];null!=k&&(g.originalSrc="data:page/id,"+k)}}catch(v){}};EditorUi.prototype.updatePageLinksForCell=
function(d,g){var k=document.createElement("div"),v=this.editor.graph,t=v.getLinkForCell(g);null!=t&&v.setLinkForCell(g,this.updatePageLink(d,t));if(v.isHtmlLabel(g)){k.innerHTML=Graph.sanitizeHtml(v.getLabel(g));for(var x=k.getElementsByTagName("a"),A=!1,J=0;J<x.length;J++)t=x[J].getAttribute("href"),null!=t&&(x[J].setAttribute("href",this.updatePageLink(d,t)),A=!0);A&&v.labelChanged(g,k.innerHTML)}for(J=0;J<v.model.getChildCount(g);J++)this.updatePageLinksForCell(d,v.model.getChildAt(g,J))};EditorUi.prototype.updatePageLink=
function(d,g){if(Graph.isPageLink(g)){var k=d[g.substring(g.indexOf(",")+1)];g=null!=k?"data:page/id,"+k:null}else if("data:action/json,"==g.substring(0,17))try{var v=JSON.parse(g.substring(17));if(null!=v.actions){for(var t=0;t<v.actions.length;t++){var x=v.actions[t];if(null!=x.open&&Graph.isPageLink(x.open)){var A=x.open.substring(x.open.indexOf(",")+1);k=d[A];null!=k?x.open="data:page/id,"+k:null==this.getPageById(A)&&delete x.open}}g="data:action/json,"+JSON.stringify(v)}}catch(J){}return g};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,v,t){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){v=null!=v?v:d.name;var J=mxUtils.bind(this,function(E){A.clear()&&x(E)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(v);
-try{var R=v.lastIndexOf(".");if(0<=R&&R<v.length)v.substring(R+1).toUpperCase();else{var V=v.lastIndexOf("/");0<=V&&V<v.length&&(v=v.substring(V+1))}}catch(P){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())J({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",d,v);var Q=new XMLHttpRequest;Q.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":""));Q.responseType="blob";this.addRemoteServiceSecurityCheck(Q);
-null!=t&&Q.setRequestHeader("x-convert-custom",t);Q.onreadystatechange=mxUtils.bind(this,function(){if(4==Q.readyState&&A.clear())if(200<=Q.status&&299>=Q.status)try{var P=Q.response;if("text/xml"==P.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(B){J({message:mxResources.get("errorLoadingFile")})}});q.readAsText(P)}else this.doImportVisio(P,g,J,v)}catch(y){J(y)}else try{""==Q.responseType||"text"==Q.responseType?J({message:Q.responseText}):(q=new FileReader,
-q.onload=function(){try{J({message:JSON.parse(q.result).Message})}catch(y){J(y)}},q.readAsText(Q.response))}catch(y){J({})}});Q.send(E)}else if(A.clear())try{this.doImportVisio(d,g,J,v)}catch(P){J(P)}}else J({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,J))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var v=
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,g,k,v,t){var x=mxUtils.bind(this,function(A){this.loadingExtensions=!1;null!=k?k(A):this.handleError(A)});this.createTimeout(null,mxUtils.bind(this,function(A){v=null!=v?v:d.name;var J=mxUtils.bind(this,function(G){A.clear()&&x(G)}),D=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var G=this.isRemoteVisioFormat(v);
+try{var R=v.lastIndexOf(".");if(0<=R&&R<v.length)v.substring(R+1).toUpperCase();else{var V=v.lastIndexOf("/");0<=V&&V<v.length&&(v=v.substring(V+1))}}catch(O){}if(G)if(null==VSD_CONVERT_URL||this.isOffline())J({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{G=new FormData;G.append("file1",d,v);var Q=new XMLHttpRequest;Q.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(v)?"?stencil=1":""));Q.responseType="blob";this.addRemoteServiceSecurityCheck(Q);
+null!=t&&Q.setRequestHeader("x-convert-custom",t);Q.onreadystatechange=mxUtils.bind(this,function(){if(4==Q.readyState&&A.clear())if(200<=Q.status&&299>=Q.status)try{var O=Q.response;if("text/xml"==O.type){var q=new FileReader;q.onload=mxUtils.bind(this,function(y){try{g(y.target.result)}catch(B){J({message:mxResources.get("errorLoadingFile")})}});q.readAsText(O)}else this.doImportVisio(O,g,J,v)}catch(y){J(y)}else try{""==Q.responseType||"text"==Q.responseType?J({message:Q.responseText}):(q=new FileReader,
+q.onload=function(){try{J({message:JSON.parse(q.result).Message})}catch(y){J(y)}},q.readAsText(Q.response))}catch(y){J({})}});Q.send(G)}else if(A.clear())try{this.doImportVisio(d,g,J,v)}catch(O){J(O)}}else J({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?D():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",D,null,null,null,J))}),x)};EditorUi.prototype.importGraphML=function(d,g,k){var v=
mxUtils.bind(this,function(t){this.loadingExtensions=!1;null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if(this.doImportGraphML)try{this.doImportGraphML(d,g,v)}catch(J){x(J)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?A():(this.loadingExtensions=!0,
mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.exportVisio=function(d){if(this.spinner.spin(document.body,mxResources.get("loading"))){var g=mxUtils.bind(this,function(k){this.loadingExtensions=!1;this.handleError(k)});this.createTimeout(null,mxUtils.bind(this,function(k){var v=mxUtils.bind(this,function(x){k.clear()&&g(x)}),t=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(k.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),
(new VsdxExport(this)).exportCurrentDiagrams(d)||v({message:mxResources.get("unknownError")})}catch(x){v(x)}else v({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(t,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,v))}),g)}};EditorUi.prototype.convertLucidChart=function(d,g,k){var v=mxUtils.bind(this,function(t){this.loadingExtensions=!1;
-null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var J=JSON.parse(d);g(LucidImporter.importState(J));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),"convertLucidChart",J];null!=J.state&&D.push(JSON.parse(J.state));if(null!=J.svgThumbs)for(var E=0;E<J.svgThumbs.length;E++)D.push(Editor.createSvgDataUri(J.svgThumbs[E]));
+null!=k?k(t):this.handleError(t)});this.createTimeout(null,mxUtils.bind(this,function(t){var x=mxUtils.bind(this,function(J){t.clear()&&v(J)}),A=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(t.clear())if("undefined"!==typeof window.LucidImporter)try{var J=JSON.parse(d);g(LucidImporter.importState(J));try{if(null!=window.console&&"1"==urlParams.test){var D=[(new Date).toISOString(),"convertLucidChart",J];null!=J.state&&D.push(JSON.parse(J.state));if(null!=J.svgThumbs)for(var G=0;G<J.svgThumbs.length;G++)D.push(Editor.createSvgDataUri(J.svgThumbs[G]));
null!=J.thumb&&D.push(J.thumb);console.log.apply(console,D)}}catch(R){}}catch(R){null!=window.console&&console.error(R),x(R)}else x({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
function(){mxscript("js/orgchart/mxOrgChartLayout.js",A,null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x)},null,null,null,x):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))}),v)};EditorUi.prototype.createMermaidXml=function(d,g,k,v,t,x){var A=new Graph(document.createElement("div"));k=A.insertVertex(null,null,null,0,0,v,t,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+k+";");A.setAttributeForCell(k,"mermaidData",JSON.stringify({data:d,
config:g},null,2));null!=x&&A.setAttributeForCell(k,"templatePrompt",x);d=(new mxCodec).encode(A.getModel());return mxUtils.getXml(d)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(d,g,k){var v=0,t=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(x){var A=new mxXmlRequest("https://www.draw.io/generate/v2",d,"POST"),J=mxUtils.bind(this,function(D){x.clear()&&k(D)});A.send(mxUtils.bind(this,function(D){if(x.isAlive())if(200<=D.getStatus()&&299>=D.getStatus())this.tryAndHandle(mxUtils.bind(this,
-function(){var R=mxUtils.trim(D.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(V,Q,P){this.tryAndHandle(mxUtils.bind(this,function(){x.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",R),g(R,V,Q,P))}),J)}),J,mxUtils.bind(this,function(V){3>v++?x.clear()&&t():J(V)}))}),J);else{var E={message:mxResources.get("error")+" "+D.getStatus()};try{E=JSON.parse(D.getText()),E=E.error}catch(R){}J(E)}}),J)}),k)});t()};EditorUi.prototype.extractMermaidDeclaration=
+function(){var R=mxUtils.trim(D.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(V,Q,O){this.tryAndHandle(mxUtils.bind(this,function(){x.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",d,"\nresult:",R),g(R,V,Q,O))}),J)}),J,mxUtils.bind(this,function(V){3>v++?x.clear()&&t():J(V)}))}),J);else{var G={message:mxResources.get("error")+" "+D.getStatus()};try{G=JSON.parse(D.getText()),G=G.error}catch(R){}J(G)}}),J)}),k)});t()};EditorUi.prototype.extractMermaidDeclaration=
function(d){d=mxUtils.trim(d);"o\n\n"==d.substring(0,3)&&(d=d.substring(3));var g=d.split("```");g=1<g.length?g:d.split("<pre>");g=1<g.length?g:d.split("~~~");g=1<g.length?g:d.split("%%");g=1<g.length?g:d.split("(Begins)");d=mxUtils.trim(1>=g.length?d:g[1]);g=d.split("\n");var k=1<g.length?g[1]:null;if(null!=k){var v=k.indexOf("-");0<v&&(k=k.substring(0,v))}if(0<g.length&&"mermaid"==mxUtils.trim(g[0])||null!=k&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k))g.shift(),d=mxUtils.trim(g.join("\n")),
g=d.split("\n");k=g[0].split(" ")[0].replace(/:$/,"");v=k.indexOf("-");0<v&&(k=k.substring(0,v));try{"mindmap"==k&&2<g.length&&(d=extractMermaidMindmap(g))}catch(t){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,k)&&(d=null);return d};EditorUi.prototype.generateMermaidImage=function(d,g,k,v,t){var x=mxUtils.bind(this,function(J){this.loadingMermaid=!1;null!=v?v(J):this.handleError(J)}),A=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);
-g.securityLevel="strict";g.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var J=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var E=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<E.length&&"error"!=
-E[0].getAttribute("aria-roledescription")){var R=parseFloat(E[0].getAttribute("width")),V=parseFloat(E[0].getAttribute("height"));if(isNaN(R)||isNaN(V))try{var Q=E[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(Q[2]);V=parseFloat(Q[3])}catch(P){R=R||100,V=V||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),R,V)}else null!=t?t():v({message:mxResources.get("invalidInput")})}catch(P){v(P)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
+g.securityLevel="strict";g.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&g.flowchart&&0<=d.indexOf("$$")&&(g.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(g.theme="dark");var J=mxUtils.bind(this,function(D){try{if(mxClient.IS_IE||mxClient.IS_IE11)D=D.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var G=mxUtils.parseXml(D).getElementsByTagName("svg");if(0<G.length&&"error"!=
+G[0].getAttribute("aria-roledescription")){var R=parseFloat(G[0].getAttribute("width")),V=parseFloat(G[0].getAttribute("height"));if(isNaN(R)||isNaN(V))try{var Q=G[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(Q[2]);V=parseFloat(Q[3])}catch(O){R=R||100,V=V||100}k(this.convertDataUri(Editor.createSvgDataUri(D)),R,V)}else null!=t?t():v({message:mxResources.get("invalidInput")})}catch(O){v(O)}});mermaid.mermaidAPI.initialize(g);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
d).then(function(D){J(D.svg)}).catch(function(D){null!=t?t(D):v(D)})}catch(D){v(D)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(A,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(J){this.importXml(J,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",A,null,null,null,x)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",A,null,null,null,x))};
-EditorUi.prototype.generatePlantUmlImage=function(d,g,k,v){function t(J,D,E){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|E>>6;c4=E&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(J){r="";
-for(i=0;i<J.length;i+=3)r=i+2==J.length?r+t(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+t(J.charCodeAt(i),0,0):r+t(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(E){var R=new Image;R.onload=function(){try{var V=R.width,Q=R.height;
-if(0==V&&0==Q){var P=D.result,q=P.indexOf(","),y=decodeURIComponent(escape(atob(P.substring(q+1)))),B=mxUtils.parseXml(y).getElementsByTagName("svg");0<B.length&&(V=parseFloat(B[0].getAttribute("width")),Q=parseFloat(B[0].getAttribute("height")))}k(D.result,V,Q)}catch(C){v(C)}};R.src=D.result};D.onerror=function(E){v(E)}}else v(J)};A.onerror=function(J){v(J)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var v=this.editor.graph,t=null;v.getModel().beginUpdate();try{t=v.insertVertex(null,
+EditorUi.prototype.generatePlantUmlImage=function(d,g,k,v){function t(J,D,G){c1=J>>2;c2=(J&3)<<4|D>>4;c3=(D&15)<<2|G>>6;c4=G&63;r="";r+=x(c1&63);r+=x(c2&63);r+=x(c3&63);return r+=x(c4&63)}function x(J){if(10>J)return String.fromCharCode(48+J);J-=10;if(26>J)return String.fromCharCode(65+J);J-=26;if(26>J)return String.fromCharCode(97+J);J-=26;return 0==J?"-":1==J?"_":"?"}var A=new XMLHttpRequest;A.open("GET",("txt"==g?PLANT_URL+"/txt/":"png"==g?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(J){r="";
+for(i=0;i<J.length;i+=3)r=i+2==J.length?r+t(J.charCodeAt(i),J.charCodeAt(i+1),0):i+1==J.length?r+t(J.charCodeAt(i),0,0):r+t(J.charCodeAt(i),J.charCodeAt(i+1),J.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=g&&(A.responseType="blob");A.onload=function(J){if(200<=this.status&&300>this.status)if("txt"==g)k(this.response);else{var D=new FileReader;D.readAsDataURL(this.response);D.onloadend=function(G){var R=new Image;R.onload=function(){try{var V=R.width,Q=R.height;
+if(0==V&&0==Q){var O=D.result,q=O.indexOf(","),y=decodeURIComponent(escape(atob(O.substring(q+1)))),B=mxUtils.parseXml(y).getElementsByTagName("svg");0<B.length&&(V=parseFloat(B[0].getAttribute("width")),Q=parseFloat(B[0].getAttribute("height")))}k(D.result,V,Q)}catch(C){v(C)}};R.src=D.result};D.onerror=function(G){v(G)}}else v(J)};A.onerror=function(J){v(J)};A.send()};EditorUi.prototype.insertAsPreText=function(d,g,k){var v=this.editor.graph,t=null;v.getModel().beginUpdate();try{t=v.insertVertex(null,
null,"<pre>"+d+"</pre>",g,k,1,1,"text;html=1;align=left;verticalAlign=top;"),v.updateCellSize(t,!0)}finally{v.getModel().endUpdate()}return t};EditorUi.prototype.insertTextAt=function(d,g,k,v,t,x,A,J){x=null!=x?x:!0;A=null!=A?A:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g," "),mxUtils.bind(this,function(Q){4==Q.readyState&&200<=
-Q.status&&299>=Q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Q.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var E=Editor.extractGraphModelFromPdf(d);if(null!=E&&0<E.length)return this.importXml(E,g,k,x,!0,J)}if(Editor.isPngDataUrl(d)&&(E=Editor.extractGraphModelFromPng(d),null!=E&&0<E.length))return this.importXml(E,g,k,x,
-!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{E=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(E=d.substring(d.indexOf(",")+1),E=window.atob&&!mxClient.IS_SF?atob(E):Base64.decode(E,!0)):E=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(E,g,k,x,!0,J);if(0<R.length)return R}catch(Q){}this.loadImage(d,mxUtils.bind(this,function(Q){if("data:"==d.substring(0,5))this.resizeImage(Q,d,mxUtils.bind(this,function(y,B,C){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),
-D.snap(k),B,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),A,this.maxImageSize);else{var P=Math.min(1,Math.min(this.maxImageSize/Q.width,this.maxImageSize/Q.height)),q=Math.round(Q.width*P);Q=Math.round(Q.height*P);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),q,Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+Q.status&&299>=Q.status&&this.editor.graph.setSelectionCells(this.insertTextAt(Q.responseText,g,k,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(t||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var D=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,g,k,x,!0,J)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),null!=G&&0<G.length))return this.importXml(G,g,k,x,
+!0,J);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var R=this.importXml(G,g,k,x,!0,J);if(0<R.length)return R}catch(Q){}this.loadImage(d,mxUtils.bind(this,function(Q){if("data:"==d.substring(0,5))this.resizeImage(Q,d,mxUtils.bind(this,function(y,B,C){D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),
+D.snap(k),B,C,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(y)+";"))}),A,this.maxImageSize);else{var O=Math.min(1,Math.min(this.maxImageSize/Q.width,this.maxImageSize/Q.height)),q=Math.round(Q.width*O);Q=Math.round(Q.height*O);D.setSelectionCell(D.insertVertex(null,null,"",D.snap(g),D.snap(k),q,Q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
d+";"))}}),mxUtils.bind(this,function(){var Q=null;D.getModel().beginUpdate();try{Q=D.insertVertex(D.getDefaultParent(),null,d,D.snap(g),D.snap(k),1,1,"text;"+(v?"html=1;":"")),D.updateCellSize(Q),D.fireEvent(new mxEventObject("textInserted","cells",[Q]))}finally{D.getModel().endUpdate()}D.setSelectionCell(Q)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,g,k,x,null,J);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
function(Q){this.editor.graph.setSelectionCells(this.importXml(Q,g,k,x,null,J))}),mxUtils.bind(this,function(Q){this.handleError(Q)}));else{D=this.editor.graph;t=null;D.getModel().beginUpdate();try{t=D.insertVertex(D.getDefaultParent(),null,"",D.snap(g),D.snap(k),1,1,"text;whiteSpace=wrap;"+(v?"html=1;":""));D.fireEvent(new mxEventObject("textInserted","cells",[t]));v&&(d=D.sanitizeHtml(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+"...");t.value=d;D.updateCellSize(t);if(0<this.maxTextWidth&&
t.geometry.width>this.maxTextWidth){var V=D.getPreferredSizeForCell(t,this.maxTextWidth);t.geometry.width=V.width;t.geometry.height=V.height}Graph.isLink(t.value)&&D.setLinkForCell(t,t.value);t.geometry.width+=D.gridSize;t.geometry.height+=D.gridSize}finally{D.getModel().endUpdate()}return[t]}}return[]};EditorUi.prototype.formatFileSize=function(d){var g=-1;do d/=1024,g++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[g]};EditorUi.prototype.convertDataUri=
@@ -13266,71 +13270,71 @@ function(d){if("data:"==d.substring(0,5)){var g=d.indexOf(";");0<g&&(d=d.substri
document.createElement("input");k.setAttribute("type","file");mxEvent.addListener(k,"change",mxUtils.bind(this,function(){null!=k.files&&(this.importFiles(k.files,null,null,this.maxImageSize),k.type="",k.type="file",k.value="")}));k.style.display="none";document.body.appendChild(k);this.importFileInputElt=k}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(A,J){StorageFile.listFiles(this,"F",A,J)});window.openBrowserFile=
mxUtils.bind(this,function(A,J,D){StorageFile.getFileContent(this,A,J,D)});window.deleteBrowserFile=mxUtils.bind(this,function(A,J,D){StorageFile.deleteFile(this,A,J,D)});if(!g){var v=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(A){this.hideDialog(A)}));window.openFile.setConsumer(mxUtils.bind(this,function(A,J){null!=J&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(J)?(A=new Blob([A],{type:"application/octet-stream"}),this.importVisio(A,
mxUtils.bind(this,function(D){this.importXml(D,0,0,!0)}),null,J)):this.editor.graph.setSelectionCells(this.importXml(A,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!g){var t=this.dialog,x=t.close;this.dialog.close=mxUtils.bind(this,function(A){Editor.useLocalStorage=v;x.apply(t,arguments);A&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(d,g,k){var v=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,J,D=!1;x.forEach(function(E,R){E=R.name.toLowerCase();"diagram/diagram.xml"==E?(D=!0,R.async("string").then(function(V){0==V.indexOf("<mxfile ")?g(V):k()})):0==E.indexOf("versions/")&&(E=parseInt(E.substr(9)),E>A&&(A=E,J=R))});0<A?J.async("string").then(function(E){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(E,
-d.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):v.parseFileData(E,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?g(R.responseText):k())}),d.name):k()}):D||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,v,t,x,A,
-J,D,E,R,V){E=null!=E?E:!0;var Q=!1,P=null,q=mxUtils.bind(this,function(y){var B=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,A)),this.showSidebar()):B=this.importXml(y,k,v,E,null,null!=V?mxEvent.isControlDown(V):null);null!=J&&J(B)});"image"==g.substring(0,5)?(D=!1,"image/png"==g.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(P=this.importXml(R,k,v,E,null,null!=V?mxEvent.isControlDown(V):null),D=!0)),D||(D=this.editor.graph,
-R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),E&&D.isGridEnabled()&&(k=D.snap(k),v=D.snap(v)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(R+="editableCssRules=.*;"),P=[D.insertVertex(null,null,"",k,v,t,x,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(Q=!0,this.importGraphML(d,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(Q=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Q=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?q(y.responseText):null!=J&&(J(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(D,g,A)):0==d.indexOf("PK")&&null!=D?(Q=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){P=
-this.insertTextAt(this.validateFileData(d),k,v,!0,null,E);J(P)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(P=this.insertTextAt(this.validateFileData(d),k,v,!0,null,E,null,null!=V?mxEvent.isControlDown(V):null));Q||null==J||J(P);return P};EditorUi.prototype.importFiles=function(d,g,k,v,t,x,A,J,D,E,R,V,Q){v=null!=v?v:this.maxImageSize;E=null!=E?E:this.maxImageBytes;var P=null!=g&&null!=k,q=!0;g=null!=g?g:0;k=null!=k?k:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=R||
+function(d,g,k){var v=this,t=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(x){if(mxUtils.isEmptyObject(x.files))k();else{var A=0,J,D=!1;x.forEach(function(G,R){G=R.name.toLowerCase();"diagram/diagram.xml"==G?(D=!0,R.async("string").then(function(V){0==V.indexOf("<mxfile ")?g(V):k()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>A&&(A=G,J=R))});0<A?J.async("string").then(function(G){(new XMLHttpRequest).upload&&v.isRemoteFileFormat(G,
+d.name)?v.isOffline()?v.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,k):v.parseFileData(G,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?g(R.responseText):k())}),d.name):k()}):D||k()}},function(x){k(x)}):k()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?t():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",t,null,null,null,k))};EditorUi.prototype.importFile=function(d,g,k,v,t,x,A,
+J,D,G,R,V){G=null!=G?G:!0;var Q=!1,O=null,q=mxUtils.bind(this,function(y){var B=null;null!=y&&"<mxlibrary"==y.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,y,A)),this.showSidebar()):B=this.importXml(y,k,v,G,null,null!=V?mxEvent.isControlDown(V):null);null!=J&&J(B)});"image"==g.substring(0,5)?(D=!1,"image/png"==g.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(d),null!=R&&0<R.length&&(O=this.importXml(R,k,v,G,null,null!=V?mxEvent.isControlDown(V):null),D=!0)),D||(D=this.editor.graph,
+R=d.indexOf(";"),0<R&&(d=d.substring(0,R)+d.substring(d.indexOf(",",R+1))),G&&D.isGridEnabled()&&(k=D.snap(k),v=D.snap(v)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==g.substring(0,9)&&(R+="editableCssRules=.*;"),O=[D.insertVertex(null,null,"",k,v,t,x,R+"image="+d+";")])):/(\.*<graphml )/.test(d)?(Q=!0,this.importGraphML(d,q)):null!=D&&null!=A&&EditorUi.isVisioFilename(A)?(Q=!0,this.importVisio(D,q)):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(d,A)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(Q=!0,g=mxUtils.bind(this,function(y){4==y.readyState&&(200<=y.status&&299>=y.status?q(y.responseText):null!=J&&(J(null),this.showError(mxResources.get("error"),413==y.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=d?this.parseFileData(d,g,A):this.parseFile(D,g,A)):0==d.indexOf("PK")&&null!=D?(Q=!0,this.importZipFile(D,q,mxUtils.bind(this,function(){O=
+this.insertTextAt(this.validateFileData(d),k,v,!0,null,G);J(O)}))):/(\.v(sd|dx))($|\?)/i.test(A)||/(\.vs(s|x))($|\?)/i.test(A)||(O=this.insertTextAt(this.validateFileData(d),k,v,!0,null,G,null,null!=V?mxEvent.isControlDown(V):null));Q||null==J||J(O);return O};EditorUi.prototype.importFiles=function(d,g,k,v,t,x,A,J,D,G,R,V,Q){v=null!=v?v:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var O=null!=g&&null!=k,q=!0;g=null!=g?g:0;k=null!=k?k:0;var y=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var B=R||
this.resampleThreshold,C=0;C<d.length;C++)if("image/svg"!==d[C].type.substring(0,9)&&"image/"===d[C].type.substring(0,6)&&d[C].size>B){y=!0;break}var M=mxUtils.bind(this,function(){var T=this.editor.graph,m=T.gridSize;t=null!=t?t:mxUtils.bind(this,function(S,U,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==d.length&&null!=Q&&"drop"==Q.type&&this.isBlankFile()&&
-!this.canUndo()&&(P=!1,X=W=0);return this.importFile(S,U,W,X,Z,Y,ba,ea,ca,P,V,Q)}catch(fa){return this.handleError(fa),null}});x=null!=x?x:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,I=z,L=[],N=mxUtils.bind(this,function(S,U){L[S]=U;if(0==--I){this.spinner.stop();if(null!=J)J(L);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var X=L[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}x(W)}}),
-O=0;O<z;O++)mxUtils.bind(this,function(S){var U=d[S];if(null!=U){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==A||A(U))try{if("image/"==U.type.substring(0,6))if("image/svg"==U.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=V?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&
+!this.canUndo()&&(O=!1,X=W=0);return this.importFile(S,U,W,X,Z,Y,ba,ea,ca,O,V,Q)}catch(fa){return this.handleError(fa),null}});x=null!=x?x:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var z=d.length,I=z,L=[],N=mxUtils.bind(this,function(S,U){L[S]=U;if(0==--I){this.spinner.stop();if(null!=J)J(L);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<L.length;S++){var X=L[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}x(W)}}),
+P=0;P<z;P++)mxUtils.bind(this,function(S){var U=d[S];if(null!=U){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==A||A(U))try{if("image/"==U.type.substring(0,6))if("image/svg"==U.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=V?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&
(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?N(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var oa=pa[0],ha=oa.getAttribute("width"),xa=oa.getAttribute("height");ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;xa=null!=xa&&"%"!=xa.charAt(xa.length-1)?parseFloat(xa):NaN;var qa=oa.getAttribute("viewBox");
if(null==qa||0==qa.length)oa.setAttribute("viewBox","0 0 "+ha+" "+xa);else if(isNaN(ha)||isNaN(xa)){var ua=qa.split(" ");3<ua.length&&(ha=parseFloat(ua[2]),xa=parseFloat(ua[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ya=Math.min(1,Math.min(v/Math.max(1,ha)),v/Math.max(1,xa)),ja=t(Z,U.type,g+S*m,k+S*m,Math.max(1,Math.round(ha*ya)),Math.max(1,Math.round(xa*ya)),U.name);if(null!=ja&&(isNaN(ha)||isNaN(xa))){var ma=new Image;ma.onload=mxUtils.bind(this,function(){ha=Math.max(1,ma.width);xa=
Math.max(1,ma.height);ja[0].geometry.width=ha;ja[0].geometry.height=xa;oa.setAttribute("viewBox","0 0 "+ha+" "+xa);Z=Editor.createSvgDataUri(mxUtils.getXml(oa));var ka=Z.indexOf(";");0<ka&&(Z=Z.substring(0,ka)+Z.substring(Z.indexOf(",",ka+1)));T.setCellStyles("image",Z,[ja[0]])});ma.src=Editor.createSvgDataUri(mxUtils.getXml(oa))}return ja}}}catch(ka){}return null})):N(S,mxUtils.bind(this,function(){return t(aa,"text/xml",g+S*m,k+S*m,0,0,U.name)}))}else N(S,mxUtils.bind(this,function(){return null}))}else{Y=
!1;if("image/png"==U.type){var da=V?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ia=new Image;ia.src=X.target.result;N(S,mxUtils.bind(this,function(){return t(da,"text/xml",g+S*m,k+S*m,ia.width,ia.height,U.name)}));Y=!0}}Y||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
-this.loadImage(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(oa,ha,xa){N(S,mxUtils.bind(this,function(){if(null!=oa&&oa.length<E){var qa=q&&this.isResampleImageSize(U.size,R)?Math.min(1,Math.min(v/ha,v/xa)):1;return t(oa,U.type,g+S*m,k+S*m,Math.round(ha*qa),Math.round(xa*qa),U.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,v,R,U.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=
-X.target.result,t(Z,U.type,g+S*m,k+S*m,240,160,U.name,function(pa){N(S,function(){return pa})},U)}catch(pa){N(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,U)}else N(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(U.name)?t(null,U.type,g+S*m,k+S*m,240,160,U.name,function(X){N(S,function(){return X})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?W.readAsDataURL(U):W.readAsText(U)}})(O)});if(y){y=[];for(C=0;C<d.length;C++)y.push(d[C]);
+this.loadImage(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(oa,ha,xa){N(S,mxUtils.bind(this,function(){if(null!=oa&&oa.length<G){var qa=q&&this.isResampleImageSize(U.size,R)?Math.min(1,Math.min(v/ha,v/xa)):1;return t(oa,U.type,g+S*m,k+S*m,Math.round(ha*qa),Math.round(xa*qa),U.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),q,v,R,U.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=
+X.target.result,t(Z,U.type,g+S*m,k+S*m,240,160,U.name,function(pa){N(S,function(){return pa})},U)}catch(pa){N(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,U)}else N(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(U.name)?t(null,U.type,g+S*m,k+S*m,240,160,U.name,function(X){N(S,function(){return X})},U):"image"==U.type.substring(0,5)||"application/pdf"==U.type?W.readAsDataURL(U):W.readAsText(U)}})(P)});if(y){y=[];for(C=0;C<d.length;C++)y.push(d[C]);
d=y;this.confirmImageResize(function(T){q=T;M()},D)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},v=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,t=function(x,A){if(x||g)mxSettings.setResizeImages(x?
A:null),mxSettings.save();k();d(A)};null==v||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(x){t(x,!0)},function(x){t(x,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):t(!1,v)};EditorUi.prototype.parseFile=function(d,g,
k){k=null!=k?k:d.name;var v=new FileReader;v.onload=mxUtils.bind(this,function(){this.parseFileData(v.result,g,k)});v.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var v=new XMLHttpRequest;v.open("POST",OPEN_URL);v.setRequestHeader("Content-Type","application/x-www-form-urlencoded");v.onreadystatechange=function(){g(v)};v.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(t){}};
-EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,v,t,x,A){t=null!=t?t:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height),E=g;if(v&&this.isResampleImageSize(null!=A?A:g.length,x))try{var R=Math.max(J/t,D/t);if(1<R){var V=Math.round(J/R),Q=Math.round(D/R),P=document.createElement("canvas");P.width=V;P.height=Q;P.getContext("2d").drawImage(d,0,0,V,Q);var q=P.toDataURL();if(q.length<g.length){var y=
-document.createElement("canvas");y.width=V;y.height=Q;var B=y.toDataURL();q!==B&&(g=q,J=V,D=Q)}}}catch(C){}v&&E!=g&&t>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,k,v,t/1.5,x,A):k(g,J,D)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;g(v)};null!=k&&(v.onerror=k);v.src=d}catch(t){if(null!=
+EditorUi.prototype.isResampleImageSize=function(d,g){g=null!=g?g:this.resampleThreshold;return d>g};EditorUi.prototype.resizeImage=function(d,g,k,v,t,x,A){t=null!=t?t:this.maxImageSize;var J=Math.max(1,d.width),D=Math.max(1,d.height),G=g;if(v&&this.isResampleImageSize(null!=A?A:g.length,x))try{var R=Math.max(J/t,D/t);if(1<R){var V=Math.round(J/R),Q=Math.round(D/R),O=document.createElement("canvas");O.width=V;O.height=Q;O.getContext("2d").drawImage(d,0,0,V,Q);var q=O.toDataURL();if(q.length<g.length){var y=
+document.createElement("canvas");y.width=V;y.height=Q;var B=y.toDataURL();q!==B&&(g=q,J=V,D=Q)}}}catch(C){}v&&G!=g&&t>this.maxImageSize/2&&g.length>this.maxImageBytes?this.resizeImage(d,g,k,v,t/1.5,x,A):k(g,J,D)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var v=new Image;v.onload=function(){v.width=0<v.width?v.width:120;v.height=0<v.height?v.height:120;g(v)};null!=k&&(v.onerror=k);v.src=d}catch(t){if(null!=
k)k(t);else throw t;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var l=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());l.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&
null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var n=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var d=this,g=this.editor.graph,k=g.isEnabled;g.isEnabled=function(){return k.apply(this,arguments)&&!d.isLocked()};Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(m){var z=m.getEvent();return null==m.getState()&&!mxEvent.isMouseEvent(z)&&
-!g.freehand.isDrawing()||mxEvent.isPopupTrigger(z)&&(null==m.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))});g.cellEditor.editPlantUmlData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,L.format,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(m,"<pre>"+O+"</pre>"),g.updateCellSize(m,
-!0);else{g.setCellStyles("image",d.convertDataUri(O),[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=S,W.height=U,g.cellsResized([m],[W],!1))}g.setAttributeForCell(m,"plantUmlData",JSON.stringify({data:N,format:L.format}))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};g.cellEditor.editMermaidData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,
-function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,L.config,function(O,S,U){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",O,[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,U),g.cellsResized([m],[W],!1));g.setAttributeForCell(m,"mermaidData",JSON.stringify({data:N,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(O){d.handleError(O)})},
+!g.freehand.isDrawing()||mxEvent.isPopupTrigger(z)&&(null==m.getState()||mxEvent.isControlDown(z)||mxEvent.isShiftDown(z))});g.cellEditor.editPlantUmlData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("plantUml")+":",L.data,function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(N,L.format,function(P,S,U){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==L.format)g.labelChanged(m,"<pre>"+P+"</pre>"),g.updateCellSize(m,
+!0);else{g.setCellStyles("image",d.convertDataUri(P),[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=S,W.height=U,g.cellsResized([m],[W],!1))}g.setAttributeForCell(m,"plantUmlData",JSON.stringify({data:N,format:L.format}))}finally{g.getModel().endUpdate()}},function(P){d.handleError(P)})},null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};g.cellEditor.editMermaidData=function(m,z,I){var L=JSON.parse(I);z=new TextareaDialog(d,mxResources.get("mermaid")+":",L.data,
+function(N){null!=N&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(N,L.config,function(P,S,U){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",P,[m]);var W=g.model.getGeometry(m);null!=W&&(W=W.clone(),W.width=Math.max(W.width,S),W.height=Math.max(W.height,U),g.cellsResized([m],[W],!1));g.setAttributeForCell(m,"mermaidData",JSON.stringify({data:N,config:L.config},null,2))}finally{g.getModel().endUpdate()}},function(P){d.handleError(P)})},
null,null,400,220);d.showDialog(z.container,420,300,!0,!0);z.init()};var v=g.cellEditor.startEditing;g.cellEditor.startEditing=function(m,z){try{var I=this.graph.getAttributeForCell(m,"plantUmlData");if(null!=I)this.editPlantUmlData(m,z,I);else if(I=this.graph.getAttributeForCell(m,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(m,z,I);else{var L=g.getCellStyle(m);"1"==mxUtils.getValue(L,"metaEdit","0")?d.showDataDialog(m):v.apply(this,arguments)}}catch(N){d.handleError(N)}};
g.getLinkTitle=function(m){return d.getLinkTitle(m)};g.customLinkClicked=function(m,z){var I=!1;try{var L=this.getGraphBounds();d.handleCustomLink(m,z);I=!0;d.chromelessResize&&!L.equals(this.getGraphBounds())&&(d.chromelessResize(),this.scrollCellToVisible(z))}catch(N){d.handleError(N)}return I};var t=g.parseBackgroundImage;g.parseBackgroundImage=function(m){var z=t.apply(this,arguments);null!=z&&null!=z.src&&Graph.isPageLink(z.src)&&(z={originalSrc:z.src});return z};var x=g.setBackgroundImage;g.setBackgroundImage=
function(m){null!=m&&null!=m.originalSrc&&(m=d.createImageForPageLink(m.originalSrc,d.currentPage,this));x.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(m,z){m=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=m){var I=m.indexOf(",");if(0<I)for(m=m.substring(I+
1),z=z.getProperty("patches"),I=0;I<z.length;I++)if(null!=z[I][EditorUi.DIFF_UPDATE]&&null!=z[I][EditorUi.DIFF_UPDATE][m]||null!=z[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(z[I][EditorUi.DIFF_REMOVE],m)){g.refreshBackgroundImage();break}}}));var A=g.getBackgroundImageObject;g.getBackgroundImageObject=function(m,z){var I=A.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=z?d.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||
(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var J=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(m){m=null!=m?m:"";"1"==urlParams.dev&&(m+=(0<m.length?"&":"?")+"dev=1");return J.apply(this,arguments)};var D=g.addClickHandler;g.addClickHandler=function(m,z,I){var L=z;z=
-function(N,O,S){if(null==O){var U=mxEvent.getSource(N);"a"==U.nodeName.toLowerCase()&&(O=U.getAttribute("href"))}null!=O&&g.isCustomLink(O)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(O,S)&&mxEvent.consume(N);null!=L&&L(N,O,S)};D.call(this,m,z,I)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var E=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(m,z,I){g.isSelectionEmpty()&&
-"simple"==Editor.currentTheme&&this.addMenuItems(m,["zoomIn","zoomOut","-"],null,I);E.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(m,["-","addToScratchpad"],null,I);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(m,["-","exitGroup","home"],null,I)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(m,z,I){if(d.editor.graph.isSelectionEmpty())R.apply(this,arguments),d.menus.addMenuItems(m,["copyAsImage"],
+function(N,P,S){if(null==P){var U=mxEvent.getSource(N);"a"==U.nodeName.toLowerCase()&&(P=U.getAttribute("href"))}null!=P&&g.isCustomLink(P)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&g.customLinkClicked(P,S)&&mxEvent.consume(N);null!=L&&L(N,P,S)};D.call(this,m,z,I)};n.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(m,z,I){g.isSelectionEmpty()&&
+"simple"==Editor.currentTheme&&this.addMenuItems(m,["zoomIn","zoomOut","-"],null,I);G.apply(this,arguments);g.isSelectionEmpty()||null==d.addSelectionToScratchpad||this.addMenuItems(m,["-","addToScratchpad"],null,I);g.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(m,["-","exitGroup","home"],null,I)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(m,z,I){if(d.editor.graph.isSelectionEmpty())R.apply(this,arguments),d.menus.addMenuItems(m,["copyAsImage"],
null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(m,z,I):this.addPopupMenuArrangeItems(m,z,I),this.addMenuItems(m,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(m,z,I),this.addMenuItems(m,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==g.getSelectionCount()&&!g.isCellLocked(z)&&g.isCellEditable(z)&&(this.addSubmenu("editCell",m,null,mxResources.get("edit")),m.addSeparator(),g.getModel().isEdge(z))){this.addSubmenu("line",
m);var L=g.getModel().getGeometry(z);null!=L&&null!=L.points&&0<L.points.length&&this.addMenuItems(m,["clearWaypoints"],null,I)}1==g.getSelectionCount()&&this.addMenuItems(m,["enterGroup"],null,I);L=d.getSelectionState();null!=L.mergeCell?this.addMenuItem(m,"mergeCells"):(1<L.style.colspan||1<L.style.rowspan)&&this.addMenuItem(m,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=
function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var V=g.getExportVariables;g.getExportVariables=function(){var m=V.apply(this,arguments),z=d.getCurrentFile();null!=z&&(m.filename=z.getTitle());m.pagecount=null!=d.pages?d.pages.length:1;m.page=null!=d.currentPage?d.currentPage.getName():"";m.pagenumber=null!=d.pages&&null!=d.currentPage?
-mxUtils.indexOf(d.pages,d.currentPage)+1:1;return m};var Q=g.getGlobalVariable;g.getGlobalVariable=function(m){var z=d.getCurrentFile();return"filename"==m&&null!=z?z.getTitle():"page"==m&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==m?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==m?null!=d.pages?d.pages.length:1:Q.apply(this,arguments)};var P=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var m=this.getCurrentFile(),
-z=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;P!=z&&m==q&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());P=z;q=m}));var y=g.labelLinkClicked;g.labelLinkClicked=function(m,z,I){var L=z.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))y.apply(this,arguments);else{if(!g.isEnabled()||null!=m&&g.isCellLocked(m.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=
+mxUtils.indexOf(d.pages,d.currentPage)+1:1;return m};var Q=g.getGlobalVariable;g.getGlobalVariable=function(m){var z=d.getCurrentFile();return"filename"==m&&null!=z?z.getTitle():"page"==m&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==m?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==m?null!=d.pages?d.pages.length:1:Q.apply(this,arguments)};var O=null,q=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var m=this.getCurrentFile(),
+z=null!=m&&null!=m.getTitle()?m.getTitle():this.defaultFilename;O!=z&&m==q&&(g.invalidateDescendantsWithPlaceholders(g.model.getRoot()),g.view.validate());O=z;q=m}));var y=g.labelLinkClicked;g.labelLinkClicked=function(m,z,I){var L=z.getAttribute("href");if(null==L||!g.isCustomLink(L)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))y.apply(this,arguments);else{if(!g.isEnabled()||null!=m&&g.isCellLocked(m.cell))g.customLinkClicked(L),g.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=
function(){var m=d.defaultFilename,z=d.getCurrentFile();null!=z&&(m=null!=z.getTitle()?z.getTitle():m);return m};var B=this.actions.get("print");B.setEnabled(!mxClient.IS_IOS||!navigator.standalone);B.visible=B.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=
"synchronize","1"==urlParams.embedInline&&g.addListener(mxEvent.ESCAPE,function(m,z){null!=z&&g.isEnabled()&&!g.isEditing()&&null!=z.getProperty("event")&&d.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(m){var z=g.cellEditor.text2,
I=null;null!=z&&(mxEvent.addListener(z,"dragleave",function(L){null!=I&&(I.parentNode.removeChild(I),I=null);L.stopPropagation();L.preventDefault()}),mxEvent.addListener(z,"dragover",mxUtils.bind(this,function(L){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(z));L.stopPropagation();L.preventDefault()})),mxEvent.addListener(z,"drop",mxUtils.bind(this,function(L){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<L.dataTransfer.files.length)this.importFiles(L.dataTransfer.files,
-0,0,this.maxImageSize,function(O,S,U,W,X,Z){g.insertImage(O,X,Z)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var S=0;S<O.length;S++)O[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var N=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(O){var S=Math.max(1,O.width);O=Math.max(1,O.height);var U=this.maxImageSize;U=Math.min(1,
-Math.min(U/Math.max(1,S)),U/Math.max(1,O));g.insertImage(decodeURIComponent(N),S*U,O*U)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=
+0,0,this.maxImageSize,function(P,S,U,W,X,Z){g.insertImage(P,X,Z)},function(){},function(P){return"image/"==P.type.substring(0,6)},function(P){for(var S=0;S<P.length;S++)P[S]()},mxEvent.isControlDown(L));else if(0<=mxUtils.indexOf(L.dataTransfer.types,"text/uri-list")){var N=L.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,function(P){var S=Math.max(1,P.width);P=Math.max(1,P.height);var U=this.maxImageSize;U=Math.min(1,
+Math.min(U/Math.max(1,S)),U/Math.max(1,P));g.insertImage(decodeURIComponent(N),S*U,P*U)})):document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(L.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(L.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,L.dataTransfer.getData("text/plain"));L.stopPropagation();L.preventDefault()})))}));if(Editor.isSettingsEnabled()){B=
this.editor.graph.view;var C=mxSettings.getUnit();B.setUnit(C);Editor.pageSizeUnit=C==mxConstants.METERS?mxConstants.MILLIMETERS:C;B.addListener("unitChanged",function(m,z){m=z.getProperty("unit");mxSettings.setUnit(m);mxSettings.save();Editor.pageSizeUnit=m==mxConstants.METERS?mxConstants.MILLIMETERS:m});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,B.unit);
this.refresh()}if("1"==urlParams.styledev){B=document.getElementById("geFooter");null!=B&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),
this.styleInput.value)})),B.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(m,z){0<this.editor.graph.getSelectionCount()?(m=this.editor.graph.getSelectionCell(),m=this.editor.graph.getModel().getStyle(m),this.styleInput.value=m||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var M=this.isSelectionAllowed;this.isSelectionAllowed=function(m){return mxEvent.getSource(m)==this.styleInput?
!0:M.apply(this,arguments)}}B=document.getElementById("geInfo");null!=B&&B.parentNode.removeChild(B);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var T=null;mxEvent.addListener(g.container,"dragleave",function(m){g.isEnabled()&&(null!=T&&(T.parentNode.removeChild(T),T=null),m.stopPropagation(),m.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(m){null==T&&(!mxClient.IS_IE||10<document.documentMode)&&(T=this.highlightElement(g.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();m.stopPropagation();m.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(m){null!=T&&(T.parentNode.removeChild(T),T=null);if(g.isEnabled()){var z=mxUtils.convertPoint(g.container,mxEvent.getClientX(m),mxEvent.getClientY(m)),I=m.dataTransfer.files,L=g.view.translate,N=g.view.scale,O=z.x/N-L.x,S=z.y/N-L.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(m)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
-this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(m)&&(S=O=null),this.importFiles(I,O,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(m),null,null,mxEvent.isShiftDown(m),m));else{mxEvent.isAltDown(m)&&(S=O=0);var U=0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):null;z=this.extractGraphModelFromEvent(m,null!=this.pages);if(null!=z)g.setSelectionCells(this.importXml(z,O,S,!0));else if(0<=mxUtils.indexOf(m.dataTransfer.types,
+null!=this.sidebar&&this.sidebar.hideTooltip();m.stopPropagation();m.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(m){null!=T&&(T.parentNode.removeChild(T),T=null);if(g.isEnabled()){var z=mxUtils.convertPoint(g.container,mxEvent.getClientX(m),mxEvent.getClientY(m)),I=m.dataTransfer.files,L=g.view.translate,N=g.view.scale,P=z.x/N-L.x,S=z.y/N-L.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(m)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&
+this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(m)&&(S=P=null),this.importFiles(I,P,S,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(m),null,null,mxEvent.isShiftDown(m),m));else{mxEvent.isAltDown(m)&&(S=P=0);var U=0<=mxUtils.indexOf(m.dataTransfer.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):null;z=this.extractGraphModelFromEvent(m,null!=this.pages);if(null!=z)g.setSelectionCells(this.importXml(z,P,S,!0));else if(0<=mxUtils.indexOf(m.dataTransfer.types,
"text/html")){var W=m.dataTransfer.getData("text/html");z=document.createElement("div");z.innerHTML=Graph.sanitizeHtml(W);var X=null;I=z.getElementsByTagName("img");null!=I&&1==I.length?(W=I[0].getAttribute("src"),null==W&&(W=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)||(X=!0)):(I=z.getElementsByTagName("a"),null!=I&&1==I.length?W=I[0].getAttribute("href"):(z=z.getElementsByTagName("pre"),null!=z&&1==z.length&&(W=mxUtils.getTextContent(z[0]))));var Z=!0,Y=mxUtils.bind(this,
-function(){g.setSelectionCells(this.insertTextAt(W,O,S,!0,X,null,Z,mxEvent.isControlDown(m)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(m)):Y()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));g.setSelectionCell(g.insertVertex(null,
-null,"",O,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(ba){g.setSelectionCells(this.insertTextAt(U,O,S,!0))})):0<=mxUtils.indexOf(m.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(m.dataTransfer.getData("text/plain"),O,S,!0))}}m.stopPropagation();m.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",
+function(){g.setSelectionCells(this.insertTextAt(W,P,S,!0,X,null,Z,mxEvent.isControlDown(m)))});X&&null!=W&&W.length>this.resampleThreshold?this.confirmImageResize(function(ba){Z=ba;Y()},mxEvent.isControlDown(m)):Y()}else null!=U&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(ba){var ea=Math.max(1,ba.width);ba=Math.max(1,ba.height);var ca=this.maxImageSize;ca=Math.min(1,Math.min(ca/Math.max(1,ea)),ca/Math.max(1,ba));g.setSelectionCell(g.insertVertex(null,
+null,"",P,S,ea*ca,ba*ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+U+";"))}),mxUtils.bind(this,function(ba){g.setSelectionCells(this.insertTextAt(U,P,S,!0))})):0<=mxUtils.indexOf(m.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(m.dataTransfer.getData("text/plain"),P,S,!0))}}m.stopPropagation();m.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",
mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&g.view.validateBackground()});g.addListener("enabledChanged",mxUtils.bind(this,function(){g.isEnabled()||this.hideShapePicker()}));d=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==d.embedViewport)mxUtils.fit(this.div);else{var m=parseInt(this.div.offsetLeft),z=
-parseInt(this.div.offsetWidth),I=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),O=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(m,I-z))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,O-N))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};
+parseInt(this.div.offsetWidth),I=d.embedViewport.x+d.embedViewport.width,L=parseInt(this.div.offsetTop),N=parseInt(this.div.offsetHeight),P=d.embedViewport.y+d.embedViewport.height;this.div.style.left=Math.max(d.embedViewport.x,Math.min(m,I-z))+"px";this.div.style.top=Math.max(d.embedViewport.y,Math.min(L,P-N))+"px";this.div.style.height=Math.min(d.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(d.embedViewport.width,parseInt(this.div.style.width))+"px"}};
if(!this.editor.chromeless||this.editor.editable)if(B=Editor.currentTheme,"simple"==B||"sketch"==B)Editor.currentTheme="",this.doSetCurrentTheme(B,mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);B=!1;null!=urlParams.dark?B=urlParams.dark:(B="dark"==Editor.currentTheme,
!Editor.isSettingsEnabled()||"1"==urlParams.embed||B&&"auto"!=mxSettings.settings.darkMode||(B=mxSettings.settings.darkMode));"auto"==B&&this.isAutoDarkModeSupported()&&(B=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof B?"1"==B:B);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(m){this.isAutoDarkMode()&&this.setDarkMode(m.matches)}))}catch(m){this.actions.get("autoMode").setEnabled(!1)}"1"==
urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(m,z){g.enableFlowAnimation=Editor.enableAnimations;g.refresh()}));g.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&
d.editor.loadFonts()};var p=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,g=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=g&&d<g?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<g&&d>=g&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=
-d}p.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,v=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(E),mxEvent.getClientY(E)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=
-document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var x=null,A=null,J=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(E){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(E);v.popupMenuHandler.hideMenu();mxEvent.consume(E)}));
-t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(E){J=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(E);v.popupMenuHandler.hideMenu();mxEvent.consume(E)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(E){var R=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,J+mxEvent.getClientX(E)-x)+"px",R=!0);null!=A&&(this.diagramContainer.style.height=
-Math.max(20,D+mxEvent.getClientY(E)-A)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(E){null==x&&null==A||mxEvent.consume(E);A=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
-"hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(E){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(E){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
+d}p.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var d=this.sketchFooterMenuElt,g=this.sketchMainMenuElt,k=this.sketchPickerMenuElt,v=this.editor.graph;k.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(G){mxEvent.getSource(G)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(G),mxEvent.getClientY(G)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var t=
+document.createElement("div");t.style.position="absolute";t.style.width="10px";t.style.height="10px";t.style.borderRadius="5px";t.style.border="1px solid gray";t.style.background="#ffffff";t.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(t);this.bottomResizer=t;var x=null,A=null,J=null,D=null;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(G){D=parseInt(this.diagramContainer.style.height);A=mxEvent.getClientY(G);v.popupMenuHandler.hideMenu();mxEvent.consume(G)}));
+t=t.cloneNode(!1);t.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(t);this.rightResizer=t;mxEvent.addGestureListeners(t,mxUtils.bind(this,function(G){J=parseInt(this.diagramContainer.style.width);x=mxEvent.getClientX(G);v.popupMenuHandler.hideMenu();mxEvent.consume(G)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(G){var R=!1;null!=x&&(this.diagramContainer.style.width=Math.max(20,J+mxEvent.getClientX(G)-x)+"px",R=!0);null!=A&&(this.diagramContainer.style.height=
+Math.max(20,D+mxEvent.getClientY(G)-A)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(G){null==x&&null==A||mxEvent.consume(G);A=x=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
+"hidden";this.sketchMenubarElt.style.display="none";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(G){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(G){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
"hidden";g.style.visibility="hidden";d.style.visibility="hidden";k.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,v=!1,t=0;t<k.types.length;t++)if("text/"===k.types[t].substring(0,5)){v=!0;break}if(!v){var x=
-k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(D,E,R,V,Q,P){d.insertImage(D,Q,P)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var E=0;E<D.length;E++)D[E]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=
+k.items;for(index in x){var A=x[index];if("file"===A.kind){if(d.isEditing())this.importFiles([A.getAsFile()],0,0,this.maxImageSize,function(D,G,R,V,Q,O){d.insertImage(D,Q,O)},function(){},function(D){return"image/"==D.type.substring(0,6)},function(D){for(var G=0;G<D.length;G++)D[G]()});else{var J=this.editor.graph.getInsertPoint();this.importFiles([A.getAsFile()],J.x,J.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(D){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML=
"&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.textRendering="optimizeSpeed";k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.background="transparent";k.style.color="transparent";k.style.position="absolute";k.style.whiteSpace="nowrap";k.style.overflow=
"hidden";k.style.display="block";k.style.fontSize="1";k.style.zIndex="-1";k.style.resize="none";k.style.outline="none";k.style.width="1px";k.style.height="1px";mxUtils.setOpacity(k,0);k.contentEditable=!0;k.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(x){var A=mxEvent.getSource(x);null==g.container||!g.isEnabled()||g.isMouseDown||
g.isEditing()||null!=this.dialog||"INPUT"==A.nodeName||"TEXTAREA"==A.nodeName||"true"==A.contentEditable||224!=x.keyCode&&(mxClient.IS_MAC||17!=x.keyCode)&&(!mxClient.IS_MAC||91!=x.keyCode&&93!=x.keyCode)||v||(k.style.left=g.container.scrollLeft+10+"px",k.style.top=g.container.scrollTop+10+"px",x=g.container.scrollLeft,A=g.container.scrollTop,g.container.appendChild(k),v=!0,k.focus(),document.execCommand("selectAll",!1,null),g.container.scrollLeft=x,g.container.scrollTop=A)}));mxEvent.addListener(document,
@@ -13364,7 +13368,7 @@ this.div.style.left=parseInt(this.div.style.left)+v-140+"px"):(this.div.style.wi
(d=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,(1200>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)||708>d)&&this.formatWindow.window.toggleMinimized()):this.formatWindow.window.setVisible(!1)}};var u=EditorUi.prototype.toggleFormatPanel;EditorUi.prototype.toggleFormatPanel=function(d){var g=this.formatWindow;null!=g?g.window.setVisible(null!=d?d:!this.isFormatPanelVisible()):u.apply(this,arguments)};EditorUi.prototype.toggleShapesPanel=
function(d){if(this.isShapesPanelVisible()!=d){var g=EditorUi.prototype.hsplitPosition;0==g&&(g=this.defaultSidebarWidth);var k=this.hsplitPosition,v=mxUtils.bind(this,function(){this.hsplitPosition=t;this.refresh();this.diagramContainer.scrollLeft-=k-this.hsplitPosition}),t=d?g:0;mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",0==t?"translateX(0)":"translateX(-100%)");0!=t&&v();window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",
0==t?"translateX(-100%)":"translateX(0)");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition","transform 0.3s ease-in-out");mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin","top left");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transition",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform",null);mxUtils.setPrefixedStyle(this.sidebarContainer.style,"transform-origin",null);0==t&&v()}),
-300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var G=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():G.apply(this,arguments)};var H=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;if("1"!=urlParams.embedInline){var g=this.container.clientWidth;this.container==
+300)}),10)}};EditorUi.prototype.isShapesPanelVisible=function(){return 0<this.hsplitPosition};var F=EditorUi.prototype.isFormatPanelVisible;EditorUi.prototype.isFormatPanelVisible=function(){var d=this.formatWindow;return null!=d?d.window.isVisible():F.apply(this,arguments)};var H=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){if(null!=this.sketchWrapperElt&&null!=this.sketchWrapperElt.parentNode){d=null!=d?d:!0;if("1"!=urlParams.embedInline){var g=this.container.clientWidth;this.container==
document.body&&(g=document.body.clientWidth||document.documentElement.clientWidth);var k=this.getDiagramContainerOffset();var v=k.x;var t=k.y;"simple"==Editor.currentTheme&&(t+=this.sketchMainMenuElt.offsetHeight);this.diagramContainer.style.top=t+"px";this.diagramContainer.style.bottom="0";"simple"==Editor.currentTheme?(this.hsplit.style.top=this.sketchMainMenuElt.offsetHeight+"px",this.sidebarContainer.style.top=this.hsplit.style.top,this.formatContainer.style.top=this.hsplit.style.top,g=Math.max(0,
Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.formatWidth,Math.min(this.hsplitPosition,g-this.splitSize-40))),this.sidebarContainer.style.width=g+"px",this.diagramContainer.style.left=g+v+"px",this.tabContainer.style.left=g+"px",this.tabContainer.style.right=this.formatWidth+1+"px",this.sketchMainMenuElt.style.left="0px",this.sketchMainMenuElt.style.right="0px",this.hsplit.style.left=g+"px",this.diagramContainer.style.right=this.formatWidth+"px",
this.formatContainer.style.width=this.formatWidth+"px",this.hsplit.style.bottom=this.tabContainer.offsetHeight+"px",this.diagramContainer.style.bottom=this.hsplit.style.bottom,this.checkTabScrollerOverflow()):(this.diagramContainer.style.left=k.x+"px",this.diagramContainer.style.right="0")}d&&this.editor.graph.sizeDidChange()}else H.apply(this,arguments)};EditorUi.prototype.createShapesPanel=function(d){var g=mxUtils.bind(this,function(v){v=this.createMenu(v,null,"geTitle");v.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";
@@ -13402,19 +13406,19 @@ this.editor.graph;g.isSelectionEmpty()||(d=mxUtils.sortCells(g.getExportableCell
x.getSelectionCount()){t=x.getStartEditingCell(x.getSelectionCell(),v);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==x.getCurrentCellStyle(t)[mxConstants.STYLE_SHAPE])x.setCellStyles(mxConstants.STYLE_IMAGE,d,[t]);else{x.model.beginUpdate();try{x.labelChanged(t,d),Graph.isLink(d)&&x.setLinkForCell(t,d)}finally{x.model.endUpdate()}}x.setSelectionCell(t)}else A=x.getInsertPoint(),x.isMouseInsertPoint()&&(J=0,x.lastPasteXml==d&&0<x.pasteCounter&&x.pasteCounter--),A=this.insertTextAt(d,A.x+J,
A.y+J,t),x.setSelectionCells(A);x.isSelectionEmpty()||(x.scrollCellToVisible(x.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(x.view.getState(x.getSelectionCell())));return A};EditorUi.prototype.pasteCells=function(d,g,k,v){if(!mxEvent.isConsumed(d)){var t=g,x=!1;if(k&&null!=d.clipboardData&&d.clipboardData.getData){var A=d.clipboardData.getData("text/plain"),J=!1;if(null!=A&&0<A.length&&"%3CmxGraphModel%3E"==A.substring(0,18))try{var D=decodeURIComponent(A);this.isCompatibleString(D)&&
(J=!0,A=D)}catch(q){}J=J?null:d.clipboardData.getData("text/html");null!=J&&0<J.length?(t=this.parseHtmlData(J),x="text/plain"!=t.getAttribute("data-type")):null!=A&&0<A.length&&(t=document.createElement("div"),mxUtils.setTextContent(t,J))}A=t.getElementsByTagName("span");if(null!=A&&0<A.length&&"application/vnd.lucid.chart.objects"===A[0].getAttribute("data-lucid-type"))k=A[0].getAttribute("data-lucid-content"),null!=k&&0<k.length&&(this.convertLucidChart(k,mxUtils.bind(this,function(q){var y=this.editor.graph;
-y.lastPasteXml==q?y.pasteCounter++:(y.lastPasteXml=q,y.pasteCounter=0);var B=y.pasteCounter*y.gridSize;y.setSelectionCells(this.importXml(q,B,B));y.scrollCellToVisible(y.getSelectionCell())}),mxUtils.bind(this,function(q){this.handleError(q)})),mxEvent.consume(d));else{var E=!1,R="";R=x?null!=t.textContent&&"<mxfile"==t.textContent.substring(0,7)&&"</mxfile>"==t.textContent.substring(t.textContent.length-9)||"<mxGraphModel"==t.textContent.substring(0,13)&&"</mxGraphModel>"==t.textContent.substring(t.textContent.length-
-15)?t.textContent.replace(/\u00a0/g," "):t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var V=R.lastIndexOf("%3E");0<=V&&V<R.length-3&&(R=R.substring(0,V+3))}catch(q){}try{A=t.getElementsByTagName("span"),(D=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(E=!0,R=D)}catch(q){}try{if(null!=R&&0<R.length){if(0==R.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":')){var Q=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,v,E,d)}catch(q){console.log("Miro import error:",q)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Q):Q()}else this.pasteXml(R,v,E,d,x);try{mxEvent.consume(d)}catch(q){}}else if(!k){var P=this.editor.graph;P.lastPasteXml=null;P.pasteCounter=0}}catch(q){this.handleError(q)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=
+y.lastPasteXml==q?y.pasteCounter++:(y.lastPasteXml=q,y.pasteCounter=0);var B=y.pasteCounter*y.gridSize;y.setSelectionCells(this.importXml(q,B,B));y.scrollCellToVisible(y.getSelectionCell())}),mxUtils.bind(this,function(q){this.handleError(q)})),mxEvent.consume(d));else{var G=!1,R="";R=x?null!=t.textContent&&"<mxfile"==t.textContent.substring(0,7)&&"</mxfile>"==t.textContent.substring(t.textContent.length-9)||"<mxGraphModel"==t.textContent.substring(0,13)&&"</mxGraphModel>"==t.textContent.substring(t.textContent.length-
+15)?t.textContent.replace(/\u00a0/g," "):t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var V=R.lastIndexOf("%3E");0<=V&&V<R.length-3&&(R=R.substring(0,V+3))}catch(q){}try{A=t.getElementsByTagName("span"),(D=null!=A&&0<A.length?mxUtils.trim(decodeURIComponent(A[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(D)||0==D.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(G=!0,R=D)}catch(q){}try{if(null!=R&&0<R.length){if(0==R.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":')){var Q=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,v,G,d)}catch(q){console.log("Miro import error:",q)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",Q):Q()}else this.pasteXml(R,v,G,d,x);try{mxEvent.consume(d)}catch(q){}}else if(!k){var O=this.editor.graph;O.lastPasteXml=null;O.pasteCounter=0}}catch(q){this.handleError(q)}}}g.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=
function(d,g){var k=320;this.editor.graph.isEnabled()&&(k+=40);null!=this.pages&&1<this.pages.length&&(k+=40,this.editor.graph.isEnabled()||(k+=10));null==g||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(k+=20);this.showDialog((new PrintDialog(this,d,g)).container,320,k,!0,!0)};EditorUi.prototype.print=function(d,g){var k=this.editor,v=k.graph,t=this.getPageIndex(this.currentPage),x=null!=t?t+1:1,A=mxUtils.bind(this,function(B,C,M,T){var m=B.useCssTransforms,z=B.currentTranslate,I=B.currentScale,
-L=B.view.translate,N=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var O=B.getGraphBounds(),S=0,U=0,W=mxRectangle.fromRectangle(B.pageFormat),X=g.fit||g.crop||!B.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*B.pageScale);W.height=Math.ceil(W.height*B.pageScale);var Y=1;if(g.fit){Y=g.sheetsAcross;var ba=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));
-Y=Math.min(W.height*ba/(O.height/B.view.scale),W.width*Y/(O.width/B.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&B.pageVisible?(Z=B.getPageLayout(),S-=Z.x*W.width,U-=Z.y*W.height):X=!0;g.crop&&(g.selection&&(O=v.getBoundingBox(v.getSelectionCells())),W.width=(O.width+1)*Y/B.view.scale,W.height=(O.height+1)*Y/B.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==C){C=PrintDialog.createPrintPreview(B,Y,null,0,S,U,X);C.title=this.getBaseFilename(!0);
+L=B.view.translate,N=B.view.scale;B.useCssTransforms&&(B.useCssTransforms=!1,B.currentTranslate=new mxPoint(0,0),B.currentScale=1,B.view.translate=new mxPoint(0,0),B.view.scale=1);var P=B.getGraphBounds(),S=0,U=0,W=mxRectangle.fromRectangle(B.pageFormat),X=g.fit||g.crop||!B.pageVisible,Z=g.scale;W.width=Math.ceil(W.width*B.pageScale);W.height=Math.ceil(W.height*B.pageScale);var Y=1;if(g.fit){Y=g.sheetsAcross;var ba=g.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));
+Y=Math.min(W.height*ba/(P.height/B.view.scale),W.width*Y/(P.width/B.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&B.pageVisible?(Z=B.getPageLayout(),S-=Z.x*W.width,U-=Z.y*W.height):X=!0;g.crop&&(g.selection&&(P=v.getBoundingBox(v.getSelectionCells())),W.width=(P.width+1)*Y/B.view.scale,W.height=(P.height+1)*Y/B.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==C){C=PrintDialog.createPrintPreview(B,Y,null,0,S,U,X);C.title=this.getBaseFilename(!0);
C.pageSelector=!1;C.mathEnabled=!1;S=g.border;isNaN(S)||(C.pageMargin=S);g.selection&&(C.isCellVisible=function(aa){return B.isCellSelected(aa)});var ea=C.writeHead;C.writeHead=function(aa){ea.apply(this,arguments);mxClient.IS_GC&&(aa.writeln('<style type="text/css">'),aa.writeln("@media print {"),aa.writeln(".MathJax svg { shape-rendering: crispEdges; }"),aa.writeln("}"),aa.writeln("</style>"));null!=k.fontCss&&(aa.writeln('<style type="text/css">'),aa.writeln(mxUtils.htmlEntities(k.fontCss,!1,!1,
!1)),aa.writeln("</style>"));for(var da=B.getCustomFonts(),ia=0;ia<da.length;ia++){var pa=da[ia].name,oa=da[ia].url;Graph.isCssFontUrl(oa)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(oa))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(oa)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=C.drawBackgroundImage;
C.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),v.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=C.addGraphFragment;C.addGraphFragment=function(aa,da,ia,pa,oa,ha){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:oa.classList.add("geDisableMathJax")};g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
-B.view.gridColor);C.open(null,null,M,!0,T,W,g.selection?B.getSelectionCells():null)}else{O=B.background;if(null==O||""==O||O==mxConstants.NONE)O="#ffffff";C.backgroundColor=O;C.autoOrigin=X;g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);C.appendGraph(B,Y,S,U,M,!0,T,W,g.selection?B.getSelectionCells():null);M=B.getCustomFonts();if(null!=C.wnd)for(W=0;W<M.length;W++)S=M[W].name,U=M[W].url,Graph.isCssFontUrl(U)?
-C.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(U)+'" charset="UTF-8" type="text/css">'):(C.wnd.document.writeln('<style type="text/css">'),C.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(U)+'");\n}'),C.wnd.document.writeln("</style>"))}m&&(B.useCssTransforms=m,B.currentTranslate=z,B.currentScale=I,B.view.translate=L,B.view.scale=N);return C}),J=g.pagesFrom,D=g.pagesTo,E=!g.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
-g);else{E&&(E=g.selection||J==x&&D==x);if(!E&&null!=this.pages&&this.pages.length){E=0;x=this.pages.length-1;g.allPages||(E=parseInt(J)-1,x=parseInt(D)-1);for(var R=E;R<=x;R++){var V=this.pages[R];J=V==this.currentPage?v:null;if(null==J){J=this.createTemporaryGraph(v.stylesheet);J.shapeForegroundColor=v.shapeForegroundColor;J.shapeBackgroundColor=v.shapeBackgroundColor;D=!0;E=!1;var Q=null,P=null;null==V.viewState&&null==V.root&&this.updatePageRoot(V);null!=V.viewState&&(D=V.viewState.pageVisible,
-E=V.viewState.mathEnabled,Q=V.viewState.background,P=V.viewState.backgroundImage,J.pageFormat=V.viewState.pageFormat,J.gridSize=V.viewState.gridSize);null!=P&&null!=P.originalSrc&&(P=this.createImageForPageLink(P.originalSrc,V));J.background=Q;J.backgroundImage=null!=P?new mxImage(P.src,P.width,P.height,P.x,P.y):null;J.pageVisible=D;J.mathEnabled=E;var q=J.getGraphBounds;J.getGraphBounds=function(){var B=q.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var M=
+B.view.gridColor);C.open(null,null,M,!0,T,W,g.selection?B.getSelectionCells():null)}else{P=B.background;if(null==P||""==P||P==mxConstants.NONE)P="#ffffff";C.backgroundColor=P;C.autoOrigin=X;g.grid&&(C.gridSize=B.gridSize,C.gridSteps=B.view.gridSteps,C.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:B.view.gridColor);C.appendGraph(B,Y,S,U,M,!0,T,W,g.selection?B.getSelectionCells():null);M=B.getCustomFonts();if(null!=C.wnd)for(W=0;W<M.length;W++)S=M[W].name,U=M[W].url,Graph.isCssFontUrl(U)?
+C.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(U)+'" charset="UTF-8" type="text/css">'):(C.wnd.document.writeln('<style type="text/css">'),C.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(U)+'");\n}'),C.wnd.document.writeln("</style>"))}m&&(B.useCssTransforms=m,B.currentTranslate=z,B.currentScale=I,B.view.translate=L,B.view.scale=N);return C}),J=g.pagesFrom,D=g.pagesTo,G=!g.allPages;t=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
+g);else{G&&(G=g.selection||J==x&&D==x);if(!G&&null!=this.pages&&this.pages.length){G=0;x=this.pages.length-1;g.allPages||(G=parseInt(J)-1,x=parseInt(D)-1);for(var R=G;R<=x;R++){var V=this.pages[R];J=V==this.currentPage?v:null;if(null==J){J=this.createTemporaryGraph(v.stylesheet);J.shapeForegroundColor=v.shapeForegroundColor;J.shapeBackgroundColor=v.shapeBackgroundColor;D=!0;G=!1;var Q=null,O=null;null==V.viewState&&null==V.root&&this.updatePageRoot(V);null!=V.viewState&&(D=V.viewState.pageVisible,
+G=V.viewState.mathEnabled,Q=V.viewState.background,O=V.viewState.backgroundImage,J.pageFormat=V.viewState.pageFormat,J.gridSize=V.viewState.gridSize);null!=O&&null!=O.originalSrc&&(O=this.createImageForPageLink(O.originalSrc,V));J.background=Q;J.backgroundImage=null!=O?new mxImage(O.src,O.width,O.height,O.x,O.y):null;J.pageVisible=D;J.mathEnabled=G;var q=J.getGraphBounds;J.getGraphBounds=function(){var B=q.apply(this,arguments),C=this.backgroundImage;if(null!=C&&null!=C.width&&null!=C.height){var M=
this.view.translate,T=this.view.scale;B=mxRectangle.fromRectangle(B);B.add(new mxRectangle((M.x+C.x)*T,(M.y+C.y)*T,C.width*T,C.height*T))}return B};var y=J.getGlobalVariable;J.getGlobalVariable=function(B){return"page"==B?V.getName():"pagenumber"==B?R+1:"pagecount"==B?null!=this.pages?this.pages.length:1:y.apply(this,arguments)};document.body.appendChild(J.container);this.updatePageRoot(V);J.model.setRoot(V.root)}t=A(J,t,R!=x,V.getId());J!=v&&J.container.parentNode.removeChild(J.container)}}else t=
A(v);null==t||null==t.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(t.mathEnabled&&(A=t.wnd.document,d||(t.wnd.IMMEDIATE_PRINT=!0),A.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),t.closeDocument(),Graph.rewritePageLinks(t.wnd.document,!0),t.mathEnabled||d||PrintDialog.printPreview(t));return t}};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var g=null,k=0;k<d.length;k++)mxEvent.addListener(d[k],"dragleave",function(v){null!=
g&&(g.parentNode.removeChild(g),g=null);v.stopPropagation();v.preventDefault()}),mxEvent.addListener(d[k],"dragover",mxUtils.bind(this,function(v){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==g&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(g=this.highlightElement());v.stopPropagation();v.preventDefault()})),mxEvent.addListener(d[k],"drop",mxUtils.bind(this,function(v){null!=g&&(g.parentNode.removeChild(g),g=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<
@@ -13424,7 +13428,7 @@ mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+e
"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(t)))))}else this.openLocalFile(t,null,!0)}v.stopPropagation();v.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var g=0,k=0;if(null==d){var v=document.body;var t=document.documentElement;var x=(v.clientWidth||t.clientWidth)-3;v=Math.max(v.clientHeight||0,t.clientHeight)-3}else g=d.offsetTop,k=d.offsetLeft,x=d.clientWidth,v=d.clientHeight;t=document.createElement("div");t.style.zIndex=mxPopupMenu.prototype.zIndex+
2;t.style.border="3px dotted rgb(254, 137, 12)";t.style.pointerEvents="none";t.style.position="absolute";t.style.top=g+"px";t.style.left=k+"px";t.style.width=Math.max(0,x-3)+"px";t.style.height=Math.max(0,v-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(t):document.body.appendChild(t);return t};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var g=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=g){var k=new mxCodec(g.ownerDocument),
v=new mxGraphModel;k.decode(g,v);g=v.getChildAt(v.getRoot(),0);for(k=0;k<v.getChildCount(g);k++)d.push(v.getChildAt(g,k))}return d};EditorUi.prototype.openFileHandle=function(d,g,k,v,t,x){if(null!=g&&0<g.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(g)||/(\.pdf)$/i.test(g))g=g.substring(0,g.length-4),/(\.drawio)$/i.test(g)||(g+=".drawio");var A=mxUtils.bind(this,function(D){g=0<=g.lastIndexOf(".")?g.substring(0,g.lastIndexOf("."))+".drawio":g+".drawio";if("<mxlibrary"==D.substring(0,10)){null==
-this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,g)),this.showSidebar()}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,g,v)});if(EditorUi.isVisioFilename(g))this.importVisio(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(Graph.fileSupport&&
+this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,D,g)),this.showSidebar()}catch(G){this.handleError(G,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(D,g,v)});if(EditorUi.isVisioFilename(g))this.importVisio(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}));else if(Graph.fileSupport&&
(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,g))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(k,mxUtils.bind(this,function(D){4==D.readyState&&(this.spinner.stop(),200<=D.status&&299>=D.status?A(D.responseText):this.handleError({message:mxResources.get(413==D.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(g)&&(g=g.substring(0,
g.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(D){this.spinner.stop();this.openLocalFile(D,g,v)}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,v);try{this.loadLibrary(new LocalLibrary(this,d,k.name)),this.showSidebar()}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}else if(0==
d.indexOf("PK"))this.importZipFile(k,mxUtils.bind(this,function(D){this.spinner.stop();A(D)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,g,v)}));else{if("image/png"==k.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==k.type){var J=Editor.extractGraphModelFromPdf(d);null!=J&&(t=null,v=!0,d=J)}this.spinner.stop();this.openLocalFile(d,g,v,t,null!=t?k:null,x)}}};EditorUi.prototype.openFiles=function(d,g){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var k=
@@ -13435,97 +13439,97 @@ null,J,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.open
(k(mxMarker.getPackageForType(t[mxConstants.STYLE_STARTARROW])),k(mxMarker.getPackageForType(t[mxConstants.STYLE_ENDARROW])));t=v.model.getChildCount(d);for(var x=0;x<t;x++)this.addBasenamesForCell(v.model.getChildAt(d,x),g)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?
"":"none";this.editor.graph.setEnabled(d);null!=this.tabContainer&&(this.tabContainer.style.visibility=d&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");d||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=
!1;this.installMessageHandler(mxUtils.bind(this,function(g,k,v,t){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==g||0==g.length)g=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,g,{}));this.mode=App.MODE_EMBED;this.setFileData(g);if(t)try{var x=this.editor.graph;x.setGridEnabled(!1);x.pageVisible=!1;var A=x.model.cells,J;for(J in A){var D=A[J];null!=D&&null!=D.style&&(D.style+=";sketch=1;"+(-1==D.style.indexOf("fontFamily=")||-1<D.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(E){console.log(E)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=v?v:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(d,g){null!=d?this.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(mxUtils.bind(this,function(k){this.spinner.stop();g(k)})):g(null)};EditorUi.prototype.createLoadMessage=function(d){var g=this.editor.graph;return{event:d,pageVisible:g.pageVisible,
translate:g.view.translate,bounds:g.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:g.view.scale,page:g.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){try{var g=this.editor.graph;g.isEditing()&&g.stopEditing(!g.isInvokesStopCellEditing());var k=window.opener||window.parent;if(this.editor.modified){var v=g.background;if(null==v||v==mxConstants.NONE)v=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,
null,null,!1),g,null,!0,mxUtils.bind(this,function(t){k.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(t)}),"*")}),null,null,!0,v,1,this.embedExportBorder,null,this.embedExportTheme)}else d||k.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,g.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){d||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,v=!1,t=null,x=mxUtils.bind(this,function(D,E){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,
-function(D){if(D.source==(window.opener||window.parent)){var E=D.data,R=null,V=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});
-if("json"==urlParams.proto){var Q=!1;try{E=JSON.parse(E),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[E])}catch(aa){E=null}try{if(null==E)return;if("dialog"==E.action){this.showError(null!=E.titleKey?mxResources.get(E.titleKey):E.title,null!=E.messageKey?mxResources.get(E.messageKey):mxUtils.htmlEntities(E.message),null!=E.buttonKey?mxResources.get(E.buttonKey):E.button);null!=E.modified&&(this.editor.modified=E.modified);return}if("layout"==E.action){this.executeLayouts(this.editor.graph.createLayouts(E.layouts));
-return}if("prompt"==E.action){this.spinner.stop();var P=new FilenameDialog(this,E.defaultValue||"",null!=E.okKey?mxResources.get(E.okKey):E.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:E}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")},null!=E.titleKey?mxResources.get(E.titleKey):E.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")});this.showDialog(P.container,300,80,!0,!1);
-P.init();return}if("draft"==E.action){var q=V(E.xml);this.spinner.stop();P=new DraftDialog(this,mxResources.get("draftFound",[E.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:E}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:E}),"*")}),E.editKey?mxResources.get(E.editKey):null,E.discardKey?mxResources.get(E.discardKey):null,E.ignore?
-mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:E}),"*")}):null);this.showDialog(P.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{P.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:E}),"*")}return}if("template"==E.action){this.spinner.stop();var y=1==E.enableRecent,B=1==E.enableSearch,C=1==E.enableCustomTemp;P=new NewDialog(this,!1,E.templatesOnly?
-!1:null!=E.callback,mxUtils.bind(this,function(aa,da,ia,pa){aa=aa||this.emptyDiagramXml;null!=E.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ia,libs:pa,builtIn:!0,message:E}),"*"):(d(aa,D,aa!=this.emptyDiagramXml,E.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,y?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):
-null,B?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ia){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ia}),"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==E.withoutType);this.showDialog(P.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();
-aa&&this.actions.get("exit").funct()}));P.init();return}if("textContent"==E.action){var M=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:M,message:E}),"*");return}if("status"==E.action){null!=E.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(E.messageKey))):null!=E.message&&this.editor.setStatus(mxUtils.htmlEntities(E.message));null!=E.modified&&(this.editor.modified=E.modified);return}if("spinner"==E.action){var T=null!=E.messageKey?mxResources.get(E.messageKey):
-E.message;null==E.show||E.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==E.action){this.actions.get("exit").funct();return}if("viewport"==E.action){null!=E.viewport&&(this.embedViewport=E.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==E.action){P=null;try{var m=this.diagramContainer.getAttribute("data-scrollState");null!=m&&(this.diagramContainer.removeAttribute("data-scrollState"),P=JSON.parse(m))}catch(aa){}Editor.inlineFullscreen=
-E.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=P&&this.restoreScrollState(P);return}if("snapshot"==E.action){this.sendEmbeddedSvgExport(!0);return}if("export"==E.action){if("png"==E.format||"xmlpng"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){var z=null!=E.xml?E.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,L=mxUtils.bind(this,function(aa,da){if(E.withSvg)E.withSvg=
-!1,this.getEmbeddedSvg(z,this.editor.graph,null,!0,function(pa){L(aa,pa)},null,null,E.embedImages,this.editor.graph.background,E.scale,E.border,E.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=E.format;ia.message=E;ia.data=aa;ia.svg=da;ia.xml=z;A.postMessage(JSON.stringify(ia),"*")}}),N=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==E.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(z)));
-I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);L(aa)}),O=E.pageId||(null!=this.pages?E.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=O){var aa=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var da,ia=0;ia<this.pages.length;ia++)if(this.pages[ia].getId()==O){da=this.updatePageRoot(this.pages[ia]);break}null==da&&(da=this.currentPage);
-I.getGlobalVariable=function(xa){return"page"==xa?da.getName():"pagenumber"==xa?1:aa.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(da.root)}if(null!=E.layerIds){var pa=I.model,oa=pa.getChildCells(pa.getRoot()),ha={};for(ia=0;ia<E.layerIds.length;ia++)ha[E.layerIds[ia]]=!0;for(ia=0;ia<oa.length;ia++)pa.setVisible(oa[ia],ha[oa[ia].id]||!1)}ia=null;E.keepTheme&&(ia=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(xa){N(xa.toDataURL("image/png"))}),
-E.width,null,E.background,mxUtils.bind(this,function(){N(null)}),null,null,E.scale,E.transparent,E.shadow,null,I,E.border,null,E.grid,ia)});null!=E.xml&&0<E.xml.length&&(k=!0,this.setFileData(z),k=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==E.format?"1":"0")+(null!=O?"&pageId="+O:"")+(null!=E.layerIds&&0<E.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:E.layerIds})):"")+(null!=E.scale?"&scale="+E.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,
-function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?L("data:image/png;base64,"+aa.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=E;if("html2"==E.format||"html"==E.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=E.format}else if("html"==E.format)da=this.editor.getGraphXml(),
-aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=E.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=E.background?E.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ia=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(oa);A.postMessage(JSON.stringify(aa),"*")}),pa="auto";E.keepTheme&&
-(pa=Editor.isDarkMode()?"dark":"light");null!=E.theme&&(pa=E.theme);if("xmlsvg"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=E.theme&&(pa=E.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ia,null,null,E.embedImages,da,E.scale,E.border,E.shadow,pa)}}else if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?
-mxResources.get(E.spinKey):E.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,E.scale,E.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||E.shadow,null,pa),(this.editor.graph.shadowVisible||E.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(oa){E.embedImages||null==E.embedImages?this.editor.convertImages(oa,mxUtils.bind(this,function(ha){ia(mxUtils.getXml(ha))})):ia(mxUtils.getXml(oa))}));return}A.postMessage(JSON.stringify(aa),
-"*")}),null!=E.xml&&0<E.xml.length){if(this.editor.graph.mathEnabled){var U=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){U.apply(this,arguments);S()}}k=!0;this.setFileData(E.xml);k=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==E.action){Q=E.toSketch;v=1==E.autosave;this.hideDialog();null!=E.modified&&null==urlParams.modified&&(urlParams.modified=E.modified);null!=E.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=E.saveAndExit);if("1"==urlParams.saveAndExit||
-"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=E.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=E.noSaveBtn);if(null!=E.rough){var W=Editor.sketchMode;this.doSetSketchMode(E.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
-E.dark&&this.setDarkMode(E.dark);null!=E.border&&(this.embedExportBorder=E.border);null!=E.theme&&(this.embedExportTheme=E.theme);null!=E.background&&(this.embedExportBackground=E.background);null!=E.viewport&&(this.embedViewport=E.viewport);this.embedExitPoint=null;if(null!=E.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,E.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,E.rect.top)+"px";this.minInlineWidth=E.minWidth;this.minInlineHeight=E.minHeight;
-this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=E.maxFitScale,Y=E.rect.width+2*X,ba=E.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=
-aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ia=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ia}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[E]));da.container.focus();null!=this.formatWindow&&
-null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=E.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=E.noExitBtn);null!=E.title&&null!=this.buttonContainer&&(q=this.createStatusDiv(""),mxUtils.write(q,E.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{E.libs&&this.sidebar.showEntries(E.libs)}catch(aa){}E=null!=E.xmlpng?this.extractGraphModelFromPng(E.xmlpng):null!=E.descriptor?E.descriptor:E.xml}else{if("merge"==E.action){var ea=this.getCurrentFile();null!=ea&&(q=V(E.xml),null!=q&&""!=q&&ea.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",message:E}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:E,error:aa}),"*")}))}else"remoteInvokeReady"==
-E.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==E.action?this.handleRemoteInvoke(E,D.origin):"remoteInvokeResponse"==E.action?this.handleRemoteInvokeResponse(E):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(E)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){k=!0;
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(t){d||this.handleError(t)}};EditorUi.prototype.installMessageHandler=function(d){var g=null,k=!1,v=!1,t=null,x=mxUtils.bind(this,function(D,G){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,x);mxEvent.addListener(window,"message",mxUtils.bind(this,
+function(D){if(D.source==(window.opener||window.parent)){var G=D.data,R=null,V=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});
+if("json"==urlParams.proto){var Q=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[D],"data",[G])}catch(aa){G=null}try{if(null==G)return;if("dialog"==G.action){this.showError(null!=G.titleKey?mxResources.get(G.titleKey):G.title,null!=G.messageKey?mxResources.get(G.messageKey):mxUtils.htmlEntities(G.message),null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));
+return}if("prompt"==G.action){this.spinner.stop();var O=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(aa){null!=aa?A.postMessage(JSON.stringify({event:"prompt",value:aa,message:G}),"*"):A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title,null,null,null,null,function(){A.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")});this.showDialog(O.container,300,80,!0,!1);
+O.init();return}if("draft"==G.action){var q=V(G.xml);this.spinner.stop();O=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),q,mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"discard",message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?
+mxUtils.bind(this,function(){this.hideDialog();A.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(O.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{O.init()}catch(aa){A.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var y=1==G.enableRecent,B=1==G.enableSearch,C=1==G.enableCustomTemp;O=new NewDialog(this,!1,G.templatesOnly?
+!1:null!=G.callback,mxUtils.bind(this,function(aa,da,ia,pa){aa=aa||this.emptyDiagramXml;null!=G.callback?A.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ia,libs:pa,builtIn:!0,message:G}),"*"):(d(aa,D,aa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,y?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):
+null,B?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ia){A.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ia}),"*")}),null,null,C?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==G.withoutType);this.showDialog(O.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();
+aa&&this.actions.get("exit").funct()}));O.init();return}if("textContent"==G.action){var M=this.getDiagramTextContent();A.postMessage(JSON.stringify({event:"textContent",data:M,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var T=null!=G.messageKey?mxResources.get(G.messageKey):
+G.message;null==G.show||G.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==G.action){O=null;try{var m=this.diagramContainer.getAttribute("data-scrollState");null!=m&&(this.diagramContainer.removeAttribute("data-scrollState"),O=JSON.parse(m))}catch(aa){}Editor.inlineFullscreen=
+G.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=O&&this.restoreScrollState(O);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var z=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,L=mxUtils.bind(this,function(aa,da){if(G.withSvg)G.withSvg=
+!1,this.getEmbeddedSvg(z,this.editor.graph,null,!0,function(pa){L(aa,pa)},null,null,G.embedImages,this.editor.graph.background,G.scale,G.border,G.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ia=this.createLoadMessage("export");ia.format=G.format;ia.message=G;ia.data=aa;ia.svg=da;ia.xml=z;A.postMessage(JSON.stringify(ia),"*")}}),N=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==G.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(z)));
+I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);L(aa)}),P=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=P){var aa=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var da,ia=0;ia<this.pages.length;ia++)if(this.pages[ia].getId()==P){da=this.updatePageRoot(this.pages[ia]);break}null==da&&(da=this.currentPage);
+I.getGlobalVariable=function(xa){return"page"==xa?da.getName():"pagenumber"==xa?1:aa.apply(this,arguments)};document.body.appendChild(I.container);I.model.setRoot(da.root)}if(null!=G.layerIds){var pa=I.model,oa=pa.getChildCells(pa.getRoot()),ha={};for(ia=0;ia<G.layerIds.length;ia++)ha[G.layerIds[ia]]=!0;for(ia=0;ia<oa.length;ia++)pa.setVisible(oa[ia],ha[oa[ia].id]||!1)}ia=null;G.keepTheme&&(ia=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(xa){N(xa.toDataURL("image/png"))}),
+G.width,null,G.background,mxUtils.bind(this,function(){N(null)}),null,null,G.scale,G.transparent,G.shadow,null,I,G.border,null,G.grid,ia)});null!=G.xml&&0<G.xml.length&&(k=!0,this.setFileData(z),k=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(z))).send(mxUtils.bind(this,
+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?L("data:image/png;base64,"+aa.getText()):N(null)}),mxUtils.bind(this,function(){N(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=G.format}else if("html"==G.format)da=this.editor.getGraphXml(),
+aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=G.background?G.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ia=mxUtils.bind(this,function(oa){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(oa);A.postMessage(JSON.stringify(aa),"*")}),pa="auto";G.keepTheme&&
+(pa=Editor.isDarkMode()?"dark":"light");null!=G.theme&&(pa=G.theme);if("xmlsvg"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=G.theme&&(pa=G.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ia,null,null,G.embedImages,da,G.scale,G.border,G.shadow,pa)}}else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?
+mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,pa),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(oa){G.embedImages||null==G.embedImages?this.editor.convertImages(oa,mxUtils.bind(this,function(ha){ia(mxUtils.getXml(ha))})):ia(mxUtils.getXml(oa))}));return}A.postMessage(JSON.stringify(aa),
+"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var U=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){U.apply(this,arguments);S()}}k=!0;this.setFileData(G.xml);k=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==G.action){Q=G.toSketch;v=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);if("1"==urlParams.saveAndExit||
+"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var W=Editor.sketchMode;this.doSetSketchMode(G.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
+G.dark&&this.setDarkMode(G.dark);null!=G.border&&(this.embedExportBorder=G.border);null!=G.theme&&(this.embedExportTheme=G.theme);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,G.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,G.rect.top)+"px";this.minInlineWidth=G.minWidth;this.minInlineHeight=G.minHeight;
+this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=G.maxFitScale,Y=G.rect.width+2*X,ba=G.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=
+aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ia=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ia}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[G]));da.container.focus();null!=this.formatWindow&&
+null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(q=this.createStatusDiv(""),mxUtils.write(q,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(q),this.embedFilenameSpan=q);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(aa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var ea=this.getCurrentFile();null!=ea&&(q=V(G.xml),null!=q&&""!=q&&ea.mergeFile(new LocalFile(this,q),function(){A.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(aa){A.postMessage(JSON.stringify({event:"merge",message:G,error:aa}),"*")}))}else"remoteInvokeReady"==
+G.action?this.handleRemoteInvokeReady(A):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,D.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):A.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){k=!0;
try{d(aa,da,null,Q)}catch(ia){this.handleError(ia)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");t=ca();v&&null==g&&(g=mxUtils.bind(this,function(ia,pa){ia=ca();ia==t||k||(pa=this.createLoadMessage("autosave"),pa.xml=ia,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));t=ia}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",
-g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,A.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=E&&
-"function"===typeof E.substring&&"data:application/vnd.visio;base64,"==E.substring(0,34)?(V="0M8R4KGxGuE"==E.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(aa){fa(aa,D)},mxUtils.bind(this,function(aa){this.handleError(aa)}),V)):null!=E&&"function"===typeof E.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(E,
-mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,D):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=E&&"function"===typeof E.substring&&this.isLucidChartData(E)?this.convertLucidChart(E,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==E||"object"!==typeof E||null==E.format||
-null==E.data&&null==E.url?(E=V(E),fa(E,D)):this.loadDescriptor(E,mxUtils.bind(this,function(aa){fa(ca(),D)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(x,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,E,R){J.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",
-href:D,target:E,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,k,v){var t="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,x=document.createElement("button");x.setAttribute("title",d+(null!=k?" ("+k+")":""));x.style.marginLeft="6px";mxUtils.write(x,d);t?(x.className=v?"gePrimaryBtn":"",x.style.marginLeft="8px",x.style.padding="6px"):x.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(x,"click",g);return x};
-EditorUi.prototype.addEmbedButtons=function(){var d=document.createElement("div");d.style.display="inline-flex";d.style.alignItems="center";d.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(d.style.marginRight="66px",d.style["float"]="right","atlas"==Editor.currentTheme&&(d.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&d.appendChild(this.createEmbedButton("1"==
+g),this.addListener("pageScaleChanged",g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,A.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=G&&
+"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(V="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(aa){fa(aa,D)},mxUtils.bind(this,function(aa){this.handleError(aa)}),V)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
+mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,D):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==G||"object"!==typeof G||null==G.format||
+null==G.data&&null==G.url?(G=V(G),fa(G,D)):this.loadDescriptor(G,mxUtils.bind(this,function(aa){fa(ca(),D)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var A=window.opener||window.parent;x="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";A.postMessage(x,"*");if("json"==urlParams.proto){var J=this.editor.graph.openLink;this.editor.graph.openLink=function(D,G,R){J.apply(this,arguments);A.postMessage(JSON.stringify({event:"openLink",
+href:D,target:G,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(d,g,k,v){var t="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,x=document.createElement("button");x.setAttribute("title",d+(null!=k?" ("+k+")":""));x.style.marginLeft="6px";mxUtils.write(x,d);t?(x.className=v?"gePrimaryBtn":"",x.style.marginLeft="8px",x.style.padding="6px"):x.className="geBigButton"+(v?"":" geBigStandardButton");mxEvent.addListener(x,"click",g);return x};
+EditorUi.prototype.addEmbedButtons=function(){var d=document.createElement("div");d.style.display="inline-flex";d.style.alignItems="center";d.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(d.style.marginRight="66px",d.style.order="1","atlas"==Editor.currentTheme&&(d.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&d.appendChild(this.createEmbedButton("1"==
urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(d.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&d.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));
-"1"!=urlParams.noExitBtn&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d)):(this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(d){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(k){if(0<k.length)try{var v=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(v));this.customLayoutConfig=v;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,v){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var x=v.value;v.value=JSON.stringify(JSON.parse(x));v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-v.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));v.value=x}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),v=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;g.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,v))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),v=[],t=[],x=[],A={};if(0<k.length){var J={},D=this.editor.graph,E=null,R=null,V=null,Q=null,
-P=null,q=null,y=null,B="whiteSpace=wrap;html=1;",C=null,M=null,T="",m="auto",z="auto",I=!1,L=null,N=null,O=40,S=40,U=100,W=0,X=mxUtils.bind(this,function(){null!=g?g(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";M=null;for(var fa=[],aa=null,da=null,ia=0;ia<k.length&&"#"==k[ia].charAt(0);){d=k[ia].replace(/\r$/,
-"");for(ia++;ia<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ia].substring(1)),ia++;if("#"!=d.charAt(1)){var pa=d.indexOf(":");if(0<pa){var oa=mxUtils.trim(d.substring(1,pa)),ha=mxUtils.trim(d.substring(pa+1));"label"==oa?ea=Graph.sanitizeHtml(ha):"labelname"==oa&&0<ha.length&&"-"!=ha?P=ha:"labels"==oa&&0<ha.length&&"-"!=ha?y=JSON.parse(ha):"style"==oa?R=ha:"parentstyle"==oa?B=ha:"unknownStyle"==oa&&"-"!=ha?q=ha:"stylename"==oa&&0<ha.length&&
-"-"!=ha?Q=ha:"styles"==oa&&0<ha.length&&"-"!=ha?V=JSON.parse(ha):"vars"==oa&&0<ha.length&&"-"!=ha?E=JSON.parse(ha):"identity"==oa&&0<ha.length&&"-"!=ha?C=ha:"parent"==oa&&0<ha.length&&"-"!=ha?M=ha:"namespace"==oa&&0<ha.length&&"-"!=ha?T=ha:"width"==oa?m=ha:"height"==oa?z=ha:"collapsed"==oa&&"-"!=ha?I="true"==ha:"left"==oa&&0<ha.length?L=ha:"top"==oa&&0<ha.length?N=ha:"ignore"==oa?da=ha.split(","):"connect"==oa?fa.push(JSON.parse(ha)):"link"==oa?aa=ha:"padding"==oa?W=parseFloat(ha):"edgespacing"==
-oa?O=parseFloat(ha):"nodespacing"==oa?S=parseFloat(ha):"levelspacing"==oa?U=parseFloat(ha):"layout"==oa&&(ca=ha)}}}if(null==k[ia])throw Error(mxResources.get("invalidOrMissingFile"));var xa=this.editor.csvToArray(k[ia].replace(/\r$/,""));pa=d=null;oa=[];for(ha=0;ha<xa.length;ha++)C==xa[ha]&&(d=ha),M==xa[ha]&&(pa=ha),oa.push(mxUtils.trim(xa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+oa[0]+"%");if(null!=fa)for(var qa=0;qa<fa.length;qa++)null==J[fa[qa].to]&&
-(J[fa[qa].to]={});C=[];for(ha=ia+1;ha<k.length;ha++){var ua=this.editor.csvToArray(k[ha].replace(/\r$/,""));if(null==ua){var ya=40<k[ha].length?k[ha].substring(0,40)+"...":k[ha];throw Error(ya+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&C.push(ua)}D.model.beginUpdate();try{for(ha=0;ha<C.length;ha++){ua=C[ha];var ja=null,ma=null!=d?T+ua[d]:null;k=!1;null!=ma&&(ja=D.model.getCell(ma),k=null==ja||0<=mxUtils.indexOf(v,ja));var ka=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||
-"whiteSpace=wrap;html=1;");ka.collapsed=I;ka.vertex=!0;ka.id=ma;null==ja||k||D.model.setCollapsed(ja,I);for(var Ba=0;Ba<ua.length;Ba++)D.setAttributeForCell(ka,oa[Ba],ua[Ba]),null==ja||k||D.setAttributeForCell(ja,oa[Ba],ua[Ba]);if(null!=P&&null!=y){var sa=y[ka.getAttribute(P)];null!=sa&&(D.labelChanged(ka,sa),null==ja||k||D.cellLabelChanged(ja,sa))}if(null!=Q&&null!=V){var Ea=V[ka.getAttribute(Q)];null!=Ea&&(ka.style=Ea)}D.setAttributeForCell(ka,"placeholders","1");ka.style=D.replacePlaceholders(ka,
-ka.style,E);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])):(D.model.setStyle(ja,ka.style),0>mxUtils.indexOf(x,ja)&&x.push(ja),D.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));k=null!=ja;ja=ka;if(!k)for(qa=0;qa<fa.length;qa++)J[fa[qa].to][ja.getAttribute(fa[qa].to)]=ja;null!=aa&&"link"!=aa&&(D.setLinkForCell(ja,ja.getAttribute(aa)),D.setAttributeForCell(ja,aa,null));var wa=this.editor.graph.getPreferredSizeForCell(ja);M=null!=pa?D.model.getCell(T+ua[pa]):null;
-if(ja.vertex){ya=null!=M?0:Y;ia=null!=M?0:ba;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=ya+parseFloat(ja.getAttribute(L)));null!=N&&null!=ja.getAttribute(N)&&(ja.geometry.y=ia+parseFloat(ja.getAttribute(N)));var Ca="@"==m.charAt(0)?ja.getAttribute(m.substring(1)):null;ja.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ja.getAttribute(m.substring(1))):"auto"==m||"auto"==Ca?wa.width+W:parseFloat(m);var Da="@"==z.charAt(0)?ja.getAttribute(z.substring(1)):null;ja.geometry.height=null!=Da&&"auto"!=
-Da&&"width"!=z?parseFloat(Da):"auto"==z||"auto"==Da?wa.height+W:"width"==z?ja.geometry.width:parseFloat(z);Z+=ja.geometry.height+S}k?(null==A[ma]&&(A[ma]=[]),A[ma].push(ja)):(v.push(ja),null!=M?(M.style=D.replacePlaceholders(M,B,E),D.addCell(ja,M),t.push(M)):x.push(D.addCell(ja)))}for(ha=0;ha<t.length;ha++)Ca="@"==m.charAt(0)?t[ha].getAttribute(m.substring(1)):null,Da="@"==z.charAt(0)?t[ha].getAttribute(z.substring(1)):null,"auto"!=m&&"auto"!=Ca||"auto"!=z&&"auto"!=Da||D.updateGroupBounds([t[ha]],
-W,!0);var Ka=x.slice(),Aa=x.slice();for(qa=0;qa<fa.length;qa++){var Fa=fa[qa];for(ha=0;ha<v.length;ha++){ja=v[ha];var Ja=mxUtils.bind(this,function(va,ta,na){var ra=ta.getAttribute(na.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var za=0;za<ra.length;za++){var Ga=J[na.to][ra[za]];if(null==Ga&&null!=q){Ga=new mxCell(ra[za],new mxGeometry(Y,ba,0,0),q);Ga.style=D.replacePlaceholders(ta,Ga.style,E);var Ia=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=Ia.width+W;Ga.geometry.height=
-Ia.height+W;J[na.to][ra[za]]=Ga;Ga.vertex=!0;Ga.id=ra[za];x.push(D.addCell(Ga))}if(null!=Ga){Ia=na.label;null!=na.fromlabel&&(Ia=(ta.getAttribute(na.fromlabel)||"")+(Ia||""));null!=na.sourcelabel&&(Ia=D.replacePlaceholders(ta,na.sourcelabel,E)+(Ia||""));null!=na.tolabel&&(Ia=(Ia||"")+(Ga.getAttribute(na.tolabel)||""));null!=na.targetlabel&&(Ia=(Ia||"")+D.replacePlaceholders(Ga,na.targetlabel,E));var Pa="target"==na.placeholders==!na.invert?Ga:va;Pa=null!=na.style?D.replacePlaceholders(Pa,na.style,
-E):D.createCurrentEdgeStyle();Ia=D.insertEdge(null,null,Ia||"",na.invert?Ga:va,na.invert?va:Ga,Pa);if(null!=na.labels)for(Pa=0;Pa<na.labels.length;Pa++){var La=na.labels[Pa],Na=new mxCell(La.label||Pa,new mxGeometry(null!=La.x?La.x:0,null!=La.y?La.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=La.placeholders&&(Na.value=D.replacePlaceholders("target"==La.placeholders==!na.invert?Ga:va,Na.value,E));if(null!=La.dx||null!=La.dy)Na.geometry.offset=new mxPoint(null!=
-La.dx?La.dx:0,null!=La.dy?La.dy:0);Ia.insert(Na)}if(null!=na.data)for(var Va in na.data)D.setAttributeForCell(Ia,Va,na.data[Va]);Aa.push(Ia);mxUtils.remove(na.invert?va:Ga,Ka)}}}});Ja(ja,ja,Fa);if(null!=A[ja.id])for(Ba=0;Ba<A[ja.id].length;Ba++)Ja(ja,A[ja.id][Ba],Fa)}}if(null!=da)for(ha=0;ha<v.length;ha++)for(ja=v[ha],Ba=0;Ba<da.length;Ba++)D.setAttributeForCell(ja,mxUtils.trim(da[Ba]),null);if(0<x.length){var Ra=new mxParallelEdgeLayout(D);Ra.spacing=O;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&
-Ra.execute(D.getDefaultParent());for(var va=0;va<x.length;va++){var ta=D.getCellGeometry(x[va]);ta.x=Math.round(D.snap(ta.x));ta.y=Math.round(D.snap(ta.y));"auto"==m&&(ta.width=Math.round(D.snap(ta.width)));"auto"==z&&(ta.height=Math.round(D.snap(ta.height)))}};if("["==ca.charAt(0)){var ab=X;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(D);db.disableEdgeStyle=!1;db.resetEdges=!1;var Wa=db.isVertexIgnored;
-db.isVertexIgnored=function(va){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){db.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Aa.length==2*x.length-1&&1==Ka.length){D.view.validate();var Xa=new mxCompactTreeLayout(D,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(D.getDefaultParent(),0<Ka.length?Ka[0]:null)},
-!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){D.view.validate();var Ua=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=O;Ua.interRankCellSpacing=U;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Y,ba)},!0,X);X=null}else if("orgchart"==ca){D.view.validate();var eb=new mxOrgChartLayout(D,2,U,S),jb=eb.isVertexIgnored;
-eb.isVertexIgnored=function(va){return jb.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){eb.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&Aa.length>x.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var la=$a.isVertexIgnored;$a.isVertexIgnored=function(va){return la.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){$a.execute(D.getDefaultParent());
+"1"!=urlParams.noExitBtn&&d.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(d),this.toolbar.staticElements.push(d)):(this.buttonContainer.appendChild(d),this.editor.fireEvent(new mxEventObject("statusChanged")))};
+EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=
+function(d){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var g=new TextareaDialog(this,mxResources.get("layout"),d,mxUtils.bind(this,function(k){if(0<k.length)try{var v=JSON.parse(k);this.executeLayouts(this.editor.graph.createLayouts(v));this.customLayoutConfig=v;this.hideDialog()}catch(t){this.handleError(t)}}),null,null,null,null,mxUtils.bind(this,function(k,v){var t=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var x=v.value;v.value=JSON.stringify(JSON.parse(x));
+v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?v.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));v.value=x}catch(A){this.handleError(A)}}));t.setAttribute("title","copy");t.className="geBtn";k.appendChild(t)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(g.container,620,460,!0,!0);g.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(d){this.createTimeout(null,
+mxUtils.bind(this,function(g){var k=mxUtils.bind(this,function(){this.loadingOrgChart=!1;g.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),d())}),v=mxUtils.bind(this,function(t){this.loadingOrgChart=!1;g.clear()&&this.handleError(t)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?k():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k,null,null,null,v)},null,null,null,v)},null,null,null,v)},null,null,null,v):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",k,null,null,null,v))}),onerror)};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),v=[],t=[],x=[],A={};if(0<k.length){var J=
+{},D=this.editor.graph,G=null,R=null,V=null,Q=null,O=null,q=null,y=null,B="whiteSpace=wrap;html=1;",C=null,M=null,T="",m="auto",z="auto",I=!1,L=null,N=null,P=40,S=40,U=100,W=0,X=mxUtils.bind(this,function(){null!=g?g(Aa):(D.setSelectionCells(Aa),D.scrollCellToVisible(D.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=D.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";M=null;for(var fa=[],aa=null,da=null,
+ia=0;ia<k.length&&"#"==k[ia].charAt(0);){d=k[ia].replace(/\r$/,"");for(ia++;ia<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[ia].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[ia].substring(1)),ia++;if("#"!=d.charAt(1)){var pa=d.indexOf(":");if(0<pa){var oa=mxUtils.trim(d.substring(1,pa)),ha=mxUtils.trim(d.substring(pa+1));"label"==oa?ea=Graph.sanitizeHtml(ha):"labelname"==oa&&0<ha.length&&"-"!=ha?O=ha:"labels"==oa&&0<ha.length&&"-"!=ha?y=JSON.parse(ha):"style"==oa?R=ha:"parentstyle"==oa?B=
+ha:"unknownStyle"==oa&&"-"!=ha?q=ha:"stylename"==oa&&0<ha.length&&"-"!=ha?Q=ha:"styles"==oa&&0<ha.length&&"-"!=ha?V=JSON.parse(ha):"vars"==oa&&0<ha.length&&"-"!=ha?G=JSON.parse(ha):"identity"==oa&&0<ha.length&&"-"!=ha?C=ha:"parent"==oa&&0<ha.length&&"-"!=ha?M=ha:"namespace"==oa&&0<ha.length&&"-"!=ha?T=ha:"width"==oa?m=ha:"height"==oa?z=ha:"collapsed"==oa&&"-"!=ha?I="true"==ha:"left"==oa&&0<ha.length?L=ha:"top"==oa&&0<ha.length?N=ha:"ignore"==oa?da=ha.split(","):"connect"==oa?fa.push(JSON.parse(ha)):
+"link"==oa?aa=ha:"padding"==oa?W=parseFloat(ha):"edgespacing"==oa?P=parseFloat(ha):"nodespacing"==oa?S=parseFloat(ha):"levelspacing"==oa?U=parseFloat(ha):"layout"==oa&&(ca=ha)}}}if(null==k[ia])throw Error(mxResources.get("invalidOrMissingFile"));var xa=this.editor.csvToArray(k[ia].replace(/\r$/,""));pa=d=null;oa=[];for(ha=0;ha<xa.length;ha++)C==xa[ha]&&(d=ha),M==xa[ha]&&(pa=ha),oa.push(mxUtils.trim(xa[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+oa[0]+"%");
+if(null!=fa)for(var qa=0;qa<fa.length;qa++)null==J[fa[qa].to]&&(J[fa[qa].to]={});C=[];for(ha=ia+1;ha<k.length;ha++){var ua=this.editor.csvToArray(k[ha].replace(/\r$/,""));if(null==ua){var ya=40<k[ha].length?k[ha].substring(0,40)+"...":k[ha];throw Error(ya+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<ua.length&&C.push(ua)}D.model.beginUpdate();try{for(ha=0;ha<C.length;ha++){ua=C[ha];var ja=null,ma=null!=d?T+ua[d]:null;k=!1;null!=ma&&(ja=D.model.getCell(ma),k=null==ja||0<=mxUtils.indexOf(v,
+ja));var ka=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ka.collapsed=I;ka.vertex=!0;ka.id=ma;null==ja||k||D.model.setCollapsed(ja,I);for(var Ba=0;Ba<ua.length;Ba++)D.setAttributeForCell(ka,oa[Ba],ua[Ba]),null==ja||k||D.setAttributeForCell(ja,oa[Ba],ua[Ba]);if(null!=O&&null!=y){var sa=y[ka.getAttribute(O)];null!=sa&&(D.labelChanged(ka,sa),null==ja||k||D.cellLabelChanged(ja,sa))}if(null!=Q&&null!=V){var Ea=V[ka.getAttribute(Q)];null!=Ea&&(ka.style=Ea)}D.setAttributeForCell(ka,
+"placeholders","1");ka.style=D.replacePlaceholders(ka,ka.style,G);null==ja||k?D.fireEvent(new mxEventObject("cellsInserted","cells",[ka])):(D.model.setStyle(ja,ka.style),0>mxUtils.indexOf(x,ja)&&x.push(ja),D.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));k=null!=ja;ja=ka;if(!k)for(qa=0;qa<fa.length;qa++)J[fa[qa].to][ja.getAttribute(fa[qa].to)]=ja;null!=aa&&"link"!=aa&&(D.setLinkForCell(ja,ja.getAttribute(aa)),D.setAttributeForCell(ja,aa,null));var wa=this.editor.graph.getPreferredSizeForCell(ja);
+M=null!=pa?D.model.getCell(T+ua[pa]):null;if(ja.vertex){ya=null!=M?0:Y;ia=null!=M?0:ba;null!=L&&null!=ja.getAttribute(L)&&(ja.geometry.x=ya+parseFloat(ja.getAttribute(L)));null!=N&&null!=ja.getAttribute(N)&&(ja.geometry.y=ia+parseFloat(ja.getAttribute(N)));var Ca="@"==m.charAt(0)?ja.getAttribute(m.substring(1)):null;ja.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ja.getAttribute(m.substring(1))):"auto"==m||"auto"==Ca?wa.width+W:parseFloat(m);var Da="@"==z.charAt(0)?ja.getAttribute(z.substring(1)):
+null;ja.geometry.height=null!=Da&&"auto"!=Da&&"width"!=z?parseFloat(Da):"auto"==z||"auto"==Da?wa.height+W:"width"==z?ja.geometry.width:parseFloat(z);Z+=ja.geometry.height+S}k?(null==A[ma]&&(A[ma]=[]),A[ma].push(ja)):(v.push(ja),null!=M?(M.style=D.replacePlaceholders(M,B,G),D.addCell(ja,M),t.push(M)):x.push(D.addCell(ja)))}for(ha=0;ha<t.length;ha++)Ca="@"==m.charAt(0)?t[ha].getAttribute(m.substring(1)):null,Da="@"==z.charAt(0)?t[ha].getAttribute(z.substring(1)):null,"auto"!=m&&"auto"!=Ca||"auto"!=
+z&&"auto"!=Da||D.updateGroupBounds([t[ha]],W,!0);var Ka=x.slice(),Aa=x.slice();for(qa=0;qa<fa.length;qa++){var Fa=fa[qa];for(ha=0;ha<v.length;ha++){ja=v[ha];var Ja=mxUtils.bind(this,function(va,ta,na){var ra=ta.getAttribute(na.from);if(null!=ra&&""!=ra){ra=ra.split(",");for(var za=0;za<ra.length;za++){var Ga=J[na.to][ra[za]];if(null==Ga&&null!=q){Ga=new mxCell(ra[za],new mxGeometry(Y,ba,0,0),q);Ga.style=D.replacePlaceholders(ta,Ga.style,G);var Ia=this.editor.graph.getPreferredSizeForCell(Ga);Ga.geometry.width=
+Ia.width+W;Ga.geometry.height=Ia.height+W;J[na.to][ra[za]]=Ga;Ga.vertex=!0;Ga.id=ra[za];x.push(D.addCell(Ga))}if(null!=Ga){Ia=na.label;null!=na.fromlabel&&(Ia=(ta.getAttribute(na.fromlabel)||"")+(Ia||""));null!=na.sourcelabel&&(Ia=D.replacePlaceholders(ta,na.sourcelabel,G)+(Ia||""));null!=na.tolabel&&(Ia=(Ia||"")+(Ga.getAttribute(na.tolabel)||""));null!=na.targetlabel&&(Ia=(Ia||"")+D.replacePlaceholders(Ga,na.targetlabel,G));var Pa="target"==na.placeholders==!na.invert?Ga:va;Pa=null!=na.style?D.replacePlaceholders(Pa,
+na.style,G):D.createCurrentEdgeStyle();Ia=D.insertEdge(null,null,Ia||"",na.invert?Ga:va,na.invert?va:Ga,Pa);if(null!=na.labels)for(Pa=0;Pa<na.labels.length;Pa++){var La=na.labels[Pa],Na=new mxCell(La.label||Pa,new mxGeometry(null!=La.x?La.x:0,null!=La.y?La.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=La.placeholders&&(Na.value=D.replacePlaceholders("target"==La.placeholders==!na.invert?Ga:va,Na.value,G));if(null!=La.dx||null!=La.dy)Na.geometry.offset=
+new mxPoint(null!=La.dx?La.dx:0,null!=La.dy?La.dy:0);Ia.insert(Na)}if(null!=na.data)for(var Va in na.data)D.setAttributeForCell(Ia,Va,na.data[Va]);Aa.push(Ia);mxUtils.remove(na.invert?va:Ga,Ka)}}}});Ja(ja,ja,Fa);if(null!=A[ja.id])for(Ba=0;Ba<A[ja.id].length;Ba++)Ja(ja,A[ja.id][Ba],Fa)}}if(null!=da)for(ha=0;ha<v.length;ha++)for(ja=v[ha],Ba=0;Ba<da.length;Ba++)D.setAttributeForCell(ja,mxUtils.trim(da[Ba]),null);if(0<x.length){var Ra=new mxParallelEdgeLayout(D);Ra.spacing=P;Ra.checkOverlap=!0;var Sa=
+function(){0<Ra.spacing&&Ra.execute(D.getDefaultParent());for(var va=0;va<x.length;va++){var ta=D.getCellGeometry(x[va]);ta.x=Math.round(D.snap(ta.x));ta.y=Math.round(D.snap(ta.y));"auto"==m&&(ta.width=Math.round(D.snap(ta.width)));"auto"==z&&(ta.height=Math.round(D.snap(ta.height)))}};if("["==ca.charAt(0)){var ab=X;D.view.validate();this.executeLayouts(D.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(D);db.disableEdgeStyle=!1;db.resetEdges=
+!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(va){return Wa.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){db.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&Aa.length==2*x.length-1&&1==Ka.length){D.view.validate();var Xa=new mxCompactTreeLayout(D,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(D.getDefaultParent(),
+0<Ka.length?Ka[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==Ka.length){D.view.validate();var Ua=new mxHierarchicalLayout(D,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=P;Ua.interRankCellSpacing=U;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(D.getDefaultParent(),Aa);D.moveCells(Aa,Y,ba)},!0,X);X=null}else if("orgchart"==ca){D.view.validate();var eb=new mxOrgChartLayout(D,
+2,U,S),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(va){return jb.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){eb.execute(D.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&Aa.length>x.length){D.view.validate();var $a=new mxFastOrganicLayout(D);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var la=$a.isVertexIgnored;$a.isVertexIgnored=function(va){return la.apply(this,arguments)||0>mxUtils.indexOf(x,va)};this.executeLayout(function(){$a.execute(D.getDefaultParent());
Sa()},!0,X);X=null}}this.hideDialog()}finally{D.model.endUpdate()}null!=X&&X()}}catch(va){this.handleError(va)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",v;for(v in urlParams)0>mxUtils.indexOf(d,v)&&null!=urlParams[v]&&(g+=k+v+"="+urlParams[v],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;
if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),v;for(v in urlParams)0>mxUtils.indexOf(k,v)&&(d=0==g?d+"?":d+"&",null!=urlParams[v]&&(d+=v+"="+urlParams[v],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,v,t){d=new LinkDialog(this,d,g,k,!0,v,t);this.showDialog(d.container,440,120,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&
"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);
this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));
d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("smartFit").setEnabled(g);this.actions.get("resetView").setEnabled(g);this.actions.get("darkMode").setEnabled("atlas"!=Editor.currentTheme);this.actions.get("lightMode").setEnabled("atlas"!=Editor.currentTheme);k=this.actions.get("autoMode");k.setEnabled(k.isEnabled()&&"atlas"!=Editor.currentTheme);
this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};
-EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var F=EditorUi.prototype.updateActionStates;
-EditorUi.prototype.updateActionStates=function(){F.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),v=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(d.isEnabled());
+EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};EditorUi.prototype.restoreOpenLibraries=function(){var d=this.openLibraries;this.openLibraries=null;if(null!=d)for(var g=0;g<d.length;g++)this.libraryLoaded(d[g].file,d[g].images,d[g].title,null!=d[g].div?"none"!=d[g].div.style.display:d[g].expand)};var E=EditorUi.prototype.updateActionStates;
+EditorUi.prototype.updateActionStates=function(){E.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),v=this.isDiagramActive(),t="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=g&&g.isEditable();this.actions.get("undo").setEnabled(this.canUndo()&&t);this.actions.get("redo").setEnabled(this.canRedo()&&t);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(v);this.actions.get("editData").setEnabled(d.isEnabled());
this.actions.get("editConnectionPoints").setEnabled(v&&0==k.edges.length&&1==k.vertices.length);this.actions.get("editImage").setEnabled(v&&k.image&&0<k.cells.length);this.actions.get("crop").setEnabled(v&&k.image&&0<k.cells.length);this.actions.get("pageSetup").setEnabled(v);this.actions.get("shadowVisible").setEnabled(v);this.actions.get("connectionArrows").setEnabled(v);this.actions.get("connectionPoints").setEnabled(v);this.actions.get("copyStyle").setEnabled(v&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=
this.copiedStyle&&v&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(v);this.actions.get("createRevision").setEnabled(v);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(v&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("removeFormat").setEnabled(d.isEnabled()&&
!d.isSelectionEmpty()&&!d.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.actions.get("properties").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=
g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"");d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(v&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var K=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,v,t,x,A,J){var D=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(D.getSvg(v,t,x)),"image/svg+xml");else{var E=d.getFileData(!0,null,null,null,null,!0),R=D.getGraphBounds(),V=Math.floor(R.width*t/D.view.scale),Q=Math.floor(R.height*
-t/D.view.scale);if(E.length<=MAX_REQUEST_SIZE&&V*Q<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var P={globalVars:D.getExportVariables()};J&&(P.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(g,k,function(q,y){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(y||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(P))+(0<A?"&dpi="+A:"")+"&bg="+(null!=v?v:"none")+"&w="+V+"&h="+
-Q+"&border="+x+"&xml="+encodeURIComponent(E))})}else"png"==k?d.exportImage(t,null==v||"none"==v,!0,!1,!1,x,!0,!1,null,J,A):d.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var v=d;this.currentPage!=this.pages[k]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),
+null);K.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,g,k,v,t,x,A,J){var D=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(D.getSvg(v,t,x)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),R=D.getGraphBounds(),V=Math.floor(R.width*t/D.view.scale),Q=Math.floor(R.height*
+t/D.view.scale);if(G.length<=MAX_REQUEST_SIZE&&V*Q<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var O={globalVars:D.getExportVariables()};J&&(O.grid={size:D.gridSize,steps:D.view.gridSteps,color:D.view.gridColor});d.saveRequest(g,k,function(q,y){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(y||"0")+(null!=q?"&filename="+encodeURIComponent(q):"")+"&extras="+encodeURIComponent(JSON.stringify(O))+(0<A?"&dpi="+A:"")+"&bg="+(null!=v?v:"none")+"&w="+V+"&h="+
+Q+"&border="+x+"&xml="+encodeURIComponent(G))})}else"png"==k?d.exportImage(t,null==v||"none"==v,!0,!1,!1,x,!0,!1,null,J,A):d.exportImage(t,!1,!0,!1,!1,x,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var v=d;this.currentPage!=this.pages[k]&&(v=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),
v.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+v.getIndexableText()+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxUtils.htmlEntities(d));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(v);var t=document.createElement("div");t.style.cssText=
-"border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var J=A[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));x[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(E){}this.remoteInvoke("getCustomLibraries",null,null,function(E){t.innerText="";if(0==E.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+
-mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<E.length;R++){var V=E[R];x[V.id]&&(g[V.id]=V);var Q=this.addCheckbox(t,V.title,x[V.id]);(function(P,q){mxEvent.addListener(q,"change",function(){this.checked?g[P.id]=P:delete g[P.id]})})(V,Q)}},mxUtils.bind(this,function(E){t.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=E&&null!=E.message?E.message:
-mxResources.get("unknownError"));t.appendChild(R)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var E=0,R;for(R in g)null==x[R]&&(E++,mxUtils.bind(this,function(V){this.remoteInvoke("getFileContent",[V.downloadUrl],null,mxUtils.bind(this,function(Q){E--;0==E&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Q,V)),this.showSidebar()}catch(P){this.handleError(P,mxResources.get("errorLoadingFile"))}}),
-mxUtils.bind(this,function(){E--;0==E&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[R]));for(R in x)g[R]||this.closeLibrary(new RemoteLibrary(this,null,x[R]));0==E&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
+"border:1px solid lightGray;overflow: auto;height:300px";t.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var x={};try{var A=mxSettings.getCustomLibraries();for(d=0;d<A.length;d++){var J=A[d];if("R"==J.substring(0,1)){var D=JSON.parse(decodeURIComponent(J.substring(1)));x[D[0]]={id:D[0],title:D[1],downloadUrl:D[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){t.innerText="";if(0==G.length)t.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+
+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<G.length;R++){var V=G[R];x[V.id]&&(g[V.id]=V);var Q=this.addCheckbox(t,V.title,x[V.id]);(function(O,q){mxEvent.addListener(q,"change",function(){this.checked?g[O.id]=O:delete g[O.id]})})(V,Q)}},mxUtils.bind(this,function(G){t.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=G&&null!=G.message?G.message:
+mxResources.get("unknownError"));t.appendChild(R)}));k.appendChild(t);k=new CustomDialog(this,k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,R;for(R in g)null==x[R]&&(G++,mxUtils.bind(this,function(V){this.remoteInvoke("getFileContent",[V.downloadUrl],null,mxUtils.bind(this,function(Q){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,Q,V)),this.showSidebar()}catch(O){this.handleError(O,mxResources.get("errorLoadingFile"))}}),
+mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[R]));for(R in x)g[R]||this.closeLibrary(new RemoteLibrary(this,null,x[R]));0==G&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(k.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var g=0;g<this.remoteInvokeQueue.length;g++)d.postMessage(this.remoteInvokeQueue[g],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var g=d.msgMarkers,k=this.remoteInvokeCallbacks[g.callbackId];
if(null==k)throw Error("No callback for "+(null!=g?g.callbackId:"null"));d.error?k.error&&k.error(d.error.errResp):k.callback&&k.callback.apply(this,d.resp);this.remoteInvokeCallbacks[g.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,g,k,v,t){var x=!0,A=window.setTimeout(mxUtils.bind(this,function(){x=!1;t({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),J=mxUtils.bind(this,function(){window.clearTimeout(A);x&&v.apply(this,arguments)}),D=mxUtils.bind(this,
-function(){window.clearTimeout(A);x&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(E,R){var V={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=R?
-V.error={errResp:R}:null!=E&&(V.resp=E);this.remoteWin.postMessage(JSON.stringify(V),"*")});try{var v=d.funtionName,t=this.remoteInvokableFns[v];if(null!=t&&"function"===typeof this[v]){if(t.allowedDomains){for(var x=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){x=!0;break}if(!x){k(null,"Invalid Call: "+v+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(t.isAsync)J.push(function(){k(Array.prototype.slice.apply(arguments))}),J.push(function(E){k(null,
-E||"Unkown Error")}),this[v].apply(this,J);else{var D=this[v].apply(this,J);k([D])}}else k(null,"Invalid Call: "+v+" is not found.")}catch(E){k(null,"Invalid Call: An error occurred, "+E.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var v=k.open("database",2);v.onupgradeneeded=function(t){try{var x=v.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&
+function(){window.clearTimeout(A);x&&t.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:J,error:D});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:g,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,g){var k=mxUtils.bind(this,function(G,R){var V={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=R?
+V.error={errResp:R}:null!=G&&(V.resp=G);this.remoteWin.postMessage(JSON.stringify(V),"*")});try{var v=d.funtionName,t=this.remoteInvokableFns[v];if(null!=t&&"function"===typeof this[v]){if(t.allowedDomains){for(var x=!1,A=0;A<t.allowedDomains.length;A++)if(g=="https://"+t.allowedDomains[A]){x=!0;break}if(!x){k(null,"Invalid Call: "+v+" is not allowed.");return}}var J=d.functionArgs;Array.isArray(J)||(J=[]);if(t.isAsync)J.push(function(){k(Array.prototype.slice.apply(arguments))}),J.push(function(G){k(null,
+G||"Unkown Error")}),this[v].apply(this,J);else{var D=this[v].apply(this,J);k([D])}}else k(null,"Invalid Call: "+v+" is not found.")}catch(G){k(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,g){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var v=k.open("database",2);v.onupgradeneeded=function(t){try{var x=v.result;1>t.oldVersion&&x.createObjectStore("objects",{keyPath:"key"});2>t.oldVersion&&
(x.createObjectStore("files",{keyPath:"title"}),x.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(A){null!=g&&g(A)}};v.onsuccess=mxUtils.bind(this,function(t){try{var x=v.result;this.database=x;EditorUi.migrateStorageFiles&&(StorageFile.migrate(x),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(A){if(!A||
-"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,E=!1,R,V=0,Q=mxUtils.bind(this,function(){E=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),P=mxUtils.bind(this,function(){V++;q()}),q=mxUtils.bind(this,function(){try{if(V>=
-R.length)Q();else{var B=R[V];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(C){null==C||".scratchpad"==B&&C==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):P()}),P)}}catch(C){console.log(C)}}),y=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],P,P,["filesInfo","files"])}catch(C){console.log(C)}});
-A=mxUtils.bind(this,function(B){try{if(B.source==J.contentWindow){var C={};try{C=JSON.parse(B.data)}catch(M){}"init"==C.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||E||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(R=C.resp[0],D=!1,q()):Q():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?y(C.resp[0]):P())}}catch(M){console.log(M)}});
+"1"==urlParams.forceMigration){var J=document.createElement("iframe");J.style.display="none";J.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(J);var D=!0,G=!1,R,V=0,Q=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),O=mxUtils.bind(this,function(){V++;q()}),q=mxUtils.bind(this,function(){try{if(V>=
+R.length)Q();else{var B=R[V];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(C){null==C||".scratchpad"==B&&C==this.emptyLibraryXml?J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):O()}),O)}}catch(C){console.log(C)}}),y=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],O,O,["filesInfo","files"])}catch(C){console.log(C)}});
+A=mxUtils.bind(this,function(B){try{if(B.source==J.contentWindow){var C={};try{C=JSON.parse(B.data)}catch(M){}"init"==C.event?(J.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),J.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=C.event||G||(D?null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?(R=C.resp[0],D=!1,q()):Q():null!=C.resp&&0<C.resp.length&&null!=C.resp[0]?y(C.resp[0]):O())}}catch(M){console.log(M)}});
window.addEventListener("message",A)}})));d(x);x.onversionchange=function(){x.close()}}catch(A){null!=g?g(A):null!=window.console&&console.warn(A)}});v.onerror=g;v.onblocked=function(){}}catch(t){null!=g?g(t):null!=window.console&&console.error(t)}else null!=g&&g(Error("IndexedDB not supported"))}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,g,k,v,t){this.openDatabase(mxUtils.bind(this,function(x){try{t=t||"objects";Array.isArray(t)||(t=[t],d=[d],g=[g]);var A=x.transaction(t,
"readwrite");A.oncomplete=k;A.onerror=v;for(x=0;x<t.length;x++)A.objectStore(t[x]).put(null!=d&&null!=d[x]?{key:d[x],data:g[x]}:g[x])}catch(J){null!=v&&v(J)}}),v)};EditorUi.prototype.removeDatabaseItem=function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";Array.isArray(v)||(v=[v],d=[d]);var x=t.transaction(v,"readwrite");x.oncomplete=g;x.onerror=k;for(t=0;t<v.length;t++)x.objectStore(v[t]).delete(d[t])}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItem=
function(d,g,k,v){this.openDatabase(mxUtils.bind(this,function(t){try{v=v||"objects";var x=t.transaction([v],"readonly").objectStore(v).get(d);x.onsuccess=function(){g(x.result)};x.onerror=k}catch(A){null!=k&&k(A)}}),k)};EditorUi.prototype.getDatabaseItems=function(d,g,k){this.openDatabase(mxUtils.bind(this,function(v){try{k=k||"objects";var t=v.transaction([k],"readonly").objectStore(k).openCursor(IDBKeyRange.lowerBound(0)),x=[];t.onsuccess=function(A){null==A.target.result?d(x):(x.push(A.target.result.value),
@@ -13534,55 +13538,55 @@ this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prot
d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,g){var k=this.getCurrentFile();return null!=k?k.newComment(d,g):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,g)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,g){var k=this.getCurrentFile();null!=
k&&k.getRevisions?k.getRevisions(d,g):g({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,g,k,v,t,x,A,J){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
return this.editor.loadUrl(d,g,k,v,t,x,A,J)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,g)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,v,t,x,A,J,D,E,R,V,Q,P,q,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,g,k,v,t,x,A,J,D,G,R,V,Q,O,q,y)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(d,g,k,v)};EditorUi.prototype.convertImageToDataUri=function(d,g){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,g)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,g,k,v){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,v)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,v,t){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,v,t)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),v=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<v.length){var t=
"<mxfile "===v.substring(0,8)||"<?xml"===v.substring(0,5)||"\x3c!--[if IE]>"===v.substring(0,12);v="<mxlibrary>"===v.substring(0,11);(t||v)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
var CommentsWindow=function(b,e,f,c,l,n){function p(){for(var q=A.getElementsByTagName("div"),y=0,B=0;B<q.length;B++)"none"!=q[B].style.display&&q[B].parentNode==A&&y++;J.style.display=0==y?"block":"none"}function u(q,y,B,C){function M(){y.removeChild(z);y.removeChild(I);m.style.display="block";T.style.display="block"}v={div:y,comment:q,saveCallback:B,deleteOnCancel:C};var T=y.querySelector(".geCommentTxt"),m=y.querySelector(".geCommentActionsList"),z=document.createElement("textarea");z.className=
"geCommentEditTxtArea";z.style.minHeight=T.offsetHeight+"px";z.value=q.content;y.insertBefore(z,T);var I=document.createElement("div");I.className="geCommentEditBtns";var L=mxUtils.button(mxResources.get("cancel"),function(){C?(y.parentNode.removeChild(y),p()):M();v=null});L.className="geCommentEditBtn";I.appendChild(L);var N=mxUtils.button(mxResources.get("save"),function(){T.innerText="";q.content=z.value;mxUtils.write(T,q.content);M();B(q);v=null});mxEvent.addListener(z,"keydown",mxUtils.bind(this,
-function(O){mxEvent.isConsumed(O)||((mxEvent.isControlDown(O)||mxClient.IS_MAC&&mxEvent.isMetaDown(O))&&13==O.keyCode?(N.click(),mxEvent.consume(O)):27==O.keyCode&&(L.click(),mxEvent.consume(O)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";I.appendChild(N);y.insertBefore(I,T);m.style.display="none";T.style.display="none";z.focus()}function G(q,y){y.innerText="";q=new Date(q.modifiedDate);var B=b.timeSince(q);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",
-[B],"{1} ago"));y.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function H(q){var y=document.createElement("img");y.className="geCommentBusyImg";y.src=IMAGE_PATH+"/spin.gif";q.appendChild(y);q.busyImg=y}function F(q){q.style.border="1px solid red";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function K(q){q.style.border="";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function d(q,y,B,C,M){function T(U,W,X){var Z=document.createElement("li");Z.className="geCommentAction";
+function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(N.click(),mxEvent.consume(P)):27==P.keyCode&&(L.click(),mxEvent.consume(P)))}));N.focus();N.className="geCommentEditBtn gePrimaryBtn";I.appendChild(N);y.insertBefore(I,T);m.style.display="none";T.style.display="none";z.focus()}function F(q,y){y.innerText="";q=new Date(q.modifiedDate);var B=b.timeSince(q);null==B&&(B=mxResources.get("lessThanAMinute"));mxUtils.write(y,mxResources.get("timeAgo",
+[B],"{1} ago"));y.setAttribute("title",q.toLocaleDateString()+" "+q.toLocaleTimeString())}function H(q){var y=document.createElement("img");y.className="geCommentBusyImg";y.src=IMAGE_PATH+"/spin.gif";q.appendChild(y);q.busyImg=y}function E(q){q.style.border="1px solid red";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function K(q){q.style.border="";q.busyImg.parentNode==q&&q.removeChild(q.busyImg)}function d(q,y,B,C,M){function T(U,W,X){var Z=document.createElement("li");Z.className="geCommentAction";
var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,U);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,q);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function m(){function U(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,U(Z.replies[Y])}var W=[],X=I;U(q);return{pdiv:X,replies:W}}function z(U,W,X,Z,Y){function ba(){H(aa);q.addReply(fa,function(da){fa.id=da;q.replies.push(fa);
-K(aa);X&&X()},function(da){ea();F(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){u(fa,aa,function(da){ba()},!0)}var ca=m().pdiv,fa=b.newComment(U,b.getCurrentUser());fa.pCommentId=q.id;null==q.replies&&(q.replies=[]);var aa=d(fa,q.replies,ca,C+1);W?ea():ba()}if(M||!q.isResolved){J.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",q.id);I.style.marginLeft=20*C+5+
-"px";q.isResolved&&(t.style.opacity="0.7");var L=document.createElement("div");L.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;L.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";L.appendChild(N);var O=document.createElement("div");O.className="geCommentUsername";mxUtils.write(O,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));
-N.appendChild(O);O=document.createElement("div");O.className="geCommentDate";O.setAttribute("data-commentId",q.id);G(q,O);N.appendChild(O);I.appendChild(L);L=document.createElement("div");L.className="geCommentTxt";mxUtils.write(L,q.content||"");I.appendChild(L);q.isLocked&&(I.style.opacity="0.5");L=document.createElement("div");L.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";L.appendChild(S);g||q.isLocked||0!=C&&!k||T(mxResources.get("reply"),
-function(){z("",!0)},q.isResolved);N=b.getCurrentUser();null==N||null==q.user||N.id!=q.user.id||g||q.isLocked||(T(mxResources.get("edit"),function(){function U(){u(q,I,function(){H(I);q.editComment(q.content,function(){K(I)},function(W){F(I);U();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},q.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(I);q.deleteComment(function(U){if(!0===U){U=I.querySelector(".geCommentTxt");
-U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var W=I.querySelectorAll(".geCommentAction");for(U=0;U<W.length;U++)W[U].parentNode.removeChild(W[U]);K(I);I.style.opacity="0.5"}else{W=m(q).replies;for(U=0;U<W.length;U++)A.removeChild(W[U]);for(U=0;U<y.length;U++)if(y[U]==q){y.splice(U,1);break}J.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(U){F(I);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));
+K(aa);X&&X()},function(da){ea();E(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){u(fa,aa,function(da){ba()},!0)}var ca=m().pdiv,fa=b.newComment(U,b.getCurrentUser());fa.pCommentId=q.id;null==q.replies&&(q.replies=[]);var aa=d(fa,q.replies,ca,C+1);W?ea():ba()}if(M||!q.isResolved){J.style.display="none";var I=document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",q.id);I.style.marginLeft=20*C+5+
+"px";q.isResolved&&(t.style.opacity="0.7");var L=document.createElement("div");L.className="geCommentHeader";var N=document.createElement("img");N.className="geCommentUserImg";N.src=null!=q.user&&null!=q.user.pictureUrl?q.user.pictureUrl:Editor.userImage;L.appendChild(N);N=document.createElement("div");N.className="geCommentHeaderTxt";L.appendChild(N);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,null!=q.user?q.user.displayName:mxResources.get("unknownUser"));
+N.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",q.id);F(q,P);N.appendChild(P);I.appendChild(L);L=document.createElement("div");L.className="geCommentTxt";mxUtils.write(L,q.content||"");I.appendChild(L);q.isLocked&&(I.style.opacity="0.5");L=document.createElement("div");L.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";L.appendChild(S);g||q.isLocked||0!=C&&!k||T(mxResources.get("reply"),
+function(){z("",!0)},q.isResolved);N=b.getCurrentUser();null==N||null==q.user||N.id!=q.user.id||g||q.isLocked||(T(mxResources.get("edit"),function(){function U(){u(q,I,function(){H(I);q.editComment(q.content,function(){K(I)},function(W){E(I);U();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}U()},q.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){H(I);q.deleteComment(function(U){if(!0===U){U=I.querySelector(".geCommentTxt");
+U.innerText="";mxUtils.write(U,mxResources.get("msgDeleted"));var W=I.querySelectorAll(".geCommentAction");for(U=0;U<W.length;U++)W[U].parentNode.removeChild(W[U]);K(I);I.style.opacity="0.5"}else{W=m(q).replies;for(U=0;U<W.length;U++)A.removeChild(W[U]);for(U=0;U<y.length;U++)if(y[U]==q){y.splice(U,1);break}J.style.display=0==A.getElementsByTagName("div").length?"block":"none"}},function(U){E(I);b.handleError(U,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},q.isResolved));
g||q.isLocked||0!=C||T(q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(U){function W(){var X=U.target;X.innerText="";q.isResolved=!q.isResolved;mxUtils.write(X,q.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=q.isResolved?"none":"",Y=m(q).replies,ba="light-dark("+(q.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=
X.parentNode&&(ca[fa].style.display=Z);V||(Y[ea].style.display="none")}p()}q.isResolved?z(mxResources.get("reOpened")+": ",!0,W,!1,!0):z(mxResources.get("markedAsResolved"),!1,W,!0)});I.appendChild(L);null!=B?A.insertBefore(I,B.nextSibling):A.appendChild(I);for(B=0;null!=q.replies&&B<q.replies.length;B++)L=q.replies[B],L.isResolved=q.isResolved,d(L,q.replies,null,C+1,M);null!=v&&(v.comment.id==q.id?(M=q.content,q.content=v.comment.content,u(q,I,v.saveCallback,v.deleteOnCancel),q.content=M):null==
v.comment.id&&v.comment.pCommentId==q.id&&(A.appendChild(v.div),u(v.comment,v.div,v.saveCallback,v.deleteOnCancel)));return I}}var g=!b.canComment(),k=b.canReplyToReplies(),v=null,t=document.createElement("div");t.className="geCommentsWin";t.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var x=EditorUi.compactUi?"26px":"30px",A=document.createElement("div");A.className="geCommentsList";A.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";A.style.bottom=parseInt(x)+
7+"px";t.appendChild(A);var J=document.createElement("span");J.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(J,mxResources.get("noCommentsFound"));var D=document.createElement("div");D.className="geToolbarContainer geCommentsToolbar";D.style.height=x;D.style.padding="3px 4px 4px 4px";x=document.createElement("a");x.className="geToolbarButton geAdaptiveAsset geToggleItem";x.style.width="16px";x.style.height="18px";x.style.backgroundPosition="center center";x.style.backgroundRepeat=
-"no-repeat";x.style.backgroundSize="20px";x.style.margin="0 2px";x.style.display="inline-block";x.style.cursor="pointer";if(!g){var E=x.cloneNode();E.style.backgroundImage="url("+Editor.plusImage+")";E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(q){function y(){u(B,C,function(M){H(C);b.addComment(M,function(T){M.id=T;Q.push(M);K(C)},function(T){F(C);y();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var B=
-b.newComment("",b.getCurrentUser()),C=d(B,Q,null,0);y();q.preventDefault();mxEvent.consume(q)});D.appendChild(E)}var R=x.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var V=!1;mxEvent.addListener(R,"click",function(q){(V=!V)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");P();q.preventDefault();mxEvent.consume(q)});D.appendChild(R);b.commentsRefreshNeeded()&&(E=x.cloneNode(),
-E.style.backgroundImage="url("+Editor.refreshImage+")",E.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(E,"click",function(q){P();q.preventDefault();mxEvent.consume(q)}),D.appendChild(E));b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geButton geAdaptiveAsset",mxEvent.addListener(x,"click",function(q){n();q.preventDefault();mxEvent.consume(q)}),
-D.appendChild(x));t.appendChild(D);var Q=[],P=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var q=v.div.querySelector(".geCommentEditTxtArea"),y=v.div.querySelector(".geCommentEditBtns");v.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(B){b.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"no-repeat";x.style.backgroundSize="20px";x.style.margin="0 2px";x.style.display="inline-block";x.style.cursor="pointer";if(!g){var G=x.cloneNode();G.style.backgroundImage="url("+Editor.plusImage+")";G.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(G,"click",function(q){function y(){u(B,C,function(M){H(C);b.addComment(M,function(T){M.id=T;Q.push(M);K(C)},function(T){E(C);y();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var B=
+b.newComment("",b.getCurrentUser()),C=d(B,Q,null,0);y();q.preventDefault();mxEvent.consume(q)});D.appendChild(G)}var R=x.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var V=!1;mxEvent.addListener(R,"click",function(q){(V=!V)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");O();q.preventDefault();mxEvent.consume(q)});D.appendChild(R);b.commentsRefreshNeeded()&&(G=x.cloneNode(),
+G.style.backgroundImage="url("+Editor.refreshImage+")",G.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(G,"click",function(q){O();q.preventDefault();mxEvent.consume(q)}),D.appendChild(G));b.commentsSaveNeeded()&&(x=x.cloneNode(),x.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',x.setAttribute("title",mxResources.get("save")),x.className="geButton geAdaptiveAsset",mxEvent.addListener(x,"click",function(q){n();q.preventDefault();mxEvent.consume(q)}),
+D.appendChild(x));t.appendChild(D);var Q=[],O=mxUtils.bind(this,function(){this.hasError=!1;if(null!=v)try{v.div=v.div.cloneNode(!0);var q=v.div.querySelector(".geCommentEditTxtArea"),y=v.div.querySelector(".geCommentEditBtns");v.comment.content=q.value;q.parentNode.removeChild(q);y.parentNode.removeChild(y)}catch(B){b.handleError(B)}A.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
"...</div>";k=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(B){function C(M){if(null!=M){M.sort(function(m,z){return new Date(m.modifiedDate)-new Date(z.modifiedDate)});for(var T=0;T<M.length;T++)C(M[T].replies)}}B.sort(function(M,T){return new Date(M.modifiedDate)-new Date(T.modifiedDate)});A.innerText="";A.appendChild(J);J.style.display="block";Q=B;for(B=0;B<Q.length;B++)C(Q[B].replies),d(Q[B],Q,null,0,V);null!=v&&null==v.comment.id&&null==v.comment.pCommentId&&(A.appendChild(v.div),
-u(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(B){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});P();this.refreshComments=P;D=mxUtils.bind(this,function(){function q(T){var m=B[T.id];if(null!=m)for(G(T,m),m=0;null!=T.replies&&m<T.replies.length;m++)q(T.replies[m])}if(this.window.isVisible()){for(var y=A.querySelectorAll(".geCommentDate"),B=
+u(v.comment,v.div,v.saveCallback,v.deleteOnCancel))},mxUtils.bind(this,function(B){A.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(B&&B.message?": "+B.message:""));this.hasError=!0})):A.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});O();this.refreshComments=O;D=mxUtils.bind(this,function(){function q(T){var m=B[T.id];if(null!=m)for(F(T,m),m=0;null!=T.replies&&m<T.replies.length;m++)q(T.replies[m])}if(this.window.isVisible()){for(var y=A.querySelectorAll(".geCommentDate"),B=
{},C=0;C<y.length;C++){var M=y[C];B[M.getAttribute("data-commentId")]=M}for(C=0;C<Q.length;C++)q(Q[C])}});setInterval(D,6E4);this.refreshCommentsTime=D;this.window=new mxWindow(mxResources.get("comments"),t,e,f,c,l,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,n,p,u,G,H,F){var K=document.createElement("div");K.style.textAlign="center";F=null!=F?F:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=F+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);K.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),K.appendChild(d));H=document.createElement("div");
+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,f,c,l,n,p,u,F,H,E){var K=document.createElement("div");K.style.textAlign="center";E=null!=E?E:44;var d=document.createElement("div");d.style.padding="6px";d.style.overflow="auto";d.style.maxHeight=E+"px";d.style.lineHeight="1.2em";mxUtils.write(d,e);K.appendChild(d);null!=H&&(d=document.createElement("div"),d.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",H),d.appendChild(e),K.appendChild(d));H=document.createElement("div");
H.style.textAlign="center";H.style.whiteSpace="nowrap";var g=document.createElement("input");g.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(g.checked)});n.className="geBtn";null!=u&&(n.innerHTML=u+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&H.appendChild(n);var k=mxUtils.button(l||mxResources.get("ok"),function(){b.hideDialog();null!=f&&
-f(g.checked)});H.appendChild(k);null!=p?(k.innerHTML=p+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(n);K.appendChild(H);G?(H.style.marginTop="10px",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),
+f(g.checked)});H.appendChild(k);null!=p?(k.innerHTML=p+"<br>"+k.innerHTML+"<br>",k.style.paddingBottom="8px",k.style.paddingTop="8px",k.style.height="auto",k.className="geBtn",k.style.width="40%"):k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||H.appendChild(n);K.appendChild(H);F?(H.style.marginTop="10px",d=document.createElement("p"),d.style.marginTop="20px",d.style.marginBottom="0px",d.appendChild(g),l=document.createElement("span"),mxUtils.write(l," "+mxResources.get("rememberThisSetting")),
d.appendChild(l),K.appendChild(d),mxEvent.addListener(l,"click",function(v){g.checked=!g.checked;mxEvent.consume(v)})):H.style.marginTop="12px";this.init=function(){k.focus()};this.container=K},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};
HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,e,f,c,l){if(null!=e)for(var n=0;n<e.length;n++)null!=e[n]&&(b=this.patchPages(b,e[n],f,c,l));return b};
-EditorUi.prototype.patchPages=function(b,e,f,c,l){var n={},p=[],u={},G={},H={},F={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var K in c[EditorUi.DIFF_UPDATE])n[K]=c[EditorUi.DIFF_UPDATE][K];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)G[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)u[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(K in e[EditorUi.DIFF_UPDATE])c=
-e[EditorUi.DIFF_UPDATE][K],null!=c.previous&&(F[c.previous]=K);if(null!=b){var d="";for(c=0;c<b.length;c++){var g=b[c].getId();H[g]=b[c];null!=F[d]||G[g]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][g]&&null!=e[EditorUi.DIFF_UPDATE][g].previous||(F[d]=g);d=g}}var k={},v=mxUtils.bind(this,function(x){var A=null!=x?x.getId():"";if(null!=x&&!k[A]){k[A]=!0;p.push(x);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][A]:null;null!=J&&(this.updatePageRoot(x),null!=J.name&&x.setName(J.name),
-null!=J.view&&this.patchViewState(x,J.view),null!=J.cells&&this.patchPage(x,J.cells,n[x.getId()],l),!f||null==J.cells&&null==J.view||(x.needsUpdate=!0))}x=F[A];null!=x&&(delete F[A],v(H[x]));x=u[A];null!=x&&(delete u[A],t(x))}),t=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var A=H[x.getId()];null==A?v(x):(this.patchPage(A,this.diffPages([A],[x]),n[A.getId()],l),f&&(A.needsUpdate=!0))});v();for(K in F)v(H[F[K]]),delete F[K];for(K in u)t(u[K]),
+EditorUi.prototype.patchPages=function(b,e,f,c,l){var n={},p=[],u={},F={},H={},E={};if(null!=c&&null!=c[EditorUi.DIFF_UPDATE])for(var K in c[EditorUi.DIFF_UPDATE])n[K]=c[EditorUi.DIFF_UPDATE][K];if(null!=e[EditorUi.DIFF_REMOVE])for(c=0;c<e[EditorUi.DIFF_REMOVE].length;c++)F[e[EditorUi.DIFF_REMOVE][c]]=!0;if(null!=e[EditorUi.DIFF_INSERT])for(c=0;c<e[EditorUi.DIFF_INSERT].length;c++)u[e[EditorUi.DIFF_INSERT][c].previous]=e[EditorUi.DIFF_INSERT][c];if(null!=e[EditorUi.DIFF_UPDATE])for(K in e[EditorUi.DIFF_UPDATE])c=
+e[EditorUi.DIFF_UPDATE][K],null!=c.previous&&(E[c.previous]=K);if(null!=b){var d="";for(c=0;c<b.length;c++){var g=b[c].getId();H[g]=b[c];null!=E[d]||F[g]||null!=e[EditorUi.DIFF_UPDATE]&&null!=e[EditorUi.DIFF_UPDATE][g]&&null!=e[EditorUi.DIFF_UPDATE][g].previous||(E[d]=g);d=g}}var k={},v=mxUtils.bind(this,function(x){var A=null!=x?x.getId():"";if(null!=x&&!k[A]){k[A]=!0;p.push(x);var J=null!=e[EditorUi.DIFF_UPDATE]?e[EditorUi.DIFF_UPDATE][A]:null;null!=J&&(this.updatePageRoot(x),null!=J.name&&x.setName(J.name),
+null!=J.view&&this.patchViewState(x,J.view),null!=J.cells&&this.patchPage(x,J.cells,n[x.getId()],l),!f||null==J.cells&&null==J.view||(x.needsUpdate=!0))}x=E[A];null!=x&&(delete E[A],v(H[x]));x=u[A];null!=x&&(delete u[A],t(x))}),t=mxUtils.bind(this,function(x){x=mxUtils.parseXml(x.data).documentElement;x=new DiagramPage(x);this.updatePageRoot(x);var A=H[x.getId()];null==A?v(x):(this.patchPage(A,this.diffPages([A],[x]),n[A.getId()],l),f&&(A.needsUpdate=!0))});v();for(K in E)v(H[E[K]]),delete E[K];for(K in u)t(u[K]),
delete u[K];return p};EditorUi.prototype.patchViewState=function(b,e){if(null!=b.viewState&&null!=e){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var f in e)try{this.patchViewStateProperty(b,e,f)}catch(c){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,e,f){b.viewState[f]=JSON.parse(e[f])};
-EditorUi.prototype.createParentLookup=function(b,e){function f(H){var F=c[H];null==F&&(F={inserted:[],moved:{}},c[H]=F);return F}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var n=e[EditorUi.DIFF_INSERT][l],p=null!=n.parent?n.parent:"",u=null!=n.previous?n.previous:"";f(p).inserted[u]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var G in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][G],null!=n.previous&&(p=n.parent,null==p&&(l=b.getCell(G),null!=l&&(l=
-b.getParent(l),null!=l&&(p=l.getId()))),null!=p&&(f(p).moved[n.previous]=G));return c};
-EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(l,e);l.beginUpdate();try{var p=l.updateEdgeParent,u=new mxDictionary,G=[];l.updateEdgeParent=function(t,x){!u.get(t)&&c&&(u.put(t,!0),G.push(t))};var H=n[""],F=null!=H&&null!=H.inserted?H.inserted[""]:null,K=null;null!=F&&(K=this.getCellForJson(F));if(null==K){var d=null!=H&&null!=H.moved?H.moved[""]:null;null!=d&&(K=l.getCell(d))}null!=K&&(l.setRoot(K),
+EditorUi.prototype.createParentLookup=function(b,e){function f(H){var E=c[H];null==E&&(E={inserted:[],moved:{}},c[H]=E);return E}var c={};if(null!=e[EditorUi.DIFF_INSERT])for(var l=0;l<e[EditorUi.DIFF_INSERT].length;l++){var n=e[EditorUi.DIFF_INSERT][l],p=null!=n.parent?n.parent:"",u=null!=n.previous?n.previous:"";f(p).inserted[u]=n}if(null!=e[EditorUi.DIFF_UPDATE])for(var F in e[EditorUi.DIFF_UPDATE])n=e[EditorUi.DIFF_UPDATE][F],null!=n.previous&&(p=n.parent,null==p&&(l=b.getCell(F),null!=l&&(l=
+b.getParent(l),null!=l&&(p=l.getId()))),null!=p&&(f(p).moved[n.previous]=F));return c};
+EditorUi.prototype.patchPage=function(b,e,f,c){var l=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),n=this.createParentLookup(l,e);l.beginUpdate();try{var p=l.updateEdgeParent,u=new mxDictionary,F=[];l.updateEdgeParent=function(t,x){!u.get(t)&&c&&(u.put(t,!0),F.push(t))};var H=n[""],E=null!=H&&null!=H.inserted?H.inserted[""]:null,K=null;null!=E&&(K=this.getCellForJson(E));if(null==K){var d=null!=H&&null!=H.moved?H.moved[""]:null;null!=d&&(K=l.getCell(d))}null!=K&&(l.setRoot(K),
b.root=K,EditorUi.debug("EditorUi.patchPage: Root changed",K.id));this.patchCellRecursive(b,l,l.root,n,e);if(null!=e[EditorUi.DIFF_REMOVE])for(var g=0;g<e[EditorUi.DIFF_REMOVE].length;g++){d=e[EditorUi.DIFF_REMOVE][g];var k=l.getCell(d);null!=k&&l.remove(k)}if(null!=e[EditorUi.DIFF_UPDATE]){var v=null!=f&&null!=f.cells?f.cells[EditorUi.DIFF_UPDATE]:null;for(d in e[EditorUi.DIFF_UPDATE])k=l.getCell(d),null!=k?this.patchCell(l,k,e[EditorUi.DIFF_UPDATE][d],null!=v?v[d]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
-d,"diff",[e[EditorUi.DIFF_UPDATE][d]])}if(null!=e[EditorUi.DIFF_INSERT])for(g=0;g<e[EditorUi.DIFF_INSERT].length;g++)F=e[EditorUi.DIFF_INSERT][g],k=l.getCell(F.id),null!=k&&(l.setTerminal(k,l.getCell(F.source),!0),l.setTerminal(k,l.getCell(F.target),!1));l.updateEdgeParent=p;if(c&&0<G.length)for(g=0;g<G.length;g++)l.contains(G[g])&&l.updateEdgeParent(G[g])}finally{l.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var n=c[f.getId()],p=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var u=0,G=e.getChildCount(f),H="",F=0;F<G;F++){var K=e.getChildAt(f,F).getId();null==n[H]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][K]||null==l[EditorUi.DIFF_UPDATE][K].previous&&null==l[EditorUi.DIFF_UPDATE][K].parent)&&(n[H]=K);H=K}G=mxUtils.bind(this,function(d,g){var k=null!=d?d.getId():"";null==k&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",d);null!=d&&g&&(g=e.getCell(k),null!=g&&g!=d&&(d=null));null!=d&&(e.getChildAt(f,u)!=d&&e.add(f,d,u),this.patchCellRecursive(b,e,d,c,l),u++);return k});for(H=[null];0<H.length;)if(F=H.shift(),F=G(null!=F?F.child:null,null!=F?F.insert:!1),K=n[F],null!=K&&(delete n[F],H.push({child:e.getCell(K)})),K=p[F],null!=K&&(delete p[F],H.push({child:this.getCellForJson(K),insert:!0})),0==H.length){for(F in n)H.push({child:e.getCell(n[F])}),delete n[F];for(F in p)H.push({child:this.getCellForJson(p[F]),
-insert:!0}),delete p[F]}}};
+d,"diff",[e[EditorUi.DIFF_UPDATE][d]])}if(null!=e[EditorUi.DIFF_INSERT])for(g=0;g<e[EditorUi.DIFF_INSERT].length;g++)E=e[EditorUi.DIFF_INSERT][g],k=l.getCell(E.id),null!=k&&(l.setTerminal(k,l.getCell(E.source),!0),l.setTerminal(k,l.getCell(E.target),!1));l.updateEdgeParent=p;if(c&&0<F.length)for(g=0;g<F.length;g++)l.contains(F[g])&&l.updateEdgeParent(F[g])}finally{l.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,e,f,c,l){if(null!=f){var n=c[f.getId()],p=null!=n&&null!=n.inserted?n.inserted:{};n=null!=n&&null!=n.moved?n.moved:{};for(var u=0,F=e.getChildCount(f),H="",E=0;E<F;E++){var K=e.getChildAt(f,E).getId();null==n[H]&&(null==l[EditorUi.DIFF_UPDATE]||null==l[EditorUi.DIFF_UPDATE][K]||null==l[EditorUi.DIFF_UPDATE][K].previous&&null==l[EditorUi.DIFF_UPDATE][K].parent)&&(n[H]=K);H=K}F=mxUtils.bind(this,function(d,g){var k=null!=d?d.getId():"";null==k&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",d);null!=d&&g&&(g=e.getCell(k),null!=g&&g!=d&&(d=null));null!=d&&(e.getChildAt(f,u)!=d&&e.add(f,d,u),this.patchCellRecursive(b,e,d,c,l),u++);return k});for(H=[null];0<H.length;)if(E=H.shift(),E=F(null!=E?E.child:null,null!=E?E.insert:!1),K=n[E],null!=K&&(delete n[E],H.push({child:e.getCell(K)})),K=p[E],null!=K&&(delete p[E],H.push({child:this.getCellForJson(K),insert:!0})),0==H.length){for(E in n)H.push({child:e.getCell(n[E])}),delete n[E];for(E in p)H.push({child:this.getCellForJson(p[E]),
+insert:!0}),delete p[E]}}};
EditorUi.prototype.patchCell=function(b,e,f,c){if(null!=e&&null!=f){if(null==c||null==c.xmlValue&&(null==c.value||""==c.value))"value"in f?b.setValue(e,f.value):null!=f.xmlValue&&b.setValue(e,mxUtils.parseXml(f.xmlValue).documentElement);null!=c&&null!=c.style||null==f.style||b.setStyle(e,f.style);null!=f.visible&&b.setVisible(e,1==f.visible);null!=f.collapsed&&b.setCollapsed(e,1==f.collapsed);null!=f.vertex&&(e.vertex=1==f.vertex);null!=f.edge&&(e.edge=1==f.edge);null!=f.connectable&&(e.connectable=
1==f.connectable);null!=f.geometry&&b.setGeometry(e,this.codec.decode(mxUtils.parseXml(f.geometry).documentElement));null!=f.source&&b.setTerminal(e,b.getCell(f.source),!0);null!=f.target&&b.setTerminal(e,b.getCell(f.target),!1);for(var l in f)this.cellProperties[l]||(e[l]=f[l])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var e=null;null!=b&&(e=mxUtils.getXml(b));return e};
EditorUi.prototype.getNodeForPages=function(b){var e=null;if(null!=this.fileNode&&null!=b){e=this.fileNode.cloneNode(!1);for(var f=0;f<b.length;f++){var c=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[f].root));this.editor.graph.saveViewState(b[f].viewState,c);var l=b[f].node.cloneNode(!1);l.appendChild(c);e.appendChild(l)}}return e};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
EditorUi.prototype.getPagesForNode=function(b,e){var f=this.editor.extractGraphModel(b,!0,!0);null!=f&&(b=f);e=b.getElementsByTagName(e||"diagram");f=[];if(0<e.length)for(b=0;b<e.length;b++){var c=new DiagramPage(e[b]);this.updatePageRoot(c,!0);f.push(c)}else"mxGraphModel"==b.nodeName&&(c=new DiagramPage(b.ownerDocument.createElement("diagram")),c.setName(mxResources.get("pageWithNumber",[1])),c.node.appendChild(b.cloneNode(!0)),f.push(c));return f};
-EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},n={},p={},u=null;if(null!=b&&null!=e){for(var G=0;G<e.length;G++)n[e[G].getId()]={page:e[G],prev:u},u=e[G];u=null;for(G=0;G<b.length;G++){var H=b[G].getId();e=n[H];if(null==e)c.push(H);else{this.updatePageRoot(b[G]);this.updatePageRoot(e.page);var F=this.diffCells(b[G].root,e.page.root),K={};mxUtils.isEmptyObject(F)||(K.cells=F);F=this.diffViewState(b[G],e.page);mxUtils.isEmptyObject(F)||(K.view=F);if((null!=e.prev?null==u:null!=u)||null!=
-u&&null!=e.prev&&u.getId()!=e.prev.getId())K.previous=null!=e.prev?e.prev.getId():"";null!=e.page.getName()&&b[G].getName()!=e.page.getName()&&(K.name=e.page.getName());mxUtils.isEmptyObject(K)||(p[H]=K)}delete n[b[G].getId()];u=b[G]}for(H in n)e=n[H],f.push({id:e.page.getId(),data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(p)||(l[EditorUi.DIFF_UPDATE]=p);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};
+EditorUi.prototype.diffPages=function(b,e){var f=[],c=[],l={},n={},p={},u=null;if(null!=b&&null!=e){for(var F=0;F<e.length;F++)n[e[F].getId()]={page:e[F],prev:u},u=e[F];u=null;for(F=0;F<b.length;F++){var H=b[F].getId();e=n[H];if(null==e)c.push(H);else{this.updatePageRoot(b[F]);this.updatePageRoot(e.page);var E=this.diffCells(b[F].root,e.page.root),K={};mxUtils.isEmptyObject(E)||(K.cells=E);E=this.diffViewState(b[F],e.page);mxUtils.isEmptyObject(E)||(K.view=E);if((null!=e.prev?null==u:null!=u)||null!=
+u&&null!=e.prev&&u.getId()!=e.prev.getId())K.previous=null!=e.prev?e.prev.getId():"";null!=e.page.getName()&&b[F].getName()!=e.page.getName()&&(K.name=e.page.getName());mxUtils.isEmptyObject(K)||(p[H]=K)}delete n[b[F].getId()];u=b[F]}for(H in n)e=n[H],f.push({id:e.page.getId(),data:mxUtils.getXml(e.page.node),previous:null!=e.prev?e.prev.getId():""});mxUtils.isEmptyObject(p)||(l[EditorUi.DIFF_UPDATE]=p);0<c.length&&(l[EditorUi.DIFF_REMOVE]=c);0<f.length&&(l[EditorUi.DIFF_INSERT]=f)}return l};
EditorUi.prototype.createCellLookup=function(b,e,f){f=null!=f?f:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):f[b.getId()]={cell:b,prev:e};var c=b.getChildCount();e=null;for(var l=0;l<c;l++){var n=b.getChildAt(l);this.createCellLookup(n,e,f);e=n}return f};
EditorUi.prototype.diffCellRecursive=function(b,e,f,c,l){c=null!=c?c:{};var n=f[b.getId()];delete f[b.getId()];if(null==n)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):l.push(b.getId());else{var p=this.diffCell(b,n.cell);if(null!=p.parent||(null!=n.prev?null==e:null!=e)||null!=e&&null!=n.prev&&e.getId()!=n.prev.getId())p.previous=null!=n.prev?n.prev.getId():"";mxUtils.isEmptyObject(p)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
b,"diff",p):c[b.getId()]=p)}n=b.getChildCount();e=null;for(p=0;p<n;p++){var u=b.getChildAt(p);this.diffCellRecursive(u,e,f,c,l);e=u}return c};
@@ -13666,8 +13670,8 @@ DrawioFileSync.prototype.patchRealtime=function(b,e,f,c){var l=null;if(this.file
"all",l,"local",n,"applied",p,"immediate",c)}return l};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),e=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,e,!0);this.snapshot=b;var f=this.ui.resolveCrossReferences(e,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.isRealtimeActive()&&this.doSendLocalChanges([f,e])}this.localFileWasChanged=
!1}catch(c){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,c)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,e,f,c,l,n,p){try{this.file.stats.merged++;this.lastModified=new Date;var u=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var G=this.ui.clonePages(this.file.getShadowPages()),H=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(G,this.ui.pages):null,F=this.file.isRealtime()?this.ui.diffPages(G,this.file.ownPages):null;G=this.ui.applyPatches(G,b);var K=null==e?null:this.ui.getHashValueForPages(G);
-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",H,"pending",F,"checksum",e,"current",K,"valid",e==K,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",u,"etag",this.file.getDescriptorEtag(f),"immediate",p);if(null!=e&&e!=K){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=l&&l()}),n,null,p);return}this.file.setShadowPages(G);null==this.patchRealtime(b,null,F,p)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
+DrawioFileSync.prototype.merge=function(b,e,f,c,l,n,p){try{this.file.stats.merged++;this.lastModified=new Date;var u=this.file.getDescriptorRevisionId(f);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var F=this.ui.clonePages(this.file.getShadowPages()),H=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(F,this.ui.pages):null,E=this.file.isRealtime()?this.ui.diffPages(F,this.file.ownPages):null;F=this.ui.applyPatches(F,b);var K=null==e?null:this.ui.getHashValueForPages(F);
+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",H,"pending",E,"checksum",e,"current",K,"valid",e==K,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",u,"etag",this.file.getDescriptorEtag(f),"immediate",p);if(null!=e&&e!=K){this.reload(mxUtils.bind(this,function(){null!=c&&c()}),mxUtils.bind(this,function(){null!=l&&l()}),n,null,p);return}this.file.setShadowPages(F);null==this.patchRealtime(b,null,E,p)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
H:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),f);null!=c&&c(!0)}catch(k){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=l&&l(k);try{var d=this.file.getCurrentUser(),g=null!=d?d.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),g,k)}catch(v){}}};
DrawioFileSync.prototype.fileChanged=function(b,e,f,c,l){var n=window.setTimeout(mxUtils.bind(this,function(){null!=f&&f()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",c,"immediate",l,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(p){null!=f&&f()||(this.isValidState()?this.catchup(p,b,e,f,l):null!=e&&e())}),e)):null!=e&&e())}),c?this.cacheReadyDelay:0);return this.notifyThread=
n};
@@ -13676,19 +13680,19 @@ this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fast
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,e,f,c,l){if(null!=b&&(null==c||!c())){var n=this.file.getCurrentRevisionId(),p=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",n,"to",p,"immediate",l,"valid",this.isValidState());if(n==p)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=e&&e(!0);else if(this.isValidState()){var u=this.file.getDescriptorChecksum(b),G=this.file.getDescriptorSecret(b);if(null!=u&&u==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=e&&e(!0);else if(Editor.enableRealtimeCache&&null!=G&&"1"!=urlParams.lockdown){var H=0,F=!1,K=mxUtils.bind(this,function(){if(null==c||!c())if(n!=this.file.getCurrentRevisionId())null!=e&&
-e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;this.reload(e,f,c,null,l)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(n)+"&to="+encodeURIComponent(p)+(null!=G?"&secret="+encodeURIComponent(G):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(g);if(d&&(null==c||!c()))if(n!=this.file.getCurrentRevisionId())null!=
-e&&e(!0);else if(this.isValidState()){var v=null,t=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[k],"status",k.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var x=JSON.parse(k.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var J=this.stringToObject(x[A]);if(J.v>DrawioFileSync.PROTOCOL){F=!0;t=[];break}else if(J.v===DrawioFileSync.PROTOCOL&&null!=J.d)v=J.d.checksum,
-t.push(J.d.patch);else{F=!0;t=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[x],"status",F?"failed":"ok","temp",t,"checksum",v)}catch(D){t=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,v,b,e,f,c,l)):H<=this.maxCacheReadyRetries-1&&!F&&401!=k.getStatus()&&503!=k.getStatus()&&410!=k.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(K,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=e&&e(!0);else if(this.isValidState()){var u=this.file.getDescriptorChecksum(b),F=this.file.getDescriptorSecret(b);if(null!=u&&u==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=e&&e(!0);else if(Editor.enableRealtimeCache&&null!=F&&"1"!=urlParams.lockdown){var H=0,E=!1,K=mxUtils.bind(this,function(){if(null==c||!c())if(n!=this.file.getCurrentRevisionId())null!=e&&
+e(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;this.reload(e,f,c,null,l)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(n)+"&to="+encodeURIComponent(p)+(null!=F?"&secret="+encodeURIComponent(F):""),mxUtils.bind(this,function(k){this.file.stats.bytesReceived+=k.getText().length;window.clearTimeout(g);if(d&&(null==c||!c()))if(n!=this.file.getCurrentRevisionId())null!=
+e&&e(!0);else if(this.isValidState()){var v=null,t=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[k],"status",k.getStatus(),"cacheReadyRetryCount",H,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=k.getStatus()&&299>=k.getStatus()&&0<k.getText().length)try{var x=JSON.parse(k.getText());if(null!=x&&0<x.length)for(var A=0;A<x.length;A++){var J=this.stringToObject(x[A]);if(J.v>DrawioFileSync.PROTOCOL){E=!0;t=[];break}else if(J.v===DrawioFileSync.PROTOCOL&&null!=J.d)v=J.d.checksum,
+t.push(J.d.patch);else{E=!0;t=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[x],"status",E?"failed":"ok","temp",t,"checksum",v)}catch(D){t=[],null!=window.console&&"1"==urlParams.test&&console.log(D)}try{0<t.length?(this.file.stats.cacheHits++,this.merge(t,v,b,e,f,c,l)):H<=this.maxCacheReadyRetries-1&&!E&&401!=k.getStatus()&&503!=k.getStatus()&&410!=k.getStatus()?(H++,this.file.stats.cacheMiss++,window.setTimeout(K,(H+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
this.reload(e,f,c,null,l))}catch(D){null!=f&&f(D)}}else null!=f&&f()}),f)}else null!=f&&f()});window.setTimeout(K,this.cacheReadyDelay)}else this.reload(e,f,c,null,l)}else null!=f&&f()}};DrawioFileSync.prototype.reload=function(b,e,f,c,l){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",l);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(n){null!=e&&e(n)}),f,c,l)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var e=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),f=this.file.getCurrentRevisionId(),c=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(f)+"&msg="+encodeURIComponent(e)+"&data="+encodeURIComponent(c));this.file.stats.bytesSent+=c.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",f)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,e,f){var c=!0,l=window.setTimeout(mxUtils.bind(this,function(){c=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(n){window.clearTimeout(l);c&&(200<=n.getStatus()&&299>=n.getStatus()?e(n.getText()):f({code:n.getStatus(),message:"Token Error "+n.getStatus()}))}),f)};
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l,n){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var p=this.file.getDescriptorSecret(this.file.getDescriptor()),u=this.createMessage({m:this.lastModified.getTime()}),G=this.file.getDescriptorRevisionId(e),H=this.file.getCurrentRevisionId();if(null!=p&&null!=l&&
-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var F=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);n=null!=n?n:this.ui.getHashValueForPages(b);var K=this.objectToString(this.createMessage({patch:F,checksum:n}));this.file.stats.bytesSent+=K.length;this.file.stats.msgSent++;var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(G)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(u)))+(null!=p?"&secret="+encodeURIComponent(p):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(K.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(K):"")+(null!=l?"&token="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&(200<=k.getStatus()&&299>=k.getStatus()?(Editor.p2pSyncNotify&&this.notify(u),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")+
-(0!=k.getStatus()?": "+k.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",H,"etag",this.file.getCurrentEtag(),"diff",F,K.length,"bytes","checksum",n)}else this.notify(u),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",G,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+DrawioFileSync.prototype.fileSaved=function(b,e,f,c,l,n){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var p=this.file.getDescriptorSecret(this.file.getDescriptor()),u=this.createMessage({m:this.lastModified.getTime()}),F=this.file.getDescriptorRevisionId(e),H=this.file.getCurrentRevisionId();if(null!=p&&null!=l&&
+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var E=this.ui.diffPages(this.file.getShadowPages(),b);e=this.file.getDescriptorSecret(e);n=null!=n?n:this.ui.getHashValueForPages(b);var K=this.objectToString(this.createMessage({patch:E,checksum:n}));this.file.stats.bytesSent+=K.length;this.file.stats.msgSent++;var d=!0,g=window.setTimeout(mxUtils.bind(this,function(){d=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
+"&from="+encodeURIComponent(F)+"&to="+encodeURIComponent(H)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(u)))+(null!=p?"&secret="+encodeURIComponent(p):"")+(null!=e?"&last-secret="+encodeURIComponent(e):"")+(K.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(K):"")+(null!=l?"&token="+encodeURIComponent(l):""),mxUtils.bind(this,function(k){window.clearTimeout(g);d&&(200<=k.getStatus()&&299>=k.getStatus()?(Editor.p2pSyncNotify&&this.notify(u),null!=f&&f()):c({message:mxResources.get("realtimeCollaboration")+
+(0!=k.getStatus()?": "+k.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",H,"etag",this.file.getCurrentEtag(),"diff",E,K.length,"bytes","msg",u,"checksum",n)}else this.notify(u),null!=f&&f(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",F,"to",H,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,e,f){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,e,f):this.fileChanged(e,f)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=f&&f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
@@ -13701,12 +13705,12 @@ mxAsyncCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.wai
mxAsyncCanvas.prototype.setAlpha=function(b){this.state.alpha=b};mxAsyncCanvas.prototype.setFontColor=function(b){this.state.fontColor=b};mxAsyncCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxAsyncCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxAsyncCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
mxAsyncCanvas.prototype.setFontFamily=function(b){this.state.fontFamily=b};mxAsyncCanvas.prototype.setFontStyle=function(b){this.state.fontStyle=b};mxAsyncCanvas.prototype.rect=function(b,e,f,c){};mxAsyncCanvas.prototype.roundrect=function(b,e,f,c,l,n){};mxAsyncCanvas.prototype.ellipse=function(b,e,f,c){};mxAsyncCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
mxAsyncCanvas.prototype.image=function(b,e,f,c,l,n,p,u){l=this.rewriteImageSource(l);b=this.htmlCanvas.images[l];null==b&&(b=new Image,b.onload=mxUtils.bind(this,function(){this.decWaitCounter()}),b.onerror=mxUtils.bind(this,function(){this.decWaitCounter()}),this.incWaitCounter(),this.htmlCanvas.images[l]=b,b.src=l)};mxAsyncCanvas.prototype.fill=function(){};mxAsyncCanvas.prototype.stroke=function(){};mxAsyncCanvas.prototype.fillAndStroke=function(){};
-mxAsyncCanvas.prototype.text=function(b,e,f,c,l,n,p,u,G,H,F,K){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==G&&"function"===typeof html2canvas)){this.incWaitCounter();var d=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[d]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
+mxAsyncCanvas.prototype.text=function(b,e,f,c,l,n,p,u,F,H,E,K){if(null!=l&&0!=l.length&&(b=this.state.scale,"html"==F&&"function"===typeof html2canvas)){this.incWaitCounter();var d=this.canvasIndex++;html2canvas(l,{onrendered:mxUtils.bind(this,function(g){this.htmlCanvas.subCanvas[d]=g;this.decWaitCounter()}),scale:b,logging:!0})}};mxAsyncCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};function mxJsCanvas(b){mxAbstractCanvas2D.call(this);this.ctx=b.getContext("2d");this.ctx.textBaseline="top";this.ctx.fillStyle="rgba(255,255,255,0)";this.ctx.strokeStyle="rgba(0, 0, 0, 0)";this.M_RAD_PER_DEG=Math.PI/180;this.images=null==this.images?[]:this.images;this.subCanvas=null==this.subCanvas?[]:this.subCanvas}mxUtils.extend(mxJsCanvas,mxAbstractCanvas2D);mxJsCanvas.prototype.ctx=null;mxJsCanvas.prototype.waitCounter=0;mxJsCanvas.prototype.onComplete=null;mxJsCanvas.prototype.images=null;
mxJsCanvas.prototype.subCanvas=null;mxJsCanvas.prototype.canvasIndex=0;mxJsCanvas.prototype.hexToRgb=function(b){b=b.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,f,c,l){return f+f+c+c+l+l});return(b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(b))?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null};mxJsCanvas.prototype.incWaitCounter=function(){this.waitCounter++};
mxJsCanvas.prototype.decWaitCounter=function(){this.waitCounter--;0==this.waitCounter&&null!=this.onComplete&&(this.onComplete(),this.onComplete=null)};mxJsCanvas.prototype.updateFont=function(){var b="";(this.state.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(b+="bold ");(this.state.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(b+="italic ");this.ctx.font=b+this.state.fontSize+"px "+this.state.fontFamily};
mxJsCanvas.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state);this.ctx.save()};mxJsCanvas.prototype.restore=function(){this.state=this.states.pop();this.ctx.restore()};mxJsCanvas.prototype.scale=function(b){this.state.scale*=b;this.state.strokeWidth*=b;this.ctx.scale(b,b)};mxJsCanvas.prototype.translate=function(b,e){this.state.dx+=b;this.state.dy+=e;this.ctx.translate(b,e)};
mxJsCanvas.prototype.rotate=function(b,e,f,c,l){c-=this.state.dx;l-=this.state.dy;this.ctx.translate(c,l);(e||f)&&this.ctx.scale(e?-1:1,f?-1:1);this.ctx.rotate(b*this.M_RAD_PER_DEG);this.ctx.translate(-c,-l)};mxJsCanvas.prototype.setAlpha=function(b){this.state.alpha=b;this.ctx.globalAlpha=b};mxJsCanvas.prototype.setFillColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fillColor=b;this.state.gradientColor=null;this.ctx.fillStyle=b};
-mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,n,p,u,G){f=this.ctx.createLinearGradient(0,c,0,c+n);c=this.state;c.fillColor=b;c.fillAlpha=null!=u?u:1;c.gradientColor=e;c.gradientAlpha=null!=G?G:1;c.gradientDirection=p;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};
+mxJsCanvas.prototype.setGradient=function(b,e,f,c,l,n,p,u,F){f=this.ctx.createLinearGradient(0,c,0,c+n);c=this.state;c.fillColor=b;c.fillAlpha=null!=u?u:1;c.gradientColor=e;c.gradientAlpha=null!=F?F:1;c.gradientDirection=p;b=this.hexToRgb(b);e=this.hexToRgb(e);null!=b&&f.addColorStop(0,"rgba("+b.r+","+b.g+","+b.b+","+c.fillAlpha+")");null!=e&&f.addColorStop(1,"rgba("+e.r+","+e.g+","+e.b+","+c.gradientAlpha+")");this.ctx.fillStyle=f};
mxJsCanvas.prototype.setStrokeColor=function(b){null!=b&&(b==mxConstants.NONE?(this.state.strokeColor=null,this.ctx.strokeStyle="rgba(0, 0, 0, 0)"):(this.ctx.strokeStyle=b,this.state.strokeColor=b))};mxJsCanvas.prototype.setStrokeWidth=function(b){this.ctx.lineWidth=b};mxJsCanvas.prototype.setDashed=function(b){if(this.state.dashed=b){b=this.state.dashPattern.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.setLineDash(b)}else this.setLineDash([0])};
mxJsCanvas.prototype.setLineDash=function(b){try{"function"===typeof this.ctx.setLineDash&&this.ctx.setLineDash(b)}catch(e){}};mxJsCanvas.prototype.setDashPattern=function(b){this.state.dashPattern=b;if(this.state.dashed){b=b.split(" ");for(var e=0;e<b.length;e++)b[e]=parseInt(b[e],10);this.ctx.setLineDash(b)}};mxJsCanvas.prototype.setLineCap=function(b){this.ctx.lineCap=b};mxJsCanvas.prototype.setLineJoin=function(b){this.ctx.lineJoin=b};
mxJsCanvas.prototype.setMiterLimit=function(b){this.ctx.lineJoin=b};mxJsCanvas.prototype.setFontColor=function(b){this.ctx.fillStyle=b};mxJsCanvas.prototype.setFontBackgroundColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBackgroundColor=b};mxJsCanvas.prototype.setFontBorderColor=function(b){b==mxConstants.NONE&&(b=null);this.state.fontBorderColor=b};mxJsCanvas.prototype.setFontSize=function(b){this.state.fontSize=b};
@@ -13716,13 +13720,13 @@ mxJsCanvas.prototype.setShadowOffset=function(b,e){this.state.shadowDx=b;this.st
mxJsCanvas.prototype.arcTo=function(b,e,f,c,l,n,p){b=mxUtils.arcToCurves(this.lastMoveX,this.lastMoveY,b,e,f,c,l,n,p);if(null!=b)for(e=0;e<b.length;e+=6)this.curveTo(b[e],b[e+1],b[e+2],b[e+3],b[e+4],b[e+5])};mxJsCanvas.prototype.curveTo=function(b,e,f,c,l,n){this.ctx.bezierCurveTo(b,e,f,c,l,n);this.lastMoveX=l;this.lastMoveY=n};mxJsCanvas.prototype.rect=function(b,e,f,c){this.begin();this.moveTo(b,e);this.lineTo(b+f,e);this.lineTo(b+f,e+c);this.lineTo(b,e+c);this.close()};
mxJsCanvas.prototype.roundrect=function(b,e,f,c,l,n){this.begin();this.moveTo(b+l,e);this.lineTo(b+f-l,e);this.quadTo(b+f,e,b+f,e+n);this.lineTo(b+f,e+c-n);this.quadTo(b+f,e+c,b+f-l,e+c);this.lineTo(b+l,e+c);this.quadTo(b,e+c,b,e+c-n);this.lineTo(b,e+n);this.quadTo(b,e,b+l,e)};mxJsCanvas.prototype.ellipse=function(b,e,f,c){this.ctx.save();this.ctx.translate(b+f/2,e+c/2);this.ctx.scale(f/2,c/2);this.ctx.beginPath();this.ctx.arc(0,0,1,0,2*Math.PI,!1);this.ctx.restore()};
mxJsCanvas.prototype.rewriteImageSource=function(b){if("http://"==b.substring(0,7)||"https://"==b.substring(0,8))b="/proxy?url="+encodeURIComponent(b);return b};
-mxJsCanvas.prototype.image=function(b,e,f,c,l,n,p,u){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var G=this.ctx;G.save();if(n){n=l.width;var H=l.height,F=Math.min(f/n,c/H);b+=(f-n*F)/2;e+=(c-H*F)/2;f=n*F;c=H*F}p&&(G.translate(2*b+f,0),G.scale(-1,1));u&&(G.translate(0,2*e+c),G.scale(1,-1));G.drawImage(l,b,e,f,c);G.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
+mxJsCanvas.prototype.image=function(b,e,f,c,l,n,p,u){l=this.rewriteImageSource(l);l=this.images[l];if(null!=l&&0<l.height&&0<l.width){var F=this.ctx;F.save();if(n){n=l.width;var H=l.height,E=Math.min(f/n,c/H);b+=(f-n*E)/2;e+=(c-H*E)/2;f=n*E;c=H*E}p&&(F.translate(2*b+f,0),F.scale(-1,1));u&&(F.translate(0,2*e+c),F.scale(1,-1));F.drawImage(l,b,e,f,c);F.restore()}};mxJsCanvas.prototype.begin=function(){this.ctx.beginPath()};mxJsCanvas.prototype.close=function(){this.ctx.closePath()};
mxJsCanvas.prototype.fill=function(){this.ctx.fill()};mxJsCanvas.prototype.stroke=function(){this.ctx.stroke()};mxJsCanvas.prototype.fillAndStroke=function(){if(this.state.shadow){this.ctx.stroke();this.ctx.fill();var b=this.ctx.shadowColor,e=this.ctx.shadowOffsetX,f=this.ctx.shadowOffsetY;this.ctx.shadowColor="transparent";this.ctx.shadowOffsetX=0;this.ctx.shadowOffsetY=0;this.ctx.stroke();this.ctx.shadowColor=b;this.ctx.shadowOffsetX=e;this.ctx.shadowOffsetY=f}else this.ctx.fill(),this.ctx.stroke()};
-mxJsCanvas.prototype.text=function(b,e,f,c,l,n,p,u,G,H,F,K){if(null!=l&&0!=l.length){f=this.state.scale;0!=K&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(K*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==G){l=this.subCanvas[this.canvasIndex++];G=l.height;K=l.width;switch(p){case mxConstants.ALIGN_MIDDLE:e-=G/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=G/f}switch(n){case mxConstants.ALIGN_CENTER:b-=K/2/f;break;case mxConstants.ALIGN_RIGHT:b-=K/f}this.ctx.save();
+mxJsCanvas.prototype.text=function(b,e,f,c,l,n,p,u,F,H,E,K){if(null!=l&&0!=l.length){f=this.state.scale;0!=K&&(this.ctx.translate(Math.round(b),Math.round(e)),this.ctx.rotate(K*Math.PI/180),this.ctx.translate(Math.round(-b),Math.round(-e)));if("html"==F){l=this.subCanvas[this.canvasIndex++];F=l.height;K=l.width;switch(p){case mxConstants.ALIGN_MIDDLE:e-=F/2/f;break;case mxConstants.ALIGN_BOTTOM:e-=F/f}switch(n){case mxConstants.ALIGN_CENTER:b-=K/2/f;break;case mxConstants.ALIGN_RIGHT:b-=K/f}this.ctx.save();
if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor)null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f))),null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(Math.round(b)-.5,Math.round(e)-.5,Math.round(l.width/f),Math.round(l.height/f)));this.ctx.scale(1/f,1/f);this.ctx.drawImage(l,
-Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();K=document.createElement("div");K.innerHTML=l;K.style.position="absolute";K.style.top="-9999px";K.style.left="-9999px";K.style.fontFamily=this.state.fontFamily;K.style.fontWeight="bold";K.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(K);G=[K.offsetWidth,K.offsetHeight];document.body.removeChild(K);l=l.split("\n");K=G[1];this.ctx.textBaseline="top";G=e;switch(p){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
-"middle";e-=(l.length-1)*K/2;G=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=K*(l.length-1),G=e-this.state.fontSize}p=[];K=[];for(f=0;f<l.length;f++)K[f]=b,p[f]=this.ctx.measureText(l[f]).width,null!=n&&n!=mxConstants.ALIGN_LEFT&&(K[f]-=p[f],n==mxConstants.ALIGN_CENTER&&(K[f]+=p[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=K[0];n=p[0];for(f=1;f<l.length;f++)b=Math.min(b,K[f]),n=Math.max(n,p[f]);this.ctx.save();
-b=Math.round(b)-.5;G=Math.round(G)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,G,n,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,G,n,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],K[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
+Math.round(b*f),Math.round(e*f))}else{this.ctx.save();this.updateFont();K=document.createElement("div");K.innerHTML=l;K.style.position="absolute";K.style.top="-9999px";K.style.left="-9999px";K.style.fontFamily=this.state.fontFamily;K.style.fontWeight="bold";K.style.fontSize=this.state.fontSize+"pt";document.body.appendChild(K);F=[K.offsetWidth,K.offsetHeight];document.body.removeChild(K);l=l.split("\n");K=F[1];this.ctx.textBaseline="top";F=e;switch(p){case mxConstants.ALIGN_MIDDLE:this.ctx.textBaseline=
+"middle";e-=(l.length-1)*K/2;F=e-this.state.fontSize/2;break;case mxConstants.ALIGN_BOTTOM:this.ctx.textBaseline="alphabetic",e-=K*(l.length-1),F=e-this.state.fontSize}p=[];K=[];for(f=0;f<l.length;f++)K[f]=b,p[f]=this.ctx.measureText(l[f]).width,null!=n&&n!=mxConstants.ALIGN_LEFT&&(K[f]-=p[f],n==mxConstants.ALIGN_CENTER&&(K[f]+=p[f]/2));if(null!=this.state.fontBackgroundColor||null!=this.state.fontBorderColor){b=K[0];n=p[0];for(f=1;f<l.length;f++)b=Math.min(b,K[f]),n=Math.max(n,p[f]);this.ctx.save();
+b=Math.round(b)-.5;F=Math.round(F)-.5;null!=this.state.fontBackgroundColor&&(this.ctx.fillStyle=this.state.fontBackgroundColor,this.ctx.fillRect(b,F,n,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));null!=this.state.fontBorderColor&&(this.ctx.strokeStyle=this.state.fontBorderColor,this.ctx.lineWidth=1,this.ctx.strokeRect(b,F,n,this.state.fontSize*mxConstants.LINE_HEIGHT*l.length));this.ctx.restore()}for(f=0;f<l.length;f++)this.ctx.fillText(l[f],K[f],e),e+=this.state.fontSize*mxConstants.LINE_HEIGHT}this.ctx.restore()}};
mxJsCanvas.prototype.getCanvas=function(){return canvas};mxJsCanvas.prototype.finish=function(b){0==this.waitCounter?b():this.onComplete=b};DrawioClient=function(b,e){mxEventSource.call(this);this.ui=b;this.cookieName=e;this.token=this.getPersistentToken()};mxUtils.extend(DrawioClient,mxEventSource);DrawioClient.prototype.token=null;DrawioClient.prototype.user=null;DrawioClient.prototype.setUser=function(b){this.user=b;this.fireEvent(new mxEventObject("userChanged"))};DrawioClient.prototype.getUser=function(){return this.user};
DrawioClient.prototype.clearPersistentToken=function(){if(isLocalStorage)localStorage.removeItem("."+this.cookieName),sessionStorage.removeItem("."+this.cookieName);else if("undefined"!=typeof Storage){var b=new Date;b.setYear(b.getFullYear()-1);document.cookie=this.cookieName+"=; expires="+b.toUTCString()}};
DrawioClient.prototype.getPersistentToken=function(b){var e=null;isLocalStorage&&(e=localStorage.getItem("."+this.cookieName),null==e&&b&&(e=sessionStorage.getItem("."+this.cookieName)));if(null==e&&"undefined"!=typeof Storage){var f=document.cookie;b=this.cookieName+"=";var c=f.indexOf(b);0<=c&&(c+=b.length,e=f.indexOf(";",c),0>e?e=f.length:postCookie=f.substring(e),e=f.substring(c,e),e=0<e.length?e:null,null!=e&&isLocalStorage&&(f=new Date,f.setYear(f.getFullYear()-1),document.cookie=b+"; expires="+
@@ -13731,9 +13735,9 @@ DriveFile.prototype.isConflict=function(b){return null!=b&&null!=b.error&&412==b
DriveFile.prototype.getFolderUrl=function(){return null!=this.desc.labels&&this.desc.labels.trashed?"https://drive.google.com/drive/trash":null!=this.desc.parents&&0<this.desc.parents.length?"https://drive.google.com/drive/folders/"+this.desc.parents[0].id:null};
DriveFile.prototype.getPublicUrl=function(b){this.ui.drive.executeRequest({url:"/files/"+this.desc.id+"/permissions?supportsAllDrives=true"},mxUtils.bind(this,function(e){if(null!=e&&null!=e.items)for(var f=0;f<e.items.length;f++)if("anyoneWithLink"===e.items[f].id||"anyone"===e.items[f].id){b(this.desc.webContentLink);return}b(null)}),mxUtils.bind(this,function(){b(null)}))};DriveFile.prototype.isAutosaveOptional=function(){return!0};
DriveFile.prototype.isRenamable=function(){return this.isEditable()&&DrawioFile.prototype.isEditable.apply(this,arguments)};DriveFile.prototype.isMovable=function(){return this.isEditable()};DriveFile.prototype.isTrashed=function(){return this.desc.labels.trashed};DriveFile.prototype.save=function(b,e,f,c,l){DrawioFile.prototype.save.apply(this,[b,mxUtils.bind(this,function(){this.saveFile(null,b,e,f,c,l)}),f,c,l])};
-DriveFile.prototype.saveFile=function(b,e,f,c,l,n){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(p,u){var G=mxUtils.bind(this,function(H,F){try{var K=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,F,mxUtils.bind(this,function(d,g,k,v){try{this.savingFile=!1,0!=d?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),
+DriveFile.prototype.saveFile=function(b,e,f,c,l,n){try{this.isEditable()?this.savingFile||(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.createSecret(mxUtils.bind(this,function(p,u){var F=mxUtils.bind(this,function(H,E){try{var K=this.desc;null!=this.sync&&this.sync.fileSaving();this.ui.drive.saveFile(this,E,mxUtils.bind(this,function(d,g,k,v){try{this.savingFile=!1,0!=d?(this.setModified(this.getShadowModified()),e&&(this.lastAutosaveRevision=(new Date).getTime()),
this.autosaveDelay=Math.round(Math.min(1E4,Math.max(DriveFile.prototype.autosaveDelay,this.saveDelay))),this.desc=d,this.fileSaved(g,K,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f(d)}),c,u,k,v)):null!=c&&c(d)}catch(t){if(this.savingFile=!1,null!=c)c(t);else throw t;}}),mxUtils.bind(this,function(d,g){try{this.savingFile=!1,this.isConflict(d)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(g,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,
-function(){this.updateFileData();this.setShadowModified(!1);G(H,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),l,l,H,null,p)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});G(n,e)}))):null!=f&&f()}catch(p){if(null!=c)c(p);else throw p;}};
+function(){this.updateFileData();this.setShadowModified(!1);F(H,!0)}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&c(d)}catch(k){if(this.savingFile=!1,null!=c)c(k);else throw k;}}),l,l,H,null,p)}catch(d){if(this.savingFile=!1,null!=c)c(d);else throw d;}});F(n,e)}))):null!=f&&f()}catch(p){if(null!=c)c(p);else throw p;}};
DriveFile.prototype.copyFile=function(b,e){this.isRestricted()?DrawioFile.prototype.copyFile.apply(this,arguments):this.makeCopy(mxUtils.bind(this,function(){if(this.ui.spinner.spin(document.body,mxResources.get("saving")))try{this.save(!0,b,e)}catch(f){e(f)}}),e,!0)};
DriveFile.prototype.makeCopy=function(b,e,f){this.ui.spinner.spin(document.body,mxResources.get("saving"))&&this.saveAs(this.ui.getCopyFilename(this,f),mxUtils.bind(this,function(c){this.desc=c;this.ui.spinner.stop();this.setModified(!1);this.inConflictState=this.invalidChecksum=!1;this.descriptorChanged();b()}),mxUtils.bind(this,function(){this.ui.spinner.stop();null!=e&&e()}))};DriveFile.prototype.saveAs=function(b,e,f){this.ui.drive.copyFile(this.getId(),b,e,f)};
DriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.drive.renameFile(this.getId(),b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.desc=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.desc=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};
@@ -13755,89 +13759,89 @@ DriveClient.prototype.catchupFields="etag,headRevisionId,modifiedDate,properties
"-").replace(/\//g,"_");DriveClient.prototype.placeholderMimeType="image/png";DriveClient.prototype.libraryMimeType="application/vnd.jgraph.mxlibrary";DriveClient.prototype.newAppHostname="app.diagrams.net";DriveClient.prototype.extension=".drawio";DriveClient.prototype.tokenRefreshInterval=0;DriveClient.prototype.lastTokenRefresh=0;DriveClient.prototype.maxRetries=5;DriveClient.prototype.staleEtagMaxRetries=4;DriveClient.prototype.coolOff=1E3;DriveClient.prototype.mimeTypeCheckCoolOff=6E4;DriveClient.prototype.user=
null;DriveClient.prototype.sameWinAuthMode=!1;DriveClient.prototype.sameWinRedirectUrl=null;DriveClient.prototype.setUser=function(f){this.user=f;null==this.user?(this.userId=null,null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null)):this.userId=f.id;this.fireEvent(new mxEventObject("userChanged"))};DriveClient.prototype.setUserId=function(f){this.userId=f;null!=this.user&&this.user.id!=this.userId&&(this.user=null)};DriveClient.prototype.getUser=
function(){return this.user};DriveClient.prototype.getUsersList=function(){var f=[],c=JSON.parse(this.getPersistentToken(!0)),l=null;if(null!=c){null!=c.current&&(l=c.current.userId,f.push(c[l].user),f[0].isCurrent=!0);for(var n in c)"current"!=n&&n!=l&&f.push(c[n].user)}return f};DriveClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&userId="+this.userId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();
-this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,p){this.authorize(!1,mxUtils.bind(this,function(){null!=p&&p();f()}),mxUtils.bind(this,function(u){var G=null!=u.message?u.message:mxResources.get("cannotLogin");null!=u&&null!=u.error&&403==u.error.code&&null!=u.error.data&&0<u.error.data.length&&"domainPolicy"==u.error.data[0].reason&&(G=u.error.message);this.logout();this.ui.showError(mxResources.get("error"),
-G,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var n=!0,p=null,u=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var G=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=p&&window.clearTimeout(p);p=window.setTimeout(mxUtils.bind(this,
-function(){n=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:G})}),this.ui.timeout);var H=null,F=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),F=!0);var K=f.fullUrl||this.GDriveBaseUrl+f.url;F&&(K+=(0<K.indexOf("?")?"&":"?")+"alt=json");var d=new mxXmlRequest(K,H,f.method||"GET");d.setRequestHeaders=mxUtils.bind(this,function(g,k){if(null!=f.headers)for(var v in f.headers)g.setRequestHeader(v,f.headers[v]);else null!=f.contentType?
-g.setRequestHeader("Content-Type",f.contentType):F&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});d.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(p),n){try{var k=JSON.parse(g.getText())}catch(x){k=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(k);else{var v=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,t=null!=v&&0<v.length?v[0].reason:null;null==l||null==k||null==k.error||-1!=k.error.code&&
-(403!=k.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=t)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==t?(null!=l&&l(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(G)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==f&&u<this.maxRetries?(u++,this.requestThread=window.setTimeout(G,
-Math.round(Math.pow(2,u)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(k):l(k)}}}catch(x){if(null!=l)l(x);else throw x;}}))}catch(g){if(null!=l)l(g);else throw g;}});null!=b&&this.authCalled?G():this.execute(G)}catch(H){if(null!=l)l(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
+this.setUser(null);b=null};DriveClient.prototype.execute=function(f){var c=mxUtils.bind(this,function(l){this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(n,p){this.authorize(!1,mxUtils.bind(this,function(){null!=p&&p();f()}),mxUtils.bind(this,function(u){var F=null!=u.message?u.message:mxResources.get("cannotLogin");null!=u&&null!=u.error&&403==u.error.code&&null!=u.error.data&&0<u.error.data.length&&"domainPolicy"==u.error.data[0].reason&&(F=u.error.message);this.logout();this.ui.showError(mxResources.get("error"),
+F,mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/doc/faq/gsuite-authorisation-troubleshoot")}),null,mxResources.get("ok"))}),n)}))});this.authorize(!0,f,c)};DriveClient.prototype.executeRequest=function(f,c,l){try{var n=!0,p=null,u=0;null!=this.requestThread&&window.clearTimeout(this.requestThread);var F=mxUtils.bind(this,function(){try{this.requestThread=null;this.currentRequest=f;null!=p&&window.clearTimeout(p);p=window.setTimeout(mxUtils.bind(this,
+function(){n=!1;null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:F})}),this.ui.timeout);var H=null,E=!1;"string"===typeof f.params?H=f.params:null!=f.params&&(H=JSON.stringify(f.params),E=!0);var K=f.fullUrl||this.GDriveBaseUrl+f.url;E&&(K+=(0<K.indexOf("?")?"&":"?")+"alt=json");var d=new mxXmlRequest(K,H,f.method||"GET");d.setRequestHeaders=mxUtils.bind(this,function(g,k){if(null!=f.headers)for(var v in f.headers)g.setRequestHeader(v,f.headers[v]);else null!=f.contentType?
+g.setRequestHeader("Content-Type",f.contentType):E&&g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b)});d.send(mxUtils.bind(this,function(g){try{if(window.clearTimeout(p),n){try{var k=JSON.parse(g.getText())}catch(x){k=null}if(200<=g.getStatus()&&299>=g.getStatus())null!=c&&c(k);else{var v=null!=k&&null!=k.error?null!=k.error.data?k.error.data:k.error.errors:null,t=null!=v&&0<v.length?v[0].reason:null;null==l||null==k||null==k.error||-1!=k.error.code&&
+(403!=k.error.code||"domainPolicy"!=t&&"The requested mime type change is forbidden."!=k.error.message)?null!=k&&null!=k.error&&(401==k.error.code||403==k.error.code&&"rateLimitExceeded"!=t)?403==k.error.code&&this.retryAuth||401==k.error.code&&this.retryAuth&&"authError"==t?(null!=l&&l(k),this.retryAuth=!1):(this.retryAuth=!0,this.execute(F)):null!=k&&null!=k.error&&412!=k.error.code&&404!=k.error.code&&400!=k.error.code&&this.currentRequest==f&&u<this.maxRetries?(u++,this.requestThread=window.setTimeout(F,
+Math.round(Math.pow(2,u)*(1+.1*(Math.random()-.5))*this.coolOff))):null!=l&&l(k):l(k)}}}catch(x){if(null!=l)l(x);else throw x;}}))}catch(g){if(null!=l)l(g);else throw g;}});null!=b&&this.authCalled?F():this.execute(F)}catch(H){if(null!=l)l(H);else throw H;}};DriveClient.prototype.createAuthWin=function(f){return window.open(f?f:"about:blank","gdauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join())};
DriveClient.prototype.authorize=function(f,c,l,n,p){this.isExtAuth&&!f?window.parent.driveAuth(mxUtils.bind(this,function(u){this.updateAuthInfo(u,!0,!0,c,l)}),l):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(u){200<=u.getStatus()&&299>=u.getStatus()?this.authorizeStep2(u.getText(),f,c,l,n,p):null!=l&&l(u)}),l)};DriveClient.prototype.updateAuthInfo=function(f,c,l,n,p){b=f.access_token;delete f.access_token;f.expires=Date.now()+1E3*parseInt(f.expires_in);
-f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var u=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var G=JSON.parse(u);this.setPersistentToken(G,!c);null!=n&&n()}),p)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,l,n,p,u){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var G=
-JSON.parse(this.getPersistentToken(!0));G&&null!=G.current&&(this.userId=G.current.userId)}if(c&&null==this.userId)null!=n&&n();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(F){try{if(200<=F.getStatus()&&299>=F.getStatus()){var K=JSON.parse(F.getText());this.updateAuthInfo(K,!0,!1,l,n)}else 0!=F.getStatus()&&this.logout(),null!=n&&n(F)}catch(d){if(null!=
+f.remember=c;this.resetTokenRefresh(f);this.authCalled=!0;if(l||null==this.user){var u=JSON.stringify(f);this.updateUser(mxUtils.bind(this,function(){var F=JSON.parse(u);this.setPersistentToken(F,!c);null!=n&&n()}),p)}else null!=n&&(this.setPersistentToken(f,!c),n())};DriveClient.prototype.authorizeStep2=function(f,c,l,n,p,u){try{null!=this.ui.stateArg&&null!=this.ui.stateArg.userId&&(this.userId=this.ui.stateArg.userId,null!=this.user&&this.user.id!=this.userId&&(this.user=null));if(null==this.userId){var F=
+JSON.parse(this.getPersistentToken(!0));F&&null!=F.current&&(this.userId=F.current.userId)}if(c&&null==this.userId)null!=n&&n();else if(c)(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f)+"&userId="+this.userId,null,"GET")).send(mxUtils.bind(this,function(E){try{if(200<=E.getStatus()&&299>=E.getStatus()){var K=JSON.parse(E.getText());this.updateAuthInfo(K,!0,!1,l,n)}else 0!=E.getStatus()&&this.logout(),null!=n&&n(E)}catch(d){if(null!=
window.console&&console.log("DriveClient.authorizeStep2",d),null!=n)n(d);else throw d;}}),n);else{var H="https://accounts.google.com/o/oauth2/v2/auth?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&include_granted_scopes=true"+(p?"&access_type=offline&prompt=consent%20select_account":"")+"&scope="+encodeURIComponent(this.scopes.join(" "))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+f+(this.sameWinRedirectUrl?
-"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(H),u=null):null==u?u=this.createAuthWin(H):u.location=H;null!=u?(window.onGoogleDriveCallback=mxUtils.bind(this,function(F,K){window.onGoogleDriveCallback=null;try{null==F?null!=n&&n({message:mxResources.get("accessDenied")}):this.updateAuthInfo(F,p,!0,l,n)}catch(d){null!=n&&n(d)}finally{null!=K&&K.close()}}),u.focus()):null!=n&&n({message:mxResources.get("allowPopups")})}}catch(F){if(null!=n)n(F);else throw F;
+"&redirect="+this.sameWinRedirectUrl:""));this.sameWinAuthMode?(window.location.assign(H),u=null):null==u?u=this.createAuthWin(H):u.location=H;null!=u?(window.onGoogleDriveCallback=mxUtils.bind(this,function(E,K){window.onGoogleDriveCallback=null;try{null==E?null!=n&&n({message:mxResources.get("accessDenied")}):this.updateAuthInfo(E,p,!0,l,n)}catch(d){null!=n&&n(d)}finally{null!=K&&K.close()}}),u.focus()):null!=n&&n({message:mxResources.get("allowPopups")})}}catch(E){if(null!=n)n(E);else throw E;
}};DriveClient.prototype.resetTokenRefresh=function(f){null!=this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);null!=f&&null==f.error&&0<f.expires_in&&(this.tokenRefreshInterval=1E3*parseInt(f.expires_in),this.lastTokenRefresh=Date.now(),this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authorize(!0,mxUtils.bind(this,function(){}),mxUtils.bind(this,function(){}))}),900*f.expires_in))};DriveClient.prototype.checkToken=function(f){var c=
-0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(n){try{var p=JSON.parse(n);this.executeRequest({url:"/about"},mxUtils.bind(this,function(u){var G=
-mxResources.get("notAvailable"),H=G,F=null;null!=u&&null!=u.user&&(G=u.user.emailAddress,H=u.user.displayName,F=null!=u.user.picture?u.user.picture.url:null);this.setUser(new DrawioUser(p.id,G,H,F,p.locale));this.userId=p.id;null!=f&&f()}),c)}catch(u){null!=c&&c(u)}}),c,null,null,null,null,l)}catch(n){if(null!=c)c(n);else throw n;}};DriveClient.prototype.copyFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",
+0<this.lastTokenRefresh;Date.now()-this.lastTokenRefresh>this.tokenRefreshInterval||null==this.tokenRefreshThread?this.execute(mxUtils.bind(this,function(){f();c&&this.fireEvent(new mxEventObject("disconnected"))})):f()};DriveClient.prototype.updateUser=function(f,c){try{var l={Authorization:"Bearer "+b};this.ui.editor.loadUrl("https://www.googleapis.com/oauth2/v2/userinfo?alt=json",mxUtils.bind(this,function(n){try{var p=JSON.parse(n);this.executeRequest({url:"/about"},mxUtils.bind(this,function(u){var F=
+mxResources.get("notAvailable"),H=F,E=null;null!=u&&null!=u.user&&(F=u.user.emailAddress,H=u.user.displayName,E=null!=u.user.picture?u.user.picture.url:null);this.setUser(new DrawioUser(p.id,F,H,E,p.locale));this.userId=p.id;null!=f&&f()}),c)}catch(u){null!=c&&c(u)}}),c,null,null,null,null,l)}catch(n){if(null!=c)c(n);else throw n;}};DriveClient.prototype.copyFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest({url:"/files/"+f+"/copy?fields="+encodeURIComponent(this.allFields)+"&supportsAllDrives=true&enforceSingleParent=true",
method:"POST",params:{title:c,properties:[{key:"channel",value:Editor.guid()}]}},l,n)};DriveClient.prototype.renameFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{title:c}),l,n)};DriveClient.prototype.moveFile=function(f,c,l,n){null!=f&&null!=c&&this.executeRequest(this.createDriveRequest(f,{parents:[{kind:"drive#fileLink",id:c}]}),l,n)};DriveClient.prototype.createDriveRequest=function(f,c){return{url:"/files/"+f+"?uploadType=multipart&supportsAllDrives=true",
method:"PUT",contentType:"application/json; charset=UTF-8",params:c}};DriveClient.prototype.getLibrary=function(f,c,l){return this.getFile(f,c,l,!0,!0)};DriveClient.prototype.loadDescriptor=function(f,c,l,n){this.executeRequest({url:"/files/"+f+"?supportsAllDrives=true&fields="+(null!=n?n:this.allFields)},c,l)};DriveClient.prototype.listFiles=function(f,c,l,n,p){this.executeRequest({url:"/files?supportsAllDrives=true&includeItemsFromAllDrives=true&q="+encodeURIComponent("(mimeType contains '"+this.xmlMimeType+
"') "+(f?" and (title contains '"+f+"')":"")+(c?" and (modifiedDate > '"+c.toISOString()+"')":"")+(l?" and ('me' in owners)":""))+"&orderBy=modifiedDate desc,title"},n,p)};DriveClient.prototype.getCustomProperty=function(f,c){f=f.properties;var l=null;if(null!=f)for(var n=0;n<f.length;n++)if(f[n].key==c){l=f[n].value;break}return l};DriveClient.prototype.getFile=function(f,c,l,n,p){n=null!=n?n:!1;p=null!=p?p:!1;null!=urlParams.rev?this.executeRequest({url:"/files/"+f+"/revisions/"+urlParams.rev+"?supportsAllDrives=true"},
-mxUtils.bind(this,function(u){u.title=u.originalFilename;u.headRevisionId=u.id;u.id=f;this.getXmlFile(u,c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(u){try{if(null!=this.user){var G=/\.png$/i.test(u.title);/\.v(dx|sdx?)$/i.test(u.title)||/\.gliffy$/i.test(u.title)||!this.ui.useCanvasForExport&&G?this.ui.convertFile(u.downloadUrl,u.title,u.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):n||p||u.mimeType==this.libraryMimeType||u.mimeType==this.xmlMimeType?this.getXmlFile(u,
-c,l,!0,p):this.getXmlFile(u,c,l)}else l({message:mxResources.get("loggedOut")})}catch(H){if(null!=l)l(H);else throw H;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,n,p){try{var u={Authorization:"Bearer "+b},G=f.downloadUrl;if(null==G)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var H=0,F=mxUtils.bind(this,function(){this.ui.editor.loadUrl(G,
+mxUtils.bind(this,function(u){u.title=u.originalFilename;u.headRevisionId=u.id;u.id=f;this.getXmlFile(u,c,l)}),l):this.loadDescriptor(f,mxUtils.bind(this,function(u){try{if(null!=this.user){var F=/\.png$/i.test(u.title);/\.v(dx|sdx?)$/i.test(u.title)||/\.gliffy$/i.test(u.title)||!this.ui.useCanvasForExport&&F?this.ui.convertFile(u.downloadUrl,u.title,u.mimeType,this.extension,c,l,null,{Authorization:"Bearer "+b}):n||p||u.mimeType==this.libraryMimeType||u.mimeType==this.xmlMimeType?this.getXmlFile(u,
+c,l,!0,p):this.getXmlFile(u,c,l)}else l({message:mxResources.get("loggedOut")})}catch(H){if(null!=l)l(H);else throw H;}}),l)};DriveClient.prototype.isGoogleRealtimeMimeType=function(f){return null!=f&&"application/vnd.jgraph.mxfile."==f.substring(0,30)};DriveClient.prototype.getXmlFile=function(f,c,l,n,p){try{var u={Authorization:"Bearer "+b},F=f.downloadUrl;if(null==F)null!=l&&l({message:mxResources.get("exportOptionsDisabledDetails")});else{var H=0,E=mxUtils.bind(this,function(){this.ui.editor.loadUrl(F,
mxUtils.bind(this,function(K){try{if(null==K)l({message:mxResources.get("invalidOrMissingFile")});else if(f.mimeType==this.libraryMimeType||p)f.mimeType!=this.libraryMimeType||p?c(new DriveLibrary(this.ui,K,f)):l({message:mxResources.get("notADiagramFile")});else{var d=!1;if(/\.png$/i.test(f.title)){var g=K.lastIndexOf(",");if(0<g){var k=this.ui.extractGraphModelFromPng(K);if(null!=k&&0<k.length)K=k;else try{k=K.substring(g+1);var v=!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):
-atob(k),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?d=!0:K=v}catch(x){d=!0}}}else/\.pdf$/i.test(f.title)?(k=Editor.extractGraphModelFromPdf(K),null!=k&&0<k.length&&(d=!0,K=k)):"data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)&&(v=K.substring(22),K=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,G)?this.ui.parseFileData(K,mxUtils.bind(this,
-function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,f.title+this.extension,!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=l)l(A);else throw A;}}),f.title):c(d?new LocalFile(this.ui,K,f.title,!0):new DriveFile(this.ui,K,f))}}catch(x){if(null!=l)l(x);else throw x;}}),mxUtils.bind(this,function(K,d){if(H<this.maxRetries&&null!=d&&403==d.getStatus())H++,window.setTimeout(F,2*H*this.coolOff*(1+.1*(Math.random()-.5)));
-else if(null!=l)l(K);else throw K;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,u)});F()}}catch(K){if(null!=l)l(K);else throw K;}};DriveClient.prototype.saveFile=function(f,c,l,n,p,u,G,H,F){try{var K=0;f.saveLevel=1;var d=mxUtils.bind(this,function(V){if(null!=n)n(V);else throw V;}),g=mxUtils.bind(this,function(V){d(V);try{EditorUi.logError(V.message,null,
-null,null,V)}catch(Q){}});if(f.isEditable()&&null!=f.desc){var k=Date.now(),v=f.desc.etag,t=f.desc.modifiedDate,x=f.desc.headRevisionId,A=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());u=null!=u?u:!1;var J=null,D=!1,E={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(E.mimeType))E.mimeType=this.xmlMimeType,J=f.desc,D=c=!0;else if("application/octet-stream"==E.mimeType||"1"==urlParams["override-mime"]&&E.mimeType!=this.xmlMimeType)E.mimeType=this.xmlMimeType;
-var R=mxUtils.bind(this,function(V,Q,P){try{f.saveLevel=3;var q=f.getData(),y=null,B=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),F=null!=F?F:Editor.guid(32),H.push({key:"secret",value:F}),B=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(B),H.push({key:"checksum",value:F+":"+y}));P||(null!=V||u||(V=this.placeholderThumbnail,Q=this.placeholderMimeType),
-null!=V&&null!=Q&&(E.thumbnail={image:V,mimeType:Q}));var C=mxUtils.bind(this,function(m){try{if(f.saveDelay=Date.now()-k,f.saveLevel=null,l(m,q,B,y),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+
-J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){g(z)}}),M=mxUtils.bind(this,function(m,z){f.saveLevel=4;try{null!=H&&(E.properties=H);var I=G||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),L=mxUtils.bind(this,function(S){f.saveLevel=5;try{var U=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&
-f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;d({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),E,m,c||S||U,z,S?null:I,D),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(t)).getTime():0;if(0>=Y||v==Z.etag||c&&x==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),
+atob(k),t=this.ui.editor.extractGraphModel(mxUtils.parseXml(v).documentElement,!0);null==t||0<t.getElementsByTagName("parsererror").length?d=!0:K=v}catch(x){d=!0}}}else/\.pdf$/i.test(f.title)?(k=Editor.extractGraphModelFromPdf(K),null!=k&&0<k.length&&(d=!0,K=k)):"data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)&&(v=K.substring(22),K=window.atob&&!mxClient.IS_SF?atob(v):Base64.decode(v));Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,F)?this.ui.parseFileData(K,mxUtils.bind(this,
+function(x){try{4==x.readyState&&(200<=x.status&&299>=x.status?c(new LocalFile(this.ui,x.responseText,f.title+this.extension,!0)):null!=l&&l({message:mxResources.get("errorLoadingFile")}))}catch(A){if(null!=l)l(A);else throw A;}}),f.title):c(d?new LocalFile(this.ui,K,f.title,!0):new DriveFile(this.ui,K,f))}}catch(x){if(null!=l)l(x);else throw x;}}),mxUtils.bind(this,function(K,d){if(H<this.maxRetries&&null!=d&&403==d.getStatus())H++,window.setTimeout(E,2*H*this.coolOff*(1+.1*(Math.random()-.5)));
+else if(null!=l)l(K);else throw K;}),null!=f.mimeType&&"image/"==f.mimeType.substring(0,6)&&"image/svg"!=f.mimeType.substring(0,9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,u)});E()}}catch(K){if(null!=l)l(K);else throw K;}};DriveClient.prototype.saveFile=function(f,c,l,n,p,u,F,H,E){try{var K=0;f.saveLevel=1;var d=mxUtils.bind(this,function(V){if(null!=n)n(V);else throw V;}),g=mxUtils.bind(this,function(V){d(V);try{EditorUi.logError(V.message,null,
+null,null,V)}catch(Q){}});if(f.isEditable()&&null!=f.desc){var k=Date.now(),v=f.desc.etag,t=f.desc.modifiedDate,x=f.desc.headRevisionId,A=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());u=null!=u?u:!1;var J=null,D=!1,G={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(G.mimeType))G.mimeType=this.xmlMimeType,J=f.desc,D=c=!0;else if("application/octet-stream"==G.mimeType||"1"==urlParams["override-mime"]&&G.mimeType!=this.xmlMimeType)G.mimeType=this.xmlMimeType;
+var R=mxUtils.bind(this,function(V,Q,O){try{f.saveLevel=3;var q=f.getData(),y=null,B=null;f.constructor==DriveFile&&(null==H&&(H=[]),null==f.getChannelId()&&H.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&H.push({key:"key",value:Editor.guid(32)}),E=null!=E?E:Editor.guid(32),H.push({key:"secret",value:E}),B=this.ui.getPagesForXml(q),y=this.ui.getHashValueForPages(B),H.push({key:"checksum",value:E+":"+y}));O||(null!=V||u||(V=this.placeholderThumbnail,Q=this.placeholderMimeType),
+null!=V&&null!=Q&&(G.thumbnail={image:V,mimeType:Q}));var C=mxUtils.bind(this,function(m){try{if(f.saveDelay=Date.now()-k,f.saveLevel=null,l(m,q,B,y),null!=J){this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(z){z.pinned=!0;this.executeRequest({url:"/files/"+J.id+"/revisions/"+J.headRevisionId,method:"PUT",params:z})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+
+J.id+"."+J.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(z){}}}catch(z){g(z)}}),M=mxUtils.bind(this,function(m,z){f.saveLevel=4;try{null!=H&&(G.properties=H);var I=F||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:f.getCurrentEtag(),L=mxUtils.bind(this,function(S){f.saveLevel=5;try{var U=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&
+f.desc.mimeType!=this.libraryMimeType,W=!0,X=null;try{X=window.setTimeout(mxUtils.bind(this,function(){W=!1;d({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Z){}this.executeRequest(this.createUploadRequest(f.getId(),G,m,c||S||U,z,S?null:I,D),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){var Y=null!=Z?(new Date(Z.modifiedDate)).getTime()-(new Date(t)).getTime():0;if(0>=Y||v==Z.etag||c&&x==Z.headRevisionId){var ba=[];null==Z?ba.push("Empty response"):(0>=Y&&ba.push("Invalid modified time"),
v==Z.etag&&ba.push("Stale etag"),c&&x==Z.headRevisionId&&ba.push("Stale revision"),I=Z.etag);0==ba.length&&ba.push(mxResources.get("unknownError"));Y=ba.join(", ");if(K<this.staleEtagMaxRetries)K++,ba=Math.round(Math.pow(2,K)*this.coolOff*(1+.1*(Math.random()-.5))),window.setTimeout(L,ba),"1"==urlParams.test&&EditorUi.debug("DriveClient: Invalid response","retry",K,"delay",ba,"rev",null!=Z?Z.headRevisionId:"null","errors",Y);else{f.saveLevel=12;d({message:mxResources.get("error")+": "+Y},Z);try{EditorUi.logError("Saving to Google Drive failed",
null,"id-"+f.desc.id+"-from-"+x+"."+t+"-"+this.ui.hashValue(v)+"-to-"+Z.headRevisionId+"."+Z.modifiedDate+"-"+this.ui.hashValue(Z.etag)+(0<Y.length?"-errors-"+Y:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")+"-retries-"+K+"-delay-"+(Date.now()-k))}catch(ea){}}}else C(Z)}}),mxUtils.bind(this,function(Z){window.clearTimeout(X);if(W){f.saveLevel=6;try{f.isConflict(Z)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+
this.catchupFields},mxUtils.bind(this,function(Y){f.saveLevel=7;try{if(null!=Y&&Y.etag==I)if(K<this.staleEtagMaxRetries){K++;var ba=Math.round(2*K*this.coolOff*(1+.1*(Math.random()-.5)));window.setTimeout(N,ba);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",K,"delay",ba)}else{N(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?
"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ea){}}else"1"==urlParams.test&&Y.headRevisionId==x&&EditorUi.debug("DriveClient: Remote Etag Changed","local",I,"remote",Y.etag,"rev",f.desc.headRevisionId,"response",[Y],"file",[f]),d(Z,Y)}catch(ea){g(ea)}}),mxUtils.bind(this,function(){d(Z)})):
d(Z)}catch(Y){g(Y)}}}))}catch(Z){g(Z)}}),N=mxUtils.bind(this,function(S){f.saveLevel=9;if(S||null==I)L(S);else{var U=!0,W=null;try{W=window.setTimeout(mxUtils.bind(this,function(){U=!1;d({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(X){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(X){window.clearTimeout(W);if(U){f.saveLevel=10;try{null!=X&&X.headRevisionId==x?("1"==urlParams.test&&I!=X.etag&&EditorUi.debug("DriveClient: Preflight Etag Update",
-"from",I,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I=X.etag,L(S)):d({error:{code:412}},X)}catch(Z){g(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);U&&(f.saveLevel=11,d(X))}))}});if(A&&null==V){f.saveLevel=8;var O=new Image;O.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/O.width,U=document.createElement("canvas");U.width=this.thumbnailWidth;U.height=Math.floor(O.height*S);U.getContext("2d").drawImage(O,0,0,U.width,U.height);var W=U.toDataURL();
-W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");E.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){g(Z)}}});O.src="data:image/png;base64,"+m}else N(!1)}catch(S){g(S)}});if(A){var T=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){M(m,!0)}),d,this.ui.getCurrentFile()!=f?q:null,T.scale,T.border)}else M(q,!1)}catch(m){g(m)}});try{f.saveLevel=2,(u||A||f.constructor==DriveLibrary||!this.enableThumbnails||
-"0"==urlParams.thumb||null!=E.mimeType&&"application/vnd.jgraph.mxfile"!=E.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(V){try{var Q=null;try{null!=V&&(Q=V.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(P){Q=null}R(Q,"image/png")}catch(P){g(P)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(V){g(V)}}else this.ui.editor.graph.reset(),d({message:mxResources.get("readOnly")})}catch(V){g(V)}};
-DriveClient.prototype.insertFile=function(f,c,l,n,p,u,G){u=null!=u?u:this.xmlMimeType;f={mimeType:u,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,G),mxUtils.bind(this,function(H){u==this.libraryMimeType?n(new DriveLibrary(this.ui,c,H)):0==H?null!=p&&p({message:mxResources.get("errorSavingFile")}):n(new DriveFile(this.ui,c,H))}),p)};DriveClient.prototype.createUploadRequest=function(f,c,l,n,p,u,G){p=null!=p?p:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};
+"from",I,"to",X.etag,"rev",f.desc.headRevisionId,"response",[X],"file",[f]),I=X.etag,L(S)):d({error:{code:412}},X)}catch(Z){g(Z)}}}),mxUtils.bind(this,function(X){window.clearTimeout(W);U&&(f.saveLevel=11,d(X))}))}});if(A&&null==V){f.saveLevel=8;var P=new Image;P.onload=mxUtils.bind(this,function(){try{var S=this.thumbnailWidth/P.width,U=document.createElement("canvas");U.width=this.thumbnailWidth;U.height=Math.floor(P.height*S);U.getContext("2d").drawImage(P,0,0,U.width,U.height);var W=U.toDataURL();
+W=W.substring(W.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");G.thumbnail={image:W,mimeType:"image/png"};N(!1)}catch(X){try{N(!1)}catch(Z){g(Z)}}});P.src="data:image/png;base64,"+m}else N(!1)}catch(S){g(S)}});if(A){var T=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(m){M(m,!0)}),d,this.ui.getCurrentFile()!=f?q:null,T.scale,T.border)}else M(q,!1)}catch(m){g(m)}});try{f.saveLevel=2,(u||A||f.constructor==DriveLibrary||!this.enableThumbnails||
+"0"==urlParams.thumb||null!=G.mimeType&&"application/vnd.jgraph.mxfile"!=G.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(V){try{var Q=null;try{null!=V&&(Q=V.toDataURL("image/png")),null!=Q&&(Q=Q.length>this.maxThumbnailSize?null:Q.substring(Q.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(O){Q=null}R(Q,"image/png")}catch(O){g(O)}}),20))&&R(null,null,f.constructor!=DriveLibrary)}catch(V){g(V)}}else this.ui.editor.graph.reset(),d({message:mxResources.get("readOnly")})}catch(V){g(V)}};
+DriveClient.prototype.insertFile=function(f,c,l,n,p,u,F){u=null!=u?u:this.xmlMimeType;f={mimeType:u,title:f};null!=l&&(f.parents=[{kind:"drive#fileLink",id:l}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,F),mxUtils.bind(this,function(H){u==this.libraryMimeType?n(new DriveLibrary(this.ui,c,H)):0==H?null!=p&&p({message:mxResources.get("errorSavingFile")}):n(new DriveFile(this.ui,c,H))}),p)};DriveClient.prototype.createUploadRequest=function(f,c,l,n,p,u,F){p=null!=p?p:!1;var H={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};
null!=u&&(H["If-Match"]=u);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:H,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+JSON.stringify(c)+"\r\n---------314159265358979323846\r\nContent-Type: application/octect-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+(null!=l?p?l:!window.btoa||
-mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");G&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),
+mxClient.IS_IE||mxClient.IS_IE11?Base64.encode(l):Graph.base64EncodeUnicode(l):"")+"\r\n---------314159265358979323846--"};n||(f.fullUrl+="&newRevision=false");F&&(f.fullUrl+="&pinned=true");return f};DriveClient.prototype.createLinkPicker=function(){var f=e.linkPicker;if(null==f||e.linkPickerToken!=b){e.linkPickerToken=b;f=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0);var c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),
l=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0);f=(new google.picker.PickerBuilder).setAppId(this.appId).setLocale(mxLanguage).setOAuthToken(e.linkPickerToken).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(f).addView(c).addView(l).addView(google.picker.ViewId.RECENTLY_PICKED)}return f};DriveClient.prototype.pickFile=function(f,c,l){this.filePickerCallback=null!=f?f:mxUtils.bind(this,function(n){this.ui.loadFile("G"+n)});this.filePicked=
mxUtils.bind(this,function(n){n.action==google.picker.Action.PICKED&&this.filePickerCallback(n.docs[0].id,n.docs[0])});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var n=c?"genericPicker":"filePicker",p=mxUtils.bind(this,function(d){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(d).className&&(mxEvent.removeListener(document,"click",p),this[n].setVisible(!1),l&&l())});if(null==e[n]||e[n+"Token"]!=
-b){e[n+"Token"]=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),G=(new google.picker.DocsView).setIncludeFolders(!0),H=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),F=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(u.setMimeTypes("*/*"),G.setMimeTypes("*/*"),H.setMimeTypes("*/*")):(u.setMimeTypes(this.mimeTypes),G.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes));e[n]=(new google.picker.PickerBuilder).setOAuthToken(e[n+
-"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(G).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).addView(F);if(urlParams.gPickerSize){var K=urlParams.gPickerSize.split(",");e[n]=e[n].setSize(K[0],K[1])}urlParams.topBaseUrl&&(e[n]=e[n].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[n]=e[n].setCallback(mxUtils.bind(this,function(d){if(d.action==google.picker.Action.PICKED||d.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,
+b){e[n+"Token"]=b;var u=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0),F=(new google.picker.DocsView).setIncludeFolders(!0),H=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0),E=(new google.picker.DocsUploadView).setIncludeFolders(!0);c?(u.setMimeTypes("*/*"),F.setMimeTypes("*/*"),H.setMimeTypes("*/*")):(u.setMimeTypes(this.mimeTypes),F.setMimeTypes(this.mimeTypes),H.setMimeTypes(this.mimeTypes));e[n]=(new google.picker.PickerBuilder).setOAuthToken(e[n+
+"Token"]).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(u).addView(F).addView(H).addView(google.picker.ViewId.RECENTLY_PICKED).addView(E);if(urlParams.gPickerSize){var K=urlParams.gPickerSize.split(",");e[n]=e[n].setSize(K[0],K[1])}urlParams.topBaseUrl&&(e[n]=e[n].setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e[n]=e[n].setCallback(mxUtils.bind(this,function(d){if(d.action==google.picker.Action.PICKED||d.action==google.picker.Action.CANCEL)mxEvent.removeListener(document,
"click",p),l&&d.action==google.picker.Action.CANCEL&&l();d.action==google.picker.Action.PICKED&&this.filePicked(d)})).build()}mxEvent.addListener(document,"click",p);e[n].setVisible(!0)}catch(d){this.ui.spinner.stop(),this.ui.handleError(d)}}))};DriveClient.prototype.pickFolder=function(f,c){this.folderPickerCallback=f;var l=mxUtils.bind(this,function(){try{this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var n=
-mxUtils.bind(this,function(F){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(F).className&&(mxEvent.removeListener(document,"click",n),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),u=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
-G=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(u).addView(G).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
-if(urlParams.gPickerSize){var H=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(F){F.action!=google.picker.Action.PICKED&&F.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",n);this.folderPickerCallback(F)})).build()}mxEvent.addListener(document,"click",n);e.folderPicker.setVisible(!0)}catch(F){this.ui.spinner.stop(),
-this.ui.handleError(F)}}))}catch(n){this.ui.handleError(n)}});c?l():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(n){this.ui.handleError(n)}}))};
+mxUtils.bind(this,function(E){"picker modal-dialog-bg picker-dialog-bg"==mxEvent.getSource(E).className&&(mxEvent.removeListener(document,"click",n),e.folderPicker.setVisible(!1))});if(null==e.folderPicker||e.folderPickerToken!=b){e.folderPickerToken=b;var p=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),u=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder"),
+F=(new google.picker.DocsView).setIncludeFolders(!0).setEnableDrives(!0).setSelectFolderEnabled(!0).setMimeTypes("application/vnd.google-apps.folder");e.folderPicker=(new google.picker.PickerBuilder).setSelectableMimeTypes("application/vnd.google-apps.folder").setOAuthToken(e.folderPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(p).addView(u).addView(F).addView(google.picker.ViewId.RECENTLY_PICKED).setTitle(mxResources.get("pickFolder"));
+if(urlParams.gPickerSize){var H=urlParams.gPickerSize.split(",");e.folderPicker=e.folderPicker.setSize(H[0],H[1])}urlParams.topBaseUrl&&(e.folderPicker=e.folderPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.folderPicker=e.folderPicker.setCallback(mxUtils.bind(this,function(E){E.action!=google.picker.Action.PICKED&&E.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",n);this.folderPickerCallback(E)})).build()}mxEvent.addListener(document,"click",n);e.folderPicker.setVisible(!0)}catch(E){this.ui.spinner.stop(),
+this.ui.handleError(E)}}))}catch(n){this.ui.handleError(n)}});c?l():this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop(),this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){this.folderPickerCallback({action:google.picker.Action.PICKED,docs:[{type:"folder",id:"root"}]})}),mxUtils.bind(this,function(){l()}),mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0)}catch(n){this.ui.handleError(n)}}))};
DriveClient.prototype.pickLibrary=function(f){this.filePickerCallback=f;this.filePicked=mxUtils.bind(this,function(c){c.action==google.picker.Action.PICKED?this.filePickerCallback(c.docs[0].id):c.action==google.picker.Action.CANCEL&&null==this.ui.getCurrentFile()&&this.ui.showSplash()});this.ui.spinner.spin(document.body,mxResources.get("authorizing"))&&this.execute(mxUtils.bind(this,function(){try{this.ui.spinner.stop();var c=mxUtils.bind(this,function(H){"picker modal-dialog-bg picker-dialog-bg"==
mxEvent.getSource(H).className&&(mxEvent.removeListener(document,"click",c),e.libraryPicker.setVisible(!1))});if(null==e.libraryPicker||e.libraryPickerToken!=b){e.libraryPickerToken=b;var l=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),n=(new google.picker.DocsView).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),
-p=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),u=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(n).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED).addView(u);if(urlParams.gPickerSize){var G=
-urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(G[0],G[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(H){H.action!=google.picker.Action.PICKED&&H.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);H.action==google.picker.Action.PICKED&&this.filePicked(H)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(H){this.ui.spinner.stop(),
+p=(new google.picker.DocsView).setEnableDrives(!0).setIncludeFolders(!0).setMimeTypes(this.libraryMimeType+",application/xml,text/plain,application/octet-stream"),u=(new google.picker.DocsUploadView).setIncludeFolders(!0);e.libraryPicker=(new google.picker.PickerBuilder).setOAuthToken(e.libraryPickerToken).setLocale(mxLanguage).setAppId(this.appId).enableFeature(google.picker.Feature.SUPPORT_DRIVES).addView(l).addView(n).addView(p).addView(google.picker.ViewId.RECENTLY_PICKED).addView(u);if(urlParams.gPickerSize){var F=
+urlParams.gPickerSize.split(",");e.libraryPicker=e.libraryPicker.setSize(F[0],F[1])}urlParams.topBaseUrl&&(e.libraryPicker=e.libraryPicker.setOrigin(decodeURIComponent(urlParams.topBaseUrl)));e.libraryPicker=e.libraryPicker.setCallback(mxUtils.bind(this,function(H){H.action!=google.picker.Action.PICKED&&H.action!=google.picker.Action.CANCEL||mxEvent.removeListener(document,"click",c);H.action==google.picker.Action.PICKED&&this.filePicked(H)})).build()}mxEvent.addListener(document,"click",c);e.libraryPicker.setVisible(!0)}catch(H){this.ui.spinner.stop(),
this.ui.handleError(H)}}))};DriveClient.prototype.showPermissions=function(f,c){var l=mxUtils.bind(this,function(){var n=new ConfirmDialog(this.ui,mxResources.get("googleSharingNotAvailable"),mxUtils.bind(this,function(){var p=null!=c?c.getFolderUrl():"https://drive.google.com/open?id="+f;this.ui.editor.graph.openLink(p)}),null,mxResources.get("open"),null,null,null,null,IMAGE_PATH+"/google-share.png");this.ui.showDialog(n.container,400,150,!0,!0);n.init()});this.sharingFailed?l():this.checkToken(mxUtils.bind(this,
-function(){try{var n=new gapi.drive.share.ShareClient(this.appId);n.setOAuthToken(b);n.setItemIds([f]);n.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(p){for(var u=!1,G=0;G<p.length;G++)for(var H=0;H<p[G].addedNodes.length;H++){var F=p[G].addedNodes[H];"BUTTON"==F.nodeName&&"ok"==F.getAttribute("name")&&null!=F.parentNode&&null!=F.parentNode.parentNode&&
-"dialog"==F.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,F.click(),l(),u=!0):"DIV"==F.nodeName&&"shr-q-shr-r-shr-xb"==F.className&&(u=!0)}u&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(p){this.ui.handleError(p)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,
+function(){try{var n=new gapi.drive.share.ShareClient(this.appId);n.setOAuthToken(b);n.setItemIds([f]);n.showSettingsDialog();"MutationObserver"in window&&(null!=this.sharingObserver&&(this.sharingObserver.disconnect(),this.sharingObserver=null),this.sharingObserver=new MutationObserver(mxUtils.bind(this,function(p){for(var u=!1,F=0;F<p.length;F++)for(var H=0;H<p[F].addedNodes.length;H++){var E=p[F].addedNodes[H];"BUTTON"==E.nodeName&&"ok"==E.getAttribute("name")&&null!=E.parentNode&&null!=E.parentNode.parentNode&&
+"dialog"==E.parentNode.parentNode.getAttribute("role")?(this.sharingFailed=!0,E.click(),l(),u=!0):"DIV"==E.nodeName&&"shr-q-shr-r-shr-xb"==E.className&&(u=!0)}u&&(this.sharingObserver.disconnect(),this.sharingObserver=null)})),this.sharingObserver.observe(document,{childList:!0,subtree:!0}))}catch(p){this.ui.handleError(p)}}))};DriveClient.prototype.clearPersistentToken=function(){var f=JSON.parse(this.getPersistentToken(!0))||{};delete f.current;delete f[this.userId];for(var c in f){f.current={userId:c,
expires:0};break}DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(f))};DriveClient.prototype.setPersistentToken=function(f,c){var l=JSON.parse(this.getPersistentToken(!0))||{};f.userId=this.userId;l.current=f;l[this.userId]={user:this.user};DrawioClient.prototype.setPersistentToken.call(this,JSON.stringify(l),c)}})();DropboxFile=function(b,e,f){DrawioFile.call(this,b,e);this.stat=f};mxUtils.extend(DropboxFile,DrawioFile);DropboxFile.prototype.getId=function(){return this.stat.path_display.substring(1)};DropboxFile.prototype.getHash=function(){return"D"+encodeURIComponent(this.getId())};DropboxFile.prototype.getMode=function(){return App.MODE_DROPBOX};DropboxFile.prototype.isAutosaveOptional=function(){return!0};DropboxFile.prototype.getTitle=function(){return this.stat.name};
DropboxFile.prototype.isRenamable=function(){return!0};DropboxFile.prototype.getSize=function(){return this.stat.size};DropboxFile.prototype.isRevisionHistorySupported=function(){return!0};DropboxFile.prototype.getFileUrl=function(){return"https://www.dropbox.com/home/Apps"+this.ui.dropbox.appPath+this.stat.path_display};DropboxFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};
-DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],n=c.entries.length-1;0<=n;n--)mxUtils.bind(this,function(p){l.push({modifiedDate:p.client_modified,fileSize:p.size,getXml:mxUtils.bind(this,function(u,G){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:p.rev},u,G)}),getUrl:mxUtils.bind(this,function(u){return this.ui.getUrl(window.location.pathname+"?rev="+
+DropboxFile.prototype.getRevisions=function(b,e){var f=this.ui.dropbox.client.filesListRevisions({path:this.stat.path_lower,limit:100});f.then(mxUtils.bind(this,function(c){try{for(var l=[],n=c.entries.length-1;0<=n;n--)mxUtils.bind(this,function(p){l.push({modifiedDate:p.client_modified,fileSize:p.size,getXml:mxUtils.bind(this,function(u,F){this.ui.dropbox.readFile({path:this.stat.path_lower,rev:p.rev},u,F)}),getUrl:mxUtils.bind(this,function(u){return this.ui.getUrl(window.location.pathname+"?rev="+
p.rev+"&chrome=0&nav=1&layers=1&edit=_blank"+(null!=u?"&page="+u:""))+window.location.hash})})})(c.entries[n]);b(l)}catch(p){e(p)}}));f["catch"](function(c){e(c)})};DropboxFile.prototype.getLatestVersion=function(b,e){this.ui.dropbox.getFile(this.getId(),b,e)};DropboxFile.prototype.updateDescriptor=function(b){this.stat=b.stat};DropboxFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};DropboxFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};
DropboxFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.stat.name;this.stat.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.stat.name=p;this.saveFile(b,e,f,c,l,n)}),c,l,n])};
-DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var n=mxUtils.bind(this,function(u){var G=this.stat.path_display.lastIndexOf("/");G=1<G?this.stat.path_display.substring(1,G+1):null;this.ui.dropbox.saveFile(b,u,mxUtils.bind(this,function(H){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=H;this.contentChanged();
-null!=f&&f()}),mxUtils.bind(this,function(H){this.savingFile=!1;null!=c&&c(H)}),G)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var p=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){n(this.ui.base64ToBlob(u,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,p.scale,p.border)}else n(this.getData())}catch(u){if(this.savingFile=!1,null!=c)c(u);else throw u;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
+DropboxFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&c({code:App.ERROR_BUSY}):(e=mxUtils.bind(this,function(l){if(l)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var n=mxUtils.bind(this,function(u){var F=this.stat.path_display.lastIndexOf("/");F=1<F?this.stat.path_display.substring(1,F+1):null;this.ui.dropbox.saveFile(b,u,mxUtils.bind(this,function(H){this.setModified(this.getShadowModified());this.savingFile=!1;this.stat=H;this.contentChanged();
+null!=f&&f()}),mxUtils.bind(this,function(H){this.savingFile=!1;null!=c&&c(H)}),F)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle())){var p=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(u){n(this.ui.base64ToBlob(u,"image/png"))}),c,this.ui.getCurrentFile()!=this?this.getData():null,p.scale,p.border)}else n(this.getData())}catch(u){if(this.savingFile=!1,null!=c)c(u);else throw u;}else null!=c&&c()}),this.getTitle()==b?e(!0):this.ui.dropbox.checkExists(b,
e)):null!=f&&f()};DropboxFile.prototype.rename=function(b,e,f){this.ui.dropbox.renameFile(this,b,mxUtils.bind(this,function(c){this.hasSameExtension(b,this.getTitle())?(this.stat=c,this.descriptorChanged(),null!=e&&e()):(this.stat=c,this.descriptorChanged(),this.save(!0,e,f))}),f)};DropboxLibrary=function(b,e,f){DropboxFile.call(this,b,e,f)};mxUtils.extend(DropboxLibrary,DropboxFile);DropboxLibrary.prototype.isAutosave=function(){return!0};DropboxLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};DropboxLibrary.prototype.open=function(){};(function(){var b=null;window.DropboxClient=function(e){DrawioClient.call(this,e,"dbauth");this.client=new Dropbox({clientId:this.clientId})};mxUtils.extend(DropboxClient,DrawioClient);DropboxClient.prototype.appPath="/drawio-diagrams/";DropboxClient.prototype.extension=".drawio";DropboxClient.prototype.writingFile=!1;DropboxClient.prototype.maxRetries=4;DropboxClient.prototype.clientId=window.DRAWIO_DROPBOX_ID;DropboxClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"dropbox";DropboxClient.prototype.logout=
function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.client.authTokenRevoke().then(mxUtils.bind(this,function(){this.client.setAccessToken(null)}))};DropboxClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),p=this.client.usersGetCurrentAccount();
p.then(mxUtils.bind(this,function(u){window.clearTimeout(n);l&&(this.setUser(new DrawioUser(u.account_id,u.email,u.name.display_name)),e())}));p["catch"](mxUtils.bind(this,function(u){window.clearTimeout(n);l&&(null==u||401!==u.status||c?f({message:mxResources.get("accessDenied")}):(this.setUser(null),this.client.setAccessToken(null),b=null,this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)))}))};DropboxClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+
"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};DropboxClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onDropboxCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=
p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.client.setAccessToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.client.setAccessToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open("https://www.dropbox.com/oauth2/authorize?client_id="+this.clientId+
-(p?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(G,H){if(n){window.onDropboxCallback=null;n=!1;try{null==G?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=G.access_token,this.client.setAccessToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f())}catch(F){c(F)}finally{null!=
-H&&H.close()}}else null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onDropboxCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(p){var u=!0,G=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),H=e();H.then(mxUtils.bind(this,
-function(F){window.clearTimeout(G);u&&null!=f&&f(F)}));H["catch"](mxUtils.bind(this,function(F){window.clearTimeout(G);u&&(null==F||500!=F.status&&400!=F.status&&401!=F.status?c({message:mxResources.get("error")+" "+F.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,p?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),n=mxUtils.bind(this,function(p){null==this.user?
+(p?"&token_access_type=offline":"")+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"dbauth")?window.onDropboxCallback=mxUtils.bind(this,function(F,H){if(n){window.onDropboxCallback=null;n=!1;try{null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=F.access_token,this.client.setAccessToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f())}catch(E){c(E)}finally{null!=
+H&&H.close()}}else null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onDropboxCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};DropboxClient.prototype.executePromise=function(e,f,c){var l=mxUtils.bind(this,function(p){var u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;c({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),H=e();H.then(mxUtils.bind(this,
+function(E){window.clearTimeout(F);u&&null!=f&&f(E)}));H["catch"](mxUtils.bind(this,function(E){window.clearTimeout(F);u&&(null==E||500!=E.status&&400!=E.status&&401!=E.status?c({message:mxResources.get("error")+" "+E.status}):(this.setUser(null),this.client.setAccessToken(null),b=null,p?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){n(!0)},c)})}):this.authenticate(function(){l(!0)},c)))}))}),n=mxUtils.bind(this,function(p){null==this.user?
this.updateUser(function(){n(!0)},c,p):l(p)});null==b?this.authenticate(function(){n(!0)},c):n(!1)};DropboxClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};DropboxClient.prototype.getFile=function(e,f,c,l){l=null!=l?l:!1;var n=/\.png$/i.test(e);if(/^https:\/\//i.test(e)||/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&n){var p=mxUtils.bind(this,function(){var u=e.split("/");this.ui.convertFile(e,0<u.length?u[u.length-1]:e,null,this.extension,
-f,c)});null!=b?p():this.authenticate(p,c)}else p={path:"/"+e},null!=urlParams.rev&&(p.rev=urlParams.rev),this.readFile(p,mxUtils.bind(this,function(u,G){var H=null;if(0<(n?u.lastIndexOf(","):-1)){var F=this.ui.extractGraphModelFromPng(u);null!=F&&0<F.length?u=F:H=new LocalFile(this,u,e,!0)}f(null!=H?H:l?new DropboxLibrary(this.ui,u,G):new DropboxFile(this.ui,u,G))}),c,n)};DropboxClient.prototype.readFile=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var G=!0,H=window.setTimeout(mxUtils.bind(this,
-function(){G=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),F=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});F.then(mxUtils.bind(this,function(K){}));F["catch"](function(K){window.clearTimeout(H);G&&null!=K&&409==K.status&&(G=!1,c({message:mxResources.get("fileNotFound")}))});F=this.client.filesDownload(e);F.then(mxUtils.bind(this,function(K){window.clearTimeout(H);if(G){G=!1;try{var d=new FileReader;d.onload=mxUtils.bind(this,function(g){f(d.result,K)});l?d.readAsDataURL(K.fileBlob):
-d.readAsText(K.fileBlob)}catch(g){c(g)}}}));F["catch"](mxUtils.bind(this,function(K){window.clearTimeout(H);G&&(G=!1,null==K||500!=K.status&&400!=K.status&&401!=K.status?c({message:mxResources.get("error")+" "+K.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c)))}))}),p=mxUtils.bind(this,function(u){null==this.user?this.updateUser(function(){p(!0)},
+f,c)});null!=b?p():this.authenticate(p,c)}else p={path:"/"+e},null!=urlParams.rev&&(p.rev=urlParams.rev),this.readFile(p,mxUtils.bind(this,function(u,F){var H=null;if(0<(n?u.lastIndexOf(","):-1)){var E=this.ui.extractGraphModelFromPng(u);null!=E&&0<E.length?u=E:H=new LocalFile(this,u,e,!0)}f(null!=H?H:l?new DropboxLibrary(this.ui,u,F):new DropboxFile(this.ui,u,F))}),c,n)};DropboxClient.prototype.readFile=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var F=!0,H=window.setTimeout(mxUtils.bind(this,
+function(){F=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout),E=this.client.filesGetMetadata({path:"/"+e.path.substring(1),include_deleted:!1});E.then(mxUtils.bind(this,function(K){}));E["catch"](function(K){window.clearTimeout(H);F&&null!=K&&409==K.status&&(F=!1,c({message:mxResources.get("fileNotFound")}))});E=this.client.filesDownload(e);E.then(mxUtils.bind(this,function(K){window.clearTimeout(H);if(F){F=!1;try{var d=new FileReader;d.onload=mxUtils.bind(this,function(g){f(d.result,K)});l?d.readAsDataURL(K.fileBlob):
+d.readAsText(K.fileBlob)}catch(g){c(g)}}}));E["catch"](mxUtils.bind(this,function(K){window.clearTimeout(H);F&&(F=!1,null==K||500!=K.status&&400!=K.status&&401!=K.status?c({message:mxResources.get("error")+" "+K.status}):(this.client.setAccessToken(null),this.setUser(null),b=null,u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c)))}))}),p=mxUtils.bind(this,function(u){null==this.user?this.updateUser(function(){p(!0)},
c,u):n(u)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};DropboxClient.prototype.checkExists=function(e,f,c){var l=mxUtils.bind(this,function(){return this.client.filesGetMetadata({path:"/"+e.toLowerCase(),include_deleted:!1})});this.executePromise(l,mxUtils.bind(this,function(n){c?f(!1,!0,n):this.ui.confirm(mxResources.get("replaceIt",[e]),function(){f(!0,!0,n)},function(){f(!1,!0,n)})}),function(n){f(!0,!1)})};DropboxClient.prototype.renameFile=function(e,f,c,l){if(/[\\\/:\?\*"\|]/.test(f))l({message:mxResources.get("dropboxCharsNotAllowed")});
-else{if(null!=e&&null!=f){var n=e.stat.path_display.substring(1),p=n.lastIndexOf("/");0<p&&(f=n.substring(0,p+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(u,G,H){u?(u=mxUtils.bind(this,function(F){F=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+f,autorename:!1})});this.executePromise(F,c,l)}),G&&H.path_lower.substring(1)!==f.toLowerCase()?(G=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
-f.toLowerCase()})}),this.executePromise(G,u,l)):u()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,n){n=null!=n?n:!1;this.checkExists(e,mxUtils.bind(this,function(p){p?this.saveFile(e,f,mxUtils.bind(this,function(u){n?c(new DropboxLibrary(this.ui,f,u)):c(new DropboxFile(this.ui,f,u))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,n){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});
+else{if(null!=e&&null!=f){var n=e.stat.path_display.substring(1),p=n.lastIndexOf("/");0<p&&(f=n.substring(0,p+1)+f)}null!=e&&null!=f&&e.stat.path_lower.substring(1)!==f.toLowerCase()?this.checkExists(f,mxUtils.bind(this,function(u,F,H){u?(u=mxUtils.bind(this,function(E){E=mxUtils.bind(this,function(){return this.client.filesMove({from_path:e.stat.path_display,to_path:"/"+f,autorename:!1})});this.executePromise(E,c,l)}),F&&H.path_lower.substring(1)!==f.toLowerCase()?(F=mxUtils.bind(this,function(){return this.client.filesDelete({path:"/"+
+f.toLowerCase()})}),this.executePromise(F,u,l)):u()):l()})):l({message:mxResources.get("invalidName")})}};DropboxClient.prototype.insertLibrary=function(e,f,c,l){this.insertFile(e,f,c,l,!0)};DropboxClient.prototype.insertFile=function(e,f,c,l,n){n=null!=n?n:!1;this.checkExists(e,mxUtils.bind(this,function(p){p?this.saveFile(e,f,mxUtils.bind(this,function(u){n?c(new DropboxLibrary(this.ui,f,u)):c(new DropboxFile(this.ui,f,u))}),l):l()}))};DropboxClient.prototype.saveFile=function(e,f,c,l,n){if(/[\\\/:\?\*"\|]/.test(e))l({message:mxResources.get("dropboxCharsNotAllowed")});
else if(15E7<=f.length)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(f.length)+" / 150 MB)"});else{n=null!=n?n:"";var p=mxUtils.bind(this,function(){return this.client.filesUpload({path:"/"+n+e,mode:{".tag":"overwrite"},mute:!0,contents:new Blob([f],{type:"text/plain"})})});this.executePromise(p,c,l)}};DropboxClient.prototype.pickLibrary=function(e){Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(f){if(this.ui.spinner.spin(document.body,
-mxResources.get("loading"))){var c=mxUtils.bind(this,function(p){this.ui.spinner.stop();this.ui.handleError(p)}),l=null!=f[0].link?f[0].link.indexOf(this.appPath):-1;if(0<l){var n=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(p,u){if(null!=u&&u.id==f[0].id)try{this.ui.spinner.stop(),e(n.substring(1),new DropboxLibrary(this.ui,p,u))}catch(G){this.ui.handleError(G)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],
+mxResources.get("loading"))){var c=mxUtils.bind(this,function(p){this.ui.spinner.stop();this.ui.handleError(p)}),l=null!=f[0].link?f[0].link.indexOf(this.appPath):-1;if(0<l){var n=decodeURIComponent(f[0].link.substring(l+this.appPath.length-1));this.readFile({path:n},mxUtils.bind(this,function(p,u){if(null!=u&&u.id==f[0].id)try{this.ui.spinner.stop(),e(n.substring(1),new DropboxLibrary(this.ui,p,u))}catch(F){this.ui.handleError(F)}else this.createLibrary(f[0],e,c)}),c)}else this.createLibrary(f[0],
e,c)}})})};DropboxClient.prototype.createLibrary=function(e,f,c){this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,function(){this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(l){this.insertFile(e.name,l,mxUtils.bind(this,function(n){try{this.ui.spinner.stop(),f(n.getHash().substring(1),n)}catch(p){c(p)}}),c,!0)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()}))};DropboxClient.prototype.pickFile=function(e,f){null!=
-Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),e(c[0].link);else{var l=mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}),n=mxUtils.bind(this,function(H,F){this.ui.spinner.stop();e(H,
-F)}),p=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&p)n(c[0].link);else{var u=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<u){var G=decodeURIComponent(c[0].link.substring(u+this.appPath.length-1));this.readFile({path:G},mxUtils.bind(this,function(H,F){if(null!=F&&F.id==c[0].id){var K=p?H.lastIndexOf(","):-1;this.ui.spinner.stop();var d=null;0<K&&(K=this.ui.extractGraphModelFromPng(H),null!=K&&0<K.length?H=K:d=new LocalFile(this,
-H,G,!0));e(G.substring(1),null!=d?d:new DropboxFile(this.ui,H,F))}else this.createFile(c[0],n,l)}),l,p)}else this.createFile(c[0],n,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(n){null!=n&&0<n.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,
+Dropbox.choose?(e=null!=e?e:mxUtils.bind(this,function(c,l){this.ui.loadFile(null!=c?"D"+encodeURIComponent(c):l.getHash(),null,l)}),Dropbox.choose({linkType:"direct",cancel:mxUtils.bind(this,function(){}),success:mxUtils.bind(this,function(c){if(this.ui.spinner.spin(document.body,mxResources.get("loading")))if(f)this.ui.spinner.stop(),e(c[0].link);else{var l=mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}),n=mxUtils.bind(this,function(H,E){this.ui.spinner.stop();e(H,
+E)}),p=/\.png$/i.test(c[0].name);if(/\.vsdx$/i.test(c[0].name)||/\.gliffy$/i.test(c[0].name)||!this.ui.useCanvasForExport&&p)n(c[0].link);else{var u=null!=c[0].link?c[0].link.indexOf(this.appPath):-1;if(0<u){var F=decodeURIComponent(c[0].link.substring(u+this.appPath.length-1));this.readFile({path:F},mxUtils.bind(this,function(H,E){if(null!=E&&E.id==c[0].id){var K=p?H.lastIndexOf(","):-1;this.ui.spinner.stop();var d=null;0<K&&(K=this.ui.extractGraphModelFromPng(H),null!=K&&0<K.length?H=K:d=new LocalFile(this,
+H,F,!0));e(F.substring(1),null!=d?d:new DropboxFile(this.ui,H,E))}else this.createFile(c[0],n,l)}),l,p)}else this.createFile(c[0],n,l)}}})})):this.ui.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})};DropboxClient.prototype.createFile=function(e,f,c){var l=/(\.png)$/i.test(e.name);this.ui.editor.loadUrl(e.link,mxUtils.bind(this,function(n){null!=n&&0<n.length?this.ui.confirm(mxResources.get("note")+": "+mxResources.get("fileWillBeSavedInAppFolder",[e.name]),mxUtils.bind(this,
function(){var p=l?n.lastIndexOf(","):-1;0<p&&(p=this.ui.extractGraphModelFromPng(n.substring(p+1)),null!=p&&0<p.length&&(n=p));this.insertFile(e.name,n,mxUtils.bind(this,function(u){f(e.name,u)}),c)}),mxUtils.bind(this,function(){this.ui.spinner.stop()})):(this.ui.spinner.stop(),c({message:mxResources.get("errorLoadingFile")}))}),c,l)}})();OneDriveFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f};mxUtils.extend(OneDriveFile,DrawioFile);OneDriveFile.prototype.autosaveDelay=500;OneDriveFile.prototype.isRealtimeSupported=function(){return!0};
OneDriveFile.prototype.getFileUrl=function(){var b=this.meta.webUrl;b=b.substring(0,b.lastIndexOf("/"));if(null!=this.meta.parentReference)try{if("personal"==this.meta.parentReference.driveType)b="https://onedrive.live.com/?cid="+encodeURIComponent(this.meta.parentReference.driveId)+"&id="+encodeURIComponent(this.meta.id);else if("documentLibrary"==this.meta.parentReference.driveType){var e=this.meta.parentReference.path;e=e.substring(e.indexOf("/root:")+6);var f=this.meta.webUrl;b=f.substring(0,
f.length-e.length-encodeURIComponent(this.meta.name).length-1);f=f.substring(f.indexOf("/",8));b=b+"/Forms/AllItems.aspx?id="+f+"&parent="+f.substring(0,f.lastIndexOf("/"))}else if("business"==this.meta.parentReference.driveType){b=this.meta["@microsoft.graph.downloadUrl"];var c=b.indexOf("/_layouts/15/download.aspx?");e=f=this.meta.webUrl;f=f.substring(8);f=f.substring(f.indexOf("/"));e=e.substring(0,e.lastIndexOf("/"));e=e.substring(e.indexOf("/",8));b=b.substring(0,c)+"/_layouts/15/onedrive.aspx?id="+
@@ -13848,8 +13852,8 @@ OneDriveFile.prototype.getCurrentUser=function(){return null!=this.ui.oneDrive?t
OneDriveFile.prototype.setDescriptor=function(b){this.meta=b};OneDriveFile.prototype.getDescriptorEtag=function(b){return b.eTag};OneDriveFile.prototype.setDescriptorEtag=function(b,e){b.eTag=e};OneDriveFile.prototype.loadPatchDescriptor=function(b,e){var f=this.ui.oneDrive.getItemURL(this.getId());this.ui.oneDrive.executeRequest(f+"?select=etag,file",mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?b(JSON.parse(c.getText())):e(this.ui.oneDrive.parseRequestText(c))}),e)};
OneDriveFile.prototype.getChannelKey=function(){return"undefined"!==typeof CryptoJS?CryptoJS.MD5(this.meta.createdDateTime+(null!=this.meta.createdBy&&null!=this.meta.createdBy.user?this.meta.createdBy.user.id:"")).toString():null};OneDriveFile.prototype.getLastModifiedDate=function(){return new Date(this.meta.lastModifiedDateTime)};OneDriveFile.prototype.save=function(b,e,f,c,l){this.doSave(this.getTitle(),b,e,f,c,l)};OneDriveFile.prototype.saveAs=function(b,e,f){this.doSave(b,!1,e,f)};
OneDriveFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=p;this.saveFile(b,e,f,c,l,n)}),c,l,n])};
-OneDriveFile.prototype.saveFile=function(b,e,f,c,l,n){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var p=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var u=n||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),G=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(H,F){this.setModified(this.getShadowModified());
-this.savingFile=!1;this.meta=H;this.fileSaved(F,G,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(H,F){try{this.savingFile=!1,this.isConflict(F)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();p()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
+OneDriveFile.prototype.saveFile=function(b,e,f,c,l,n){if(!this.isEditable())null!=f&&f();else if(!this.savingFile)if(this.getTitle()==b){var p=mxUtils.bind(this,function(){try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var u=n||this.constructor!=OneDriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:this.getCurrentEtag(),F=this.meta;null!=this.sync&&this.sync.fileSaving();this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(H,E){this.setModified(this.getShadowModified());
+this.savingFile=!1;this.meta=H;this.fileSaved(E,F,mxUtils.bind(this,function(){this.contentChanged();null!=f&&f()}),c)}),mxUtils.bind(this,function(H,E){try{this.savingFile=!1,this.isConflict(E)?(this.inConflictState=!0,null!=this.sync?(this.savingFile=!0,this.sync.fileConflict(null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){this.updateFileData();p()}),100+500*Math.random())}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))):null!=c&&c()):null!=c&&
c(H)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}}),u)}catch(H){if(this.savingFile=!1,null!=c)c(H);else throw H;}});p()}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.oneDrive.insertFile(b,this.getData(),mxUtils.bind(this,function(u){this.setModified(this.getShadowModified());this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(u)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}))};
OneDriveFile.prototype.rename=function(b,e,f){var c=this.getCurrentRevisionId();this.ui.oneDrive.renameFile(this,b,mxUtils.bind(this,function(l){this.hasSameExtension(b,this.getTitle())?(this.meta=l,this.descriptorChanged(),null!=this.sync&&this.sync.descriptorChanged(c),null!=e&&e(l)):(this.meta=l,null!=this.sync&&this.sync.descriptorChanged(c),this.save(!0,e,f))}),f)};
OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId(),b,mxUtils.bind(this,function(c){this.meta=c;this.descriptorChanged();null!=e&&e(c)}),f)};OneDriveLibrary=function(b,e,f){OneDriveFile.call(this,b,e,f)};mxUtils.extend(OneDriveLibrary,OneDriveFile);OneDriveLibrary.prototype.isAutosave=function(){return!0};OneDriveLibrary.prototype.save=function(b,e,f){this.ui.oneDrive.saveFile(this,mxUtils.bind(this,function(c){this.desc=c;null!=e&&e(c)}),f)};OneDriveLibrary.prototype.open=function(){};(function(){var b=null;window.OneDriveClient=function(e,f,c,l){null==f&&null!=window.urlParams&&"1"==window.urlParams.extAuth&&(f=!0);null==c&&(c=null!=window.Editor?Editor.oneDriveInlinePicker:!0);null==l&&null!=window.urlParams&&"1"==window.urlParams.noLogoutOD&&(l=!0);DrawioClient.call(this,e,f?"oneDriveExtAuthInfo":"oneDriveAuthInfo");this.isExtAuth=f;this.inlinePicker=c;this.noLogout=l;e=JSON.parse(this.token);null!=e&&(this.endpointHint=null!=e.endpointHint?e.endpointHint.replace("/Documents",
@@ -13857,35 +13861,35 @@ OneDriveFile.prototype.move=function(b,e,f){this.ui.oneDrive.moveFile(this.getId
"417a451a-a343-4788-b6c1-901e63182565":OneDriveClient.prototype.clientId;OneDriveClient.prototype.scopes="user.read files.readwrite.all sites.read.all";OneDriveClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"microsoft";OneDriveClient.prototype.pickerRedirectUri=window.DRAWIO_SERVER_URL+"onedrive3.html";OneDriveClient.prototype.defEndpointHint="api.onedrive.com";OneDriveClient.prototype.endpointHint=OneDriveClient.prototype.defEndpointHint;OneDriveClient.prototype.rootId={id:"root",name:"root",
parentReference:{driveId:"me"}};OneDriveClient.prototype.extension=".drawio";OneDriveClient.prototype.baseUrl="https://graph.microsoft.com/v1.0";OneDriveClient.prototype.authUrl="https://login.microsoftonline.com/"+(window.DRAWIO_MSGRAPH_TENANT_ID||"common");OneDriveClient.prototype.emptyFn=function(){};OneDriveClient.prototype.invalidFilenameRegExs=[/[~"#%\*:<>\?\/\\{\|}]/,/^\.lock$/i,/^CON$/i,/^PRN$/i,/^AUX$/i,/^NUL$/i,/^COM\d$/i,/^LPT\d$/i,/^desktop\.ini$/i,/_vti_/i];OneDriveClient.prototype.isValidFilename=
function(e){if(null==e||""===e)return!1;for(var f=0;f<this.invalidFilenameRegExs.length;f++)if(this.invalidFilenameRegExs[f].test(e))return!1;return!0};OneDriveClient.prototype.get=function(e,f,c){e=new mxXmlRequest(e,null,"GET");e.setRequestHeaders=mxUtils.bind(this,function(l,n){l.setRequestHeader("Authorization","Bearer "+b)});e.send(f,c);return e};OneDriveClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout);
-this.get(this.baseUrl+"/me",mxUtils.bind(this,function(p){window.clearTimeout(n);if(l)if(200>p.getStatus()||300<=p.getStatus())c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f));else try{var u=JSON.parse(p.getText());this.setUser(new DrawioUser(u.id,u.mail,u.displayName));e()}catch(G){f(G)}}),mxUtils.bind(this,function(p){window.clearTimeout(n);l&&f(p)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=
+this.get(this.baseUrl+"/me",mxUtils.bind(this,function(p){window.clearTimeout(n);if(l)if(200>p.getStatus()||300<=p.getStatus())c?f({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f));else try{var u=JSON.parse(p.getText());this.setUser(new DrawioUser(u.id,u.mail,u.displayName));e()}catch(F){f(F)}}),mxUtils.bind(this,function(p){window.clearTimeout(n);l&&f(p)}))};OneDriveClient.prototype.resetTokenRefresh=function(e){null!=
this.tokenRefreshThread&&(window.clearTimeout(this.tokenRefreshThread),this.tokenRefreshThread=null);0<e&&(this.tokenRefreshInterval=1E3*e,this.tokenRefreshThread=window.setTimeout(mxUtils.bind(this,function(){this.authenticate(this.emptyFn,this.emptyFn,!0)}),900*e))};OneDriveClient.prototype.authenticate=function(e,f,c){this.isExtAuth?(window.oneDriveAuth?window.oneDriveAuth:window.parent.oneDriveAuth)(mxUtils.bind(this,function(l){this.updateAuthInfo(l,!0,null==this.endpointHint,e,f)}),f,null!=
window.urlParams&&"1"==urlParams.odAuthCancellable):(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(l){200<=l.getStatus()&&299>=l.getStatus()?this.authenticateStep2(l.getText(),e,f,c):null!=f&&f(l)}),f)};OneDriveClient.prototype.updateAuthInfo=function(e,f,c,l,n){c&&this.setUser(null);b=e.access_token;delete e.access_token;e.expiresOn=Date.now()+1E3*e.expires_in;this.tokenExpiresOn=e.expiresOn;e.remember=f;this.setPersistentToken(JSON.stringify(e),!f);
-this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),n):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var n=mxUtils.bind(this,function(){var p=!0,u=JSON.parse(this.getPersistentToken(!0));null!=u?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(G){if(200<=G.getStatus()&&
-299>=G.getStatus())try{this.updateAuthInfo(JSON.parse(G.getText()),u.remember,!1,f,c)}catch(H){c({message:mxResources.get("authFailed"),retry:n})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=G.getStatus()&&400!=G.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:n}):n()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(G,H){var F=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+
-"&scope="+encodeURIComponent(this.scopes+(G?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e);F=window.open(F,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=F&&(window.onOneDriveCallback=mxUtils.bind(this,function(K,d){if(p){window.onOneDriveCallback=
-null;p=!1;try{null==K?c({message:mxResources.get("accessDenied"),retry:n}):(null!=H&&H(),this.updateAuthInfo(K,G,!0,f,c))}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}),F.focus())}),mxUtils.bind(this,function(){p&&(window.onOneDriveCallback=null,p=!1,c({message:mxResources.get("accessDenied"),retry:n}))}))});n()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=
+this.resetTokenRefresh(e.expires_in);c?this.getAccountTypeAndEndpoint(mxUtils.bind(this,function(){l()}),n):l()};OneDriveClient.prototype.authenticateStep2=function(e,f,c,l){if(null==window.onOneDriveCallback){var n=mxUtils.bind(this,function(){var p=!0,u=JSON.parse(this.getPersistentToken(!0));null!=u?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(F){if(200<=F.getStatus()&&
+299>=F.getStatus())try{this.updateAuthInfo(JSON.parse(F.getText()),u.remember,!1,f,c)}catch(H){c({message:mxResources.get("authFailed"),retry:n})}else this.clearPersistentToken(),this.setUser(null),b=null,401!=F.getStatus()&&400!=F.getStatus()||l?c({message:mxResources.get("accessDenied"),retry:n}):n()}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(F,H){var E=this.authUrl+"/oauth2/v2.0/authorize?client_id="+this.clientId+"&response_type=code&redirect_uri="+encodeURIComponent(this.redirectUri)+
+"&scope="+encodeURIComponent(this.scopes+(F?" offline_access":""))+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e);E=window.open(E,"odauth",["width=525,height=525","top="+(window.screenY+Math.max(window.outerHeight-525,0)/2),"left="+(window.screenX+Math.max(window.outerWidth-525,0)/2),"status=no,resizable=yes,toolbar=no,menubar=no,scrollbars=yes"].join());null!=E&&(window.onOneDriveCallback=mxUtils.bind(this,function(K,d){if(p){window.onOneDriveCallback=
+null;p=!1;try{null==K?c({message:mxResources.get("accessDenied"),retry:n}):(null!=H&&H(),this.updateAuthInfo(K,F,!0,f,c))}catch(g){c(g)}finally{null!=d&&d.close()}}else null!=d&&d.close()}),E.focus())}),mxUtils.bind(this,function(){p&&(window.onOneDriveCallback=null,p=!1,c({message:mxResources.get("accessDenied"),retry:n}))}))});n()}else c({code:App.ERROR_BUSY})};OneDriveClient.prototype.getAccountTypeAndEndpoint=function(e,f){this.get(this.baseUrl+"/me/drive/root",mxUtils.bind(this,function(c){try{if(200<=
c.getStatus()&&299>=c.getStatus()){var l=JSON.parse(c.getText());0<l.webUrl.indexOf(".sharepoint.com")?this.endpointHint=l.webUrl.replace("/Documents","/_layouts/15/onedrive.aspx"):this.endpointHint=this.defEndpointHint;var n=JSON.parse(this.getPersistentToken(!0));null!=n&&(n.endpointHint=this.endpointHint,this.setPersistentToken(JSON.stringify(n),!n.remember));e();return}}catch(p){}f({message:mxResources.get("unknownError")+" (Code: "+c.getStatus()+")"})}),f)};OneDriveClient.prototype.executeRequest=
-function(e,f,c){var l=mxUtils.bind(this,function(n){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(G){window.clearTimeout(u);p&&(200<=G.getStatus()&&299>=G.getStatus()||404==G.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(G)):n||401!==G.getStatus()&&400!==G.getStatus()?c(this.parseRequestText(G)):this.authenticate(function(){l(!0)},c,n))}),mxUtils.bind(this,
-function(G){window.clearTimeout(u);p&&c(G)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<
+function(e,f,c){var l=mxUtils.bind(this,function(n){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;c({code:App.ERROR_TIMEOUT,retry:l})}),this.ui.timeout);this.get(e,mxUtils.bind(this,function(F){window.clearTimeout(u);p&&(200<=F.getStatus()&&299>=F.getStatus()||404==F.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),f(F)):n||401!==F.getStatus()&&400!==F.getStatus()?c(this.parseRequestText(F)):this.authenticate(function(){l(!0)},c,n))}),mxUtils.bind(this,
+function(F){window.clearTimeout(u);p&&c(F)}))});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){l(!0)},c):l(!1)};OneDriveClient.prototype.checkToken=function(e,f){null==b||null==this.tokenRefreshThread||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(e,null!=f?f:this.emptyFn):e()};OneDriveClient.prototype.getItemRef=function(e){var f=e.split("/");return 1<f.length?{driveId:f[0],id:f[1]}:{id:e}};OneDriveClient.prototype.getItemURL=function(e,f){var c=e.split("/");return 1<
c.length?(e=c[1],(f?"":this.baseUrl)+"/drives/"+c[0]+("root"==e?"/root":"/items/"+e)):(f?"":this.baseUrl)+"/me/drive/items/"+e};OneDriveClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!1,!0)};OneDriveClient.prototype.removeExtraHtmlContent=function(e){var f=e.lastIndexOf('<html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><meta name="Robots" ');0<f&&(e=e.substring(0,f));return e};OneDriveClient.prototype.getFile=function(e,f,c,l,n){n=null!=n?n:!1;this.executeRequest(this.getItemURL(e),
-mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var u=JSON.parse(p.getText()),G=/\.png$/i.test(u.name);if(/\.v(dx|sdx?)$/i.test(u.name)||/\.gliffy$/i.test(u.name)||/\.pdf$/i.test(u.name)||!this.ui.useCanvasForExport&&G)this.ui.convertFile(u["@microsoft.graph.downloadUrl"],u.name,null!=u.file?u.file.mimeType:null,this.extension,f,c);else{var H=!0,F=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(u["@microsoft.graph.downloadUrl"],
-mxUtils.bind(this,function(K){try{if(window.clearTimeout(F),H){/\.html$/i.test(u.name)&&(K=this.removeExtraHtmlContent(K));var d=null;if(0<(G?K.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(K);null!=g&&0<g.length?K=g:d=new LocalFile(this.ui,K,u.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)){var k=K.substring(22);K=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,u["@microsoft.graph.downloadUrl"])?
-this.ui.parseFileData(K,mxUtils.bind(this,function(v){try{4==v.readyState&&(200<=v.status&&299>=v.status?f(new LocalFile(this.ui,v.responseText,u.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),u.name):null!=d?f(d):n?f(new OneDriveLibrary(this.ui,K,u)):f(new OneDriveFile(this.ui,K,u))}}catch(v){if(null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(K){window.clearTimeout(F);H&&c(this.parseRequestText(K))}),G||null!=
+mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus()){var u=JSON.parse(p.getText()),F=/\.png$/i.test(u.name);if(/\.v(dx|sdx?)$/i.test(u.name)||/\.gliffy$/i.test(u.name)||/\.pdf$/i.test(u.name)||!this.ui.useCanvasForExport&&F)this.ui.convertFile(u["@microsoft.graph.downloadUrl"],u.name,null!=u.file?u.file.mimeType:null,this.extension,f,c);else{var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT})}),this.ui.timeout);this.ui.editor.loadUrl(u["@microsoft.graph.downloadUrl"],
+mxUtils.bind(this,function(K){try{if(window.clearTimeout(E),H){/\.html$/i.test(u.name)&&(K=this.removeExtraHtmlContent(K));var d=null;if(0<(F?K.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(K);null!=g&&0<g.length?K=g:d=new LocalFile(this.ui,K,u.name,!0)}else if("data:image/png;base64,PG14ZmlsZS"==K.substring(0,32)){var k=K.substring(22);K=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k)}Graph.fileSupport&&(new XMLHttpRequest).upload&&this.ui.isRemoteFileFormat(K,u["@microsoft.graph.downloadUrl"])?
+this.ui.parseFileData(K,mxUtils.bind(this,function(v){try{4==v.readyState&&(200<=v.status&&299>=v.status?f(new LocalFile(this.ui,v.responseText,u.name+this.extension,!0)):null!=c&&c({message:mxResources.get("errorLoadingFile")}))}catch(t){if(null!=c)c(t);else throw t;}}),u.name):null!=d?f(d):n?f(new OneDriveLibrary(this.ui,K,u)):f(new OneDriveFile(this.ui,K,u))}}catch(v){if(null!=c)c(v);else throw v;}}),mxUtils.bind(this,function(K){window.clearTimeout(E);H&&c(this.parseRequestText(K))}),F||null!=
u.file&&null!=u.file.mimeType&&("image/"==u.file.mimeType.substring(0,6)&&"image/svg"!=u.file.mimeType.substring(0,9)||"application/pdf"==u.file.mimeType))}}else this.isExtAuth?c({message:mxResources.get("fileNotFoundOrDenied"),ownerEmail:null!=window.urlParams?urlParams.ownerEml:null}):c(this.parseRequestText(p))}),function(p){null!=c&&(null!=p&&null!=p.error&&"ObjectHandle is Invalid"===p.error.message&&(p.error.message=mxResources.get("fileNotFoundOrDenied")),c(p))})};OneDriveClient.prototype.renameFile=
function(e,f,c,l){null!=e&&null!=f&&(this.isValidFilename(f)?this.checkExists(e.getParentId(),f,!1,mxUtils.bind(this,function(n){n?this.writeFile(this.getItemURL(e.getId()),JSON.stringify({name:f}),"PATCH","application/json",c,l):l()})):l({message:this.invalidFilenameRegExs[0].test(f)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")}))};OneDriveClient.prototype.moveFile=function(e,f,c,l){f=this.getItemRef(f);var n=this.getItemRef(e);f.driveId!=n.driveId?l({message:mxResources.get("cannotMoveOneDrive",
-null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n)};OneDriveClient.prototype.insertFile=function(e,f,c,l,n,p){this.isValidFilename(e)?(n=null!=n?n:!1,this.checkExists(p,e,!0,mxUtils.bind(this,function(u){if(u){u="/me/drive/root";null!=p&&(u=this.getItemURL(p,!0));var G=mxUtils.bind(this,function(H){n?
-c(new OneDriveLibrary(this.ui,f,H)):c(new OneDriveFile(this.ui,f,H))});u=this.baseUrl+u+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(u,"","PUT",null,mxUtils.bind(this,function(H){this.writeLargeFile(this.getItemURL(H.id),f,G,l)}),l):this.writeFile(u,f,"PUT",null,G,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
+null,"Moving a file between accounts is not supported yet.")}):this.writeFile(this.getItemURL(e),JSON.stringify({parentReference:f}),"PATCH","application/json",c,l)};OneDriveClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n)};OneDriveClient.prototype.insertFile=function(e,f,c,l,n,p){this.isValidFilename(e)?(n=null!=n?n:!1,this.checkExists(p,e,!0,mxUtils.bind(this,function(u){if(u){u="/me/drive/root";null!=p&&(u=this.getItemURL(p,!0));var F=mxUtils.bind(this,function(H){n?
+c(new OneDriveLibrary(this.ui,f,H)):c(new OneDriveFile(this.ui,f,H))});u=this.baseUrl+u+"/children/"+encodeURIComponent(e)+"/content";4E6<=f.length?this.writeFile(u,"","PUT",null,mxUtils.bind(this,function(H){this.writeLargeFile(this.getItemURL(H.id),f,F,l)}),l):this.writeFile(u,f,"PUT",null,F,l)}else l()}))):l({message:this.invalidFilenameRegExs[0].test(e)?mxResources.get("oneDriveCharsNotAllowed"):mxResources.get("oneDriveInvalidDeviceName")})};OneDriveClient.prototype.checkExists=function(e,f,
c,l){var n="/me/drive/root";null!=e&&(n=this.getItemURL(e,!0));this.executeRequest(this.baseUrl+n+"/children/"+encodeURIComponent(f),mxUtils.bind(this,function(p){404==p.getStatus()?l(!0):c?(this.ui.spinner.stop(),this.ui.confirm(mxResources.get("replaceIt",[f]),function(){l(!0)},function(){l(!1)})):(this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){l(!1)}))}),function(p){l(!1)},!0)};OneDriveClient.prototype.saveFile=function(e,
-f,c,l){try{var n=e.getData(),p=mxUtils.bind(this,function(G){var H=mxUtils.bind(this,function(K){f(K,n)}),F=this.getItemURL(e.getId());4E6<=G.length?this.writeLargeFile(F,G,H,c,l):this.writeFile(F+"/content/",G,"PUT",null,H,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){p(this.ui.base64ToBlob(G,"image/png"))}),c,this.ui.getCurrentFile()!=e?n:null,u.scale,u.border)}else p(n)}catch(G){c(G)}};
-OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,n){try{if(null!=f){var p=(new TextEncoder).encode(f).length,u=mxUtils.bind(this,function(H,F,K,d){try{d=d||0;var g=!0,k=null;k=window.setTimeout(mxUtils.bind(this,function(){g=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var v=f.substr(F,4194304),t=(new TextEncoder).encode(v).length,x=new mxXmlRequest(H,v,"PUT");x.setRequestHeaders=mxUtils.bind(this,function(A,J){A.setRequestHeader("Content-Range","bytes "+K+"-"+(K+t-1)+"/"+p)});x.send(mxUtils.bind(this,
-function(A){window.clearTimeout(k);if(g){var J=A.getStatus();200<=J&&299>=J?(J=F+v.length,J==f.length?c(JSON.parse(A.getText())):u(H,J,K+t,d)):500<=J&&599>=J&&2>d?(d++,u(H,F,K,d)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(k);g&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),G=mxUtils.bind(this,function(H){try{var F=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){F=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e+
-"/createUploadSession","{}","POST");d.setRequestHeaders=mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b);null!=n&&g.setRequestHeader("If-Match",n)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);F&&(200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),u(g.uploadUrl,0,0)):H||401!==g.getStatus()?l(this.parseRequestText(g),g):this.authenticate(function(){G(!0)},l,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);
-F&&l(this.parseRequestText(g))}))}catch(g){l(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},l):G(!1)}else l({message:mxResources.get("unknownError")})}catch(H){l(H)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,n,p,u){try{if(null!=e&&null!=f){var G=mxUtils.bind(this,function(H){try{var F=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){F=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e,f,c);d.setRequestHeaders=
-mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type",l||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=u&&g.setRequestHeader("If-Match",u)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);F&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),n(JSON.parse(g.getText()))):H||401!==g.getStatus()?p(this.parseRequestText(g),g):this.authenticate(function(){G(!0)},p,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);
-F&&p(this.parseRequestText(g))}))}catch(g){p(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){G(!0)},p):G(!1)}else p({message:mxResources.get("unknownError")})}catch(H){p(H)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};
-OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,n=document.createElement("div");n.style.position="relative";var p=new CustomDialog(this.ui,n,mxUtils.bind(this,function(){var u=l.getSelectedItem();if(null!=u)if(f&&"object"==typeof u.folder)e({value:[u]});else{if(!u.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var G=OneDriveFile.prototype.getIdOf(u);this.executeRequest(this.getItemURL(G),mxUtils.bind(this,function(H){this.ui.spinner.stop();
-200<=H.getStatus()&&299>=H.getStatus()?(H=JSON.parse(H.getText()),e(G,{value:[H]})):this.ui.handleError({code:H.getStatus()})}),mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"select":"open"),null,null,null,null,!0);this.ui.showDialog(p.container,550,500,!0,!0);n.style.width=p.container.parentNode.style.width;n.style.height=parseInt(p.container.parentNode.style.height)-60+"px";
-l=new mxODPicker(n,null,mxUtils.bind(this,function(u,G,H,F){this.executeRequest(F?u:this.baseUrl+u,function(K){G(JSON.parse(K.getText()))},H)}),mxUtils.bind(this,function(u,G,H,F){this.executeRequest(this.baseUrl+"/drives/"+G+"/items/"+u,function(K){H(JSON.parse(K.getText()))},F)}),null,null,function(u){f?e({value:[u]}):e(OneDriveFile.prototype.getIdOf(u))},mxUtils.bind(this,function(u){this.ui.showError(mxResources.get("error"),u)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=
+f,c,l){try{var n=e.getData(),p=mxUtils.bind(this,function(F){var H=mxUtils.bind(this,function(K){f(K,n)}),E=this.getItemURL(e.getId());4E6<=F.length?this.writeLargeFile(E,F,H,c,l):this.writeFile(E+"/content/",F,"PUT",null,H,c,l)});if(this.ui.useCanvasForExport&&/(\.png)$/i.test(e.meta.name)){var u=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(F){p(this.ui.base64ToBlob(F,"image/png"))}),c,this.ui.getCurrentFile()!=e?n:null,u.scale,u.border)}else p(n)}catch(F){c(F)}};
+OneDriveClient.prototype.writeLargeFile=function(e,f,c,l,n){try{if(null!=f){var p=(new TextEncoder).encode(f).length,u=mxUtils.bind(this,function(H,E,K,d){try{d=d||0;var g=!0,k=null;k=window.setTimeout(mxUtils.bind(this,function(){g=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout);var v=f.substr(E,4194304),t=(new TextEncoder).encode(v).length,x=new mxXmlRequest(H,v,"PUT");x.setRequestHeaders=mxUtils.bind(this,function(A,J){A.setRequestHeader("Content-Range","bytes "+K+"-"+(K+t-1)+"/"+p)});x.send(mxUtils.bind(this,
+function(A){window.clearTimeout(k);if(g){var J=A.getStatus();200<=J&&299>=J?(J=E+v.length,J==f.length?c(JSON.parse(A.getText())):u(H,J,K+t,d)):500<=J&&599>=J&&2>d?(d++,u(H,E,K,d)):l(this.parseRequestText(A),A)}}),mxUtils.bind(this,function(A){window.clearTimeout(k);g&&l(this.parseRequestText(A))}))}catch(A){l(A)}}),F=mxUtils.bind(this,function(H){try{var E=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){E=!1;l({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e+
+"/createUploadSession","{}","POST");d.setRequestHeaders=mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type","application/json");g.setRequestHeader("Authorization","Bearer "+b);null!=n&&g.setRequestHeader("If-Match",n)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);E&&(200<=g.getStatus()&&299>=g.getStatus()?(g=JSON.parse(g.getText()),u(g.uploadUrl,0,0)):H||401!==g.getStatus()?l(this.parseRequestText(g),g):this.authenticate(function(){F(!0)},l,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);
+E&&l(this.parseRequestText(g))}))}catch(g){l(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){F(!0)},l):F(!1)}else l({message:mxResources.get("unknownError")})}catch(H){l(H)}};OneDriveClient.prototype.writeFile=function(e,f,c,l,n,p,u){try{if(null!=e&&null!=f){var F=mxUtils.bind(this,function(H){try{var E=!0,K=null;try{K=window.setTimeout(mxUtils.bind(this,function(){E=!1;p({code:App.ERROR_TIMEOUT})}),this.ui.timeout)}catch(g){}var d=new mxXmlRequest(e,f,c);d.setRequestHeaders=
+mxUtils.bind(this,function(g,k){g.setRequestHeader("Content-Type",l||" ");g.setRequestHeader("Authorization","Bearer "+b);null!=u&&g.setRequestHeader("If-Match",u)});d.send(mxUtils.bind(this,function(g){window.clearTimeout(K);E&&(200<=g.getStatus()&&299>=g.getStatus()?(null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0),n(JSON.parse(g.getText()))):H||401!==g.getStatus()?p(this.parseRequestText(g),g):this.authenticate(function(){F(!0)},p,H))}),mxUtils.bind(this,function(g){window.clearTimeout(K);
+E&&p(this.parseRequestText(g))}))}catch(g){p(g)}});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(function(){F(!0)},p):F(!1)}else p({message:mxResources.get("unknownError")})}catch(H){p(H)}};OneDriveClient.prototype.parseRequestText=function(e){var f={message:mxResources.get("unknownError")};try{f=JSON.parse(e.getText()),f.status=e.getStatus(),f.error&&(f.error.status=f.status,f.error.code=f.status)}catch(c){}return f};OneDriveClient.prototype.pickLibrary=function(e){this.pickFile(function(f){e(f)})};
+OneDriveClient.prototype.createInlinePicker=function(e,f,c){return mxUtils.bind(this,function(){var l=null,n=document.createElement("div");n.style.position="relative";var p=new CustomDialog(this.ui,n,mxUtils.bind(this,function(){var u=l.getSelectedItem();if(null!=u)if(f&&"object"==typeof u.folder)e({value:[u]});else{if(!u.folder&&this.ui.spinner.spin(document.body,mxResources.get("loading"))){var F=OneDriveFile.prototype.getIdOf(u);this.executeRequest(this.getItemURL(F),mxUtils.bind(this,function(H){this.ui.spinner.stop();
+200<=H.getStatus()&&299>=H.getStatus()?(H=JSON.parse(H.getText()),e(F,{value:[H]})):this.ui.handleError({code:H.getStatus()})}),mxUtils.bind(this,function(H){this.ui.spinner.stop();this.ui.handleError(H)}))}}else return mxResources.get("invalidSel",null,"Invalid selection")}),null,mxResources.get(f?"select":"open"),null,null,null,null,!0);this.ui.showDialog(p.container,550,500,!0,!0);n.style.width=p.container.parentNode.style.width;n.style.height=parseInt(p.container.parentNode.style.height)-60+"px";
+l=new mxODPicker(n,null,mxUtils.bind(this,function(u,F,H,E){this.executeRequest(E?u:this.baseUrl+u,function(K){F(JSON.parse(K.getText()))},H)}),mxUtils.bind(this,function(u,F,H,E){this.executeRequest(this.baseUrl+"/drives/"+F+"/items/"+u,function(K){H(JSON.parse(K.getText()))},E)}),null,null,function(u){f?e({value:[u]}):e(OneDriveFile.prototype.getIdOf(u))},mxUtils.bind(this,function(u){this.ui.showError(mxResources.get("error"),u)}),f,null,null,null,null,c)})};OneDriveClient.prototype.pickFolder=
function(e,f){var c=mxUtils.bind(this,function(n){this.ui.showError(mxResources.get("error"),n&&n.message?n.message:n)}),l=mxUtils.bind(this,function(n){var p=this.inlinePicker?this.createInlinePicker(e,!0):mxUtils.bind(this,function(){OneDrive.save({clientId:this.clientId,action:"query",openInNewWindow:!0,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference",accessToken:b,isConsumerAccount:!1},success:mxUtils.bind(this,
function(u){e(u);mxClient.IS_IE11&&(b=u.accessToken)}),cancel:mxUtils.bind(this,function(){}),error:c})});n?p():this.ui.confirm(mxResources.get("useRootFolder"),mxUtils.bind(this,function(){e({value:[this.rootId]})}),p,mxResources.get("yes"),mxResources.get("noPickFolder")+"...",!0);null==this.user&&this.updateUser(this.emptyFn,this.emptyFn,!0)});null==b||6E4>this.tokenExpiresOn-Date.now()?this.authenticate(mxUtils.bind(this,function(){l(this.inlinePicker&&f)}),c):l(f)};OneDriveClient.prototype.pickFile=
function(e,f){e=null!=e?e:mxUtils.bind(this,function(n){this.ui.loadFile("W"+encodeURIComponent(n))});var c=mxUtils.bind(this,function(n){this.ui.showError(mxResources.get("error"),n&&n.message?n.message:n)}),l=this.inlinePicker?this.createInlinePicker(e,null,f):mxUtils.bind(this,function(){OneDrive.open({clientId:this.clientId,action:"query",multiSelect:!1,advanced:{endpointHint:mxClient.IS_IE11?null:this.endpointHint,redirectUri:this.pickerRedirectUri,queryParameters:"select=id,name,parentReference,webUrl",
@@ -13897,125 +13901,125 @@ GitHubFile.prototype.getFolderUrl=function(){return"https://github.com/"+encodeU
GitHubFile.prototype.getPublicUrl=function(b){if(null!=this.meta.download_url)try{""!=(new URL(this.meta.download_url)).search?b(null):mxUtils.get(this.meta.download_url,mxUtils.bind(this,function(e){b(200<=e.getStatus()&&299>=e.getStatus()?this.meta.download_url:null)}),mxUtils.bind(this,function(){b(null)}))}catch(e){b(null)}else b(null)};GitHubFile.prototype.isConflict=function(b){return null!=b&&409==b.status};GitHubFile.prototype.getMode=function(){return App.MODE_GITHUB};
GitHubFile.prototype.isAutosave=function(){return!1};GitHubFile.prototype.getTitle=function(){return this.meta.name};GitHubFile.prototype.isRenamable=function(){return!1};GitHubFile.prototype.getLatestVersion=function(b,e){this.peer.getFile(this.getId(),b,e)};GitHubFile.prototype.getDescriptor=function(){return this.meta};GitHubFile.prototype.setDescriptor=function(b){this.meta=b};GitHubFile.prototype.getDescriptorEtag=function(b){return b.sha};
GitHubFile.prototype.setDescriptorEtag=function(b,e){b.sha=e};GitHubFile.prototype.save=function(b,e,f,c,l,n){this.doSave(this.getTitle(),e,f,c,l,n)};GitHubFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};GitHubFile.prototype.doSave=function(b,e,f,c,l,n){var p=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=p;this.saveFile(b,!1,e,f,c,l,n)}),f,c,l])};
-GitHubFile.prototype.saveFile=function(b,e,f,c,l,n,p){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var u=mxUtils.bind(this,function(G){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var H=this.getCurrentEtag(),F=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(K){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,K);this.fileSaved(F,H,mxUtils.bind(this,function(){this.contentChanged();
-null!=f&&f()}),c)}),mxUtils.bind(this,function(K){this.savingFile=!1;this.isConflict(K)?(this.inConflictState=!0,null!=c&&(K.commitMessage=G,c(K))):null!=c&&c(K)}),n,G)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(K){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;
-null!=f&&f();this.ui.fileLoaded(d)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,K,G)}))});null!=p?u(p):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(G){u(G)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=
-5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),u=this.authToken+" "+b;p.setRequestHeaders=function(G,H){G.setRequestHeader("Authorization",u)};p.send(mxUtils.bind(this,function(){window.clearTimeout(n);l&&(401===
+GitHubFile.prototype.saveFile=function(b,e,f,c,l,n,p){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else{var u=mxUtils.bind(this,function(F){if(this.getTitle()==b)try{this.savingFileTime=new Date;this.setShadowModified(!1);this.savingFile=!0;var H=this.getCurrentEtag(),E=this.data;this.peer.saveFile(this,mxUtils.bind(this,function(K){this.setModified(this.getShadowModified());this.savingFile=!1;this.setDescriptorEtag(this.meta,K);this.fileSaved(E,H,mxUtils.bind(this,function(){this.contentChanged();
+null!=f&&f()}),c)}),mxUtils.bind(this,function(K){this.savingFile=!1;this.isConflict(K)?(this.inConflictState=!0,null!=c&&(K.commitMessage=F,c(K))):null!=c&&c(K)}),n,F)}catch(K){if(this.savingFile=!1,null!=c)c(K);else throw K;}else this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.ui.pickFolder(this.getMode(),mxUtils.bind(this,function(K){this.peer.insertFile(b,this.getData(),mxUtils.bind(this,function(d){this.setModified(this.getShadowModified());this.savingFile=!1;
+null!=f&&f();this.ui.fileLoaded(d)}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,K,F)}))});null!=p?u(p):this.peer.showCommitDialog(this.meta.name,null==this.getDescriptorEtag(this.meta)||this.meta.isNew,mxUtils.bind(this,function(F){u(F)}),c)}else null!=f&&f()};GitHubLibrary=function(b,e,f){GitHubFile.call(this,b,e,f)};mxUtils.extend(GitHubLibrary,GitHubFile);GitHubLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitHubLibrary.prototype.open=function(){};(function(){var b=null;window.GitHubClient=function(e,f){DrawioClient.call(this,e,f||"ghauth")};mxUtils.extend(GitHubClient,DrawioClient);GitHubClient.prototype.clientId="test.draw.io"==window.location.hostname?"Iv1.1218f5567fbc258a":window.DRAWIO_GITHUB_ID;GitHubClient.prototype.extension=".drawio";GitHubClient.prototype.baseUrl=DRAWIO_GITHUB_API_URL;GitHubClient.prototype.baseHostUrl=DRAWIO_GITHUB_URL;GitHubClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"github2";GitHubClient.prototype.maxFileSize=
+5E7;GitHubClient.prototype.authToken="token";GitHubClient.prototype.setToken=function(e){b=e};GitHubClient.prototype.updateUser=function(e,f,c){var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;f({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),p=new mxXmlRequest(this.baseUrl+"/user",null,"GET"),u=this.authToken+" "+b;p.setRequestHeaders=function(F,H){F.setRequestHeader("Authorization",u)};p.send(mxUtils.bind(this,function(){window.clearTimeout(n);l&&(401===
p.getStatus()?c?f({code:p.getStatus(),message:this.getErrorMessage(p,mxResources.get("accessDenied"))}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(e,f,!0)}),f)):200>p.getStatus()||300<=p.getStatus()?f({message:mxResources.get("accessDenied")}):(this.setUser(this.createUser(JSON.parse(p.getText()))),e()))}),f)};GitHubClient.prototype.createUser=function(e){return new DrawioUser(e.id,e.email,e.name)};GitHubClient.prototype.authenticate=function(e,f){(new mxXmlRequest(this.redirectUri+
"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitHubClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitHubCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=
p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open(this.baseHostUrl+"/login/oauth/authorize?client_id="+this.clientId+"&state="+encodeURIComponent("cId="+this.clientId+"&domain="+
-window.location.host+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(G,H){n?(window.onGitHubCallback=null,n=!1,null==G?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=G.access_token,this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitHubCallback=null,n=!1,c({message:mxResources.get("accessDenied"),
+window.location.host+"&token="+e),"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(F,H){n?(window.onGitHubCallback=null,n=!1,null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=F.access_token,this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitHubCallback=null,n=!1,c({message:mxResources.get("accessDenied"),
retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitHubClient.prototype.getErrorMessage=function(e,f){try{var c=JSON.parse(e.getText());null!=c&&null!=c.message&&(f=c.message)}catch(l){}return f};GitHubClient.prototype.showAuthorizeDialog=function(e,f){this.ui.showError(mxResources.get("accessDenied"),mxResources.get("authorizationRequired"),mxResources.get("help"),mxUtils.bind(this,function(){this.ui.openLink("https://www.drawio.com/blog/single-repository-diagrams")}),e,mxResources.get("authorize"),
-mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,n){var p=mxUtils.bind(this,function(G){var H=!0,F=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,retry:u})}),this.ui.timeout),K=this.authToken+" "+b;e.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",
-K)};e.send(mxUtils.bind(this,function(){window.clearTimeout(F);var d=mxUtils.bind(this,function(){var v=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){v();u()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(H)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())G?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},
+mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")}),mxResources.get("cancel"),f,480,null,!1)};GitHubClient.prototype.executeRequest=function(e,f,c,l,n){var p=mxUtils.bind(this,function(F){var H=!0,E=window.setTimeout(mxUtils.bind(this,function(){H=!1;c({code:App.ERROR_TIMEOUT,retry:u})}),this.ui.timeout),K=this.authToken+" "+b;e.setRequestHeaders=function(d,g){d.setRequestHeader("Authorization",
+K)};e.send(mxUtils.bind(this,function(){window.clearTimeout(E);var d=mxUtils.bind(this,function(){var v=this.ui.spinner.pause();this.showAuthorizeDialog(mxUtils.bind(this,function(){v();u()}),mxUtils.bind(this,function(){this.ui.hideDialog();c({name:"AbortError"})}))});if(H)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())F?c({code:e.getStatus(),message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){u(!0)},
c)})}):this.authenticate(function(){p(!0)},c);else if(403===e.getStatus()){var g=!1;try{var k=JSON.parse(e.getText());null!=k&&"Resource not accessible by integration"==k.message?d():(null!=k&&null!=k.errors&&0<k.errors.length&&(g="too_large"==k.errors[0].code),c({message:mxResources.get(g?"drawingTooLarge":"forbidden")}))}catch(v){c({message:mxResources.get(g?"drawingTooLarge":"forbidden")})}}else 404===e.getStatus()?n?c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):
-d():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(F);H&&c(d)}))}),u=mxUtils.bind(this,function(G){null==this.user?this.updateUser(function(){u(!0)},c,G):p(G)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,n,p,u){var G=
-"&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+c+"?ref="+l+G,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(H){try{n(H.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(F){p(F)}}),p,null,u)};GitHubClient.prototype.getFile=function(e,f,c,l,n){l=null!=l?l:!1;var p=e.split("/"),u=p[0],G=p[1],H=p[2];e=p.slice(3,p.length).join("/");p=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&
-p))if(null!=b){n=this.baseUrl+"/repos/"+u+"/"+G+"/contents/"+e+"?ref="+H;var F={Authorization:"token "+b};p=e.split("/");this.ui.convertFile(n,0<p.length?p[p.length-1]:e,null,this.extension,f,c,null,F)}else c({message:mxResources.get("accessDenied")});else p="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+u+"/"+G+"/contents/"+e+"?ref="+H+p,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(K){try{var d=JSON.parse(K.getText());if(""==d.content&&null!=d.git_url){var g=
-new mxXmlRequest(d.git_url,null,"GET");this.executeRequest(g,mxUtils.bind(this,function(k){k=JSON.parse(k.getText());""!=k.content?(d.content=k.content,d.encoding=k.encoding,f(this.createGitHubFile(u,G,H,d,l))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(u,G,H,d,l))}catch(k){c(k)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,l,n){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;
+d():409===e.getStatus()?c({code:e.getStatus(),status:409}):c({code:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(d){window.clearTimeout(E);H&&c(d)}))}),u=mxUtils.bind(this,function(F){null==this.user?this.updateUser(function(){u(!0)},c,F):p(F)});null==b?this.authenticate(function(){u(!0)},c):u(!1)};GitHubClient.prototype.getLibrary=function(e,f,c){this.getFile(e,f,c,!0)};GitHubClient.prototype.getSha=function(e,f,c,l,n,p,u){var F=
+"&t="+(new Date).getTime();e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+c+"?ref="+l+F,null,"HEAD");this.executeRequest(e,mxUtils.bind(this,function(H){try{n(H.request.getResponseHeader("Etag").match(/"([^"]+)"/)[1])}catch(E){p(E)}}),p,null,u)};GitHubClient.prototype.getFile=function(e,f,c,l,n){l=null!=l?l:!1;var p=e.split("/"),u=p[0],F=p[1],H=p[2];e=p.slice(3,p.length).join("/");p=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&
+p))if(null!=b){n=this.baseUrl+"/repos/"+u+"/"+F+"/contents/"+e+"?ref="+H;var E={Authorization:"token "+b};p=e.split("/");this.ui.convertFile(n,0<p.length?p[p.length-1]:e,null,this.extension,f,c,null,E)}else c({message:mxResources.get("accessDenied")});else p="&t="+(new Date).getTime(),e=new mxXmlRequest(this.baseUrl+"/repos/"+u+"/"+F+"/contents/"+e+"?ref="+H+p,null,"GET"),this.executeRequest(e,mxUtils.bind(this,function(K){try{var d=JSON.parse(K.getText());if(""==d.content&&null!=d.git_url){var g=
+new mxXmlRequest(d.git_url,null,"GET");this.executeRequest(g,mxUtils.bind(this,function(k){k=JSON.parse(k.getText());""!=k.content?(d.content=k.content,d.encoding=k.encoding,f(this.createGitHubFile(u,F,H,d,l))):c({message:mxResources.get("errorLoadingFile")})}),c)}else f(this.createGitHubFile(u,F,H,d,l))}catch(k){c(k)}}),c)};GitHubClient.prototype.createGitHubFile=function(e,f,c,l,n){e={org:e,repo:f,ref:c,name:l.name,path:l.path,sha:l.sha,html_url:l.html_url,download_url:l.download_url};f=l.content;
"base64"===l.encoding&&(/\.jpe?g$/i.test(l.name)?f="data:image/jpeg;base64,"+f:/\.gif$/i.test(l.name)?f="data:image/gif;base64,"+f:/\.png$/i.test(l.name)?(l=this.ui.extractGraphModelFromPng(f),f=null!=l&&0<l.length?l:"data:image/png;base64,"+f):f=Base64.decode(f));return n?new GitHubLibrary(this.ui,f,e):new GitHubFile(this.ui,f,e)};GitHubClient.prototype.insertLibrary=function(e,f,c,l,n){this.insertFile(e,f,c,l,!0,n,!1)};GitHubClient.prototype.insertFile=function(e,f,c,l,n,p,u){n=null!=n?n:!1;p=p.split("/");
-var G=p[0],H=p[1],F=p[2],K=p.slice(3,p.length).join("/");0<K.length&&(K+="/");K+=e;this.checkExists(G+"/"+H+"/"+F+"/"+K,!0,mxUtils.bind(this,function(d,g){d?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(k){this.writeFile(G,H,F,K,k,f,g,mxUtils.bind(this,function(v){try{var t=JSON.parse(v.getText());c(this.createGitHubFile(G,H,F,t.content,n))}catch(x){l(x)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:G,repo:H,ref:F,name:e,path:K,sha:g,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=
-function(e,f,c,l){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(p){n(function(){c(p)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}));this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=function(e,f,c,l,n,p,u,G,H){p.length>=this.maxFileSize?H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+
-" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:n,content:p},null!=u&&(c.sha=u),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(F){G(F)}),mxUtils.bind(this,function(F){404==F.code&&(F.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,F.code=null);H(F)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),n=l[0],p=l[1],u=l[2];e=l.slice(3,l.length).join("/");
-this.getSha(n,p,e,u,mxUtils.bind(this,function(G){if(f){var H=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){H();c(!0,G)},function(){H();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(G){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,G=e.meta.ref,H=e.meta.path,F=mxUtils.bind(this,function(d,
-g){this.writeFile(p,u,G,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;f(JSON.parse(k.getText()).content.sha)}),mxUtils.bind(this,function(k){c(k)}))}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){F(e.meta.sha,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else F(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(p,u,
-H,G,mxUtils.bind(this,function(d){e.meta.sha=d;K()}),c):K()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var l=null,n=null,p=null,u=null,G=document.createElement("div");G.style.whiteSpace=
-"nowrap";G.style.overflow="hidden";G.style.height="320px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(H);H=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){D()}));H.style.position="absolute";H.style.right="40px";H.style.top="26px";G.appendChild(H);var F=document.createElement("div");F.style.whiteSpace=
-"nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="290px";G.appendChild(F);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width="100%";var d=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",
-null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(E,R,V,Q){var P=document.createElement("a");P.setAttribute("title",E);P.style.cursor="pointer";mxUtils.write(P,E);mxEvent.addListener(P,"click",
-R);Q&&(P.style.textDecoration="underline");null!=V&&(E=K.cloneNode(),E.style.padding=V,E.appendChild(P),P=E);return P}),k=mxUtils.bind(this,function(E){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));E||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(E=0;E<V.length;E++)(function(Q){mxUtils.write(R,
-" / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(E)}F.appendChild(R)}),v=mxUtils.bind(this,function(E){this.ui.handleError(E,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}),null,{})}),t=null,x=null,A=mxUtils.bind(this,function(E){null==E&&(F.innerText="",E=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+u+"?ref="+encodeURIComponent(p)+"&per_page=100&page="+
-E,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(E+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,
-function(){this.ui.spinner.stop();1==E&&(k(),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T,m){if(C==("dir"==T.type)){m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?
-"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("dir"==T.type?"/":""),mxUtils.bind(this,function(){"dir"==T.type?(u=T.path,A()):e&&"file"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+T.path))})));F.appendChild(m);y++}})(P[M],M)});B(!0);e&&B(!1)}}))}),v,!0)}),
-J=mxUtils.bind(this,function(E,R){null==E&&(F.innerText="",E=1);var V=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/branches?per_page=100&page="+E,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var Q=
-mxUtils.bind(this,function(){J(E+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==E&&(k(!0),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,
-function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=B.name;u="";A()})));F.appendChild(M)})(q[y],y);100==q.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",x))}}))}),v)}),D=mxUtils.bind(this,function(E){null==E&&(F.innerText="",E=1);var R=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+E,null,"GET");d.okButton.setAttribute("disabled",
-"disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=x&&mxEvent.removeListener(F,"scroll",x);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){D(E+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var P=JSON.parse(Q.getText());
-if(null==P||0==P.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else{1==E&&(F.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(B){if(null!=B){var C=B.split("/");if(1<C.length){B=C[0];var M=C[1];3>C.length?(l=B,n=M,u=p=null,J()):this.ui.spinner.spin(F,mxResources.get("loading"))&&(C=encodeURIComponent(C.slice(2,C.length).join("/")),this.getFile(B+
-"/"+M+"/"+C,mxUtils.bind(this,function(T){this.ui.spinner.stop();l=T.meta.org;n=T.meta.repo;p=decodeURIComponent(T.meta.ref);u="";A()}),mxUtils.bind(this,function(T){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(F),mxUtils.br(F));for(var q=0;q<P.length;q++)mxUtils.bind(this,
-function(y,B){var C=K.cloneNode();C.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";C.appendChild(g(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;n=y.name;u="";J(null,!0)})));F.appendChild(C)})(P[q],q)}100==P.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&V()},mxEvent.addListener(F,"scroll",x))}))}),v)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+var F=p[0],H=p[1],E=p[2],K=p.slice(3,p.length).join("/");0<K.length&&(K+="/");K+=e;this.checkExists(F+"/"+H+"/"+E+"/"+K,!0,mxUtils.bind(this,function(d,g){d?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(k){this.writeFile(F,H,E,K,k,f,g,mxUtils.bind(this,function(v){try{var t=JSON.parse(v.getText());c(this.createGitHubFile(F,H,E,t.content,n))}catch(x){l(x)}}),l)}),l)):c(new GitHubFile(this.ui,f,{org:F,repo:H,ref:E,name:e,path:K,sha:g,isNew:!0})):l()}))};GitHubClient.prototype.showCommitDialog=
+function(e,f,c,l){var n=this.ui.spinner.pause();e=new FilenameDialog(this.ui,mxResources.get(f?"addedFile":"updateFile",[e]),mxResources.get("ok"),mxUtils.bind(this,function(p){n(function(){c(p)})}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){l()}));this.ui.showDialog(e.container,400,80,!0,!1);e.init()};GitHubClient.prototype.writeFile=function(e,f,c,l,n,p,u,F,H){p.length>=this.maxFileSize?H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+
+" / 1 MB)"}):(c={path:l,branch:decodeURIComponent(c),message:n,content:p},null!=u&&(c.sha=u),e=new mxXmlRequest(this.baseUrl+"/repos/"+e+"/"+f+"/contents/"+l,JSON.stringify(c),"PUT"),this.executeRequest(e,mxUtils.bind(this,function(E){F(E)}),mxUtils.bind(this,function(E){404==E.code&&(E.helpLink=this.baseHostUrl+"/settings/connections/applications/"+this.clientId,E.code=null);H(E)})))};GitHubClient.prototype.checkExists=function(e,f,c){var l=e.split("/"),n=l[0],p=l[1],u=l[2];e=l.slice(3,l.length).join("/");
+this.getSha(n,p,e,u,mxUtils.bind(this,function(F){if(f){var H=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){H();c(!0,F)},function(){H();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(F){c(!0)}),!0)};GitHubClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,F=e.meta.ref,H=e.meta.path,E=mxUtils.bind(this,function(d,
+g){this.writeFile(p,u,F,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;f(JSON.parse(k.getText()).content.sha)}),mxUtils.bind(this,function(k){c(k)}))}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){E(e.meta.sha,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else E(e.meta.sha,Base64.encode(e.getData()))});l?this.getSha(p,u,
+H,F,mxUtils.bind(this,function(d){e.meta.sha=d;K()}),c):K()};GitHubClient.prototype.pickLibrary=function(e){this.pickFile(e)};GitHubClient.prototype.pickFolder=function(e){this.showGitHubDialog(!1,e,!0)};GitHubClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("H"+encodeURIComponent(f))});this.showGitHubDialog(!0,e)};GitHubClient.prototype.showGitHubDialog=function(e,f,c){var l=null,n=null,p=null,u=null,F=document.createElement("div");F.style.whiteSpace=
+"nowrap";F.style.overflow="hidden";F.style.height="320px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";F.appendChild(H);H=this.ui.createToolbarButton(Editor.refreshImage,mxResources.get("refresh"),mxUtils.bind(this,function(){D()}));H.style.position="absolute";H.style.right="40px";H.style.top="26px";F.appendChild(H);var E=document.createElement("div");E.style.whiteSpace=
+"nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="290px";F.appendChild(E);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width="100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}),null,null,"https://www.drawio.com/blog/single-repository-diagrams",
+null,null,null,null,[[mxResources.get("authorize"),mxUtils.bind(this,function(){this.ui.openLink("test.draw.io"==window.location.hostname?"https://github.com/apps/diagrams-net-app-test":"https://github.com/apps/draw-io-app")})]],"16px");this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var O=document.createElement("a");O.setAttribute("title",G);O.style.cursor="pointer";mxUtils.write(O,G);mxEvent.addListener(O,"click",
+R);Q&&(O.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(O),O=G);return O}),k=mxUtils.bind(this,function(G){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));G||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(G=0;G<V.length;G++)(function(Q){mxUtils.write(R,
+" / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(G)}E.appendChild(R)}),v=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}),null,{})}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/contents/"+u+"?ref="+encodeURIComponent(p)+"&per_page=100&page="+
+G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,
+function(){this.ui.spinner.stop();1==G&&(k(),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var O=JSON.parse(Q.getText());if(null==O||0==O.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<O.length;M++)mxUtils.bind(this,function(T,m){if(C==("dir"==T.type)){m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?
+"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("dir"==T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("dir"==T.type?"/":""),mxUtils.bind(this,function(){"dir"==T.type?(u=T.path,A()):e&&"file"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+T.path))})));E.appendChild(m);y++}})(O[M],M)});B(!0);e&&B(!1)}}))}),v,!0)}),
+J=mxUtils.bind(this,function(G,R){null==G&&(E.innerText="",G=1);var V=new mxXmlRequest(this.baseUrl+"/repos/"+l+"/"+n+"/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var Q=
+mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(O.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=0;y<q.length;y++)mxUtils.bind(this,
+function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=B.name;u="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&Q()},mxEvent.addListener(E,"scroll",x))}}))}),v)}),D=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled",
+"disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&mxEvent.removeListener(E,"scroll",x);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){D(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();var O=JSON.parse(Q.getText());
+if(null==O||0==O.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else{1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var y=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(B){if(null!=B){var C=B.split("/");if(1<C.length){B=C[0];var M=C[1];3>C.length?(l=B,n=M,u=p=null,J()):this.ui.spinner.spin(E,mxResources.get("loading"))&&(C=encodeURIComponent(C.slice(2,C.length).join("/")),this.getFile(B+
+"/"+M+"/"+C,mxUtils.bind(this,function(T){this.ui.spinner.stop();l=T.meta.org;n=T.meta.repo;p=decodeURIComponent(T.meta.ref);u="";A()}),mxUtils.bind(this,function(T){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(y.container,300,80,!0,!1);y.init()}))),mxUtils.br(E),mxUtils.br(E));for(var q=0;q<O.length;q++)mxUtils.bind(this,
+function(y,B){var C=K.cloneNode();C.style.backgroundColor=0==B%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";C.appendChild(g(y.full_name,mxUtils.bind(this,function(){l=y.owner.login;n=y.name;u="";J(null,!0)})));E.appendChild(C)})(O[q],q)}100==O.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}))}),v)});D()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(l){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=l;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
function(l){this.savingFile=!1;null!=c&&c(l)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(l){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,l)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
TrelloClient.prototype.authenticate=function(b,e,f){f&&this.logout();f=mxUtils.bind(this,function(c,l){Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:c?"never":"1hour",success:function(){localStorage.setItem("drawio_trello_token",localStorage.trello_token);null!=l&&l();b()},error:function(){null!=l&&l();null!=e&&e(mxResources.get("loggedOut"))}})});this.isAuthorized()?f(!0):this.ui.showAuthDialog(this,!0,f)};
TrelloClient.prototype.getLibrary=function(b,e,f){this.getFile(b,e,f,!1,!0)};
-TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var n=mxUtils.bind(this,function(){var p=b.split(this.SEPARATOR),u=!0,G=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);Trello.cards.get(p[0]+"/attachments/"+p[1],mxUtils.bind(this,function(H){window.clearTimeout(G);if(u){var F=/\.png$/i.test(H.name),K={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(H.name)||
-/\.gliffy$/i.test(H.name)||!this.ui.useCanvasForExport&&F?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(H.url),H.name,H.mimeType,this.extension,e,f,null,K):(u=!0,G=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(H.url),mxUtils.bind(this,function(d){window.clearTimeout(G);if(u){H.compoundId=b;if(0<(F?d.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(d);null!=g&&0<g.length&&
-(d=g)}l?e(new TrelloLibrary(this.ui,d,H)):e(new TrelloFile(this.ui,d,H))}}),mxUtils.bind(this,function(d,g){window.clearTimeout(G);u&&(401==g.status?this.authenticate(n,f,!0):f())}),F||null!=H.mimeType&&"image/"==H.mimeType.substring(0,6),null,null,null,K))}}),mxUtils.bind(this,function(H){window.clearTimeout(G);u&&(null!=H&&401==H.status?this.authenticate(n,f,!0):f())}))});this.authenticate(n,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};
-TrelloClient.prototype.insertFile=function(b,e,f,c,l,n){l=null!=l?l:!1;var p=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(G){this.writeFile(b,G,n,mxUtils.bind(this,function(H){l?f(new TrelloLibrary(this.ui,e,H)):f(new TrelloFile(this.ui,e,H))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(G){u(this.ui.base64ToBlob(G,"image/png"))}),c,e):u(e)});this.authenticate(p,c)};
-TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(p){this.writeFile(b.meta.name,p,c[0],function(u){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(u)}),mxUtils.bind(this,function(G){null!=G&&401==G.status?this.authenticate(n,f,!0):f()}))},f)}),n=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(p){l(this.ui.base64ToBlob(p,
+TrelloClient.prototype.getFile=function(b,e,f,c,l){l=null!=l?l:!1;var n=mxUtils.bind(this,function(){var p=b.split(this.SEPARATOR),u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout);Trello.cards.get(p[0]+"/attachments/"+p[1],mxUtils.bind(this,function(H){window.clearTimeout(F);if(u){var E=/\.png$/i.test(H.name),K={Authorization:'OAuth oauth_consumer_key="'+Trello.key()+'", oauth_token="'+Trello.token()+'"'};/\.v(dx|sdx?)$/i.test(H.name)||
+/\.gliffy$/i.test(H.name)||!this.ui.useCanvasForExport&&E?this.ui.convertFile(PROXY_URL+"?url="+encodeURIComponent(H.url),H.name,H.mimeType,this.extension,e,f,null,K):(u=!0,F=window.setTimeout(mxUtils.bind(this,function(){u=!1;f({code:App.ERROR_TIMEOUT})}),this.ui.timeout),this.ui.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(H.url),mxUtils.bind(this,function(d){window.clearTimeout(F);if(u){H.compoundId=b;if(0<(E?d.lastIndexOf(","):-1)){var g=this.ui.extractGraphModelFromPng(d);null!=g&&0<g.length&&
+(d=g)}l?e(new TrelloLibrary(this.ui,d,H)):e(new TrelloFile(this.ui,d,H))}}),mxUtils.bind(this,function(d,g){window.clearTimeout(F);u&&(401==g.status?this.authenticate(n,f,!0):f())}),E||null!=H.mimeType&&"image/"==H.mimeType.substring(0,6),null,null,null,K))}}),mxUtils.bind(this,function(H){window.clearTimeout(F);u&&(null!=H&&401==H.status?this.authenticate(n,f,!0):f())}))});this.authenticate(n,f)};TrelloClient.prototype.insertLibrary=function(b,e,f,c,l){this.insertFile(b,e,f,c,!0,l)};
+TrelloClient.prototype.insertFile=function(b,e,f,c,l,n){l=null!=l?l:!1;var p=mxUtils.bind(this,function(){var u=mxUtils.bind(this,function(F){this.writeFile(b,F,n,mxUtils.bind(this,function(H){l?f(new TrelloLibrary(this.ui,e,H)):f(new TrelloFile(this.ui,e,H))}),c)});this.ui.useCanvasForExport&&/(\.png)$/i.test(b)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(F){u(this.ui.base64ToBlob(F,"image/png"))}),c,e):u(e)});this.authenticate(p,c)};
+TrelloClient.prototype.saveFile=function(b,e,f){var c=b.meta.compoundId.split(this.SEPARATOR),l=mxUtils.bind(this,function(p){this.writeFile(b.meta.name,p,c[0],function(u){Trello.del("cards/"+c[0]+"/attachments/"+c[1],mxUtils.bind(this,function(){e(u)}),mxUtils.bind(this,function(F){null!=F&&401==F.status?this.authenticate(n,f,!0):f()}))},f)}),n=mxUtils.bind(this,function(){this.ui.useCanvasForExport&&/(\.png)$/i.test(b.meta.name)?this.ui.getEmbeddedPng(mxUtils.bind(this,function(p){l(this.ui.base64ToBlob(p,
"image/png"))}),f,this.ui.getCurrentFile()!=b?b.getData():null):l(b.getData())});this.authenticate(n,f)};
-TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var n=mxUtils.bind(this,function(){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;l({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),G=new FormData;G.append("key",Trello.key());G.append("token",Trello.token());G.append("file","string"===typeof e?new Blob([e]):e,b);G.append("name",
-b);var H=new XMLHttpRequest;H.responseType="json";H.onreadystatechange=mxUtils.bind(this,function(){if(4===H.readyState&&(window.clearTimeout(u),p))if(200==H.status){var F=H.response;F.compoundId=f+this.SEPARATOR+F.id;c(F)}else 401==H.status?this.authenticate(n,l,!0):l()});H.open("POST",this.baseUrl+"cards/"+f+"/attachments");H.send(G)});this.authenticate(n,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
+TrelloClient.prototype.writeFile=function(b,e,f,c,l){if(null!=b&&null!=e)if(e.length>=this.maxFileSize)l({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(e.length)+" / 10 MB)"});else{var n=mxUtils.bind(this,function(){var p=!0,u=window.setTimeout(mxUtils.bind(this,function(){p=!1;l({code:App.ERROR_TIMEOUT,retry:n})}),this.ui.timeout),F=new FormData;F.append("key",Trello.key());F.append("token",Trello.token());F.append("file","string"===typeof e?new Blob([e]):e,b);F.append("name",
+b);var H=new XMLHttpRequest;H.responseType="json";H.onreadystatechange=mxUtils.bind(this,function(){if(4===H.readyState&&(window.clearTimeout(u),p))if(200==H.status){var E=H.response;E.compoundId=f+this.SEPARATOR+E.id;c(E)}else 401==H.status?this.authenticate(n,l,!0):l()});H.open("POST",this.baseUrl+"cards/"+f+"/attachments");H.send(F)});this.authenticate(n,l)}else l({message:mxResources.get("unknownError")})};TrelloClient.prototype.pickLibrary=function(b){this.pickFile(b)};
TrelloClient.prototype.pickFolder=function(b){this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!1,b)}),mxUtils.bind(this,function(e){this.ui.showError(mxResources.get("error"),e)}))};TrelloClient.prototype.pickFile=function(b,e){b=null!=b?b:mxUtils.bind(this,function(f){this.ui.loadFile("T"+encodeURIComponent(f))});this.authenticate(mxUtils.bind(this,function(){this.showTrelloDialog(!0,b)}),mxUtils.bind(this,function(f){this.ui.showError(mxResources.get("error"),f,mxResources.get("ok"))}))};
TrelloClient.prototype.showTrelloDialog=function(b,e){var f=null,c="@me",l=0,n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.overflow="hidden";n.style.height="224px";var p=document.createElement("h3");mxUtils.write(p,b?mxResources.get("selectFile"):mxResources.get("selectCard"));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(p);var u=document.createElement("div");u.style.whiteSpace="nowrap";u.style.overflow="auto";u.style.height=
-"194px";n.appendChild(u);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var G=mxUtils.bind(this,function(k,v,t){l++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var A=document.createElement("a");A.style.cursor="pointer";if(null!=t){var J=document.createElement("img");
-J.src=t.url;J.width=t.width;J.height=t.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";A.appendChild(J)}mxUtils.write(A,k);mxEvent.addListener(A,"click",v);x.appendChild(A);return x}),H=mxUtils.bind(this,function(k){this.ui.handleError(k,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),F=mxUtils.bind(this,function(){l=0;u.innerText="";this.ui.spinner.spin(u,mxResources.get("loading"));var k=mxUtils.bind(this,function(){Trello.cards.get(f+
-"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(v){this.ui.spinner.stop();u.appendChild(G("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(u);null==v||0==v.length?mxUtils.write(u,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var t=0;t<v.length;t++)mxUtils.bind(this,function(x){u.appendChild(G(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(v[t])})()}),mxUtils.bind(this,function(v){401==
+"194px";n.appendChild(u);n=new CustomDialog(this.ui,n);this.ui.showDialog(n.container,340,290,!0,!0);n.okButton.parentNode.removeChild(n.okButton);var F=mxUtils.bind(this,function(k,v,t){l++;var x=document.createElement("div");x.style="width:100%;text-overflow:ellipsis;overflow:hidden;vertical-align:middle;padding:2px 0 2px 0;background:"+(0==l%2?Editor.isDarkMode()?"#000":"#eee":Editor.isDarkMode()?"":"#fff");var A=document.createElement("a");A.style.cursor="pointer";if(null!=t){var J=document.createElement("img");
+J.src=t.url;J.width=t.width;J.height=t.height;J.style="border: 1px solid black;margin:5px;vertical-align:middle";A.appendChild(J)}mxUtils.write(A,k);mxEvent.addListener(A,"click",v);x.appendChild(A);return x}),H=mxUtils.bind(this,function(k){this.ui.handleError(k,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),E=mxUtils.bind(this,function(){l=0;u.innerText="";this.ui.spinner.spin(u,mxResources.get("loading"));var k=mxUtils.bind(this,function(){Trello.cards.get(f+
+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(v){this.ui.spinner.stop();u.appendChild(F("../ [Up]",mxUtils.bind(this,function(){g()})));mxUtils.br(u);null==v||0==v.length?mxUtils.write(u,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var t=0;t<v.length;t++)mxUtils.bind(this,function(x){u.appendChild(F(x.name,mxUtils.bind(this,function(){this.ui.hideDialog();e(f+this.SEPARATOR+x.id)}),null!=x.previews?x.previews[0]:null))})(v[t])})()}),mxUtils.bind(this,function(v){401==
v.status?this.authenticate(k,H,!0):null!=H&&H(v)}))});k()}),K=null,d=null,g=mxUtils.bind(this,function(k){null==k&&(l=0,u.innerText="",k=1);this.ui.spinner.spin(u,mxResources.get("loading"));null!=K&&null!=K.parentNode&&K.parentNode.removeChild(K);K=document.createElement("a");K.style.display="block";K.style.cursor="pointer";mxUtils.write(K,mxResources.get("more")+"...");var v=mxUtils.bind(this,function(){mxEvent.removeListener(u,"scroll",d);g(k+1)});mxEvent.addListener(K,"click",v);var t=mxUtils.bind(this,
-function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(x){this.ui.spinner.stop();x=null!=x?x.cards:null;if(null==x||0==x.length)mxUtils.write(u,mxResources.get("noFiles"));else{1==k&&(u.appendChild(G(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(D){null!=D&&(c=D,g())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(u));for(var A=0;A<x.length;A++)mxUtils.bind(this,function(J){u.appendChild(G(J.name,mxUtils.bind(this,function(){b?(f=J.id,F()):(this.ui.hideDialog(),e(J.id))})))})(x[A]);100==x.length&&(u.appendChild(K),d=function(){u.scrollTop>=u.scrollHeight-u.offsetHeight&&v()},mxEvent.addListener(u,"scroll",d))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(t,H,!0):null!=H&&H({message:x.responseText})}))});t()});g()};
+function(){Trello.get("search",{query:""==mxUtils.trim(c)?"is:open":c,cards_limit:100,cards_page:k-1},mxUtils.bind(this,function(x){this.ui.spinner.stop();x=null!=x?x.cards:null;if(null==x||0==x.length)mxUtils.write(u,mxResources.get("noFiles"));else{1==k&&(u.appendChild(F(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var J=new FilenameDialog(this.ui,c,mxResources.get("ok"),mxUtils.bind(this,function(D){null!=D&&(c=D,g())}),mxResources.get("filterCards"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(J.container,300,80,!0,!1);J.init()}))),mxUtils.br(u));for(var A=0;A<x.length;A++)mxUtils.bind(this,function(J){u.appendChild(F(J.name,mxUtils.bind(this,function(){b?(f=J.id,E()):(this.ui.hideDialog(),e(J.id))})))})(x[A]);100==x.length&&(u.appendChild(K),d=function(){u.scrollTop>=u.scrollHeight-u.offsetHeight&&v()},mxEvent.addListener(u,"scroll",d))}}),mxUtils.bind(this,function(x){401==x.status?this.authenticate(t,H,!0):null!=H&&H({message:x.responseText})}))});t()});g()};
TrelloClient.prototype.isAuthorized=function(){try{var b=localStorage.trello_token;null==b&&(b=localStorage.drawio_trello_token,null!=b&&localStorage.setItem("trello_token",b));return null!=b}catch(e){}return!1};TrelloClient.prototype.logout=function(){localStorage.removeItem("drawio_trello_token");Trello.deauthorize()};GitLabFile=function(b,e,f){GitHubFile.call(this,b,e,f);this.peer=this.ui.gitLab};mxUtils.extend(GitLabFile,GitHubFile);GitLabFile.prototype.getFileUrl=function(){return this.meta.html_url};GitLabFile.prototype.getFolderUrl=function(){var b=this.getFileUrl();return b.substring(0,b.lastIndexOf("/"))};GitLabFile.prototype.share=function(){this.ui.editor.graph.openLink(DRAWIO_GITLAB_URL+"/"+this.meta.org+"/"+encodeURIComponent(this.meta.repo)+"/-/project_members")};
GitLabFile.prototype.getId=function(){return this.meta.org+"/"+(null!=this.meta.repo?encodeURIComponent(this.meta.repo)+"/"+(null!=this.meta.ref?this.meta.ref+(null!=this.meta.path?"/"+this.meta.path:""):""):"")};GitLabFile.prototype.getHash=function(){return encodeURIComponent("A"+this.getId())};GitLabFile.prototype.isConflict=function(b){return null!=b&&400==b.status};GitLabFile.prototype.getMode=function(){return App.MODE_GITLAB};GitLabFile.prototype.getDescriptorEtag=function(b){return b.last_commit_id};
GitLabFile.prototype.setDescriptorEtag=function(b,e){b.last_commit_id=e};GitLabLibrary=function(b,e,f){GitLabFile.call(this,b,e,f)};mxUtils.extend(GitLabLibrary,GitLabFile);GitLabLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};GitLabLibrary.prototype.open=function(){};(function(){var b=null;window.GitLabClient=function(e){GitHubClient.call(this,e,"gitlabauth")};mxUtils.extend(GitLabClient,GitHubClient);GitLabClient.prototype.clientId=DRAWIO_GITLAB_ID;GitLabClient.prototype.scope="api%20read_repository%20write_repository";GitLabClient.prototype.baseUrl=DRAWIO_GITLAB_URL+"/api/v4";GitLabClient.prototype.maxFileSize=1E7;GitLabClient.prototype.authToken="Bearer";GitLabClient.prototype.redirectUri=window.DRAWIO_SERVER_URL+"gitlab";GitLabClient.prototype.authenticate=
function(e,f){(new mxXmlRequest(this.redirectUri+"?getState=1",null,"GET")).send(mxUtils.bind(this,function(c){200<=c.getStatus()&&299>=c.getStatus()?this.authenticateStep2(c.getText(),e,f):null!=f&&f(c)}),f)};GitLabClient.prototype.authenticateStep2=function(e,f,c){if(null==window.onGitLabCallback){var l=mxUtils.bind(this,function(){var n=!0;null!=this.getPersistentToken(!0)?(new mxXmlRequest(this.redirectUri+"?state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+
e),null,"GET")).send(mxUtils.bind(this,function(p){if(200<=p.getStatus()&&299>=p.getStatus())try{b=JSON.parse(p.getText()).access_token,this.setToken(b),this.setUser(null),f()}catch(u){c({message:mxResources.get("authFailed"),retry:l})}else this.clearPersistentToken(),this.setUser(null),b=null,this.setToken(null),401==p.getStatus()?l():c({message:mxResources.get("accessDenied"),retry:l})}),c):this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(p,u){null!=window.open(DRAWIO_GITLAB_URL+"/oauth/authorize?client_id="+
-this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(G,H){n?(window.onGitLabCallback=null,n=!1,null==G?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=G.access_token,this.setToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):
-null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitLabCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var G=!0,H=window.setTimeout(mxUtils.bind(this,function(){G=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),F=this.authToken+
-" "+b;e.setRequestHeaders=function(K,d){K.setRequestHeader("Authorization",F);K.setRequestHeader("PRIVATE_TOKEN",F);K.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(H);if(G)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c);else if(403===
-e.getStatus()){var K=!1;try{var d=JSON.parse(e.getText());null!=d&&null!=d.errors&&0<d.errors.length&&(K="too_large"==d.errors[0].code)}catch(g){}c({message:mxResources.get(K?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(K){window.clearTimeout(H);G&&c(K)}))}),p=mxUtils.bind(this,function(u){null==
-this.user?this.updateUser(function(){p(!0)},c,u):n(u)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,n,p){if(null!=n)c(e,n);else{var u=e.length-2,G=mxUtils.bind(this,function(){if(2>u)l({message:mxResources.get("fileNotFound")});else{var H=Math.max(u-1,0),F=e.slice(0,H).join("/");H=e[H];var K=e[u],d=e.slice(u+1,e.length).join("/");F=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+H)+"/repository/"+(f?p?"branches?per_page=1&page=1&ref="+
-K:"tree?path="+d+"&ref="+K:"files/"+encodeURIComponent(d)+"?ref="+K);var g=new mxXmlRequest(F,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(e,u):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(u--,G()):l({message:mxResources.get("fileNotFound")})}))}});G()}};GitLabClient.prototype.getFile=function(e,f,c,l,n,p){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(u,G){var H=Math.max(G-1,0),
-F=u.slice(0,H).join("/"),K=u[H],d=u[G];e=u.slice(G+1,u.length).join("/");u=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&u))if(null!=b){H="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d;u=e.split("/");this.ui.convertFile(g+H,0<u.length?u[u.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(k,v,t){k=new mxXmlRequest(k,null,
-"GET");this.executeRequest(k,mxUtils.bind(this,function(x){try{v(this.getFileContent(JSON.parse(x.getText())))}catch(A){t(A)}}),t)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(F+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d,u=new mxXmlRequest(g+H,null,"GET"),this.executeRequest(u,mxUtils.bind(this,function(k){try{f(this.createGitLabFile(F,K,d,JSON.parse(k.getText()),l,G))}catch(v){c(v)}}),c)}),c,
+this.clientId+"&scope="+this.scope+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host+"&token="+e),"gitlabauth")?window.onGitLabCallback=mxUtils.bind(this,function(F,H){n?(window.onGitLabCallback=null,n=!1,null==F?c({message:mxResources.get("accessDenied"),retry:l}):(null!=u&&u(),b=F.access_token,this.setToken(b),this.setUser(null),p&&this.setPersistentToken("remembered"),f(),null!=H&&H.close())):
+null!=H&&H.close()}):c({message:mxResources.get("serviceUnavailableOrBlocked"),retry:l})}),mxUtils.bind(this,function(){n&&(window.onGitLabCallback=null,n=!1,c({message:mxResources.get("accessDenied"),retry:l}))}))});l()}else c({code:App.ERROR_BUSY})};GitLabClient.prototype.executeRequest=function(e,f,c,l){var n=mxUtils.bind(this,function(u){var F=!0,H=window.setTimeout(mxUtils.bind(this,function(){F=!1;c({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout),E=this.authToken+
+" "+b;e.setRequestHeaders=function(K,d){K.setRequestHeader("Authorization",E);K.setRequestHeader("PRIVATE_TOKEN",E);K.setRequestHeader("Content-Type","application/json")};e.send(mxUtils.bind(this,function(){window.clearTimeout(H);if(F)if(200<=e.getStatus()&&299>=e.getStatus()||l&&404==e.getStatus())f(e);else if(401===e.getStatus())u?c({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,function(){this.authenticate(function(){p(!0)},c)})}):this.authenticate(function(){n(!0)},c);else if(403===
+e.getStatus()){var K=!1;try{var d=JSON.parse(e.getText());null!=d&&null!=d.errors&&0<d.errors.length&&(K="too_large"==d.errors[0].code)}catch(g){}c({message:mxResources.get(K?"drawingTooLarge":"forbidden")})}else 404===e.getStatus()?c({message:this.getErrorMessage(e,mxResources.get("fileNotFound"))}):c({status:e.getStatus(),message:this.getErrorMessage(e,mxResources.get("error")+" "+e.getStatus())})}),mxUtils.bind(this,function(K){window.clearTimeout(H);F&&c(K)}))}),p=mxUtils.bind(this,function(u){null==
+this.user?this.updateUser(function(){p(!0)},c,u):n(u)});null==b?this.authenticate(function(){p(!0)},c):p(!1)};GitLabClient.prototype.getRefIndex=function(e,f,c,l,n,p){if(null!=n)c(e,n);else{var u=e.length-2,F=mxUtils.bind(this,function(){if(2>u)l({message:mxResources.get("fileNotFound")});else{var H=Math.max(u-1,0),E=e.slice(0,H).join("/");H=e[H];var K=e[u],d=e.slice(u+1,e.length).join("/");E=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+H)+"/repository/"+(f?p?"branches?per_page=1&page=1&ref="+
+K:"tree?path="+d+"&ref="+K:"files/"+encodeURIComponent(d)+"?ref="+K);var g=new mxXmlRequest(E,null,"HEAD");this.executeRequest(g,mxUtils.bind(this,function(){200==g.getStatus()?c(e,u):l({message:mxResources.get("fileNotFound")})}),mxUtils.bind(this,function(){404==g.getStatus()?(u--,F()):l({message:mxResources.get("fileNotFound")})}))}});F()}};GitLabClient.prototype.getFile=function(e,f,c,l,n,p){l=null!=l?l:!1;this.getRefIndex(e.split("/"),!1,mxUtils.bind(this,function(u,F){var H=Math.max(F-1,0),
+E=u.slice(0,H).join("/"),K=u[H],d=u[F];e=u.slice(F+1,u.length).join("/");u=/\.png$/i.test(e);if(!n&&(/\.v(dx|sdx?)$/i.test(e)||/\.gliffy$/i.test(e)||/\.pdf$/i.test(e)||!this.ui.useCanvasForExport&&u))if(null!=b){H="&t="+(new Date).getTime();var g=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d;u=e.split("/");this.ui.convertFile(g+H,0<u.length?u[u.length-1]:e,null,this.extension,f,c,mxUtils.bind(this,function(k,v,t){k=new mxXmlRequest(k,null,
+"GET");this.executeRequest(k,mxUtils.bind(this,function(x){try{v(this.getFileContent(JSON.parse(x.getText())))}catch(A){t(A)}}),t)}))}else c({message:mxResources.get("accessDenied")});else H="&t="+(new Date).getTime(),g=this.baseUrl+"/projects/"+encodeURIComponent(E+"/"+K)+"/repository/files/"+encodeURIComponent(e)+"?ref="+d,u=new mxXmlRequest(g+H,null,"GET"),this.executeRequest(u,mxUtils.bind(this,function(k){try{f(this.createGitLabFile(E,K,d,JSON.parse(k.getText()),l,F))}catch(v){c(v)}}),c)}),c,
p)};GitLabClient.prototype.getFileContent=function(e){var f=e.file_name,c=e.content;"base64"===e.encoding&&(/\.jpe?g$/i.test(f)?c="data:image/jpeg;base64,"+c:/\.gif$/i.test(f)?c="data:image/gif;base64,"+c:/\.pdf$/i.test(f)?c="data:application/pdf;base64,"+c:/\.png$/i.test(f)?(e=this.ui.extractGraphModelFromPng(c),c=null!=e&&0<e.length?e:"data:image/png;base64,"+c):c=Base64.decode(c));return c};GitLabClient.prototype.createGitLabFile=function(e,f,c,l,n,p){var u=DRAWIO_GITLAB_URL+"/";e={org:e,repo:f,
-ref:c,name:l.file_name,path:l.file_path,html_url:u+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:u+e+"/"+f+"/raw/"+c+"/"+l.file_path+"?inline=false",last_commit_id:l.last_commit_id,refPos:p};l=this.getFileContent(l);return n?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,n,p,u){n=null!=n?n:!1;p=p.split("/");this.getRefIndex(p,!0,mxUtils.bind(this,function(G,H){var F=Math.max(H-1,0),K=G.slice(0,F).join("/"),d=G[F],g=G[H];path=G.slice(H+
-1,G.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(K+"/"+d+"/"+g+"/"+path,!0,mxUtils.bind(this,function(k,v){k?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(t){this.writeFile(K,d,g,path,t,f,v,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitLabFile(K,d,g,null!=A.content?A.content:A,n,H))}catch(J){l(J)}}),l)}),l)):(k=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:K,repo:d,ref:g,name:e,path:path,html_url:k+
+ref:c,name:l.file_name,path:l.file_path,html_url:u+e+"/"+f+"/blob/"+c+"/"+l.file_path,download_url:u+e+"/"+f+"/raw/"+c+"/"+l.file_path+"?inline=false",last_commit_id:l.last_commit_id,refPos:p};l=this.getFileContent(l);return n?new GitLabLibrary(this.ui,l,e):new GitLabFile(this.ui,l,e)};GitLabClient.prototype.insertFile=function(e,f,c,l,n,p,u){n=null!=n?n:!1;p=p.split("/");this.getRefIndex(p,!0,mxUtils.bind(this,function(F,H){var E=Math.max(H-1,0),K=F.slice(0,E).join("/"),d=F[E],g=F[H];path=F.slice(H+
+1,F.length).join("/");0<path.length&&(path+="/");path+=e;this.checkExists(K+"/"+d+"/"+g+"/"+path,!0,mxUtils.bind(this,function(k,v){k?n?(u||(f=Base64.encode(f)),this.showCommitDialog(e,!0,mxUtils.bind(this,function(t){this.writeFile(K,d,g,path,t,f,v,mxUtils.bind(this,function(x){try{var A=JSON.parse(x.getText());c(this.createGitLabFile(K,d,g,null!=A.content?A.content:A,n,H))}catch(J){l(J)}}),l)}),l)):(k=DRAWIO_GITLAB_URL+"/",c(new GitLabFile(this.ui,f,{org:K,repo:d,ref:g,name:e,path:path,html_url:k+
K+"/"+d+"/blob/"+g+"/"+path,download_url:k+K+"/"+d+"/raw/"+g+"/"+path+"?inline=false",refPos:H,last_commit_id:v,isNew:!0}))):l()}))}),l,null,4>=p.length)};GitLabClient.prototype.checkExists=function(e,f,c){this.getFile(e,mxUtils.bind(this,function(l){if(f){var n=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[e]),function(){n();c(!0,l.getCurrentEtag())},function(){n();c(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),
-mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,f,c,l,n,p,u,G,H){if(p.length>=this.maxFileSize)H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+" / 10 MB)"});else{var F="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:n,content:p,encoding:"base64"};null!=u&&(c.last_commit_id=u,F="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+
-encodeURIComponent(l);F=new mxXmlRequest(e,JSON.stringify(c),F);this.executeRequest(F,mxUtils.bind(this,function(K){G(K)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,G=e.meta.ref,H=e.meta.path,F=mxUtils.bind(this,function(d,g){this.writeFile(p,u,G,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;this.getFile(p+"/"+u+"/"+G+"/"+H,mxUtils.bind(this,function(v){v.getData()==e.getData()?f(v.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,
-null,e.meta.refPos)}),c)}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){F(e.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else F(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(p+"/"+u+"/"+G+"/"+H,mxUtils.bind(this,function(d){e.meta.last_commit_id=d.meta.last_commit_id;K()}),c):K()};GitLabClient.prototype.pickFolder=
-function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var l=null,n=null,p=null,u=null,G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.overflow="hidden";G.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));
-H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";G.appendChild(H);var F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.border="1px solid lightgray";F.style.boxSizing="border-box";F.style.padding="4px";F.style.overflow="auto";F.style.lineHeight="1.2em";F.style.height="274px";G.appendChild(F);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width=
-"100%";var d=new CustomDialog(this.ui,G,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}));this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(E,R,V,Q){var P=document.createElement("a");P.setAttribute("title",E);P.style.cursor="pointer";mxUtils.write(P,E);mxEvent.addListener(P,"click",R);Q&&(P.style.textDecoration="underline");null!=V&&(E=K.cloneNode(),E.style.padding=V,E.appendChild(P),P=E);return P}),
-k=mxUtils.bind(this,function(E){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));E||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(E=0;E<V.length;E++)(function(Q){mxUtils.write(R," / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(E)}F.appendChild(R)}),
-v=mxUtils.bind(this,function(E){this.ui.handleError(E,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}))}),t=null,x=null,A=mxUtils.bind(this,function(E){null==E&&(F.innerText="",E=1);var R=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/tree?path="+u+"&ref="+p+"&per_page=100&page="+E,null,"GET");this.ui.spinner.spin(F,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&
-(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(E+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==E&&(k(!p),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==
-u||null==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var P=JSON.parse(Q.getText());if(null==P||0==P.length)c||(mxUtils.br(F),mxUtils.write(F,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<P.length;M++)mxUtils.bind(this,function(T){if(C==("tree"==T.type)){var m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==
-T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("tree"==T.type?"/":""),mxUtils.bind(this,function(){"tree"==T.type?(u=T.path,A()):e&&"blob"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+p+"/"+T.path))})));F.appendChild(m);y++}})(P[M])});B(!0);e&&B(!1);100==y&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&V()},mxEvent.addListener(F,"scroll",x))}}))}),
-v,!0)}),J=mxUtils.bind(this,function(E,R){null==E&&(F.innerText="",E=1);var V=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/branches?per_page=100&page="+E,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,
-mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){J(E+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(P){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==E&&(k(!0),F.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(P.getText());if(null==q||0==q.length)mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=
-0;y<q.length;y++)mxUtils.bind(this,function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=encodeURIComponent(B.name);u="";A()})));F.appendChild(M)})(q[y],y);100==q.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&Q()},mxEvent.addListener(F,"scroll",x))}}))}),v)});d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(F,mxResources.get("loading"));
-var D=mxUtils.bind(this,function(E){var R=this.ui.spinner,V=0;this.ui.spinner.stop();var Q=function(){R.spin(F,mxResources.get("loading"));V+=1},P=function(){--V;0===V&&R.stop()};null==E&&(F.innerText="",E=1);null!=x&&(mxEvent.removeListener(F,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===V&&D(E+1)});mxEvent.addListener(t,
-"click",q);var y=mxUtils.bind(this,function(C){Q();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){this.ui.tryAndHandle(mxUtils.bind(this,function(){C(JSON.parse(T.getText()));P()}))}),v)}),B=mxUtils.bind(this,function(C,M){Q();var T=new mxXmlRequest(this.baseUrl+"/groups/"+C.id+"/projects?per_page=100",null,"GET");this.executeRequest(T,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(C,JSON.parse(m.getText()));
-P()}))}),v)});y(mxUtils.bind(this,function(C){if(null==this.user)mxUtils.write(F,mxResources.get("loggedOut"));else{Q();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+E,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){T=JSON.parse(T.getText());if(null!=T&&0!=T.length||null!=C&&0!=C.length){1==E&&(F.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===V){var I=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),
-mxUtils.bind(this,function(L){null!=L&&(L=L.split("/"),1<L.length?(l=L[0],n=L[1],p=u=null,2<L.length?(p=encodeURIComponent(L.slice(2,L.length).join("/")),A()):J(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(I.container,300,80,!0,!1);I.init()}}))),mxUtils.br(F),mxUtils.br(F));for(var m=!0,z=0;z<T.length;z++)mxUtils.bind(this,function(I){var L=K.cloneNode();L.style.backgroundColor=m?Editor.isDarkMode()?
-"#000000":"#eeeeee":"";m=!m;L.appendChild(g(I.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.owner.username,n=I.path,u="",J(null,!0))})));F.appendChild(L)})(T[z]);for(z=0;z<C.length;z++)Q(),B(C[z],mxUtils.bind(this,function(I,L){P();for(var N=0;N<L.length;N++){var O=K.cloneNode();O.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(S){O.appendChild(g(S.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.full_path,n=S.path,u="",
-J(null,!0))})));F.appendChild(O)})(L[N])}}));P()}else P(),mxUtils.br(F),mxUtils.write(F,mxResources.get("repositoryNotFound"));100==T.length&&(F.appendChild(t),x=function(){F.scrollTop>=F.scrollHeight-F.offsetHeight&&q()},mxEvent.addListener(F,"scroll",x))}),v)}}))});b?this.user?D():this.updateUser(function(){D()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+
-encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,n,p){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=n;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,n,p,u){DrawioComment.call(this,b,e,f,c,l,n,p);this.pCommentId=u};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};
+mxResources.get("ok"),function(){c(!1)})}),mxUtils.bind(this,function(l){c(!0)}),null,!0)};GitLabClient.prototype.writeFile=function(e,f,c,l,n,p,u,F,H){if(p.length>=this.maxFileSize)H({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(p.length)+" / 10 MB)"});else{var E="POST";c={path:encodeURIComponent(l),branch:decodeURIComponent(c),commit_message:n,content:p,encoding:"base64"};null!=u&&(c.last_commit_id=u,E="PUT");e=this.baseUrl+"/projects/"+encodeURIComponent(e+"/"+f)+"/repository/files/"+
+encodeURIComponent(l);E=new mxXmlRequest(e,JSON.stringify(c),E);this.executeRequest(E,mxUtils.bind(this,function(K){F(K)}),H)}};GitLabClient.prototype.saveFile=function(e,f,c,l,n){var p=e.meta.org,u=e.meta.repo,F=e.meta.ref,H=e.meta.path,E=mxUtils.bind(this,function(d,g){this.writeFile(p,u,F,H,n,g,d,mxUtils.bind(this,function(k){delete e.meta.isNew;this.getFile(p+"/"+u+"/"+F+"/"+H,mxUtils.bind(this,function(v){v.getData()==e.getData()?f(v.getCurrentEtag()):f({content:e.getCurrentEtag()})}),c,null,
+null,e.meta.refPos)}),c)}),K=mxUtils.bind(this,function(){if(this.ui.useCanvasForExport&&/(\.png)$/i.test(H)){var d=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){E(e.meta.last_commit_id,g)}),c,this.ui.getCurrentFile()!=e?e.getData():null,d.scale,d.border)}else E(e.meta.last_commit_id,Base64.encode(e.getData()))});l?this.getFile(p+"/"+u+"/"+F+"/"+H,mxUtils.bind(this,function(d){e.meta.last_commit_id=d.meta.last_commit_id;K()}),c):K()};GitLabClient.prototype.pickFolder=
+function(e){this.showGitLabDialog(!1,e,!0)};GitLabClient.prototype.pickFile=function(e){e=null!=e?e:mxUtils.bind(this,function(f){this.ui.loadFile("A"+encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.showGitLabDialog=function(e,f,c){var l=null,n=null,p=null,u=null,F=document.createElement("div");F.style.whiteSpace="nowrap";F.style.overflow="hidden";F.style.height="304px";var H=document.createElement("h3");mxUtils.write(H,mxResources.get(e?"selectFile":"selectFolder"));
+H.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";F.appendChild(H);var E=document.createElement("div");E.style.whiteSpace="nowrap";E.style.border="1px solid lightgray";E.style.boxSizing="border-box";E.style.padding="4px";E.style.overflow="auto";E.style.lineHeight="1.2em";E.style.height="274px";F.appendChild(E);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.boxSizing="border-box";K.style.overflow="hidden";K.style.padding="4px";K.style.width=
+"100%";var d=new CustomDialog(this.ui,F,mxUtils.bind(this,function(){f(l+"/"+n+"/"+encodeURIComponent(p)+"/"+u)}));this.ui.showDialog(d.container,420,370,!0,!0);e&&d.okButton.parentNode.removeChild(d.okButton);var g=mxUtils.bind(this,function(G,R,V,Q){var O=document.createElement("a");O.setAttribute("title",G);O.style.cursor="pointer";mxUtils.write(O,G);mxEvent.addListener(O,"click",R);Q&&(O.style.textDecoration="underline");null!=V&&(G=K.cloneNode(),G.style.padding=V,G.appendChild(O),O=G);return O}),
+k=mxUtils.bind(this,function(G){var R=document.createElement("div");R.style.marginBottom="8px";R.appendChild(g(l+"/"+n,mxUtils.bind(this,function(){u=null;D()}),null,!0));G||(mxUtils.write(R," / "),R.appendChild(g(decodeURIComponent(p),mxUtils.bind(this,function(){u=null;J()}),null,!0)));if(null!=u&&0<u.length){var V=u.split("/");for(G=0;G<V.length;G++)(function(Q){mxUtils.write(R," / ");R.appendChild(g(V[Q],mxUtils.bind(this,function(){u=V.slice(0,Q+1).join("/");A()}),null,!0))})(G)}E.appendChild(R)}),
+v=mxUtils.bind(this,function(G){this.ui.handleError(G,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(u=p=n=l=null,D()):this.ui.hideDialog()}))}),t=null,x=null,A=mxUtils.bind(this,function(G){null==G&&(E.innerText="",G=1);var R=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/tree?path="+u+"&ref="+p+"&per_page=100&page="+G,null,"GET");this.ui.spinner.spin(E,mxResources.get("loading"));d.okButton.removeAttribute("disabled");null!=x&&
+(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var V=mxUtils.bind(this,function(){A(G+1)});mxEvent.addListener(t,"click",V);this.executeRequest(R,mxUtils.bind(this,function(Q){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!p),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){if(""==
+u||null==u)u=null,D();else{var C=u.split("/");u=C.slice(0,C.length-1).join("/");A()}}),"4px")));var O=JSON.parse(Q.getText());if(null==O||0==O.length)c||(mxUtils.br(E),mxUtils.write(E,mxResources.get("noFiles")));else{var q=!0,y=0,B=mxUtils.bind(this,function(C){for(var M=0;M<O.length;M++)mxUtils.bind(this,function(T){if(C==("tree"==T.type)){var m=K.cloneNode();m.style.backgroundColor=q?Editor.isDarkMode()?"#000000":"#eeeeee":"";q=!q;var z=document.createElement("img");z.src=IMAGE_PATH+"/"+("tree"==
+T.type?"folder.png":"file.png");z.setAttribute("align","absmiddle");z.style.marginRight="4px";z.style.marginTop="-4px";z.width=20;m.appendChild(z);m.appendChild(g(T.name+("tree"==T.type?"/":""),mxUtils.bind(this,function(){"tree"==T.type?(u=T.path,A()):e&&"blob"==T.type&&(this.ui.hideDialog(),f(l+"/"+n+"/"+p+"/"+T.path))})));E.appendChild(m);y++}})(O[M])});B(!0);e&&B(!1);100==y&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&V()},mxEvent.addListener(E,"scroll",x))}}))}),
+v,!0)}),J=mxUtils.bind(this,function(G,R){null==G&&(E.innerText="",G=1);var V=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(l+"/"+n)+"/repository/branches?per_page=100&page="+G,null,"GET");d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,
+mxResources.get("more")+"...");var Q=mxUtils.bind(this,function(){J(G+1)});mxEvent.addListener(t,"click",Q);this.executeRequest(V,mxUtils.bind(this,function(O){this.ui.tryAndHandle(mxUtils.bind(this,function(){this.ui.spinner.stop();1==G&&(k(!0),E.appendChild(g("../ [Up]",mxUtils.bind(this,function(){u=null;D()}),"4px")));var q=JSON.parse(O.getText());if(null==q||0==q.length)mxUtils.br(E),mxUtils.write(E,mxResources.get("repositoryNotFound"));else if(1==q.length&&R)p=q[0].name,u="",A();else{for(var y=
+0;y<q.length;y++)mxUtils.bind(this,function(B,C){var M=K.cloneNode();M.style.backgroundColor=0==C%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";M.appendChild(g(B.name,mxUtils.bind(this,function(){p=encodeURIComponent(B.name);u="";A()})));E.appendChild(M)})(q[y],y);100==q.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&Q()},mxEvent.addListener(E,"scroll",x))}}))}),v)});d.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(E,mxResources.get("loading"));
+var D=mxUtils.bind(this,function(G){var R=this.ui.spinner,V=0;this.ui.spinner.stop();var Q=function(){R.spin(E,mxResources.get("loading"));V+=1},O=function(){--V;0===V&&R.stop()};null==G&&(E.innerText="",G=1);null!=x&&(mxEvent.removeListener(E,"scroll",x),x=null);null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.style.cursor="pointer";mxUtils.write(t,mxResources.get("more")+"...");var q=mxUtils.bind(this,function(){0===V&&D(G+1)});mxEvent.addListener(t,
+"click",q);var y=mxUtils.bind(this,function(C){Q();var M=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){this.ui.tryAndHandle(mxUtils.bind(this,function(){C(JSON.parse(T.getText()));O()}))}),v)}),B=mxUtils.bind(this,function(C,M){Q();var T=new mxXmlRequest(this.baseUrl+"/groups/"+C.id+"/projects?per_page=100",null,"GET");this.executeRequest(T,mxUtils.bind(this,function(m){this.ui.tryAndHandle(mxUtils.bind(this,function(){M(C,JSON.parse(m.getText()));
+O()}))}),v)});y(mxUtils.bind(this,function(C){if(null==this.user)mxUtils.write(E,mxResources.get("loggedOut"));else{Q();var M=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+G,null,"GET");this.executeRequest(M,mxUtils.bind(this,function(T){T=JSON.parse(T.getText());if(null!=T&&0!=T.length||null!=C&&0!=C.length){1==G&&(E.appendChild(g(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){if(0===V){var I=new FilenameDialog(this.ui,"group/project",mxResources.get("ok"),
+mxUtils.bind(this,function(L){null!=L&&(L=L.split("/"),1<L.length?(l=L.slice(0,L.length-1).join("/"),n=L[L.length-1],u="",J(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(I.container,300,80,!0,!1);I.init()}}))),mxUtils.br(E),mxUtils.br(E));for(var m=!0,z=0;z<T.length;z++)mxUtils.bind(this,function(I){var L=K.cloneNode();L.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;L.appendChild(g(I.name_with_namespace,
+mxUtils.bind(this,function(){0===V&&(l=I.owner.username,n=I.path,u="",J(null,!0))})));E.appendChild(L)})(T[z]);for(z=0;z<C.length;z++)Q(),B(C[z],mxUtils.bind(this,function(I,L){O();for(var N=0;N<L.length;N++){var P=K.cloneNode();P.style.backgroundColor=m?Editor.isDarkMode()?"#000000":"#eeeeee":"";m=!m;mxUtils.bind(this,function(S){P.appendChild(g(S.name_with_namespace,mxUtils.bind(this,function(){0===V&&(l=I.full_path,n=S.path,u="",J(null,!0))})));E.appendChild(P)})(L[N])}}));O()}else O(),mxUtils.br(E),
+mxUtils.write(E,mxResources.get("repositoryNotFound"));100==T.length&&(E.appendChild(t),x=function(){E.scrollTop>=E.scrollHeight-E.offsetHeight&&q()},mxEvent.addListener(E,"scroll",x))}),v)}}))});b?this.user?D():this.updateUser(function(){D()},v,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){D()},v,!0)}),v)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.host));
+this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,l,n,p){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=l;this.isResolved=n;this.user=p;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,l){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,l,n,p,u){DrawioComment.call(this,b,e,f,c,l,n,p);this.pCommentId=u};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,l){b={content:b.content};c?b.verb="resolve":l&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};
DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,n,p,u,G,H,F,K,d,g){function k(U,W){W=W||document;return W.querySelector(U)}function v(U,W,X){if(null==U["@microsoft.graph.downloadUrl"])if(null==U.parentReference)X();else{c(U.id,U.parentReference.driveId,function(ba){v(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",U["@microsoft.graph.downloadUrl"]);var Y=U.file?"image/png"==U.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;
+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,l,n,p,u,F,H,E,K,d,g){function k(U,W){W=W||document;return W.querySelector(U)}function v(U,W,X){if(null==U["@microsoft.graph.downloadUrl"])if(null==U.parentReference)X();else{c(U.id,U.parentReference.driveId,function(ba){v(ba,W,X)},X);return}var Z=new XMLHttpRequest;Z.open("GET",U["@microsoft.graph.downloadUrl"]);var Y=U.file?"image/png"==U.file.mimeType:!1;Z.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var ba=Z.responseText;
Y?(ba="data:image/png;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPng(ba)):/\.pdf$/.test(U.name)&&(ba="data:application/pdf;base64,"+Editor.base64Encode(ba),ba=Editor.extractGraphModelFromPdf(ba));var ea=mxUtils.parseXml(ba),ca="mxlibrary"==ea.documentElement.nodeName?ea.documentElement:Editor.extractGraphModel(ea.documentElement);if(null!=ca){W(ca.ownerDocument);return}}catch(fa){}X()}};(Y||/\.pdf$/.test(U.name))&&Z.overrideMimeType&&Z.overrideMimeType("text/plain; charset=x-user-defined");
-Z.send()}function t(){K&&null!=y?q.exportToCanvas(function(U){U=EditorUi.prototype.createImageDataUri(U,null,"png");p(B,U);n(B)},400,null,null,function(U){console.log(U)},600,null,null,null,null,null,y):(p(B,void 0),n(B))}function x(U){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);P.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==U||U.folder||/\.drawiolib$/.test(U.name))W(mxResources.get("noPreview"));
-else try{null!=U.remoteItem&&(U=U.remoteItem),z=U,P.spin(N),v(U,function(X){P.stop();if(z==U)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){B=null;W(mxResources.get("notADiagramFile"))})}catch(X){B=null,W(mxResources.get("notADiagramFile"))}}function A(){var U=k(".odFilesBreadcrumb");if(null!=U){U.innerText="";for(var W=
-0;W<T.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(T[W].name||mxResources.get("home"));U.appendChild(X);(function(Y,ba){X.addEventListener("click",function(){e(null);T=T.slice(0,ba);D(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[W],W);var Z=document.createElement("span");Z.innerHTML=" &gt; ";U.appendChild(Z)}null!=T[T.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get(G?"selectFolder":
-"officeSelDiag"):T[T.length-1].name||mxResources.get("home")),U.appendChild(W))}}function J(){if(null!=B&&!M)if("sharepoint"==C)D("site",null,B.id,B.displayName);else if("site"==C)D("subsite",null,B.id,B.name);else{var U=B.folder;B=B.remoteItem?B.remoteItem:B;var W=(B.parentReference?B.parentReference.driveId:null)||C,X=B.id;U?D(W,X,null,B.name):t()}}function D(U,W,X,Z,Y){function ba(qa){P.stop();var ua=document.createElement("table");ua.className="odFileListGrid";for(var ya=null,ja=0,ma=0;null!=
-qa&&ma<qa.length;ma++){var ka=qa[ma];if(1!=fa||!ka.webUrl||0<ka.webUrl.indexOf("sharepoint.com/sites/")||0>ka.webUrl.indexOf("sharepoint.com/")){var Ba=ka.displayName||ka.name,sa=mxUtils.htmlEntities(ka.description||Ba);fa&&(ka.folder=2==fa?{isRoot:!0}:!0);var Ea=null!=ka.folder;if(!G||Ea){var wa=document.createElement("tr");wa.className=ja++%2?"odOddRow":"odEvenRow";var Ca=document.createElement("td");Ca.style.width="36px";var Da=document.createElement("img");Da.src="/images/"+(Ea?"folder.png":"file.png");
+Z.send()}function t(){K&&null!=y?q.exportToCanvas(function(U){U=EditorUi.prototype.createImageDataUri(U,null,"png");p(B,U);n(B)},400,null,null,function(U){console.log(U)},600,null,null,null,null,null,y):(p(B,void 0),n(B))}function x(U){function W(X){N.style.background="transparent";N.innerText="";var Z=document.createElement("div");Z.className="odPreviewStatus";mxUtils.write(Z,X);N.appendChild(Z);O.stop()}if(null!=N)if(N.style.background="transparent",N.innerText="",null==U||U.folder||/\.drawiolib$/.test(U.name))W(mxResources.get("noPreview"));
+else try{null!=U.remoteItem&&(U=U.remoteItem),z=U,O.spin(N),v(U,function(X){O.stop();if(z==U)if("mxlibrary"==X.documentElement.nodeName)W(mxResources.get("noPreview"));else{var Z=X.getElementsByTagName("diagram");y=AspectDialog.prototype.createViewer(N,0==Z.length?X.documentElement:Z[0],null,"transparent")}},function(){B=null;W(mxResources.get("notADiagramFile"))})}catch(X){B=null,W(mxResources.get("notADiagramFile"))}}function A(){var U=k(".odFilesBreadcrumb");if(null!=U){U.innerText="";for(var W=
+0;W<T.length-1;W++){var X=document.createElement("span");X.className="odBCFolder";X.innerHTML=mxUtils.htmlEntities(T[W].name||mxResources.get("home"));U.appendChild(X);(function(Y,ba){X.addEventListener("click",function(){e(null);T=T.slice(0,ba);D(Y.driveId,Y.folderId,Y.siteId,Y.name)})})(T[W],W);var Z=document.createElement("span");Z.innerHTML=" &gt; ";U.appendChild(Z)}null!=T[T.length-1]&&(W=document.createElement("span"),W.innerHTML=mxUtils.htmlEntities(1==T.length?mxResources.get(F?"selectFolder":
+"officeSelDiag"):T[T.length-1].name||mxResources.get("home")),U.appendChild(W))}}function J(){if(null!=B&&!M)if("sharepoint"==C)D("site",null,B.id,B.displayName);else if("site"==C)D("subsite",null,B.id,B.name);else{var U=B.folder;B=B.remoteItem?B.remoteItem:B;var W=(B.parentReference?B.parentReference.driveId:null)||C,X=B.id;U?D(W,X,null,B.name):t()}}function D(U,W,X,Z,Y){function ba(qa){O.stop();var ua=document.createElement("table");ua.className="odFileListGrid";for(var ya=null,ja=0,ma=0;null!=
+qa&&ma<qa.length;ma++){var ka=qa[ma];if(1!=fa||!ka.webUrl||0<ka.webUrl.indexOf("sharepoint.com/sites/")||0>ka.webUrl.indexOf("sharepoint.com/")){var Ba=ka.displayName||ka.name,sa=mxUtils.htmlEntities(ka.description||Ba);fa&&(ka.folder=2==fa?{isRoot:!0}:!0);var Ea=null!=ka.folder;if(!F||Ea){var wa=document.createElement("tr");wa.className=ja++%2?"odOddRow":"odEvenRow";var Ca=document.createElement("td");Ca.style.width="36px";var Da=document.createElement("img");Da.src="/images/"+(Ea?"folder.png":"file.png");
Da.className="odFileImg";Ca.appendChild(Da);wa.appendChild(Ca);Ca=document.createElement("td");Ea=document.createElement("div");Ea.className="odFileTitle";Ea.innerHTML=mxUtils.htmlEntities(Ba);Ea.setAttribute("title",sa);Ca.appendChild(Ea);wa.appendChild(Ca);ua.appendChild(wa);null==ya&&(ya=wa,ya.className+=" odRowSelected",B=ka,C=U,g||e(B));(function(Ka,Aa){wa.addEventListener("dblclick",J);wa.addEventListener("click",function(){ya!=Aa&&(ya.className=ya.className.replace("odRowSelected",""),ya=Aa,
ya.className+=" odRowSelected",B=Ka,C=U,g||e(B))})})(ka,wa)}}}0==ja?(qa=document.createElement("div"),qa.className="odEmptyFolder",qa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),da.appendChild(qa)):da.appendChild(ua);A();M=!1}function ea(qa){f(qa?qa:ha,function(ua){if(ca){var ya=ua.value||[];if(g||fa)Array.prototype.push.apply(xa,ya);else{for(var ja=0;ja<ya.length;ja++){var ma=ya[ja],ka=ma.file?ma.file.mimeType:null;(ma.folder||"text/html"==ka||"text/xml"==
ka||"application/xml"==ka||"image/png"==ka||/\.svg$/.test(ma.name)||/\.html$/.test(ma.name)||/\.xml$/.test(ma.name)||/\.png$/.test(ma.name)||/\.drawio$/.test(ma.name)||/\.drawiolib$/.test(ma.name)||/\.pdf$/.test(ma.name))&&xa.push(ma)}xa.sort(function(Ba,sa){var Ea=Ba.name.toLowerCase(),wa=sa.name.toLowerCase();return Ba.folder&&!sa.folder?-1:!Ba.folder&&sa.folder?1:Ea<wa?-1:Ea>wa?1:0})}ua["@odata.nextLink"]&&1E3>xa.length?ea(ua["@odata.nextLink"]):(clearTimeout(aa),ba(xa))}},function(ua){if(ca){clearTimeout(aa);
-var ya=null;try{ya=JSON.parse(ua.responseText).error.message}catch(ja){}u(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ya?" ("+ya+")":""));M=!1;P.stop()}},null!=qa)}if(!M){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ca=M=!0,fa=0;m=arguments;var aa=setTimeout(function(){M=ca=!1;P.stop();u(mxResources.get("timeout"))},2E4),da=k(".odFilesList");da.innerText="";P.spin(da);switch(U){case "recent":T=
+var ya=null;try{ya=JSON.parse(ua.responseText).error.message}catch(ja){}u(mxResources.get("errorFetchingFolder",null,"Error fetching folder items")+(null!=ya?" ("+ya+")":""));M=!1;O.stop()}},null!=qa)}if(!M){k(".odCatsList").style.display="block";k(".odFilesSec").style.display="block";null!=N&&(N.innerText="",N.style.top="50%");var ca=M=!0,fa=0;m=arguments;var aa=setTimeout(function(){M=ca=!1;O.stop();u(mxResources.get("timeout"))},2E4),da=k(".odFilesList");da.innerText="";O.spin(da);switch(U){case "recent":T=
[{name:mxResources.get("recent",null,"Recent"),driveId:U}];var ia=l()||{},pa=[],oa;for(oa in ia)pa.push(ia[oa]);clearTimeout(aa);ba(pa);return;case "shared":var ha="/me/drive/sharedWithMe";T=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:U}];break;case "sharepoint":ha="/sites?search=";T=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:U}];fa=1;break;case "site":T.push({name:Z,driveId:U,folderId:W,siteId:X});ha="/sites/"+X+"/drives";fa=2;break;case "subsite":T.push({name:Z,
driveId:U,folderId:W,siteId:X});ha="/drives/"+X+(W?"/items/"+W:"/root")+"/children";break;case "search":U=C;T=[{driveId:U,name:mxResources.get("back",null,"Back")}];Y=encodeURIComponent(Y.replace(/'/g,"\\'"));ha=U?"/drives/"+U+"/root/search(q='"+Y+"')":"/me/drive/root/search(q='"+Y+"')";break;default:null==W?T=[{driveId:U}]:T.push({name:Z,driveId:U,folderId:W}),ha=(U?"/drives/"+U:"/me/drive")+(W?"/items/"+W:"/root")+"/children"}fa||(ha+=(0<ha.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
-var xa=[];ea()}}function E(U){O.className=O.className.replace("odCatSelected","");O=U;O.className+=" odCatSelected"}function R(U){M||(S=null,D("search",null,null,null,U))}var V="";null==e&&(e=x,V='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var U=null;try{U=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return U});null==n&&(n=function(U){if(null!=U){var W=l()||{};delete U["@microsoft.graph.downloadUrl"];W[U.id]=U;localStorage.setItem("mxODPickerRecentList",
+var xa=[];ea()}}function G(U){P.className=P.className.replace("odCatSelected","");P=U;P.className+=" odCatSelected"}function R(U){M||(S=null,D("search",null,null,null,U))}var V="";null==e&&(e=x,V='<div style="text-align: center;" class="odPreview"></div>');null==l&&(l=function(){var U=null;try{U=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(W){}return U});null==n&&(n=function(U){if(null!=U){var W=l()||{};delete U["@microsoft.graph.downloadUrl"];W[U.id]=U;localStorage.setItem("mxODPickerRecentList",
JSON.stringify(W))}});V='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+
-mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+V+(H?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(F?'<button id="odSubmitBtn" class="odSubmitBtn">'+
-mxUtils.htmlEntities(mxResources.get(G?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img class="geAdaptiveAsset" src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+V+(H?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(E?'<button id="odSubmitBtn" class="odSubmitBtn">'+
+mxUtils.htmlEntities(mxResources.get(F?"select":"open"))+"</button>":"");var Q=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();Q=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(Q?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(Q?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var P=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,B=null,C=null,M=!1,T=[],m=null,z=null;this.getSelectedItem=function(){null!=B&&n(B);return B};if(null==k("#mxODPickerCss")){var I=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");I.appendChild(L);L.type="text/css";L.id="mxODPickerCss";L.appendChild(document.createTextNode(Q))}b.innerHTML=
-V;var N=k(".odPreview"),O=k("#odFiles");b=function(U,W){W=W||document;return W.querySelectorAll(U)}(".odCatListTitle");for(V=0;V<b.length;V++)b[V].addEventListener("click",function(){B=z=null;if(!M)switch(E(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var S=null;k("#odSearchBox").addEventListener("keyup",function(U){var W=this;null!=S&&clearTimeout(S);13==U.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},
-500)});k("#refreshOD").addEventListener("click",function(){if(null!=m){e(null);var U=T.slice();D.apply(this,m);T=U}});H&&k("#odBackBtn").addEventListener("click",H);F&&k("#odSubmitBtn").addEventListener("click",t);null!=d?(H=d.pop(),"sharepoint"==d[0].driveId&&E(k("#odSharepoint")),T=d,D(H.driveId,H.folderId,H.siteId,H.name)):D()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),
+var O=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),q=new Editor,y=null,B=null,C=null,M=!1,T=[],m=null,z=null;this.getSelectedItem=function(){null!=B&&n(B);return B};if(null==k("#mxODPickerCss")){var I=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");I.appendChild(L);L.type="text/css";L.id="mxODPickerCss";L.appendChild(document.createTextNode(Q))}b.innerHTML=
+V;var N=k(".odPreview"),P=k("#odFiles");b=function(U,W){W=W||document;return W.querySelectorAll(U)}(".odCatListTitle");for(V=0;V<b.length;V++)b[V].addEventListener("click",function(){B=z=null;if(!M)switch(G(this),this.id){case "odFiles":D();break;case "odRecent":D("recent");break;case "odShared":D("shared");break;case "odSharepoint":D("sharepoint")}});var S=null;k("#odSearchBox").addEventListener("keyup",function(U){var W=this;null!=S&&clearTimeout(S);13==U.keyCode?R(W.value):S=setTimeout(function(){R(W.value)},
+500)});k("#refreshOD").addEventListener("click",function(){if(null!=m){e(null);var U=T.slice();D.apply(this,m);T=U}});H&&k("#odBackBtn").addEventListener("click",H);E&&k("#odSubmitBtn").addEventListener("click",t);null!=d?(H=d.pop(),"sharepoint"==d[0].driveId&&G(k("#odSharepoint")),T=d,D(H.driveId,H.folderId,H.siteId,H.name)):D()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&c.isModified()&&(c.getHash(),c.savingFile&&null!=c.savingFileTime&&(Date.now(),c.savingFileTime.getTime()),null!=c.ageStart&&(Date.now(),c.ageStart.getTime()),c.isAutosave(),null!=c.opened&&(Date.now(),c.opened.getTime()),null!=c.lastSaved&&(Date.now(),c.lastSaved.getTime()),
null!=c.lastChanged&&(Date.now(),c.lastChanged.getTime()),Date.now(),App.startTime.getTime(),c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&c.getSize())}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
(new Image).src=mxGraph.prototype.warningImage.src;window.geOpenWindow=mxUtils.bind(this,function(c,l,n){if("1"==urlParams.openInSameWin||navigator.standalone)null!=n&&n();else{var p=null;try{p=window.open(c)}catch(u){}null==p||void 0===p?this.showDialog((new PopupDialog(this,c,l,n)).container,320,160,!0,!0):null!=l&&l()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(c){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(c)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(c){null!=window.console&&console.log("Plugin Error:",c,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(c){try{c(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
@@ -14032,24 +14036,24 @@ null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"=
App.clearServiceWorker=function(b,e){navigator.serviceWorker.getRegistrations().then(function(f){if(null!=f&&0<f.length){for(var c=0;c<f.length;c++)f[c].unregister();null!=b&&b()}})["catch"](function(){null!=e&&e()})};App.isSameDomain=function(b){var e=document.createElement("a");e.href=b;return e.protocol===window.location.protocol||e.host===window.location.host};App.isBuiltInPlugin=function(b){for(var e in App.pluginRegistry)if(App.pluginRegistry[e]==b)return!0;return!1};
App.main=function(b,e){try{var f=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var g=parseInt(mxSettings.settings.autosaveDelay);!isNaN(g)&&0<g?(DrawioFile.prototype.autosaveDelay=g,EditorUi.debug("Setting autosaveDelay",g)):EditorUi.debug("Invalid autosaveDelay",g)}null!=mxSettings.settings.defaultEdgeLength&&(g=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(g)&&0<g?(Graph.prototype.defaultEdgeLength=g,EditorUi.debug("Using defaultEdgeLength",g)):
EditorUi.debug("Invalid defaultEdgeLength",g))}}catch(v){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(v.stack)):console.error(v)}try{if(null!=Menus.prototype.defaultFonts)for(g=0;g<Menus.prototype.defaultFonts.length;g++){var k=Menus.prototype.defaultFonts[g];"string"!==typeof k&&null!=k.fontFamily&&null!=k.fontUrl&&Graph.addFont(k.fontFamily,k.fontUrl)}mxResources.loadDefaultBundle=!1;c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
-mxLanguage))}catch(v){document.body.innerHTML="",k=document.createElement("pre"),mxUtils.write(k,v.stack),document.body.appendChild(k)}},c=function(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(k){function v(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");var D=null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,
-null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=
-null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===
-typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(D);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,D,(new Date).getTime()-t0.getTime()+"ms"]),null!=
-urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(k[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var t=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=t){EditorUi.debug("Setting configuration",
-JSON.stringify(t));if(null!=t.merge){var x=localStorage.getItem(Editor.configurationKey);if(null!=x)try{var A=JSON.parse(x),J;for(J in t.merge)A[J]=t.merge[J];t=A}catch(D){window.location.hash="",alert(D)}else t=t.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(t)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(D){window.location.hash="",alert(D)}1<k.length&&
-(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?v():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],v,function(D){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,D.stack);document.body.appendChild(E)}))},function(k){k=document.getElementById("geStatus");null!=k&&
-(k.innerHTML="Error loading page. <a>Please try refreshing.</a>",k.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';
+mxLanguage))}catch(v){document.body.innerHTML="",k=document.createElement("pre"),mxUtils.write(k,v.stack),document.body.appendChild(k)}},c=function(g){mxUtils.getAll("1"!=urlParams.dev?[g]:[g,STYLE_PATH+"/default.xml"],function(k){function v(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var D=
+null!=e?e():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",
+App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=
+null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(D);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",
+["v"+EditorUi.VERSION,D,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(G){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(G.stack)):(EditorUi.logError(G.message,null,null,null,G),window.setTimeout(function(){alert(G.message)},1))}}mxResources.parse(k[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var t=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=t){EditorUi.debug("Setting configuration",JSON.stringify(t));if(null!=t.merge){var x=localStorage.getItem(Editor.configurationKey);if(null!=x)try{var A=JSON.parse(x),J;for(J in t.merge)A[J]=t.merge[J];t=A}catch(D){window.location.hash="",alert(D)}else t=t.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(t)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(D){window.location.hash=
+"",alert(D)}1<k.length&&(Graph.prototype.defaultThemes["default-style2"]=k[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=k[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?v():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],v,function(D){document.body.innerHTML="";var G=document.createElement("pre");mxUtils.write(G,D.stack);document.body.appendChild(G)}))},function(k){k=document.getElementById("geStatus");
+null!=k&&(k.innerHTML="Error loading page. <a>Please try refreshing.</a>",k.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";c(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';
else if(App.isMainCalled=!0,window.onerror=function(g,k,v,t,x){EditorUi.logError("Global: "+(null!=g?g:""),k,v,t,x,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x)):console.error("Message:",g,"\nURL:",k,"\nLine:",v,"\nColumn:",t,"\nError:",x);window.setTimeout(function(){alert("Error: "+(null!=g?g:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&
"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var l=document.getElementById("geInfo");null!=l&&l.parentNode.removeChild(l)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var n=document.getElementById("geBootstrap");
if(null!=n){var p=mxUtils.getTextContent(n);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(p).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var u=document.getElementById("geMain");null!=u&&(p=mxUtils.getTextContent(u),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(p).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(p).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&
("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(g){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||
-"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var G=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(G=H.plugins)}catch(g){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=G&&0<
-G.length&&"0"!=urlParams.plugins)for(l=0;l<G.length;l++)try{("/"==G[l].charAt(0)&&(G[l]=PLUGINS_BASE_PATH+G[l]),App.isSameDomain(G[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(G[l])?null==App.pluginsLoaded[G[l]]&&(App.pluginsLoaded[G[l]]=!0,App.embedModePluginsCount++,mxscript(G[l])):null!=window.console&&console.log("Unknown plugin:",G[l]):null!=window.console&&console.log("Blocked plugin:",G[l])}catch(g){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var F=window.opener||window.parent,K=function(g){if(g.source==F)try{var k=JSON.parse(g.data);null!=k&&"configure"==
-k.action&&(mxEvent.removeListener(window,"message",K),Editor.configure(k.config),mxSettings.load(),null!=k.config.darkColor&&document.body.style.setProperty("--dark-color",k.config.darkColor),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(v){null!=window.console&&console.log("Error in configure message: "+v,g.data)}};mxEvent.addListener(window,"message",K);F.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
+"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var F=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var H=JSON.parse(localStorage.getItem(mxSettings.key));null!=H&&(F=H.plugins)}catch(g){}H=urlParams.p;App.initPluginCallback();null!=H&&App.loadPlugins(H.split(";"));if(null!=F&&0<
+F.length&&"0"!=urlParams.plugins)for(l=0;l<F.length;l++)try{("/"==F[l].charAt(0)&&(F[l]=PLUGINS_BASE_PATH+F[l]),App.isSameDomain(F[l]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(F[l])?null==App.pluginsLoaded[F[l]]&&(App.pluginsLoaded[F[l]]=!0,App.embedModePluginsCount++,mxscript(F[l])):null!=window.console&&console.log("Unknown plugin:",F[l]):null!=window.console&&console.log("Blocked plugin:",F[l])}catch(g){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
+"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var E=window.opener||window.parent,K=function(g){if(g.source==E)try{var k=JSON.parse(g.data);null!=k&&"configure"==
+k.action&&(mxEvent.removeListener(window,"message",K),Editor.configure(k.config),mxSettings.load(),null!=k.config.darkColor&&document.body.style.setProperty("--dark-color",k.config.darkColor),k.colorSchemeMeta&&mxmeta("color-scheme","dark light"),f())}catch(v){null!=window.console&&console.log("Error in configure message: "+v,g.data)}};mxEvent.addListener(window,"message",K);E.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):console.error(g)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var d=localStorage.getItem(Editor.configurationKey);if(null!=d)try{d=JSON.parse(d),null!=d&&(EditorUi.debug("Using local configuration",d),Editor.configure(d),mxSettings.load())}catch(g){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(g.stack)):
-console.error(g)}}}f()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(g){document.body.innerHTML="",G=document.createElement("pre"),mxUtils.write(G,g.stack),document.body.appendChild(G)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;
+console.error(g)}}}f()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(g){document.body.innerHTML="",F=document.createElement("pre"),mxUtils.write(F,g.stack),document.body.appendChild(F)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;
"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
App.loadPlugins=function(b,e){EditorUi.debug("Loading plugins",b);for(var f=0;f<b.length;f++)if(null!=b[f]&&0<b[f].length)try{if(null!=App.pluginRegistry[b[f]]){var c=PLUGINS_BASE_PATH+App.pluginRegistry[b[f]];null==App.pluginsLoaded[c]&&(App.pluginsLoaded[c]=!0,App.embedModePluginsCount++,"undefined"===typeof window.drawDevUrl?e?mxinclude(c):mxscript(c):e?mxinclude(c):mxscript(drawDevUrl+c))}else null!=window.console&&console.log("Unknown plugin:",b[f])}catch(l){null!=window.console&&console.log("Error loading plugin:",
b[f],l)}};App.prototype.initializeEmbedMode=function(){"1"==urlParams.embed&&("app.diagrams.net"==window.location.hostname&&this.showBanner("EmbedDeprecationFooter","app.diagrams.net will stop working for embed mode. Please use embed.diagrams.net."),0<App.embedModePluginsCount||this.initEmbedDone||(this.initEmbedDone=!0,EditorUi.prototype.initializeEmbedMode.apply(this,arguments)))};
@@ -14089,11 +14093,11 @@ App.prototype.addRecent=function(b,e,f){if(isLocalStorage&&null!=localStorage){e
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent"+(null!=b?b:""))}catch(e){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return this.logIfModified(b),mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,e=this.getCurrentFile();null==e||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=e&&(b=(null!=e.getTitle()?e.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
-App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),p=mxUtils.bind(this,function(Q){window.clearTimeout(n);l&&e(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var u=this.editor.graph,G=u.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());u.setBackgroundImage=this.editor.graph.setBackgroundImage;
-var F=this.pages[0];this.currentPage==F?u.setBackgroundImage(G):null!=F.viewState&&null!=F.viewState&&(G=F.viewState.backgroundImage,u.setBackgroundImage(G));u.getGlobalVariable=function(Q){return"page"==Q?F.getName():"pagenumber"==Q?1:H.apply(this,arguments)};u.getGlobalVariable=H;document.body.appendChild(u.container);u.model.setRoot(F.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{u!=this.editor.graph&&null!=u.container.parentNode&&
-u.container.parentNode.removeChild(u.container)}catch(P){Q=null}p(Q)}),b,this.thumbImageCache,"#ffffff",function(){p()},null,null,null,null,null,null,u,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var K=document.createElement("canvas"),d=u.getGraphBounds(),g=u.view.translate,k=u.view.scale;null!=G&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle((g.x+G.x)*k,(g.y+G.y)*k,G.width*k,G.height*k)));var v=b/d.width;v=Math.min(1,Math.min(3*b/(4*d.height),
-v));var t=Math.floor(d.x),x=Math.floor(d.y);K.setAttribute("width",Math.ceil(v*(d.width+4)));K.setAttribute("height",Math.ceil(v*(d.height+4)));var A=K.getContext("2d");A.scale(v,v);A.translate(-t,-x);var J=u.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";A.save();A.fillStyle=J;A.fillRect(t,x,Math.ceil(d.width+4),Math.ceil(d.height+4));A.restore();if(null!=G){var D=new Image;D.src=G.src;A.drawImage(D,G.x*v,G.y*v,G.width*v,G.height*v)}var E=new mxJsCanvas(K),R=new mxAsyncCanvas(this.thumbImageCache);
-E.images=this.thumbImageCache.images;var V=new mxImageExport;V.drawShape=function(Q,P){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(P.save(),P.translate(.5,.5),Q.shape.paint(P),P.translate(-.5,-.5),P.restore())};V.drawText=function(Q,P){};V.drawState(u.getView().getState(u.model.root),R);R.finish(mxUtils.bind(this,function(){try{V.drawState(u.getView().getState(u.model.root),E),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(Q){K=null}p(K)}));
+App.prototype.getThumbnail=function(b,e,f){f=null!=f?f:0;var c=!1;try{var l=!0,n=window.setTimeout(mxUtils.bind(this,function(){l=!1;e(null)}),this.timeout),p=mxUtils.bind(this,function(Q){window.clearTimeout(n);l&&e(Q)});null==this.thumbImageCache&&(this.thumbImageCache={});var u=this.editor.graph,F=u.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var H=u.getGlobalVariable;u=this.createTemporaryGraph(u.getStylesheet());u.setBackgroundImage=this.editor.graph.setBackgroundImage;
+var E=this.pages[0];this.currentPage==E?u.setBackgroundImage(F):null!=E.viewState&&null!=E.viewState&&(F=E.viewState.backgroundImage,u.setBackgroundImage(F));u.getGlobalVariable=function(Q){return"page"==Q?E.getName():"pagenumber"==Q?1:H.apply(this,arguments)};u.getGlobalVariable=H;document.body.appendChild(u.container);u.model.setRoot(E.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(Q){try{u!=this.editor.graph&&null!=u.container.parentNode&&
+u.container.parentNode.removeChild(u.container)}catch(O){Q=null}p(Q)}),b,this.thumbImageCache,"#ffffff",function(){p()},null,null,null,null,null,null,u,f,null,null,null,"diagram",null),c=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var K=document.createElement("canvas"),d=u.getGraphBounds(),g=u.view.translate,k=u.view.scale;null!=F&&(d=mxRectangle.fromRectangle(d),d.add(new mxRectangle((g.x+F.x)*k,(g.y+F.y)*k,F.width*k,F.height*k)));var v=b/d.width;v=Math.min(1,Math.min(3*b/(4*d.height),
+v));var t=Math.floor(d.x),x=Math.floor(d.y);K.setAttribute("width",Math.ceil(v*(d.width+4)));K.setAttribute("height",Math.ceil(v*(d.height+4)));var A=K.getContext("2d");A.scale(v,v);A.translate(-t,-x);var J=u.background;if(null==J||""==J||J==mxConstants.NONE)J="#ffffff";A.save();A.fillStyle=J;A.fillRect(t,x,Math.ceil(d.width+4),Math.ceil(d.height+4));A.restore();if(null!=F){var D=new Image;D.src=F.src;A.drawImage(D,F.x*v,F.y*v,F.width*v,F.height*v)}var G=new mxJsCanvas(K),R=new mxAsyncCanvas(this.thumbImageCache);
+G.images=this.thumbImageCache.images;var V=new mxImageExport;V.drawShape=function(Q,O){Q.shape instanceof mxShape&&Q.shape.checkBounds()&&(O.save(),O.translate(.5,.5),Q.shape.paint(O),O.translate(-.5,-.5),O.restore())};V.drawText=function(Q,O){};V.drawState(u.getView().getState(u.model.root),R);R.finish(mxUtils.bind(this,function(){try{V.drawState(u.getView().getState(u.model.root),G),u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}catch(Q){K=null}p(K)}));
c=!0}}catch(Q){c=!1,null!=u&&u!=this.editor.graph&&null!=u.container.parentNode&&u.container.parentNode.removeChild(u.container)}c||window.clearTimeout(n);return c};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(e,f){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var c=this.getCurrentFile();e=null!=c?c.getMode():e;e==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):e==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):e==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=e==App.MODE_DEVICE?"pointer":"default")}if(f)try{if(isLocalStorage)localStorage.setItem(".mode",e);else if("undefined"!=typeof Storage){var l=new Date;l.setYear(l.getFullYear()+1);document.cookie="MODE="+e+"; expires="+l.toUTCString()}}catch(n){}}})();
@@ -14108,22 +14112,22 @@ App.prototype.showRefreshDialog=function(b,e){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var e=document.createElement("div");e.className="geAlert";e.style.zIndex=2E9;e.style.left="50%";e.style.top="-100%";e.style.maxWidth="80%";e.style.width="max-content";e.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");e.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");e.appendChild(b);mxEvent.addListener(b,"click",function(f){null!=e.parentNode&&(e.parentNode.removeChild(e),mxEvent.consume(f))});document.body.appendChild(e);window.setTimeout(function(){e.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(e.style,"transition","all 2s ease");e.style.opacity="0";window.setTimeout(function(){null!=e.parentNode&&e.parentNode.removeChild(e)},
2E3)},15E3)}};
-App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(p,u,G,H,F){"ResizeObserver loop limit exceeded"!=p&&(EditorUi.logError("Uncaught: "+(null!=p?p:""),u,G,H,F,null,!0),b.handleError({message:p},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(p){var u=this.getCurrentFile();EditorUi.debug("storage event",[p],
-[u]);null!=u&&".draft-alive-check"==p.key&&null!=p.newValue&&null!=u.draftId&&(this.draftAliveCheck=p.newValue,u.saveDraft())}))}catch(p){}var e=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(p){try{var u=this.getDiagramId();if(u!=e){e=u;var G=this.getCurrentFile();null!=G&&G.getHash()==u||this.loadFile(u,!0)}else{var H=this.getHashObject();if(null!=H&&null!=H.pageId&&null!=this.currentPage&&H.pageId!=this.currentPage.getId()){var F=this.getPageById(H.pageId);
-null!=F&&this.selectPage(F)}}}catch(K){null!=document.body&&this.handleError(K,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"))}))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}else if((null==
-window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var p=mxUtils.bind(this,function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var F=urlParams.title;F=null!=F?decodeURIComponent(F):this.defaultFilename;H=new LocalFile(this,
-H,F,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.editor.chromeless||(H.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),u=window.opener||window.parent;if(u!=window){var G=urlParams.create;null!=G?p(u[decodeURIComponent(G)]):(G=urlParams.data,null!=G?p(decodeURIComponent(G)):this.installMessageHandler(mxUtils.bind(this,function(H,
-F){F.source==u&&p(H)})))}}else if(null==this.dialog)if("1"==urlParams.demo)G=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=G;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{G=!1;try{G=null!=window.opener&&null!=window.opener.openFile}catch(H){}G?this.spinner.spin(document.body,mxResources.get("loading")):(G=this.getDiagramId(),
-!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=G&&0!=G.length||this.editor.isChromelessView()?null!=G&&0<G.length?this.loadFile(G,null,null,mxUtils.bind(this,function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var F=JSON.parse(H);this.editor.graph.fitWindow(F,F.border)}catch(K){console.error(K)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,
+App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(p,u,F,H,E){"ResizeObserver loop limit exceeded"!=p&&(EditorUi.logError("Uncaught: "+(null!=p?p:""),u,F,H,E,null,!0),b.handleError({message:p},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(p){var u=this.getCurrentFile();EditorUi.debug("storage event",[p],
+[u]);null!=u&&".draft-alive-check"==p.key&&null!=p.newValue&&null!=u.draftId&&(this.draftAliveCheck=p.newValue,u.saveDraft())}))}catch(p){}var e=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(p){try{var u=this.getDiagramId();if(u!=e){e=u;var F=this.getCurrentFile();null!=F&&F.getHash()==u||this.loadFile(u,!0)}else{var H=this.getHashObject();if(null!=H&&null!=H.pageId&&null!=this.currentPage&&H.pageId!=this.currentPage.getId()){var E=this.getPageById(H.pageId);
+null!=E&&this.selectPage(E)}}}catch(K){null!=document.body&&this.handleError(K,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var d=this.getCurrentFile();window.location.hash=null!=d?d.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"))}))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}else if((null==
+window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var p=mxUtils.bind(this,function(H){Editor.isPngDataUrl(H)&&(H=Editor.extractGraphModelFromPng(H));var E=urlParams.title;E=null!=E?decodeURIComponent(E):this.defaultFilename;H=new LocalFile(this,
+H,E,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(H.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(H);this.editor.chromeless||(H.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),u=window.opener||window.parent;if(u!=window){var F=urlParams.create;null!=F?p(u[decodeURIComponent(F)]):(F=urlParams.data,null!=F?p(decodeURIComponent(F)):this.installMessageHandler(mxUtils.bind(this,function(H,
+E){E.source==u&&p(H)})))}}else if(null==this.dialog)if("1"==urlParams.demo)F=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=F;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{F=!1;try{F=null!=window.opener&&null!=window.opener.openFile}catch(H){}F?this.spinner.spin(document.body,mxResources.get("loading")):(F=this.getDiagramId(),
+!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=F&&0!=F.length||this.editor.isChromelessView()?null!=F&&0<F.length?this.loadFile(F,null,null,mxUtils.bind(this,function(){var H=decodeURIComponent(urlParams.viewbox||"");if(""!=H)try{var E=JSON.parse(H);this.editor.graph.fitWindow(E,E.border)}catch(K){console.error(K)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,
null,null,null,null,!0):this.checkDrafts())}}),c=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<c.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var l=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),n=mxUtils.bind(this,function(p){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,
-p,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var u=urlParams.title;u=null!=u?decodeURIComponent(u):this.defaultFilename;p=this.getServiceCount(!0);isLocalStorage&&p++;var G=4>=p?2:6<p?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(H,F){if(null==F){this.hideDialog();var K=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=K}else this.pickFolder(F,mxUtils.bind(this,function(d){this.createFile(H,
-this.getFileData(!0),null,F,null,!0,d)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,G,null,null,null,this.editor.fileExtensions);this.showDialog(u.container,420,p>G?390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));u.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0))this.spinner.stop(),c=JSON.parse(c),window.isMermaidEnabled&&"mermaid"==c.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){p!=
-this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=p.filename?p.filename:this.defaultFilename,p,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(c.data,null,function(){},mxUtils.bind(this,function(p){for(var u=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),G=0;G<u.length;G++)u[G].parentNode.removeChild(u[G]);mxMermaidToDrawio.resetListeners();
+p,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var u=urlParams.title;u=null!=u?decodeURIComponent(u):this.defaultFilename;p=this.getServiceCount(!0);isLocalStorage&&p++;var F=4>=p?2:6<p?4:3;u=new CreateDialog(this,u,mxUtils.bind(this,function(H,E){if(null==E){this.hideDialog();var K=Editor.useLocalStorage;this.createFile(0<H.length?H:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=K}else this.pickFolder(E,mxUtils.bind(this,function(d){this.createFile(H,
+this.getFileData(!0),null,E,null,!0,d)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,F,null,null,null,this.editor.fileExtensions);this.showDialog(u.container,420,p>F?390:280,!0,!1,mxUtils.bind(this,function(H){H&&null==this.getCurrentFile()&&this.showSplash()}));u.init()}});if("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8))if("{"==c.charAt(0))this.spinner.stop(),c=JSON.parse(c),window.isMermaidEnabled&&"mermaid"==c.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(p){p!=
+this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=p.filename?p.filename:this.defaultFilename,p,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(c.data,null,function(){},mxUtils.bind(this,function(p){for(var u=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),F=0;F<u.length;F++)u[F].parentNode.removeChild(u[F]);mxMermaidToDrawio.resetListeners();
this.handleError(p)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[c]?n(window.opener[c]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}else this.loadTemplate(c,function(p){n(p)},mxUtils.bind(this,function(p){this.handleError(p,mxResources.get("errorLoadingFile"),l)}))}else(null==window.location.hash||1>=
window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&window.history.replaceState&&window.history.replaceState(null,
null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),f())}}catch(p){this.handleError(p)}};
App.prototype.loadDraft=function(b,e){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var f=this.getCurrentFile();null!=f&&(f.fileChanged(),null!=e&&e())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(n){EditorUi.debug("App.filterDrafts",[this],"items",n);for(var p=0;p<n.length;p++)try{var u=n[p].key;if(null!=u&&".draft_"==u.substring(0,7)){var G=JSON.parse(n[p].data);null!=G&&"draft"==G.type&&G.aliveCheck!=e&&(null==b&&null==G.fileObject||null!=G.fileObject&&G.fileObject.path==b)&&(G.key=u,l.push(G))}}catch(H){}c()}),c)}catch(n){c()}};
+App.prototype.filterDrafts=function(b,e,f){function c(){f(l)}var l=[];try{this.getDatabaseItems(mxUtils.bind(this,function(n){EditorUi.debug("App.filterDrafts",[this],"items",n);for(var p=0;p<n.length;p++)try{var u=n[p].key;if(null!=u&&".draft_"==u.substring(0,7)){var F=JSON.parse(n[p].data);null!=F&&"draft"==F.type&&F.aliveCheck!=e&&(null==b&&null==F.fileObject||null!=F.fileObject&&F.fileObject.path==b)&&(F.key=u,l.push(F))}}catch(H){}c()}),c)}catch(n){c()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(e){if(1==e.length)this.loadDraft(e[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[0].key)}));else if(1<e.length){var f=new Date(e[0].modified);f=new DraftDialog(this,1<e.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
[f.toLocaleDateString()+" "+f.toLocaleTimeString()]),1<e.length?null:e[0].data,mxUtils.bind(this,function(c){this.hideDialog();c=""!=c?c:0;this.loadDraft(e[c].data,mxUtils.bind(this,function(){this.removeDatabaseItem(e[c].key)}))}),mxUtils.bind(this,function(c,l){this.removeDatabaseItem(e[""!=c?c:0].key);null!=l&&l()}),null,null,null,1<e.length?e:null);this.showDialog(f.container,640,480,!0,!1,mxUtils.bind(this,function(c){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,
this.getFileData(),null,null,null,null,null,!0)}));f.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(e){}};
@@ -14132,52 +14136,52 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash
App.prototype.addLanguageMenu=function(b,e,f){var c=null;null!=this.menus.get("language")&&(c=document.createElement("div"),c.setAttribute("title",mxResources.get("language")),c.className="geIcon geAdaptiveAsset",c.style.backgroundImage="url("+Editor.globeImage+")",c.style.backgroundPosition="right center",c.style.backgroundRepeat="no-repeat",c.style.backgroundSize="19px 19px",c.style.width="19px",c.style.height="19px",mxUtils.setOpacity(c,40),c.style.position="absolute",c.style.cursor="pointer",
c.style.bottom="20px",c.style.right=null!=f?f:"22px",e&&(c.style.direction="rtl",c.style.textAlign="right",c.style.right=null!=f?f:"24px",e=document.createElement("span"),e.style.display="inline-block",e.style.fontSize="12px",e.style.margin="2px 24px 0 0",e.style.userSelect="none",mxUtils.write(e,mxResources.get("language")),c.appendChild(e),e.className="geAdaptiveAsset"),mxEvent.addListener(c,"click",mxUtils.bind(this,function(l){this.editor.graph.popupMenuHandler.hideMenu();var n=new mxPopupMenu(this.menus.get("language").funct);
n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);n.destroy()});var p=mxUtils.getOffset(c);n.popup(p.x,p.y+c.offsetHeight,null,l);this.setCurrentMenu(n)})),b.appendChild(c));return c};
-App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(u){try{if(null!=e){var G=n.target.result;"image/png"==c.type&&(G=this.extractGraphModelFromPng(G));e(new LocalFile(this,G,c.name,null,b,c,u))}else this.openFileHandle(n.target.result,c.name,c,!1,b,u)}catch(H){f(H)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
+App.prototype.loadFileSystemEntry=function(b,e,f){f=null!=f?f:mxUtils.bind(this,function(c){this.handleError(c)});try{b.getFile().then(mxUtils.bind(this,function(c){var l=new FileReader;l.onload=mxUtils.bind(this,function(n){var p=mxUtils.bind(this,function(u){try{if(null!=e){var F=n.target.result;"image/png"==c.type&&(F=this.extractGraphModelFromPng(F));e(new LocalFile(this,F,c.name,null,b,c,u))}else this.openFileHandle(n.target.result,c.name,c,!1,b,u)}catch(H){f(H)}});b.queryPermission?b.queryPermission({mode:"readwrite"}).then(mxUtils.bind(this,
function(u){p("denied"!==u)})):b.createWritable().then(mxUtils.bind(this,function(){p(!0)}),mxUtils.bind(this,function(u){p(!1)}))});l.onerror=f;"image"!==c.type.substring(0,5)&&"application/pdf"!==c.type||"image/svg"===c.type.substring(0,9)?l.readAsText(c):l.readAsDataURL(c)}),f)}catch(c){f(c)}};
App.prototype.createFileSystemOptions=function(b){var e=[],f=null;if(null!=b){var c=b.lastIndexOf(".");0<c&&(f=b.substring(c+1))}for(c=0;c<this.editor.diagramFileTypes.length;c++){var l={description:mxResources.get(this.editor.diagramFileTypes[c].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[c].extension+")":""),accept:{}};l.accept[this.editor.diagramFileTypes[c].mimeType]=["."+this.editor.diagramFileTypes[c].extension];this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,
l):this.editor.diagramFileTypes[c].extension==f?e.splice(0,0,l):e.push(l)}return{types:e,suggestedName:b}};App.prototype.showSaveFilePicker=function(b,e,f){e=null!=e?e:mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)});f=null!=f?f:this.createFileSystemOptions();window.showSaveFilePicker(f).then(mxUtils.bind(this,function(c){null!=c&&c.getFile().then(mxUtils.bind(this,function(l){b(c,l)}),e)}),e)};
App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var e=this.getServiceForName(b);if(null!=e)e.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(p){null!=p&&0<p.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(p[0])}),
mxUtils.bind(this,function(p){"AbortError"!=p.name&&this.handleError(p)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var f=document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.openFiles(f.files),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.openFileInputElt=f}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(p,u){StorageFile.listFiles(this,"F",p,u)});window.openBrowserFile=mxUtils.bind(this,function(p,u,G){StorageFile.getFileContent(this,p,u,G)});window.deleteBrowserFile=mxUtils.bind(this,function(p,u,G){StorageFile.deleteFile(this,p,u,G)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(p,u){var G=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=u.substring(u.length-4)||(u=u.substring(0,u.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,p,u):new LocalFile(this,p,u))}),H=this.getCurrentFile();null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,G,mxResources.get("cancel"),mxResources.get("discardChanges")):G()}));var l=this.dialog,n=l.close;this.dialog.close=mxUtils.bind(this,function(p){Editor.useLocalStorage=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(p,u){StorageFile.listFiles(this,"F",p,u)});window.openBrowserFile=mxUtils.bind(this,function(p,u,F){StorageFile.getFileContent(this,p,u,F)});window.deleteBrowserFile=mxUtils.bind(this,function(p,u,F){StorageFile.deleteFile(this,p,u,F)});var c=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(p,u){var F=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=u.substring(u.length-4)||(u=u.substring(0,u.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,p,u):new LocalFile(this,p,u))}),H=this.getCurrentFile();null!=H&&H.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()}));var l=this.dialog,n=l.close;this.dialog.close=mxUtils.bind(this,function(p){Editor.useLocalStorage=
c;n.apply(l,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(p){this.handleError(p)}};
App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;var e=mxUtils.bind(this,function(n){try{this.loadLibrary(n);this.showSidebar();try{this.sidebar.palettes[n.getHash()][0].scrollIntoView({behavior:"smooth"})}catch(p){}}catch(p){this.handleError(p,mxResources.get("errorLoadingFile"))}});if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?
this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(n,p){null!=p?e(p):this.spinner.spin(document.body,mxResources.get("loading"))&&f.getLibrary(n,mxUtils.bind(this,function(u){this.spinner.stop();e(u)}),mxUtils.bind(this,function(u){this.handleError(u,null!=u?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var c=document.createElement("input");
-c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var n=0;n<c.files.length;n++)mxUtils.bind(this,function(p){var u=new FileReader;u.onload=mxUtils.bind(this,function(G){e(new LocalLibrary(this,G.target.result,p.name))});u.readAsText(p)})(c.files[n]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+c.setAttribute("type","file");mxEvent.addListener(c,"change",mxUtils.bind(this,function(){if(null!=c.files){for(var n=0;n<c.files.length;n++)mxUtils.bind(this,function(p){var u=new FileReader;u.onload=mxUtils.bind(this,function(F){e(new LocalLibrary(this,F.target.result,p.name))});u.readAsText(p)})(c.files[n]);c.type="";c.type="file";c.value=""}}));c.style.display="none";document.body.appendChild(c);this.libFileInputElt=c}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
mxUtils.bind(this,function(n,p){StorageFile.listFiles(this,"L",n,p)});window.openBrowserFile=mxUtils.bind(this,function(n,p,u){StorageFile.getFileContent(this,n,p,u)});window.deleteBrowserFile=mxUtils.bind(this,function(n,p,u){StorageFile.deleteFile(this,n,p,u)});var l=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(n){this.hideDialog(n)}));window.openFile.setConsumer(mxUtils.bind(this,function(n,p){e(b==App.MODE_BROWSER?new StorageLibrary(this,
n,p):new LocalLibrary(this,n,p))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=l;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,e,f,c,l,n,p){try{c=null!=c?c:this.mode;l=null!=l?l:!1;n=null!=n?n:!1;var u=this.createLibraryDataFromImages(e),G=mxUtils.bind(this,function(K){this.spinner.stop();null!=p&&p();this.handleError(K,null!=K?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,u,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(K){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,u,K,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),G,K):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,u,b),mxUtils.bind(this,function(d){this.hideDialog(!0);this.libraryLoaded(d,e)}),G):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
-else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(u);var H=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(K){this.spinner.stop();this.hideDialog(!0);n||this.libraryLoaded(f,e);null!=p&&p()}),G)});if(b!=f.getTitle()){var F=f.getHash();f.rename(b,mxUtils.bind(this,function(K){f.constructor!=LocalLibrary&&F!=f.getHash()&&(mxSettings.removeCustomLibrary(F),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(F);H()}),G)}else H()}}catch(K){this.handleError(K)}};
+App.prototype.saveLibrary=function(b,e,f,c,l,n,p){try{c=null!=c?c:this.mode;l=null!=l?l:!1;n=null!=n?n:!1;var u=this.createLibraryDataFromImages(e),F=mxUtils.bind(this,function(K){this.spinner.stop();null!=p&&p();this.handleError(K,null!=K?mxResources.get("errorSavingFile"):null)});null==f&&c==App.MODE_DEVICE&&(f=new LocalLibrary(this,u,b));if(null==f)this.pickFolder(c,mxUtils.bind(this,function(K){c==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,u,K,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,this.drive.libraryMimeType):c==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,u,mxUtils.bind(this,function(d){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(d,e)}),F,K):c==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,u,b),mxUtils.bind(this,function(d){this.hideDialog(!0);this.libraryLoaded(d,e)}),F):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
+else if(l||this.spinner.spin(document.body,mxResources.get("saving"))){f.setData(u);var H=mxUtils.bind(this,function(){f.save(!0,mxUtils.bind(this,function(K){this.spinner.stop();this.hideDialog(!0);n||this.libraryLoaded(f,e);null!=p&&p()}),F)});if(b!=f.getTitle()){var E=f.getHash();f.rename(b,mxUtils.bind(this,function(K){f.constructor!=LocalLibrary&&E!=f.getHash()&&(mxSettings.removeCustomLibrary(E),mxSettings.addCustomLibrary(f.getHash()));this.removeLibrarySidebar(E);H()}),F)}else H()}}catch(K){this.handleError(K)}};
App.prototype.saveFile=function(b,e){var f=this.getCurrentFile(),c=this.mode;if(null!=f){var l=mxUtils.bind(this,function(){EditorUi.enableDrafts&&f.removeDraft();this.getCurrentFile()==f||f.isModified()||(f.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=e&&e()});if(b||null==f.getTitle()||null!=f.invalidFileHandle||null==this.mode)if(null!=f&&f.constructor==LocalFile&&null!=f.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(u,G){f.invalidFileHandle=null;f.fileHandle=u;f.title=G.name;f.desc=G;f.editable=null;this.save(G.name,l)}),null,this.createFileSystemOptions(f.getTitle()));else{b=null!=f.getTitle()?f.getTitle():this.defaultFilename;var n=mxUtils.bind(this,function(u,G,H,F){if(null!=u&&0<u.length)if(/(\.pdf)$/i.test(u))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){H.value=u.split(".").slice(0,
--1).join(".");H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&G==App.MODE_DEVICE)null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(d,g){f.fileHandle=d;f.mode=App.MODE_DEVICE;f.title=g.name;f.desc=g;this.setMode(App.MODE_DEVICE);this.save(g.name,l)}),mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)}),
-this.createFileSystemOptions(u)):(this.setMode(App.MODE_DEVICE),this.save(u,l));else if("download"==G)(new LocalFile(this,null,u)).save();else if("_blank"==G)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=G){var K=mxUtils.bind(this,function(d){var g=this.editor.graph,k=g.getSelectionCells(),v=g.getViewState(),t=this.currentPage;this.createFile(u,this.getFileData(/(\.xml)$/i.test(u)||
-0>u.indexOf(".")||/(\.drawio)$/i.test(u),/(\.svg)$/i.test(u),/(\.html)$/i.test(u)),null,G,l,null==this.mode,d,null,null,mxUtils.bind(this,function(){this.restoreViewState(t,v,k)}))});null!=F?K(F):this.pickFolder(G,K)}else null!=G&&this.save(u,l)}),p=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(u,G,H){n(u.value,G,u,H);this.hideDialog()}),p?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(f.getTitle(),
+function(u,F){f.invalidFileHandle=null;f.fileHandle=u;f.title=F.name;f.desc=F;f.editable=null;this.save(F.name,l)}),null,this.createFileSystemOptions(f.getTitle()));else{b=null!=f.getTitle()?f.getTitle():this.defaultFilename;var n=mxUtils.bind(this,function(u,F,H,E){if(null!=u&&0<u.length)if(/(\.pdf)$/i.test(u))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){H.value=u.split(".").slice(0,
+-1).join(".");H.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?H.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==c&&F==App.MODE_DEVICE)null!=f&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(d,g){f.fileHandle=d;f.mode=App.MODE_DEVICE;f.title=g.name;f.desc=g;this.setMode(App.MODE_DEVICE);this.save(g.name,l)}),mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)}),
+this.createFileSystemOptions(u)):(this.setMode(App.MODE_DEVICE),this.save(u,l));else if("download"==F)(new LocalFile(this,null,u)).save();else if("_blank"==F)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(c!=F){var K=mxUtils.bind(this,function(d){var g=this.editor.graph,k=g.getSelectionCells(),v=g.getViewState(),t=this.currentPage;this.createFile(u,this.getFileData(/(\.xml)$/i.test(u)||
+0>u.indexOf(".")||/(\.drawio)$/i.test(u),/(\.svg)$/i.test(u),/(\.html)$/i.test(u)),null,F,l,null==this.mode,d,null,null,mxUtils.bind(this,function(){this.restoreViewState(t,v,k)}))});null!=E?K(E):this.pickFolder(F,K)}else null!=F&&this.save(u,l)}),p=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(u,F,H){n(u.value,F,u,H);this.hideDialog()}),p?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(f.getTitle(),
l)}};
-App.prototype.loadTemplate=function(b,e,f,c,l){var n=!1,p=b,u=null!=c?c:b;c=/\.png$/i.test(u)||/\.pdf$/i.test(u);var G=EditorUi.isVisioFilename(u);this.editor.isCorsEnabledForUrl(p)||(n=c||G,p="t="+(new Date).getTime(),p=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+p+(n?"&base64=1":""));this.editor.loadUrl(p,mxUtils.bind(this,function(H){try{var F=n?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(H):atob(H):H;if(G||this.isVisioData(F))G||(u=l?this.isRemoteVisioData(F)?"raw.vss":"raw.vssx":this.isRemoteVisioData(F)?
-"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(K){e(K)},f,u);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,u))this.isExternalDataComms()?this.parseFileData(F,mxUtils.bind(this,function(K){4==K.readyState&&200<=K.status&&299>=K.status&&"<mxGraphModel"==K.responseText.substring(0,13)&&e(K.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);else if(this.isLucidChartData(F))this.convertLucidChart(F,
-mxUtils.bind(this,function(K){e(K)}),mxUtils.bind(this,function(K){f(K)}));else{if(/(\.png)($|\?)/i.test(u)||Editor.isPngData(F))F=Editor.extractGraphModelFromPng(H);e(F)}}catch(K){f(K)}}),f,/(\.png)($|\?)/i.test(u)||G,null,null,n)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
+App.prototype.loadTemplate=function(b,e,f,c,l){var n=!1,p=b,u=null!=c?c:b;c=/\.png$/i.test(u)||/\.pdf$/i.test(u);var F=EditorUi.isVisioFilename(u);this.editor.isCorsEnabledForUrl(p)||(n=c||F,p="t="+(new Date).getTime(),p=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+p+(n?"&base64=1":""));this.editor.loadUrl(p,mxUtils.bind(this,function(H){try{var E=n?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(H):atob(H):H;if(F||this.isVisioData(E))F||(u=l?this.isRemoteVisioData(E)?"raw.vss":"raw.vssx":this.isRemoteVisioData(E)?
+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(H.substring(H.indexOf(",")+1)),function(K){e(K)},f,u);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,u))this.isExternalDataComms()?this.parseFileData(E,mxUtils.bind(this,function(K){4==K.readyState&&200<=K.status&&299>=K.status&&"<mxGraphModel"==K.responseText.substring(0,13)&&e(K.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f);else if(this.isLucidChartData(E))this.convertLucidChart(E,
+mxUtils.bind(this,function(K){e(K)}),mxUtils.bind(this,function(K){f(K)}));else{if(/(\.png)($|\?)/i.test(u)||Editor.isPngData(E))E=Editor.extractGraphModelFromPng(H);e(E)}}catch(K){f(K)}}),f,/(\.png)($|\?)/i.test(u)||F,null,null,n)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===
typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};
App.prototype.uncompressPages=function(b){if(null!=b)try{var e=mxUtils.parseXml(b);if("mxfile"==e.documentElement.nodeName){for(var f=e.documentElement.getElementsByTagName("diagram"),c=0;c<f.length;c++){var l=Editor.parseDiagramNode(f[c],!0);null!=l&&(mxUtils.setTextContent(f[c],""),f[c].appendChild(l))}b=mxUtils.getPrettyXml(e.documentElement)}}catch(n){}return b};
-App.prototype.createFile=function(b,e,f,c,l,n,p,u,G,H){c=u?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var F=mxUtils.bind(this,function(){this.spinner.stop()}),K=mxUtils.bind(this,function(g){F();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{var d=mxUtils.bind(this,function(g){F();this.fileCreated(g,
-f,n,l,G,H)});c==App.MODE_GOOGLE&&null!=this.drive?(null==p&&null!=this.stateArg&&null!=this.stateArg.folderId&&(p=this.stateArg.folderId),this.drive.insertFile(b,e,p,d,K)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,d,K,!1,p):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,d,K,!1,p):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,d,K,!1,p):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,d,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?
-this.oneDrive.insertFile(b,e,d,K,!1,p):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,d,K):!u&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(F(),this.showSaveFilePicker(mxUtils.bind(this,function(g,k){var v=new LocalFile(this,e,k.name,null,g,k);v.saveFile(k.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,f,n,l,G,H)}),K,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&K(g)}),this.createFileSystemOptions(b))):(F(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,l,G,H))}catch(g){F(),
+App.prototype.createFile=function(b,e,f,c,l,n,p,u,F,H){c=u?null:null!=c?c:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){e=null!=e?e:this.emptyDiagramXml;null==e||Editor.defaultCompressed||(e=this.uncompressPages(e));var E=mxUtils.bind(this,function(){this.spinner.stop()}),K=mxUtils.bind(this,function(g){E();null==g&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=g&&this.handleError(g)});try{var d=mxUtils.bind(this,function(g){E();this.fileCreated(g,
+f,n,l,F,H)});c==App.MODE_GOOGLE&&null!=this.drive?(null==p&&null!=this.stateArg&&null!=this.stateArg.folderId&&(p=this.stateArg.folderId),this.drive.insertFile(b,e,p,d,K)):c==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,e,d,K,!1,p):c==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,e,d,K,!1,p):c==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,e,d,K,!1,p):c==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,e,d,K):c==App.MODE_ONEDRIVE&&null!=this.oneDrive?
+this.oneDrive.insertFile(b,e,d,K,!1,p):c==App.MODE_BROWSER?StorageFile.insertFile(this,b,e,d,K):!u&&c==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(E(),this.showSaveFilePicker(mxUtils.bind(this,function(g,k){var v=new LocalFile(this,e,k.name,null,g,k);v.saveFile(k.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,f,n,l,F,H)}),K,!0)}),mxUtils.bind(this,function(g){"AbortError"!=g.name&&K(g)}),this.createFileSystemOptions(b))):(E(),this.fileCreated(new LocalFile(this,e,b,null==c),f,n,l,F,H))}catch(g){E(),
this.handleError(g)}}};
-App.prototype.fileCreated=function(b,e,f,c,l,n){var p=window.location.pathname;null!=e&&0<e.length&&(p+="?libs="+e);null!=l&&0<l.length&&(p+="?clibs="+l);p=this.getUrl(p);b.getMode()!=App.MODE_DEVICE&&(p+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var u=b.getData();u=0<u.length?this.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0):null;var G=window.location.protocol+"//"+window.location.hostname+p,H=u,F=null;null!=u&&/\.svg$/i.test(b.getTitle())&&(F=
-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(F.container),H=this.decodeNodeIntoGraph(H,F));b.setData(this.createFileData(u,F,b,G));null!=F&&F.container.parentNode.removeChild(F.container);var K=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(){K();var g=this.getCurrentFile();null==f&&null!=g&&(f=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,n);f&&b.addAllSavedStatus();
+App.prototype.fileCreated=function(b,e,f,c,l,n){var p=window.location.pathname;null!=e&&0<e.length&&(p+="?libs="+e);null!=l&&0<l.length&&(p+="?clibs="+l);p=this.getUrl(p);b.getMode()!=App.MODE_DEVICE&&(p+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var u=b.getData();u=0<u.length?this.editor.extractGraphModel(mxUtils.parseXml(u).documentElement,!0):null;var F=window.location.protocol+"//"+window.location.hostname+p,H=u,E=null;null!=u&&/\.svg$/i.test(b.getTitle())&&(E=
+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(E.container),H=this.decodeNodeIntoGraph(H,E));b.setData(this.createFileData(u,E,b,F));null!=E&&E.container.parentNode.removeChild(E.container);var K=mxUtils.bind(this,function(){this.spinner.stop()}),d=mxUtils.bind(this,function(){K();var g=this.getCurrentFile();null==f&&null!=g&&(f=!g.isModified()&&null==g.getMode());var k=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,n);f&&b.addAllSavedStatus();
null!=e&&this.sidebar.showEntries(e);if(null!=l){for(var t=[],x=l.split(";"),A=0;A<x.length;A++)t.push(decodeURIComponent(x[A]));this.loadLibraries(t)}null!=c&&c()}),v=mxUtils.bind(this,function(){f||null==g||!g.isModified()?k():this.confirm(mxResources.get("allChangesLost"),null,k,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==f||f?v():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),window.geOpenWindow(p,null,v))});b.constructor==LocalFile?d():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){d()}),mxUtils.bind(this,function(g){K();null!=g&&"AbortError"==g.name||this.handleError(g)}))}};
-App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var n=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var G=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();
-window.location.hash=null!=k?k.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c()):G({message:mxResources.get("fileNotFound")})}),G)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else if(null!=f)this.spinner.stop(),
+App.prototype.loadFile=function(b,e,f,c,l){if("1"==urlParams.openInSameWin||navigator.standalone)e=!0;this.hideDialog();var n=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var F=mxUtils.bind(this,function(g){this.handleError(g,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var k=this.getCurrentFile();
+window.location.hash=null!=k?k.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(g){null!=g?(this.fileLoaded(new StorageFile(this,g,b)),null!=c&&c()):F({message:mxResources.get("fileNotFound")})}),F)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}));else if(null!=f)this.spinner.stop(),
this.fileLoaded(f),null!=c&&c();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var H=decodeURIComponent(b.substring(1));"<"!=H.charAt(0)&&(H=Graph.decompress(H));H=new LocalFile(this,H,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);H.getHash=function(){return b};this.fileLoaded(H);null!=c&&c()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(g,k){this.spinner.stop();this.fileLoaded(new EmbedFile(this,g,k));null!=c&&c()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var F=decodeURIComponent(b.substring(1)),K=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=F.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var k=F.substring(31,F.lastIndexOf("&ex"));this.loadFile("G"+k,e,null,mxUtils.bind(this,function(){var v=this.getCurrentFile();null!=v&&this.editor.chromeless&&
-!this.editor.editable&&(v.getHash=function(){return"G"+k},window.location.hash="#"+v.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(F,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var k=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var v=F,t=F.lastIndexOf("."),x=v.lastIndexOf("/");t>x&&0<x&&(v=v.substring(x+1,t),t=F.substring(t),
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var E=decodeURIComponent(b.substring(1)),K=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=E.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var g=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var k=E.substring(31,E.lastIndexOf("&ex"));this.loadFile("G"+k,e,null,mxUtils.bind(this,function(){var v=this.getCurrentFile();null!=v&&this.editor.chromeless&&
+!this.editor.editable&&(v.getHash=function(){return"G"+k},window.location.hash="#"+v.getHash());null!=c&&c()}));return!0}return!1});!g()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",g);return!0});this.loadTemplate(E,mxUtils.bind(this,function(g){this.spinner.stop();if(null!=g&&0<g.length){var k=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var v=E,t=E.lastIndexOf("."),x=v.lastIndexOf("/");t>x&&0<x&&(v=v.substring(x+1,t),t=E.substring(t),
this.useCanvasForExport||".png"!=t||(t=".drawio"),".svg"===t||".xml"===t||".html"===t||".png"===t||".drawio"===t)&&(k=v+t)}g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):k,!0);g.getHash=function(){return b};this.fileLoaded(g,!0)?null!=c&&c():K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else K()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){K()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var d=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var g=this.getServiceForName(d);if(null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();
window.location.hash=null!=v?v.getHash():""}));else{var k=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(v){this.spinner.stop();this.fileLoaded(v);var t=this.getCurrentFile();if(null==t)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){t.getHash=function(){return k+b};v="#"+t.getHash();try{var x=this.getHashObject();null==x||mxUtils.isEmptyObject(x)||(v=v+"#"+encodeURIComponent(JSON.stringify(x)))}catch(A){}window.location.replace(v)}else v==
@@ -14185,11 +14189,11 @@ t&&null==v.getMode()&&(x=mxResources.get("copyCreated"),this.editor.setStatus('<
t,null,null,"#"+k+b):t()}))}})()}}),p=this.getCurrentFile(),u=mxUtils.bind(this,function(){l||null==p||!p.isModified()?n():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=p&&(window.location.hash=p.getHash())}),n,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?u():null==p||e?u():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,u)).container,320,160,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var e=b.getTitle();b.constructor!=LocalLibrary&&(e+="\n"+b.getHash());b.constructor==DriveLibrary?e+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?e+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?e+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?e+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?e+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?e+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(e+=" ("+mxResources.get("device")+")");return e};App.prototype.restoreLibraries=function(){function b(f){for(var c=0;c<f.length;c++)""!=f[c]&&0>mxUtils.indexOf(e,f[c])&&e.push(f[c])}var e=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(e)};
-App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(H,F){F||mxSettings.removeCustomLibrary(H);delete this.loadedLibraries[H]}),c=0,l=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,p=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var H=b.length-1;0<=H;H--)null!=l[H]&&this.loadLibrary(l[H],H<=n);null!=e&&e()}});if(null!=b)for(var u=0;u<b.length;u++){var G=encodeURIComponent(decodeURIComponent(b[u]));
-mxUtils.bind(this,function(H,F){if(null!=H&&0<H.length&&null==this.loadedLibraries[H]&&null==this.sidebar.palettes[H]){this.loadedLibraries[H]=!0;c++;var K=mxUtils.bind(this,function(x){l[F]=x;c--;p()}),d=mxUtils.bind(this,function(x){f(H,x);c--;p()}),g=H.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(H.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(A){".scratchpad"==x&&null==
+App.prototype.loadLibraries=function(b,e){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var f=mxUtils.bind(this,function(H,E){E||mxSettings.removeCustomLibrary(H);delete this.loadedLibraries[H]}),c=0,l=[],n=0<b.length&&"L.scratchpad"==b[0]?1:0,p=mxUtils.bind(this,function(){if(0==c){if(null!=b)for(var H=b.length-1;0<=H;H--)null!=l[H]&&this.loadLibrary(l[H],H<=n);null!=e&&e()}});if(null!=b)for(var u=0;u<b.length;u++){var F=encodeURIComponent(decodeURIComponent(b[u]));
+mxUtils.bind(this,function(H,E){if(null!=H&&0<H.length&&null==this.loadedLibraries[H]&&null==this.sidebar.palettes[H]){this.loadedLibraries[H]=!0;c++;var K=mxUtils.bind(this,function(x){l[E]=x;c--;p()}),d=mxUtils.bind(this,function(x){f(H,x);c--;p()}),g=H.substring(0,1);if("L"==g)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var x=decodeURIComponent(H.substring(1));StorageFile.getFileContent(this,x,mxUtils.bind(this,function(A){".scratchpad"==x&&null==
A&&(A=this.emptyLibraryXml);null!=A?K(new StorageLibrary(this,A,x)):d()}),d)}catch(A){d()}}),0);else if("U"==g){var k=decodeURIComponent(H.substring(1));this.isOffline()?d(!0):this.loadTemplate(k,mxUtils.bind(this,function(x){null!=x&&0<x.length?K(new UrlLibrary(this,x,k)):d()}),function(){d()},null,!0)}else if("R"==g){g=decodeURIComponent(H.substring(1));try{g=JSON.parse(g);var v={id:g[0],title:g[1],downloadUrl:g[2]};this.remoteInvoke("getFileContent",[v.downloadUrl],null,mxUtils.bind(this,function(x){try{K(new RemoteLibrary(this,
x,v))}catch(A){d()}}),function(){d()})}catch(x){d()}}else if("S"==g&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(H.substring(1)),function(x){K(x)},d)}catch(x){d()}else{var t=null;"G"==g?null!=this.drive&&null!=this.drive.user&&(t=this.drive):"H"==g?null!=this.gitHub&&null!=this.gitHub.getUser()&&(t=this.gitHub):"T"==g?null!=this.trello&&this.trello.isAuthorized()&&(t=this.trello):"D"==g?null!=this.dropbox&&null!=this.dropbox.getUser()&&(t=this.dropbox):"W"==g&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(H.substring(1)),mxUtils.bind(this,function(x){try{K(x)}catch(A){d()}}),function(x){d()}):d(!0)}}})(G,u)}p()}};
+null!=this.oneDrive.getUser()&&(t=this.oneDrive);null!=t?t.getLibrary(decodeURIComponent(H.substring(1)),mxUtils.bind(this,function(x){try{K(x)}catch(A){d()}}),function(x){d()}):d(!0)}}})(F,u)}p()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&(this.buttonContainer.style.paddingRight="1"==urlParams.atlas?"32px":"8px");this.commentsSupported()&&"simple"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),
this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;width:24px;height:24px;background-size:24px 24px;background-position:center center;cursor:pointer;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),null!=this.userElement&&this.userElement.parentNode==
this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.userElement):null!=this.shareButton&&this.shareButton.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.shareButton):this.buttonContainer.appendChild(this.commentButton)):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);if("draw.io"!=this.getServiceName()||"1"==urlParams.embed||this.isStandaloneApp())null!=urlParams.notif&&
@@ -14198,20 +14202,20 @@ this.fetchAndShowNotification(urlParams.notif),!this.isStandaloneApp()||"simple"
null!=this.shareButton&&(this.shareButton.style.display="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?"none":"inline-flex","simple"==Editor.currentTheme||"sketch"==Editor.currentTheme))this.shareButton.parentNode.style.display=0==this.shareButton.parentNode.clientWidth?"none":""}else null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null);"1"!=urlParams.extAuth&&"atlas"!=Editor.currentTheme&&this.fetchAndShowNotification("online",
this.mode)}null!=this.commentButton&&(this.commentButton.style.marginRight="",this.commentButton.style.top="","simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?this.commentButton.style.top="-6px":"1"==urlParams.embed&&(this.commentButton.style.marginRight="4px"));null!=this.notificationBtn&&("simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&"1"!=urlParams.embed?(this.notificationBtn.style.marginRight=
"4px",this.notificationBtn.style.marginTop="-12px"):(this.notificationBtn.style.marginRight="",this.notificationBtn.style.marginTop=""))}};
-App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(G){return!G.targets||-1<G.targets.indexOf(b)||null!=e&&-1<G.targets.indexOf(e)});for(var n=b+"NotifReadTS",p=isLocalStorage?parseInt(localStorage.getItem(n)):!0,u=0;u<l.length;u++)l[u].isNew=!p||l[u].timestamp>p;this.showNotification(l,n)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?
+App.prototype.fetchAndShowNotification=function(b,e){if(!this.fetchingNotif){b=b||"online";var f=null,c=mxUtils.bind(this,function(l){l=l.filter(function(F){return!F.targets||-1<F.targets.indexOf(b)||null!=e&&-1<F.targets.indexOf(e)});for(var n=b+"NotifReadTS",p=isLocalStorage?parseInt(localStorage.getItem(n)):!0,u=0;u<l.length;u++)l[u].isNew=!p||l[u].timestamp>p;this.showNotification(l,n)});try{isLocalStorage&&(f=JSON.parse(localStorage.getItem(".notifCache")))}catch(l){}null==f||f.ts+864E5<Date.now()?
(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(l){if(200<=l.getStatus()&&299>=l.getStatus())try{var n=JSON.parse(l.getText());n.sort(function(p,u){return u.timestamp-p.timestamp});isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:n}));this.fetchingNotif=!1;c(n)}catch(p){}}))):c(f.notifs)}};
-App.prototype.showNotification=function(b,e){function f(H){var F=document.querySelector(".geNotification-count");null!=F&&(F.innerHTML=H,F.style.display=0==H?"none":"",F=document.querySelector(".geNotification-bell"),F.style.animation=0==H?"none":"",F.className="geNotification-bell"+(0==H?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==H?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&
-c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var n=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var H=this.notificationWin.querySelectorAll(".circle.active"),F=0;F<H.length;F++)H[F].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
+App.prototype.showNotification=function(b,e){function f(H){var E=document.querySelector(".geNotification-count");null!=E&&(E.innerHTML=H,E.style.display=0==H?"none":"",E=document.querySelector(".geNotification-bell"),E.style.animation=0==H?"none":"",E.className="geNotification-bell"+(0==H?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==H?"none":"")}var c=b.length;if("min"==Editor.currentTheme||"simple"==Editor.currentTheme)for(var l=c=0;l<b.length;l++)b[l].isNew&&
+c++;if(0==c)null!=this.notificationBtn&&(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var n=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var H=this.notificationWin.querySelectorAll(".circle.active"),E=0;E<H.length;E++)H[E].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(e,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className=
"geNotification-box";c=document.createElement("span");c.className="geNotification-count";this.notificationBtn.appendChild(c);this.notifCount=c;c=document.createElement("div");c.className="geNotification-bell";l=document.createElement("span");l.className="geBell-top";c.appendChild(l);l=document.createElement("span");l.className="geBell-middle";c.appendChild(l);l=document.createElement("span");l.className="geBell-bottom";c.appendChild(l);l=document.createElement("span");l.className="geBell-rad";c.appendChild(l);
this.notificationBtn.appendChild(c);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);l=document.createElement("div");l.className="header";c=document.createElement("span");c.className="title";c.textContent=mxResources.get("notifications");l.appendChild(c);c=document.createElement("span");
c.className="closeBtn";c.textContent="x";l.appendChild(c);this.notificationWin.appendChild(l);l=document.createElement("div");l.className="notifications clearfix";var p=document.createElement("div");p.setAttribute("id","geNotifList");p.style.position="relative";l.appendChild(p);this.notificationWin.appendChild(l);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=
-0;var H=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=H.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=H.right-this.notificationWin.clientWidth+"px";f(0)}else n()}));mxEvent.addListener(c,"click",n)}else this.notificationBtn.style.display="";var u=0,G=document.getElementById("geNotifList");if(null!=G){G.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(H,F){F.isNew&&u++;var K=document.createElement("div");K.className="notification";
-H=H.timeSince(new Date(F.timestamp));null==H&&(H=mxResources.get("lessThanAMinute"));K.innerHTML='<div class="circle'+(F.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[H],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(F.content)+"</p>";F.link&&mxEvent.addListener(K,"click",function(){window.open(F.link,"notifWin")});G.appendChild(K)})(this,b[l]);f(u)}}};
-App.prototype.save=function(b,e){var f=this.getCurrentFile(),c=!0,l=mxUtils.bind(this,function(){c&&(c=!1,f.handleFileSuccess(!0),null!=e&&e())}),n=mxUtils.bind(this,function(p){if(c){c=!1;Editor.addRetryToError(p,mxUtils.bind(this,function(){this.save(b,e)}));if(null!=p&&null!=p.retry){var u=p.retry;p.retry=function(){c=!0;try{f.isModified()?u():l()}catch(G){n(G)}}}f.handleFileError(p,null==p||"AbortError"!=p.name)}});if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"),n,3*this.timeout))try{this.editor.setStatus(""),
+0;var H=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=H.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=H.right-this.notificationWin.clientWidth+"px";f(0)}else n()}));mxEvent.addListener(c,"click",n)}else this.notificationBtn.style.display="";var u=0,F=document.getElementById("geNotifList");if(null!=F){F.innerHTML='<div class="line"></div>';for(l=0;l<b.length;l++)(function(H,E){E.isNew&&u++;var K=document.createElement("div");K.className="notification";
+H=H.timeSince(new Date(E.timestamp));null==H&&(H=mxResources.get("lessThanAMinute"));K.innerHTML='<div class="circle'+(E.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[H],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(E.content)+"</p>";E.link&&mxEvent.addListener(K,"click",function(){window.open(E.link,"notifWin")});F.appendChild(K)})(this,b[l]);f(u)}}};
+App.prototype.save=function(b,e){var f=this.getCurrentFile(),c=!0,l=mxUtils.bind(this,function(){c&&(c=!1,f.handleFileSuccess(!0),null!=e&&e())}),n=mxUtils.bind(this,function(p){if(c){c=!1;Editor.addRetryToError(p,mxUtils.bind(this,function(){this.save(b,e)}));if(null!=p&&null!=p.retry){var u=p.retry;p.retry=function(){c=!0;try{f.isModified()?u():l()}catch(F){n(F)}}}f.handleFileError(p,null==p||"AbortError"!=p.name)}});if(null!=f&&this.spinner.spin(document.body,mxResources.get("saving"),n,3*this.timeout))try{this.editor.setStatus(""),
this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==f.getTitle()?f.save(!0,l,n):f.saveAs(b,l,n)}catch(p){n(p)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};
-App.prototype.pickFolder=function(b,e,f,c,l,n){f=null!=f?f:!0;var p=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(u){p();if(u.action==google.picker.Action.PICKED){var G=null;null!=u.docs&&0<u.docs.length&&"folder"==u.docs[0].type&&(G=u.docs[0].id);e(n?u:G)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(u){p();if(null!=u&&null!=u.value&&0<u.value.length){var G=OneDriveFile.prototype.getIdOf(u.value[0]);
-e(n?u:G)}}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.pickFolder=function(b,e,f,c,l,n){f=null!=f?f:!0;var p=this.spinner.pause();f&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(u){p();if(u.action==google.picker.Action.PICKED){var F=null;null!=u.docs&&0<u.docs.length&&"folder"==u.docs[0].type&&(F=u.docs[0].id);e(n?u:F)}}),l):f&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(u){p();if(null!=u&&null!=u.value&&0<u.value.length){var F=OneDriveFile.prototype.getIdOf(u.value[0]);
+e(n?u:F)}}),c):f&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):f&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(u){p();e(u)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
App.prototype.exportFile=function(b,e,f,c,l,n){l==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)})):l==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(e,b,n,mxUtils.bind(this,function(p){this.spinner.stop()}),
mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),f,c):l==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(e,c?this.base64ToBlob(b,f):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!1,n):l==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(e,b,mxUtils.bind(this,
function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!0,n,c):l==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(e,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),!0,n,c):l==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(e,c?this.base64ToBlob(b,
@@ -14220,9 +14224,9 @@ function(){localStorage.setItem(e,b)}),null==localStorage.getItem(e)?f():this.co
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var e=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,e);this.fname.setAttribute("title",e+" - "+mxResources.get("rename"))}e=this.editor.graph;var f=b.isEditable();e.isEnabled()&&!f&&e.reset();e.setEnabled(f);null==urlParams.rev&&(this.updateDocumentTitle(),e=b.getHash(),0<e.length?(e!=this.getDiagramId()&&
(window.location.hash=e),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
App.prototype.showAuthDialog=function(b,e,f,c){var l=this.spinner.pause();this.showDialog((new AuthDialog(this,b,e,mxUtils.bind(this,function(n){try{null!=f&&f(n,mxUtils.bind(this,function(){this.hideDialog();l()}))}catch(p){this.editor.setStatus(mxUtils.htmlEntities(p.message))}}))).container,300,e?180:140,!0,!0,mxUtils.bind(this,function(n){null!=c&&c(n);n&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,e,f,c,l,n,p,u){var G=e;/\.svg$/i.test(G)||(G=G.substring(0,e.lastIndexOf("."))+c);var H=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(H=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var F=new XMLHttpRequest;F.open("GET",b,!0);H||(F.responseType="blob");if(u)for(var K in u)F.setRequestHeader(K,u[K]);F.onload=mxUtils.bind(this,function(){if(200<=
-F.status&&299>=F.status){var g=null;H?(g=JSON.parse(F.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([F.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(k){l(new LocalFile(this,k,G,!0))}),n,e)}else null!=n&&n({message:mxResources.get("errorLoadingFile")})});F.onerror=n;F.send()}else{var d=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(e)){var k=Editor.extractGraphModelFromPdf(g);null!=k&&0<k.length&&l(new LocalFile(this,
-k,G,!0))}else/\.png$/i.test(e)?(k=this.extractGraphModelFromPng(g),null!=k?l(new LocalFile(this,k,G,!0)):l(new LocalFile(this,g,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(v){4==v.readyState&&(200<=v.status&&299>=v.status?l(new LocalFile(this,v.responseText,G,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,g,G,!0))}catch(v){null!=n&&n(v)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
+App.prototype.convertFile=function(b,e,f,c,l,n,p,u){var F=e;/\.svg$/i.test(F)||(F=F.substring(0,e.lastIndexOf("."))+c);var H=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(H=!0);if(/\.v(dx|sdx?)$/i.test(e)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var E=new XMLHttpRequest;E.open("GET",b,!0);H||(E.responseType="blob");if(u)for(var K in u)E.setRequestHeader(K,u[K]);E.onload=mxUtils.bind(this,function(){if(200<=
+E.status&&299>=E.status){var g=null;H?(g=JSON.parse(E.responseText),g=this.base64ToBlob(g.content,"application/octet-stream")):g=new Blob([E.response],{type:"application/octet-stream"});this.importVisio(g,mxUtils.bind(this,function(k){l(new LocalFile(this,k,F,!0))}),n,e)}else null!=n&&n({message:mxResources.get("errorLoadingFile")})});E.onerror=n;E.send()}else{var d=mxUtils.bind(this,function(g){try{if(/\.pdf$/i.test(e)){var k=Editor.extractGraphModelFromPdf(g);null!=k&&0<k.length&&l(new LocalFile(this,
+k,F,!0))}else/\.png$/i.test(e)?(k=this.extractGraphModelFromPng(g),null!=k?l(new LocalFile(this,k,F,!0)):l(new LocalFile(this,g,e,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(g,b)?this.parseFileData(g,mxUtils.bind(this,function(v){4==v.readyState&&(200<=v.status&&299>=v.status?l(new LocalFile(this,v.responseText,F,!0)):null!=n&&n({message:mxResources.get("errorLoadingFile")}))}),e):l(new LocalFile(this,g,F,!0))}catch(v){null!=n&&n(v)}});f=/\.png$/i.test(e)||/\.jpe?g$/i.test(e)||
/\.pdf$/i.test(e)||null!=f&&"image/"==f.substring(0,6);H?mxUtils.get(b,mxUtils.bind(this,function(g){if(200<=g.getStatus()&&299>=g.getStatus()){if(null!=l){g=JSON.parse(g.getText());var k=g.content;"base64"===g.encoding&&(k=/\.png$/i.test(e)?"data:image/png;base64,"+k:/\.pdf$/i.test(e)?"data:application/pdf;base64,"+k:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(k):atob(k));d(k)}}else null!=n&&n({code:App.ERROR_UNKNOWN})}),function(){null!=n&&n({code:App.ERROR_UNKNOWN})},!1,this.timeout,
function(){null!=n&&n({code:App.ERROR_TIMEOUT,retry:fn})},u):null!=p?p(b,d,n,f):this.editor.loadUrl(b,d,n,f,null,null,null,u)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){var b="url("+Editor.logoImage+")";this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.backgroundColor="light-dark(#f08705, transparent)";this.appIcon.style.margin="8px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";this.appIcon.style.backgroundPosition=
@@ -14251,16 +14255,16 @@ App.prototype.updateUserElementIcon=function(){var b=this.userElement;if(null!=b
f.setAttribute("border","0");f.style.position="absolute";f.style.left="16px";f.style.width="12px";f.style.height="12px";f.className="geAdaptiveAsset";var l=e.getRealtimeError();e=e.getRealtimeState();c+=" (";1==e?(f.src=Editor.syncImage,c+=mxResources.get("online")):(f.src=Editor.syncProblemImage,c=null!=l&&null!=l.message?c+l.message:c+mxResources.get("disconnected"));c+=")";"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme?(b.appendChild(f),"min"==Editor.currentTheme&&
(b.style.marginRight="4px")):f.style.top="2px"}b.setAttribute("title",c)}}};App.prototype.hideUserPanel=function(){null!=this.userPanel&&null!=this.userPanel.parentNode&&this.userPanel.parentNode.removeChild(this.userPanel)};
App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document.createElement("div");b.className="geDialog";b.style.position="absolute";b.style.zIndex=5;b.style.padding="0px";b.style.cursor="default";b.style.minWidth="300px";this.userPanel=b;mxEvent.addListener(document.body,"click",mxUtils.bind(this,function(p){mxEvent.isConsumed(p)||this.hideUserPanel()}))}if(null!=this.userPanel.parentNode)this.userPanel.parentNode.removeChild(this.userPanel);else{var e=!1;this.userPanel.innerText=
-"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var f=this.drive.getUsersList();if(0<f.length){var c=mxUtils.bind(this,function(p,u){var G=this.getCurrentFile();null!=G&&G.constructor==DriveFile?(this.spinner.spin(document.body,
-u),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();p()}),2E3)):p()});b=mxUtils.bind(this,function(p){var u=document.createElement("tr"),G=document.createElement("td");G.setAttribute("valig","middle");G.style.height="59px";G.style.width="66px";var H=document.createElement("img");H.setAttribute("width","50");H.setAttribute("height","50");H.setAttribute("border","0");H.setAttribute("src",null!=p.pictureUrl?p.pictureUrl:this.defaultUserPicture);H.style.borderRadius=
-"50%";H.style.margin="4px 8px 0 8px";G.appendChild(H);u.appendChild(G);G=document.createElement("td");G.setAttribute("valign","middle");G.style.whiteSpace="nowrap";G.style.paddingTop="4px";G.style.maxWidth="0";G.style.overflow="hidden";G.style.textOverflow="ellipsis";mxUtils.write(G,p.displayName+(p.isCurrent&&1<f.length?" ("+mxResources.get("default")+")":""));null!=p.email&&(mxUtils.br(G),H=document.createElement("small"),H.style.color="gray",mxUtils.write(H,p.email),G.appendChild(H));H=document.createElement("div");
-H.style.marginTop="4px";var F=document.createElement("i");mxUtils.write(F,mxResources.get("googleDrive"));H.appendChild(F);G.appendChild(H);u.appendChild(G);p.isCurrent?u.setAttribute("title","User ID: "+p.id):(u.setAttribute("title",mxResources.get("login")+" (User ID: "+p.id+")"),u.style.cursor="pointer",u.style.opacity="0.3",mxEvent.addListener(u,"mouseenter",mxUtils.bind(this,function(){u.style.opacity="1"})),mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(){u.style.opacity="0.3"})),
+"";b=document.createElement("img");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("close"));b.className="geDialogClose";b.style.top="8px";b.style.right="8px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideUserPanel()}));this.userPanel.appendChild(b);if(null!=this.drive){var f=this.drive.getUsersList();if(0<f.length){var c=mxUtils.bind(this,function(p,u){var F=this.getCurrentFile();null!=F&&F.constructor==DriveFile?(this.spinner.spin(document.body,
+u),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();p()}),2E3)):p()});b=mxUtils.bind(this,function(p){var u=document.createElement("tr"),F=document.createElement("td");F.setAttribute("valig","middle");F.style.height="59px";F.style.width="66px";var H=document.createElement("img");H.setAttribute("width","50");H.setAttribute("height","50");H.setAttribute("border","0");H.setAttribute("src",null!=p.pictureUrl?p.pictureUrl:this.defaultUserPicture);H.style.borderRadius=
+"50%";H.style.margin="4px 8px 0 8px";F.appendChild(H);u.appendChild(F);F=document.createElement("td");F.setAttribute("valign","middle");F.style.whiteSpace="nowrap";F.style.paddingTop="4px";F.style.maxWidth="0";F.style.overflow="hidden";F.style.textOverflow="ellipsis";mxUtils.write(F,p.displayName+(p.isCurrent&&1<f.length?" ("+mxResources.get("default")+")":""));null!=p.email&&(mxUtils.br(F),H=document.createElement("small"),H.style.color="gray",mxUtils.write(H,p.email),F.appendChild(H));H=document.createElement("div");
+H.style.marginTop="4px";var E=document.createElement("i");mxUtils.write(E,mxResources.get("googleDrive"));H.appendChild(E);F.appendChild(H);u.appendChild(F);p.isCurrent?u.setAttribute("title","User ID: "+p.id):(u.setAttribute("title",mxResources.get("login")+" (User ID: "+p.id+")"),u.style.cursor="pointer",u.style.opacity="0.3",mxEvent.addListener(u,"mouseenter",mxUtils.bind(this,function(){u.style.opacity="1"})),mxEvent.addListener(u,"mouseleave",mxUtils.bind(this,function(){u.style.opacity="0.3"})),
mxEvent.addListener(u,"click",mxUtils.bind(this,function(K){this.hideUserPanel();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(p);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(d){this.handleError(d)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(K)})));return u});e=!0;var l=document.createElement("table");l.style.borderSpacing="0";l.style.fontSize="10pt";l.style.width=
"100%";l.style.padding="10px";for(var n=0;n<f.length;n++)l.appendChild(b(f[n]));this.userPanel.appendChild(l);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";l=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);
this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));l.className="geBtn";l.style.float="right";b.appendChild(l);l=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var p=this.drive.createAuthWin();p.blur();window.focus();c(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(u){this.handleError(u)}),!0,p)}),mxResources.get("closingFile")+
-"...")}));l.className="geBtn";l.style.margin="0px";b.appendChild(l);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(p,u,G,H){if(null!=p){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var F=document.createElement("table");F.style.borderSpacing="0";F.style.fontSize="10pt";F.style.width="100%";F.style.padding="10px";var K=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td");g.setAttribute("valig","top");g.style.width="40px";if(null!=
+"...")}));l.className="geBtn";l.style.margin="0px";b.appendChild(l);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(p,u,F,H){if(null!=p){e&&this.userPanel.appendChild(document.createElement("hr"));e=!0;var E=document.createElement("table");E.style.borderSpacing="0";E.style.fontSize="10pt";E.style.width="100%";E.style.padding="10px";var K=document.createElement("tbody"),d=document.createElement("tr"),g=document.createElement("td");g.setAttribute("valig","top");g.style.width="40px";if(null!=
u){var k=document.createElement("img");k.setAttribute("width","40");k.setAttribute("height","40");k.setAttribute("border","0");k.setAttribute("src",u);k.style.marginRight="6px";g.appendChild(k)}d.appendChild(g);g=document.createElement("td");g.setAttribute("valign","middle");g.style.whiteSpace="nowrap";g.style.maxWidth="0";g.style.overflow="hidden";g.style.textOverflow="ellipsis";mxUtils.write(g,p.displayName);null!=p.email&&(mxUtils.br(g),u=document.createElement("small"),u.style.color="gray",mxUtils.write(u,
-p.email),g.appendChild(u));null!=H&&(p=document.createElement("div"),p.style.marginTop="4px",u=document.createElement("i"),mxUtils.write(u,H),p.appendChild(u),g.appendChild(p));d.appendChild(g);K.appendChild(d);F.appendChild(K);this.userPanel.appendChild(F);p=document.createElement("div");p.style.textAlign="center";p.style.padding="10px";p.style.whiteSpace="nowrap";null!=G&&(G=mxUtils.button(mxResources.get("signOut"),G),G.className="geBtn",p.appendChild(G));this.userPanel.appendChild(p)}});null!=
+p.email),g.appendChild(u));null!=H&&(p=document.createElement("div"),p.style.marginTop="4px",u=document.createElement("i"),mxUtils.write(u,H),p.appendChild(u),g.appendChild(p));d.appendChild(g);K.appendChild(d);E.appendChild(K);this.userPanel.appendChild(E);p=document.createElement("div");p.style.textAlign="center";p.style.padding="10px";p.style.whiteSpace="nowrap";null!=F&&(F=mxUtils.button(mxResources.get("signOut"),F),F.className="geBtn",p.appendChild(F));this.userPanel.appendChild(p)}});null!=
this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==DropboxFile){var u=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",
this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==OneDriveFile){var u=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var p=
this.getCurrentFile();if(null!=p&&p.constructor==GitHubFile){var u=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});p.isModified()?this.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var p=this.getCurrentFile();if(null!=p&&p.constructor==GitLabFile){var u=
@@ -14273,7 +14277,7 @@ Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);nu
c.style.marginLeft="4px";c.style.cursor="help";c.style.color="blue";var l=document.createElement("img");l.setAttribute("src",Editor.helpImage);l.setAttribute("valign","bottom");l.setAttribute("border","0");l.className="geAdaptiveAsset";mxUtils.setOpacity(l,60);l.style.height="16px";l.style.width="16px";c.appendChild(l);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(n){this.editorUi.hideCurrentMenu();this.editorUi.openLink(f);mxEvent.consume(n)}));return c};Menus.prototype.addLinkToItem=
function(f,c){null!=f&&(c=this.createHelpLink(c),c.style.display="inline",c.style.marginLeft="8px",f.firstChild.nextSibling.appendChild(c))};Menus.prototype.removeCustomFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==f&&this.customFonts[l].url==c){this.customFonts.splice(l,1);this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));break}};Menus.prototype.containsFont=function(f,c){for(var l=0;l<this.customFonts.length;l++)if(this.customFonts[l].name==
f&&this.customFonts[l].url==c)return!0;for(l=0;l<this.defaultFonts.length;l++){var n=this.defaultFonts[l];if("string"!==typeof n&&n.fontFamily==f&&n.fontUrl==c||"string"===typeof n&&n==f&&null==c)return!0}return!1};Menus.prototype.addCustomFont=function(f,c){null==f||this.containsFont(f,c)||(this.customFonts.push({name:f,url:c}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))};var e=Menus.prototype.init;Menus.prototype.init=function(){function f(q,
-y,B){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(C,M,T,m,z,I,L,N,O,S,U,W,X){var Z=parseInt(C);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,M&&"png"==q,T,m,z&&"png"==q,L,!N,O,q,U,null,W,X),null!=B&&B(C,M,T,m,z,I,L,N,O,S,U,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(C,M,T,m,
+y,B){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(C,M,T,m,z,I,L,N,P,S,U,W,X){var Z=parseInt(C);!isNaN(Z)&&0<Z&&(c.exportImage(Z/100,M&&"png"==q,T,m,z&&"png"==q,L,!N,P,q,U,null,W,X),null!=B&&B(C,M,T,m,z,I,L,N,P,S,U,W,X))}),!0,y,q,!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(C,M,T,m,
z){c.downloadFile(M&&"png"==q?"xmlpng":q,null,null,C,null,null,T,m,z)}),!1,!0)}e.apply(this,arguments);var c=this.editorUi,l=c.editor.graph,n=mxUtils.bind(l,l.isEnabled);mxClient.IS_SVG||c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));c.actions.addAction("new...",function(){var q=c.isOffline(),y=new NewDialog(c,q,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(y.container,
q?350:620,q?70:460,!0,!0,function(B){c.sidebar.hideTooltip();B&&null==c.getCurrentFile()&&c.showSplash()});y.init()});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var q=new NewDialog(c,null,!1,function(y){c.hideDialog();if(null!=y){var B=c.editor.graph.getFreeInsertPoint();l.setSelectionCells(c.importXml(y,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));l.scrollCellToVisible(l.getSelectionCell())}},
null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(q.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});q.init()}})).isEnabled=n;var p=c.actions.addAction("shareCursor",function(){c.setShareCursorPosition(!c.isShareCursorPosition())});p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isShareCursorPosition()});p=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});p.setToggleAction(!0);
@@ -14286,8 +14290,8 @@ p.setToggleAction(!0);p.setSelectedCallback(function(){return c.isAutoDarkMode(!
p=c.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(q){c.setSketchMode(!Editor.sketchMode)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return Editor.sketchMode});c.actions.addAction("properties...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new FilePropertiesDialog(c,q);c.showDialog(q.container,340,200,!0,!0);q.init()})}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(l.isEnabled()){if(null==
c.freehandWindow){var q=!mxClient.IS_IE&&!mxClient.IS_IE11;c.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,q?126:90,q)}l.freehand.isDrawing()?l.freehand.stopDrawing():l.freehand.startDrawing();c.freehandWindow.window.setVisible(l.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var y=
null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(B);var C=c.addCheckbox(q,mxResources.get("selectionOnly"),!1,l.isSelectionEmpty()),M=c.addCheckbox(q,mxResources.get("compressed"),Editor.defaultCompressed),T=c.addCheckbox(q,mxResources.get("allPages"),!y,y);T.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?T.setAttribute("disabled",
-"disabled"):T.removeAttribute("disabled")});q=new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!C.checked,y||!T.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,B,C,M,T,m,z,I){m=[];C&&I&&m.push("tags=%7B%7D");q=new EmbedDialog(c,c.createLink(q,
-y,!0,C,M,T,null,!0,m,null,B));c.showDialog(q.container,450,240,!0,!0);q.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,L,N,O,mxUtils.bind(this,function(U,W){var X=c.getBaseFilename(z);U='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
+"disabled"):T.removeAttribute("disabled")});q=new CustomDialog(c,q,mxUtils.bind(this,function(){c.downloadFile("xml",!M.checked,null,!C.checked,y||!T.checked)}),null,mxResources.get("export"));c.showDialog(q.container,300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(q,y,B,C,M,T,m,z,I,L,N,P){m=[];C&&I&&m.push("tags=%7B%7D");q=new EmbedDialog(c,
+c.createLink(q,y,!0,C,M,T,null,!0,m,null,B,null,P));c.showDialog(q.container,450,240,!0,!0);q.init()},null,!0)}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("export"),null,q,function(y,B,C,M,T,m,z,I,L,N,P,S){c.createHtml(y,B,C,M,T,m,z,I,L,N,P,mxUtils.bind(this,function(U,W){var X=c.getBaseFilename(z);U='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+U+"\n"+W+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",U,"text/html")}),S)})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport?c.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(q,y){q=null!=c.pages?c.pages.length:1;var B=null==c.pages||1>=c.pages.length,
C=c.getPageIndex(c.currentPage);C=null!=C?C+1:1;c.downloadFile("pdf",null,null,!y.selection,B||!y.allPages&&y.pagesFrom==C&&y.pagesTo==C,!y.crop,y.transparent,y.scale,null,y.grid,y.includeCopy,y.allPages||y.pagesFrom==C&&y.pagesTo==C?null:{from:Math.max(0,Math.min(q-1,y.pagesFrom-1)),to:Math.max(0,Math.min(q-1,y.pagesTo-1))},y.border,y.fit,y.sheetsAcross,y.sheetsDown)})):c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,320,null!=c.pages&&1<c.pages.length&&(c.editor.editable||
"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function q(){null!=y&&y.removeDraft();c.fileLoaded(null)}var y=c.getCurrentFile();null!=y&&y.isModified()?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){l.getSelectionCells();if(1==l.getSelectionCount()){var q=l.getSelectionCell(),
@@ -14299,7 +14303,7 @@ p.isEnabled=n);p=c.actions.put("defaultAdaptiveColors",new Action(mxResources.ge
function(){var q=new ChangePageSetup(c);q.ignoreColor=!0;q.ignoreImage=!0;q.adaptiveColors="none";l.model.execute(q)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return"none"==l.adaptiveColors});this.put("adaptiveColors",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["defaultAdaptiveColors","-","automaticAdaptiveColors","simpleAdaptiveColors","noAdaptiveColors"],y)})));isLocalStorage&&(p=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());
mxSettings.save()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var u=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});u.setToggleAction(!0);u.setSelectedCallback(function(){return u.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var q=l.getSelectionCells(),y=[],B=0;B<q.length;B++)l.getModel().isVertex(q[B])&&y.push(q[B]);0<y.length&&(q=new EditGeometryDialog(c,y),c.showDialog(q.container,
200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");c.actions.addAction("copyStyle",function(){if(l.isEnabled()&&1==l.getSelectionCount()){var q=l.getSelectionCell(),y=l.getCellStyle(q,!1);c.copiedStyle={};var B=[],C=[],M;for(M in y)B.push(y[M]),C.push(M);l.copyCellStyles([q],C,B,c.copiedStyle,c.copiedStyle,null,null,null,!0)}},null,null,"Alt+C");c.actions.addAction("pasteStyle",function(){l.isEnabled()&&!l.isSelectionEmpty()&&null!=c.copiedStyle&&l.pasteCellStyles(l.includeDescendants(l.getSelectionCells()),
-c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,B,C,M,T,m,z,I,L,N,O,S,U){q=parseInt(q);c.lastExportSvgEditable=M;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,B,C,M,T,m,!z,I,L,O,S,U)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+
+c.copiedStyle,c.copiedStyle,!0)},null,null,"Alt+V");c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.drawio.com/doc/faq/export-diagram",mxUtils.bind(this,function(q,y,B,C,M,T,m,z,I,L,N,P,S,U){q=parseInt(q);c.lastExportSvgEditable=M;!isNaN(q)&&0<q&&c.exportSvg(q/100,y,B,C,M,T,m,!z,I,L,P,S,U)}),!0,c.lastExportSvgEditable,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+
"...",function(){f("png",c.lastExportPngEditable,function(q,y,B,C,M){c.lastExportPngEditable=M})}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){f("jpeg")}));c.actions.put("exportWebp",new Action(mxResources.get("formatWebp")+"...",function(){f("webp")}));p=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(l.model.getTopmostCells(l.getSelectionCells())),y=mxUtils.getXml(0==q.length?c.editor.getGraphXml():l.encodeCells(q));
c.copyImage(q,y)}),null,null,"Ctrl+Alt+X");p.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;p=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){l.setShadowVisible(!l.shadowVisible)}));p.setToggleAction(!0);p.setSelectedCallback(function(){return l.shadowVisible});c.actions.put("about",new Action("v"+EditorUi.VERSION,function(q,y){}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):
c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",
@@ -14315,15 +14319,15 @@ function(){try{localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c
JSON.parse(M.value),m=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(T)),z=new EmbedDialog(c,m);c.showDialog(z.container,450,240,!0);z.init()}catch(I){c.handleError(I)}else c.handleError({message:mxResources.get("invalidInput")})}]);"atlassian"!=c.getServiceName()&&"1"!=urlParams.embed&&y.push([mxResources.get("preferences"),function(){c.showLocalStorageDialog(mxResources.get("preferences")+":",Editor.settingsKey,[[mxResources.get("reset"),
function(){c.confirm(mxResources.get("areYouSure"),function(){try{localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config"),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired"))}catch(C){c.handleError(C)}})}]])}]);c.showLocalStorageDialog(mxResources.get("configuration")+":",Editor.configurationKey,y,q.parentNode,"https://www.drawio.com/doc/faq/configure-diagram-editor",function(){null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save())})});
if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,y){var B=mxLanguage;null==urlParams.lang&&isLocalStorage&&(B=mxSettings.settings.language);var C=mxUtils.bind(this,function(T){var m=""==T?mxResources.get("automatic"):mxLanguageMap[T],z=null;""!=m&&(z=q.addItem(m,null,mxUtils.bind(this,function(){c.setAndPersistLanguage(T);c.alert(mxResources.get("restartForChangeRequired"))}),y),(T==B||""==T&&null==B)&&q.addCheckmark(z,Editor.checkmarkImage));return z});
-C("");q.addSeparator(y);for(var M in mxLanguageMap)C(M)})));var G=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var y=G.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=y&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var B=this.get("dynamicAppearance");if(null!=B){var C=y.addMenu("",B.funct);C.setAttribute("title",mxResources.get("appearance"));C.className="geToolbarButton geAdaptiveAsset";C.style.backgroundPosition="center center";
+C("");q.addSeparator(y);for(var M in mxLanguageMap)C(M)})));var F=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var y=F.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=y&&Editor.enableSimpleTheme&&"atlassian"!=c.getServiceName()){var B=this.get("dynamicAppearance");if(null!=B){var C=y.addMenu("",B.funct);C.setAttribute("title",mxResources.get("appearance"));C.className="geToolbarButton geAdaptiveAsset";C.style.backgroundPosition="center center";
C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="100% 100%";C.style.display="inline-block";C.style.cursor="pointer";C.style.zIndex="1";C.style.position="absolute";C.style.height="18px";C.style.width="18px";"atlas"==Editor.currentTheme?(C.style.filter="invert(100%)",C.style.right="11px",C.style.top="10px"):(C.style.right="10px",C.style.top="5px");document.body.appendChild(C);y.langIcon=C;B=mxUtils.bind(this,function(){var M=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
C.style.display="atlas"==Editor.currentTheme||"min"==Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";C.style.backgroundImage="simple"==Editor.currentTheme?750>M?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",B);this.editorUi.addListener("darkModeChanged",B);mxEvent.addListener(window,"resize",
B);B()}}return y}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];c.actions.addAction("runLayout",function(){c.showCustomLayoutDialog(JSON.stringify(c.customLayoutConfig,null,2))});c.actions.put("adaptiveColors",new Action("adaptiveColors",function(q){null==c.adaptiveColorsWindow&&(c.adaptiveColorsWindow=new AdaptiveColorsWindow(c,document.body.offsetWidth-520,80,200,160));
-c.adaptiveColorsWindow.window.setVisible(!0)}));p=this.get("viewZoom");var H=p.funct;p.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});p=this.get("layout");var F=p.funct;p.funct=function(q,y){F.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var B=null,C=20,M=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=B&&c.tryAndHandle(mxUtils.bind(this,
+c.adaptiveColorsWindow.window.setVisible(!0)}));p=this.get("viewZoom");var H=p.funct;p.funct=mxUtils.bind(this,function(q,y){H.apply(this,arguments);"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||this.addMenuItems(q,["-","outline","fullscreen"],y)});p=this.get("layout");var E=p.funct;p.funct=function(q,y){E.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var B=null,C=20,M=20,T=function(){"undefined"!==typeof mxOrgChartLayout&&null!=B&&c.tryAndHandle(mxUtils.bind(this,
function(){var U=c.editor.graph,W=new mxOrgChartLayout(U,B,C,M),X=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(X=U.getSelectionCell());W.execute(X)}))},m=document.createElement("div"),z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("orgChartType")+": ");m.appendChild(z);var I=document.createElement("select");I.style.width="160px";I.style.boxSizing="border-box";z=[mxResources.get("linear"),
mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var L=0;L<z.length;L++){var N=document.createElement("option");mxUtils.write(N,z[L]);N.value=L;2==L&&N.setAttribute("selected","selected");I.appendChild(N)}mxEvent.addListener(I,"change",function(){B=I.value});m.appendChild(I);z=document.createElement("div");z.style.marginTop="6px";z.style.display=
-"inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var O=document.createElement("input");O.type="number";O.value=C;O.style.width="160px";O.style.boxSizing="border-box";m.appendChild(O);mxEvent.addListener(O,"change",function(){C=O.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");m.appendChild(z);var S=document.createElement("input");
-S.type="number";S.value=M;S.style.width="160px";S.style.boxSizing="border-box";m.appendChild(S);mxEvent.addListener(S,"change",function(){M=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var U=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(O.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(U,null,2))});z.className="geBtn";m=new CustomDialog(c,m,function(){null==B&&(B=2);c.loadOrgChartLayouts(T)},
+"inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("parentChildSpacing")+": ");m.appendChild(z);var P=document.createElement("input");P.type="number";P.value=C;P.style.width="160px";P.style.boxSizing="border-box";m.appendChild(P);mxEvent.addListener(P,"change",function(){C=P.value});z=document.createElement("div");z.style.marginTop="6px";z.style.display="inline-block";z.style.width="180px";mxUtils.write(z,mxResources.get("siblingSpacing")+": ");m.appendChild(z);var S=document.createElement("input");
+S.type="number";S.value=M;S.style.width="160px";S.style.boxSizing="border-box";m.appendChild(S);mxEvent.addListener(S,"change",function(){M=S.value});z=mxUtils.button(mxResources.get("custom")+"...",function(){var U=[{layout:"mxOrgChartLayout",config:{branchOptimizer:parseInt(I.value),parentChildSpacing:parseInt(P.value),siblingSpacing:parseInt(S.value)}}];c.hideDialog();c.showCustomLayoutDialog(JSON.stringify(U,null,2))});z.className="geBtn";m=new CustomDialog(c,m,function(){null==B&&(B=2);c.loadOrgChartLayouts(T)},
null,null,null,z);c.showDialog(m.container,355,140,!0,!0)},y,null,n());q.addSeparator(y);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){c.tryAndHandle(mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(l);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),B.spacing,mxUtils.bind(this,function(C){c.tryAndHandle(mxUtils.bind(this,function(){B.spacing=C;c.executeLayout(function(){B.execute(l.getDefaultParent(),l.isSelectionEmpty()?null:l.getSelectionCells())},!1)}))}))}))}),
y);q.addSeparator(y);c.menus.addMenuItem(q,"runLayout",y,null,null,mxResources.get("custom")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,y){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(q,["keyboardShortcuts","-","about"],y);else{var B=q.addItem("Search:",null,null,y,null,null,!1);B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.borderWidth="1px";C.style.marginLeft="8px";mxEvent.addListener(C,
"keydown",mxUtils.bind(this,function(M){var T=mxUtils.trim(C.value);13==M.keyCode&&0<T.length?(this.editorUi.openLink("https://www.drawio.com/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(T)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",label:T}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==M.keyCode&&(C.value="")}));B.firstChild.nextSibling.appendChild(C);mxEvent.addGestureListeners(C,
@@ -14334,8 +14338,8 @@ y){this.addMenuItems(q,["languageCode","-"],y);y=q.addItem(mxResources.get("disa
mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");mxResources.parse("testPerformance=Performance");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!l.isSelectionEmpty()){var q=l.cloneCells(l.getSelectionCells()),y=l.getBoundingBoxFromGeometry(q,
!0);q=l.moveCells(q,-y.x,-y.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+y.width+", "+y.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(l.encodeCells(q)))+"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){function q(m){return null==m||null==m.boundingBox||!isNaN(m.boundingBox.x)&&!isNaN(m.boundingBox.y)&&!isNaN(m.boundingBox.width)&&!isNaN(m.boundingBox.height)}var y=l.getGraphBounds(),B=l.view.translate,C=l.view.scale;l.insertVertex(l.getDefaultParent(),
null,"",y.x/C-B.x,y.y/C-B.y,y.width/C,y.height/C,"fillColor=none;strokeColor=red;");var M=0,T=0;l.view.states.visit(function(m,z){m=!0;q(z.shape)||(console.log("invalid shape",z.cell.id,z.shape),m=!1);q(z.text)||(console.log("invalid text",z.cell.id,z.text),m=!1);m||M++;T++});console.log("states checked",T,"invalid",M)}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";q=new TextareaDialog(c,
-"Paste Data:",q,function(y){if(0<y.length)try{var B=function(z){function I(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=O[ba]){for(;0<O[ba].length;){var ea=O[ba].pop();I(ea)}delete O[ba]}}else mxLog.debug(L+": Visited: "+ba)}var L=z.parentNode.id,N=z.childNodes;z={};for(var O={},S=null,U={},W=0;W<N.length;W++){var X=N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(L+": Multiple roots: "+X.id):S=X.id:(null==O[Z]&&(O[Z]=[]),O[Z].push(X.id))}else U[X.id]=
-X.id}N=Object.keys(U);0<N.length?(N=L+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(L+": Checked");var Y={};null==S?mxLog.debug(L+": No root"):(I(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",O)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var C=mxUtils.parseXml(y),M=c.getPagesForNode(C.documentElement,"mxGraphModel");
+"Paste Data:",q,function(y){if(0<y.length)try{var B=function(z){function I(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=P[ba]){for(;0<P[ba].length;){var ea=P[ba].pop();I(ea)}delete P[ba]}}else mxLog.debug(L+": Visited: "+ba)}var L=z.parentNode.id,N=z.childNodes;z={};for(var P={},S=null,U={},W=0;W<N.length;W++){var X=N[W];if(null!=X.id&&0<X.id.length)if(null==z[X.id]){z[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(L+": Multiple roots: "+X.id):S=X.id:(null==P[Z]&&(P[Z]=[]),P[Z].push(X.id))}else U[X.id]=
+X.id}N=Object.keys(U);0<N.length?(N=L+": "+N.length+" Duplicates: "+N.join(", "),mxLog.debug(N+" (see console)")):mxLog.debug(L+": Checked");var Y={};null==S?mxLog.debug(L+": No root"):(I(S),Object.keys(Y).length!=Object.keys(z).length&&(mxLog.debug(L+": Invalid tree: (see console)"),console.log(L+": Invalid tree",P)))};"<"!=y.charAt(0)&&(y=Graph.decompress(y),mxLog.debug("See console for uncompressed XML"),console.log("xml",y));var C=mxUtils.parseXml(y),M=c.getPagesForNode(C.documentElement,"mxGraphModel");
if(null!=M&&0<M.length)try{var T=c.getHashValueForPages(M);mxLog.debug("Checksum: ",T)}catch(z){mxLog.debug("Error: ",z.message)}else mxLog.debug("No pages found for checksum");var m=C.getElementsByTagName("root");for(y=0;y<m.length;y++)B(m[y]);mxLog.show()}catch(z){c.handleError(z),null!=window.console&&console.error(z)}});c.showDialog(q.container,620,460,!0,!0);q.init()}));var K=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var q=new TextareaDialog(c,"Diff/Sync:",
"",function(y){var B=c.getCurrentFile();if(0<y.length&&null!=B)try{var C=JSON.parse(y);B.patch([C],null,!0,!0);c.hideDialog()}catch(M){c.handleError(M)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(y,B){K=c.getPagesForXml(c.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)}],["Diff",function(y,B){try{q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==K?
(K=c.getPagesForXml(c.getFileData(!0)),q.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(K)):q.textarea.value=JSON.stringify(c.diffPages(K,c.pages),null,2);c.showDialog(q.container,620,460,!0,!0);q.init()}else c.alert("No pages")}));c.actions.addAction("testChecksum",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=c.pages&&null!=q?c.spinner.spin(document.body,mxResources.get("loading"))&&q.getLatestVersion(function(y){c.spinner.stop();
@@ -14352,50 +14356,50 @@ arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date
"time",Date.now()-q+" ms","args",arguments);return y});null!=J?(c.resolveCrossReferences=J,J=null):(J=c.resolveCrossReferences,c.resolveCrossReferences=function(){var q=Date.now(),y=J.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-q+" ms","args",arguments);return y});null!=x?(c.getFileData=x,x=null):(x=c.getFileData,c.getFileData=function(){var q=Date.now(),y=x.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",
[this],"time",Date.now()-q+" ms","args",arguments);return y});EditorUi.debug("[Performance]",null!=d?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),y);var B=q.addItem(mxResources.get("testPerformance"),null,function(){c.actions.get("testPerformance").funct()},y);null!=d&&q.addCheckmark(B,
Editor.checkmarkImage);this.addMenuItems(q,["-","testShowConsole"],y)})))}c.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(q){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(q){l.isEnabled()&&
-(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,B,C,M,T,m,z,I,L,N,O,S){c.createHtml(y,B,C,M,T,m,z,I,
-L,N,O,mxUtils.bind(this,function(U,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+U+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(U);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);
+(q=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(c,q,mxResources.get("editShape")+":",630,400),c.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",q,function(y,B,C,M,T,m,z,I,L,N,P,S){c.createHtml(y,B,C,M,T,m,z,I,
+L,N,P,mxUtils.bind(this,function(U,W){var X=new EmbedDialog(c,"\x3c!-- "+c.editor.appName+" diagram --\x3e\n"+U+"\n"+W+"\n",null,null,function(){var Z=window.open(),Y=Z.document;if(null!=Y){"CSS1Compat"===document.compatMode&&Y.writeln("<!DOCTYPE html>");Y.writeln("<html>");Y.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');Y.writeln("<body>");Y.writeln(U);var ba=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;ba&&Y.writeln(W);
Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.createElement("div");ea.marginLeft="26px";ea.marginTop="26px";mxUtils.write(ea,mxResources.get("updatingDocument"));ba=Z.document.createElement("img");ba.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");ba.style.marginLeft="6px";ea.appendChild(ba);Z.document.body.insertBefore(ea,Z.document.body.firstChild);window.setTimeout(function(){var ca=document.createElement("script");
ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));c.actions.put("liveImage",new Action("Live image...",function(){var q=c.getCurrentFile();null!=q&&c.getPublicUrl(q,function(y){null!=y?(y=new EmbedDialog(c,'<img src="'+(q.constructor!=DriveFile?y:"https://drive.google.com/uc?id="+q.getId())+
'"/>'),c.showDialog(y.container,450,240,!0,!0),y.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("image"),
mxResources.get("retina"),c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(q,y,B,C,M,T){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(q,y,B,C,M,T,function(m){c.spinner.stop();m=new EmbedDialog(c,m);c.showDialog(m.container,450,240,!0,!0);m.init()},function(m){c.spinner.stop();c.handleError(m)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));
-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(B,C,M,T,m,z,I,L,N,O){var S=[];N&&S.push("tags=%7B%7D");B=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+L+';" src="'+c.createLink(B,C,!0,T,m,z,"public"==O?q:null,null,S,null,
-M)+'"></iframe>');c.showDialog(B.container,450,240,!0,!0);B.init()},!0)})}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,mxResources.get("getNotionChromeExtension"));
-q.appendChild(y);mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.getPublicUrl(c.getCurrentFile(),function(B){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",q,B,c.getCurrentFile(),
-function(C,M,T,m,z,I,L,N,O,S){L=["border=0"];O&&L.push("tags=%7B%7D");C=new EmbedDialog(c,c.createLink(C,M,!0,m,z,I,"public"==S?B:null,null,L,null,T));c.showDialog(C.container,450,240,!0,!0);C.init()})})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,B,C,M,T,m,z,I,L,N){z=[];M&&L&&z.push("tags=%7B%7D");y=new EmbedDialog(c,c.createLink(y,
-B,!0,M,T,m,"public"==N?q:null,null,z,null,C));c.showDialog(y.container,450,240,!0,!0);y.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",
-function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new GoogleSitesDialog(c,q);c.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&
-(p=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isHighContrast()}));p=c.actions.addAction("search",function(){if(null!=c.sidebar){var q=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});p.label=mxResources.get("searchShapes");p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=
-c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(q){l.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(q){l.isEditing()&&l.stopEditing();var y="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var B=c.createLoadMessage("save");B.xml=y;!0!==
-q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(B.exit=!0);y=JSON.stringify(B)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));q=c.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+
-"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var q=function(){c.editor.modified=!1;var y="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(y,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):
-q()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,y){c.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],y),c.jpgSupported&&this.addMenuItems(q,["exportJpg"],y),c.webpSupported&&this.addMenuItems(q,["exportWebp"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],y);this.addMenuItems(q,["exportSvg","-"],y);c.isOffline()||c.printPdfExport?this.addMenuItems(q,["exportPdf"],y):
-c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],y);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(q,["exportVsdx"],y);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(q.addSeparator(y),this.addMenuItem(q,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(q,["publishLink"],
-y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function B(T){T.pickFile(function(m){c.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(m,function(z){var I="data:image/"==z.getData().substring(0,11)?M(z.getTitle()):"text/xml";/\.svg$/i.test(z.getTitle())&&!c.editor.isDataSvg(z.getData())&&
-(z.setData(Editor.createSvgDataUri(z.getData())),I="image/svg+xml");C(z.getData(),I,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},T==c.drive)},!0)}var C=mxUtils.bind(this,function(T,m,z){var I=l.view,L=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,L.x/I.scale-I.translate.x)+4*l.gridSize)),O=l.snap(Math.ceil(Math.max(0,(L.y+L.height)/I.scale-I.translate.y)+4*l.gridSize));"data:image/"==T.substring(0,11)?c.loadImage(T,mxUtils.bind(this,function(S){var U=
-!0,W=mxUtils.bind(this,function(){c.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=U?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(T,m,N,O,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),U)});T.length>c.resampleThreshold?c.confirmImageResize(function(X){U=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(T,m,N,O,0,
-0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(T){var m="text/xml";/\.png$/i.test(T)?m="image/png":/\.jpe?g$/i.test(T)?m="image/jpg":/\.gif$/i.test(T)?m="image/gif":/\.pdf$/i.test(T)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&q.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},y):c.isModeEnabled(App.MODE_DROPBOX)&&q.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){B(c.trello)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(c,"",mxResources.get("import"),function(m){if(null!=m&&0<m.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var z=
-/(\.png)($|\?)/i.test(m)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(m),function(I){C(I,z,m)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==z)}},mxResources.get("url"));c.showDialog(T.container,300,80,!0,!0);T.init()},y))}))).isEnabled=n;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,y){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&
-(750>B&&this.addSubmenu("viewZoom",q,y,mxResources.get("zoom")),460>B&&c.isPageMenuVisible()&&this.addSubmenu("pages",q,y),320>B&&this.addSubmenu("insert",q,y),360>B&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",q,y));this.addMenuItems(q,["-","lightMode","darkMode"],y);c.isAutoDarkModeSupported()&&(B=c.menus.addMenuItem(q,"autoMode",y),null!=B&&B.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&
-this.addMenuItems(q,["-","toggleSimpleMode"],y)})));this.put("appearance",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["-","lightMode","darkMode"],y);if(c.isAutoDarkModeSupported()){var B=c.menus.addMenuItem(q,"autoMode",y);null!=B&&B.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}q.addSeparator(y);B=c.menus.addMenuItem(q,"highContrast",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&c.menus.addLinkToItem(B,
-"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",function(q){l.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(q)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(q,y){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=q.addItem(mxResources.get("automatic"),null,function(){c.setCurrentTheme("")},
-y),M=q.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},y),T=!1;if("kennedy"==B||"dark"==B)q.addCheckmark(M,Editor.checkmarkImage),T=!0;for(var m=0;m<Editor.themes.length;m++)mxUtils.bind(this,function(z){M=q.addItem(mxResources.get("min"==z?"minimal":z),null,function(){c.setCurrentTheme(z)},y);B==z&&(q.addCheckmark(M,Editor.checkmarkImage),T=!0)})(Editor.themes[m]);T||q.addCheckmark(C,Editor.checkmarkImage)})));p=this.editorUi.actions.addAction("rename...",
-mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(B,C){q.invalidFileHandle=null;q.fileHandle=B;q.title=C.name;q.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(q.getTitle()));else{var y=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;y=new FilenameDialog(this.editorUi,y,mxResources.get("rename"),mxUtils.bind(this,function(B){null!=B&&0<B.length&&null!=q&&B!=
-q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(B,mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},
-null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(y.container,340,96,!0,!0);y.init()}}));p.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=c.getCurrentFile();if(null!=q){var y=c.getCopyFilename(q);q.constructor==DriveFile?(y=new CreateDialog(c,y,mxUtils.bind(this,function(B,C){"_blank"==C?c.editor.editAsNew(c.getFileData(),B):("download"==
-C&&(C=App.MODE_GOOGLE),null!=B&&0<B.length&&(C==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(B,mxUtils.bind(this,function(M){q.desc=M;q.save(!1,mxUtils.bind(this,function(){c.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(T){c.handleError(T)}))}),mxUtils.bind(this,function(M){c.handleError(M)})):c.createFile(B,c.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),
-null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(y.container,420,380,!0,!0),y.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),y)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(q,y){q=c.getCurrentFile();null!=q&&c.openLink(q.getFolderUrl())}));c.actions.addAction("openFile...",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=q&&c.openLink(q.getFileUrl())}));c.actions.addAction("moveToFolder...",
+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){var y=l.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,y.height/l.view.scale))+2,null,null,null,q,c.getCurrentFile(),function(B,C,M,T,m,z,I,L,N,P,S,U){var W=[];N&&W.push("tags=%7B%7D");B=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+I+";height:"+L+';" src="'+c.createLink(B,C,!0,T,m,z,"public"==P?q:null,null,W,
+null,M,S,U)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");c.showDialog(B.container,450,240,!0,!0);B.init()},!0,!0)})}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var y=document.createElement("a");y.setAttribute("href","javascript:void(0);");y.setAttribute("target","_blank");y.style.cursor="pointer";mxUtils.write(y,
+mxResources.get("getNotionChromeExtension"));q.appendChild(y);mxUtils.setPrefixedStyle(y.style,"transition","all 1s ease");mxUtils.setOpacity(y,0);window.setTimeout(function(){mxUtils.setOpacity(y,100)},300);mxEvent.addListener(y,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.getPublicUrl(c.getCurrentFile(),function(B){c.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",
+q,B,c.getCurrentFile(),function(C,M,T,m,z,I,L,N,P,S,U,W){L=["border=0"];P&&L.push("tags=%7B%7D");C=new EmbedDialog(c,c.createLink(C,M,!0,m,z,I,"public"==S?B:null,null,L,null,T,null,W));c.showDialog(C.container,450,240,!0,!0);C.init()},null,!0)})}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){c.showPublishLinkDialog(null,null,null,null,null,null,q,c.getCurrentFile(),function(y,B,C,M,T,m,z,I,L,N,P,S){z=[];M&&L&&z.push("tags=%7B%7D");
+y=new EmbedDialog(c,c.createLink(y,B,!0,M,T,m,"public"==N?q:null,null,z,null,C,null,S));c.showDialog(y.container,450,240,!0,!0);y.init()},null,!0)})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});
+c.actions.addAction("googleSites...",function(){c.getPublicUrl(c.getCurrentFile(),function(q){q=new GoogleSitesDialog(c,q);c.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)p=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),p.setToggleAction(!0),p.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});window.matchMedia&&
+null!=document.getElementById("high-contrast-stylesheet")&&(p=c.actions.addAction("highContrast",function(){c.setAndPersistHighContrast(!c.isHighContrast())}),p.setToggleAction(!0),p.setSelectedCallback(function(){return c.isHighContrast()}));p=c.actions.addAction("search",function(){if(null!=c.sidebar){var q=c.sidebar.isEntryVisible("search");c.sidebar.showPalette("search",!q);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!q,mxSettings.save())}});p.label=mxResources.get("searchShapes");
+p.setToggleAction(!0);p.setSelectedCallback(function(){return null!=c.sidebar&&c.sidebar.isEntryVisible("search")});c.actions.get("clearDefaultStyle").funct=function(q){l.isEnabled()&&(c.clearDefaultStyle(),Editor.sketchMode&&c.setSketchMode(!1))};"1"==urlParams.embed&&(c.actions.get("saveAs").setEnabled(!1),c.actions.get("save").funct=function(q){l.isEditing()&&l.stopEditing();var y="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==
+urlParams.proto){var B=c.createLoadMessage("save");B.xml=y;!0!==q||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(B.exit=!0);y=JSON.stringify(B)}(window.opener||window.parent).postMessage(y,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));q=c.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():
+c.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var q=function(){c.editor.modified=!1;var y="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(y,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,
+q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,y){c.isExportToCanvas()?(this.addMenuItems(q,["exportPng"],y),c.jpgSupported&&this.addMenuItems(q,["exportJpg"],y),c.webpSupported&&this.addMenuItems(q,["exportWebp"],y)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],y);this.addMenuItems(q,["exportSvg","-"],y);c.isOffline()||
+c.printPdfExport?this.addMenuItems(q,["exportPdf"],y):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],y);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(q,["exportVsdx"],y);this.addMenuItems(q,["-","exportHtml","exportXml","exportUrl"],y);c.isOffline()||(q.addSeparator(y),this.addMenuItem(q,"export",y).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||
+this.addMenuItems(q,["publishLink"],y);c.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(q.addSeparator(y),c.menus.addSubmenu("embed",q,y))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,y){function B(T){T.pickFile(function(m){c.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(m,function(z){var I="data:image/"==z.getData().substring(0,11)?M(z.getTitle()):"text/xml";/\.svg$/i.test(z.getTitle())&&
+!c.editor.isDataSvg(z.getData())&&(z.setData(Editor.createSvgDataUri(z.getData())),I="image/svg+xml");C(z.getData(),I,z.getTitle())},function(z){c.handleError(z,null!=z?mxResources.get("errorLoadingFile"):null)},T==c.drive)},!0)}var C=mxUtils.bind(this,function(T,m,z){var I=l.view,L=l.getGraphBounds(),N=l.snap(Math.ceil(Math.max(0,L.x/I.scale-I.translate.x)+4*l.gridSize)),P=l.snap(Math.ceil(Math.max(0,(L.y+L.height)/I.scale-I.translate.y)+4*l.gridSize));"data:image/"==T.substring(0,11)?c.loadImage(T,
+mxUtils.bind(this,function(S){var U=!0,W=mxUtils.bind(this,function(){c.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=U?Math.min(1,Math.min(c.maxImageSize/Z,c.maxImageSize/Y)):1;c.importFile(T,m,N,P,Math.round(Z*X),Math.round(Y*X),z,function(ba){c.spinner.stop();l.setSelectionCells(ba);l.scrollCellToVisible(l.getSelectionCell())})}),U)});T.length>c.resampleThreshold?c.confirmImageResize(function(X){U=X;W()}):W()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):
+c.importFile(T,m,N,P,0,0,z,function(S){c.spinner.stop();l.setSelectionCells(S);l.scrollCellToVisible(l.getSelectionCell())})}),M=mxUtils.bind(this,function(T){var m="text/xml";/\.png$/i.test(T)?m="image/png":/\.jpe?g$/i.test(T)?m="image/jpg":/\.gif$/i.test(T)?m="image/gif":/\.pdf$/i.test(T)&&(m="application/pdf");return m});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},y):c.isModeEnabled(App.MODE_GOOGLE)&&
+q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1));c.isModeReady(App.MODE_ONEDRIVE)?q.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},y):c.isModeEnabled(App.MODE_ONEDRIVE)&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);c.isModeReady(App.MODE_DROPBOX)?q.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},y):c.isModeEnabled(App.MODE_DROPBOX)&&
+q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);c.isModeReady(App.MODE_GITHUB)&&q.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},y);c.isModeReady(App.MODE_GITLAB)&&q.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},y);c.isModeReady(App.MODE_TRELLO)?q.addItem(mxResources.get("trello")+"...",null,function(){B(c.trello)},y):c.isModeEnabled(App.MODE_TRELLO)&&q.addItem(mxResources.get("trello")+
+" ("+mxResources.get("loading")+"...)",null,function(){},y,null,!1);q.addSeparator(y);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},y);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},y);c.isOffline()||(q.addSeparator(y),q.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(c,"",mxResources.get("import"),function(m){if(null!=m&&0<m.length&&
+c.spinner.spin(document.body,mxResources.get("loading"))){var z=/(\.png)($|\?)/i.test(m)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(m),function(I){C(I,z,m)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==z)}},mxResources.get("url"));c.showDialog(T.container,300,80,!0,!0);T.init()},y))}))).isEnabled=n;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(q,y){var B=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;"simple"==Editor.currentTheme&&(750>B&&this.addSubmenu("viewZoom",q,y,mxResources.get("zoom")),460>B&&c.isPageMenuVisible()&&this.addSubmenu("pages",q,y),320>B&&this.addSubmenu("insert",q,y),360>B&&"1"!=urlParams.embed&&"draw.io"==c.getServiceName()&&this.addSubmenu("share",q,y));this.addMenuItems(q,["-","lightMode","darkMode"],y);c.isAutoDarkModeSupported()&&(B=c.menus.addMenuItem(q,"autoMode",y),null!=B&&B.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?
+"dark":"light")+")"));"1"!=urlParams.embed&&this.addMenuItems(q,["-","toggleSimpleMode"],y)})));this.put("appearance",new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["-","lightMode","darkMode"],y);if(c.isAutoDarkModeSupported()){var B=c.menus.addMenuItem(q,"autoMode",y);null!=B&&B.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}q.addSeparator(y);B=c.menus.addMenuItem(q,"highContrast",y);(!c.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&c.menus.addLinkToItem(B,"https://github.com/jgraph/drawio/issues/4296")})));c.actions.addAction("addToScratchpad",function(q){l.isSelectionEmpty()||null==c.addSelectionToScratchpad||c.addSelectionToScratchpad(q)});c.actions.addAction("accounts...",function(){c.toggleUserPanel();c.userPanel.style.right="10px";c.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(q,y){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=q.addItem(mxResources.get("automatic"),
+null,function(){c.setCurrentTheme("")},y),M=q.addItem(mxResources.get("classic"),null,function(){c.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},y),T=!1;if("kennedy"==B||"dark"==B)q.addCheckmark(M,Editor.checkmarkImage),T=!0;for(var m=0;m<Editor.themes.length;m++)mxUtils.bind(this,function(z){M=q.addItem(mxResources.get("min"==z?"minimal":z),null,function(){c.setCurrentTheme(z)},y);B==z&&(q.addCheckmark(M,Editor.checkmarkImage),T=!0)})(Editor.themes[m]);T||q.addCheckmark(C,Editor.checkmarkImage)})));
+p=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(B,C){q.invalidFileHandle=null;q.fileHandle=B;q.title=C.name;q.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(q.getTitle()));else{var y=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;y=new FilenameDialog(this.editorUi,y,mxResources.get("rename"),mxUtils.bind(this,
+function(B){null!=B&&0<B.length&&null!=q&&B!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(B,mxUtils.bind(this,function(C){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(C){this.editorUi.handleError(C,null!=C?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(B){if(null!=B&&0<B.length)return!0;c.showError(mxResources.get("error"),mxResources.get("invalidName"),
+mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,c.editor.fileExtensions);this.editorUi.showDialog(y.container,340,96,!0,!0);y.init()}}));p.isEnabled=function(){return this.enabled&&n.apply(this,arguments)};p.visible="1"!=urlParams.embed;c.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=c.getCurrentFile();if(null!=q){var y=c.getCopyFilename(q);q.constructor==DriveFile?(y=new CreateDialog(c,y,mxUtils.bind(this,function(B,C){"_blank"==C?c.editor.editAsNew(c.getFileData(),
+B):("download"==C&&(C=App.MODE_GOOGLE),null!=B&&0<B.length&&(C==App.MODE_GOOGLE?c.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(B,mxUtils.bind(this,function(M){q.desc=M;q.save(!1,mxUtils.bind(this,function(){c.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(T){c.handleError(T)}))}),mxUtils.bind(this,function(M){c.handleError(M)})):c.createFile(B,c.getFileData(!0),null,C)))}),mxUtils.bind(this,function(){c.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,c.editor.fileExtensions),c.showDialog(y.container,420,380,!0,!0),y.init()):c.editor.editAsNew(this.editorUi.getFileData(!0),y)}}));c.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(q,y){q=c.getCurrentFile();null!=q&&c.openLink(q.getFolderUrl())}));c.actions.addAction("openFile...",mxUtils.bind(this,function(){var q=c.getCurrentFile();null!=q&&c.openLink(q.getFileUrl())}));c.actions.addAction("moveToFolder...",
mxUtils.bind(this,function(){var q=c.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var y=!1;if(q.getMode()==App.MODE_GOOGLE&&null!=q.desc.parents)for(var B=0;B<q.desc.parents.length;B++)if(q.desc.parents[B].isRoot){y=!0;break}c.pickFolder(q.getMode(),mxUtils.bind(this,function(C){c.spinner.spin(document.body,mxResources.get("moving"))&&q.move(C,mxUtils.bind(this,function(M){c.spinner.stop()}),mxUtils.bind(this,function(M){c.handleError(M)}))}),null,!0,y)}}));this.put("publish",
new Menu(mxUtils.bind(this,function(q,y){this.addMenuItems(q,["publishLink"],y)})));c.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){c.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=c.getCurrentFile();null!=q&&q.share()}catch(y){c.handleError(y)}})).isEnabled=n;this.put("embed",new Menu(mxUtils.bind(this,function(q,y){var B=c.getCurrentFile();null==B||B.getMode()!=App.MODE_GOOGLE&&B.getMode()!=
App.MODE_GITHUB||!/(\.png)$/i.test(B.getTitle())||this.addMenuItems(q,["liveImage","-"],y);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],y);navigator.standalone||c.isOffline()||this.addMenuItems(q,["embedIframe"],y);"1"==urlParams.embed||c.isOffline()||this.addMenuItems(q,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),y)})));c.addInsertItem=function(q,y,B,C){("plantUml"!=C||EditorUi.enablePlantUml&&!c.isOffline())&&q.addItem(B,null,mxUtils.bind(this,
function(){if("fromText"==C||"formatSql"==C||"plantUml"==C||"mermaid"==C){var M=new ParseDialog(c,B,C);c.showDialog(M.container,620,420,!0,!1);c.dialog.container.style.overflow="auto"}else M=new CreateGraphDialog(c,B,C),c.showDialog(M.container,620,420,!0,!1,function(T,m){if(m)return c.confirm(mxResources.get("areYouSure"),function(){c.hideDialog()}),!1;null!=M.graph&&(null!=M.graph.container.parentNode&&M.graph.container.parentNode.removeChild(M.graph.container),M.graph.destroy(),M.graph=null)});
-M.init()}),y,null,n())};var D=function(q){l.getModel().beginUpdate();try{q=l.addCell(q),l.fireEvent(new mxEventObject("cellsInserted","cells",[q])),l.model.isVertex(q)&&l.isAutoSizeCell(q)&&l.updateCellSize(q)}finally{l.getModel().endUpdate()}l.scrollCellToVisible(q);l.setSelectionCell(q);l.container.focus();l.editAfterInsert&&l.startEditing(q);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(q))},0);return q},E=function(q,y,B,C,M){q=new mxCell(q,new mxGeometry(0,
-0,y,B),C);q.vertex=!0;null==M&&(M=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=M.x;q.geometry.y=M.y;return D(q)};c.actions.put("insertText",new Action(mxResources.get("text"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(E("Text",60,30,l.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",l.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||
-!l.isMouseInsertPoint()?null:l.getInsertPoint()))},null,null,"A")).isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"D")).isEnabled=n;c.actions.put("insertNote",new Action(mxResources.get("note"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
-E("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"S")).isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
-E("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"F")).isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&E("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"R")).isEnabled=n;c.actions.put("insertEdge",
+M.init()}),y,null,n())};var D=function(q){l.getModel().beginUpdate();try{q=l.addCell(q),l.fireEvent(new mxEventObject("cellsInserted","cells",[q])),l.model.isVertex(q)&&l.isAutoSizeCell(q)&&l.updateCellSize(q)}finally{l.getModel().endUpdate()}l.scrollCellToVisible(q);l.setSelectionCell(q);l.container.focus();l.editAfterInsert&&l.startEditing(q);window.setTimeout(function(){null!=c.hoverIcons&&c.hoverIcons.update(l.view.getState(q))},0);return q},G=function(q,y,B,C,M){q=new mxCell(q,new mxGeometry(0,
+0,y,B),C);q.vertex=!0;null==M&&(M=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([q],!0)));q.geometry.x=M.x;q.geometry.y=M.y;return D(q)};c.actions.put("insertText",new Action(mxResources.get("text"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&l.startEditingAtCell(G("Text",60,30,l.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",l.vertexFontSize),null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||
+!l.isMouseInsertPoint()?null:l.getInsertPoint()))},null,null,"A")).isEnabled=n;c.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&G("",120,60,"whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"D")).isEnabled=n;c.actions.put("insertNote",new Action(mxResources.get("note"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
+G("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"S")).isEnabled=n;c.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&
+G("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"F")).isEnabled=n;c.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(q){l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())&&G("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint())},null,null,"R")).isEnabled=n;c.actions.put("insertEdge",
new Action(mxResources.get("line"),function(q){if(l.isEnabled()&&!l.isCellLocked(l.getDefaultParent())){var y=l.defaultEdgeLength;q=null==q||mxEvent.isControlDown(q)||mxEvent.isMetaDown(q)||!l.isMouseInsertPoint()?null:l.getInsertPoint();null==q&&(q=l.getCenterInsertPoint(l.getBoundingBoxFromGeometry([B],!0)));var B=new mxCell("",new mxGeometry(0,0,y,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");B.geometry.setTerminalPoint(q,!0);B.geometry.setTerminalPoint(new mxPoint(q.x+B.geometry.width,
q.y),!1);B.geometry.points=[];B.geometry.relative=!0;B.edge=!0;D(B)}},null,null,"C")).isEnabled=n;p=c.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=c.sidebarWindow?c.sidebarWindow.window.setVisible(!c.sidebarWindow.window.isVisible()):c.toggleShapesPanel(!c.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));p.setToggleAction(!0);p.setSelectedCallback(mxUtils.bind(this,function(){return null!=c.sidebarWindow&&c.sidebarWindow.window.isVisible()||null==
c.sidebarWindow&&0<c.hsplitPosition}));c.addInsertMenuItems=mxUtils.bind(this,function(q,y,B){for(var C=0;C<B.length;C++)"-"==B[C]?q.addSeparator(y):c.addInsertItem(q,y,mxResources.get(B[C])+"...",B[C])});this.put("insert",new Menu(mxUtils.bind(this,function(q,y){"sketch"==Editor.currentTheme?(c.menus.addMenuItems(q,["toggleShapes"],y),c.menus.addSubmenu("table",q,y),q.addSeparator(y),c.insertTemplateEnabled&&!c.isOffline()&&c.menus.addMenuItems(q,["insertTemplate"],y),c.menus.addMenuItems(q,["insertImage",
@@ -14427,8 +14431,8 @@ y),q.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){c.remov
function(){c.editor.editAsNew(c.getFileData(!0,null,null,null,!0,!0))}),y)))})));this.put("pages",new Menu(mxUtils.bind(this,function(q,y){var B=c.currentPage;c.editor.graph.isLightboxView()||(q.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{c.insertPage()}catch(M){c.handleError(M)}}),y,null,c.editor.graph.isEnabled()),q.addSeparator(y));if(null!=c.pages)for(var C=0;C<c.pages.length;C++)mxUtils.bind(this,function(M){var T=null;T=c.pages[M]!=B||c.editor.graph.isLightboxView()?
q.addItem(c.getShortPageName(c.pages[M]),null,mxUtils.bind(this,function(){c.selectPage(c.pages[M])}),y):c.menus.addSubmenu("currentPage",q,y,c.getShortPageName(B));var m=c.pages[M].getId();T.setAttribute("title",c.pages[M].getName()+" ("+(M+1)+"/"+c.pages.length+")"+(null!=m?" ["+m+"]":""));c.pages[M]==B&&q.addCheckmark(T,Editor.checkmarkImage)})(C)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;p=c.actions.addAction("spellCheck",function(){c.toggleSpellCheck();R=!R;c.alert(mxResources.get("restartForChangeRequired"))});
p.setToggleAction(!0);p.setSelectedCallback(function(){return R});var V="1"==urlParams.enableStoreBkp;p=c.actions.addAction("autoBkp",function(){c.toggleStoreBkp();V=!V});p.setToggleAction(!0);p.setSelectedCallback(function(){return V});var Q="1"==urlParams.isGoogleFontsEnabled;p=c.actions.addAction("googleFonts",function(){c.toggleGoogleFonts();Q=!Q;c.alert(mxResources.get("restartForChangeRequired"))});p.setToggleAction(!0);p.setSelectedCallback(function(){return Q});c.actions.addAction("openDevTools",
-function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var P=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||
-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);null==P||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);c.menus.addSubmenu("units",
+function(){c.openDevTools()});c.actions.addAction("drafts...",function(){var q=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(y){y=parseInt(y);0<=y&&(EditorUi.draftSaveDelay=1E3*y,EditorUi.enableDrafts=0<y,mxSettings.setDraftSaveDelay(y),mxSettings.save())}),mxResources.get("draftSaveInt"));c.showDialog(q.container,320,80,!0,!0);q.init()})}var O=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(q,y){if("simple"==Editor.currentTheme||
+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||c.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&c.menus.addSubmenu("theme",q,y);q.addSeparator(y);null==O||"1"==urlParams.embed&&null!=urlParams.lang||c.menus.addSubmenu("language",q,y);c.menus.addSubmenu("units",
q,y);c.menus.addMenuItems(q,"- copyConnect collapseExpand - tooltips animations -".split(" "),y);var B=c.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors"],y),c.menus.addMenuItems(q,["ruler","-"],y));EditorUi.isElectronApp&&c.menus.addMenuItems(q,"- googleFonts spellCheck autoBkp drafts -".split(" "),y);this.addSubmenu("diagramLanguage",q,y);q.addSeparator(y);c.mode!=App.MODE_ATLAS&&c.menus.addMenuItem(q,
"configuration",y);q.addSeparator(y)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",q,y),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||c.menus.addSubmenu("appearance",q,y),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&c.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",q,y),q.addSeparator(y),B=this.addSubmenu("adaptiveColors",q,y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
c.menus.addLinkToItem(B,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(B=this.addMenuItem(q,"mathematicalTypesetting",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(q,["googleFonts","spellCheck","autoBkp","drafts","-"],y),this.addMenuItems(q,["copyConnect","collapseExpand","-"],y),"1"!=urlParams.embed&&(B=c.getCurrentFile(),null!=
@@ -14450,14 +14454,14 @@ OneDriveFile||c.menus.addMenuItems(q,["share"],y));q.addSeparator(y);null!=B&&B.
y):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(q.addSeparator(y),C=this.addMenuItem(q,"synchronize",y),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.drawio.com/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],y),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(q,["share","-"],y),null!=B&&B.isRenamable()&&
this.addMenuItems(q,["rename"],y),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],y):(this.addMenuItems(q,["makeCopy"],y),null!=B&&(B.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],y),null!=B.getFolderUrl()&&c.menus.addMenuItems(q,["openFolder"],y)))),q.addSeparator(y),this.addSubmenu("importFrom",q,y),this.addSubmenu("exportAs",q,y),q.addSeparator(y),this.addSubmenu("embed",q,y),this.addSubmenu("publish",q,y),q.addSeparator(y),
this.addSubmenu("newLibrary",q,y),this.addSubmenu("openLibraryFrom",q,y),c.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],y),null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C))&&this.addMenuItems(q,["-","properties"])),this.addMenuItems(q,["-","pageSetup"],y),mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],y),
-this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function B(N){var O=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!M[O]){for(var S=N.name,U=0;null!=I[S.toLowerCase()];)S=N.name+" ("+ ++U+")";null==z[O]&&(L.push({name:N.name,url:N.url,label:S,title:N.url}),I[S.toLowerCase()]=N,z[O]=N)}}for(var C=mxUtils.bind(this,function(N,O,S,U,W){var X=c.editor.graph,Z=this.styleChange(q,null!=U?U:N,[mxConstants.STYLE_FONTFAMILY,
-"fontSource","FType"],[N,null!=O?encodeURIComponent(O):null,null],null,y,function(){X.setFont(N,O);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=O?encodeURIComponent(O):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),
-S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,O);this.editorUi.hideCurrentMenu();
-mxEvent.consume(Y)})));Graph.addFont(N,O);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=U?U:N;null!=O&&(W+=" ("+O+")");Z.setAttribute("title",W)}),M={},T=0;T<this.defaultFonts.length;T++){var m=this.defaultFonts[T];"string"===typeof m?C(m):null!=m.fontFamily&&null!=m.fontUrl&&(M[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,C(m.fontFamily,m.fontUrl))}q.addSeparator(y);var z={},I={},L=[];for(T=0;T<this.customFonts.length;T++)B(this.customFonts[T]);L.sort(function(N,O){return N.label<
-O.label?-1:N.label>O.label?1:0});if(0<L.length){for(T=0;T<L.length;T++)C(L[T].name,L[T].url,!0,L[T].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,O=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",U=null;if(N.isEditing()){var W=
-N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){O=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());U=null!=X?X.style.fontSource:null;for(null!=U&&(U=decodeURIComponent(U));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){U=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==O){U=null;break}W=W.parentNode}null!=U&&(Graph.isGoogleFontUrl(U)?
-(U=null,S="g"):S="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(O=X.style[mxConstants.STYLE_FONTFAMILY]||O,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",U=W)));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&(Z=N.cellEditor.saveSelection());O=new FontDialog(this.editorUi,O,U,S,mxUtils.bind(this,function(Y,ba,
-ea){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(O.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);O.init()}),
+this.addMenuItems(q,["-","close"])})));this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,y){function B(N){var P=encodeURIComponent(N.name)+(null==N.url?"":"@"+encodeURIComponent(N.url));if(!M[P]){for(var S=N.name,U=0;null!=I[S.toLowerCase()];)S=N.name+" ("+ ++U+")";null==z[P]&&(L.push({name:N.name,url:N.url,label:S,title:N.url}),I[S.toLowerCase()]=N,z[P]=N)}}for(var C=mxUtils.bind(this,function(N,P,S,U,W){var X=c.editor.graph,Z=this.styleChange(q,null!=U?U:N,[mxConstants.STYLE_FONTFAMILY,
+"fontSource","FType"],[N,null!=P?encodeURIComponent(P):null,null],null,y,function(){X.setFont(N,P);c.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"],"values",[N,null!=P?encodeURIComponent(P):null,null],"cells",[X.cellEditor.getEditingCell()]))},function(){X.updateLabelElements(X.getSelectionCells(),function(Y){Y.removeAttribute("face");Y.style.fontFamily=null;"PRE"==Y.nodeName&&X.replaceElement(Y,"div")})});S&&(S=document.createElement("img"),
+S.className="geAdaptiveAsset",S.setAttribute("src",Editor.crossImage),S.setAttribute("title",mxResources.get("delete")),S.setAttribute("valign","absmiddle"),S.setAttribute("border","0"),S.style.position="relative",S.style.top="2px",S.style.width="14px",S.style.cursor="default",S.style.margin="0 3px",Z.firstChild.nextSibling.nextSibling.appendChild(S),mxEvent.addListener(S,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(Y){this.removeCustomFont(N,P);this.editorUi.hideCurrentMenu();
+mxEvent.consume(Y)})));Graph.addFont(N,P);Z.firstChild.nextSibling.style.fontFamily=N;W=null!=U?U:N;null!=P&&(W+=" ("+P+")");Z.setAttribute("title",W)}),M={},T=0;T<this.defaultFonts.length;T++){var m=this.defaultFonts[T];"string"===typeof m?C(m):null!=m.fontFamily&&null!=m.fontUrl&&(M[encodeURIComponent(m.fontFamily)+"@"+encodeURIComponent(m.fontUrl)]=!0,C(m.fontFamily,m.fontUrl))}q.addSeparator(y);var z={},I={},L=[];for(T=0;T<this.customFonts.length;T++)B(this.customFonts[T]);L.sort(function(N,P){return N.label<
+P.label?-1:N.label>P.label?1:0});if(0<L.length){for(T=0;T<L.length;T++)C(L[T].name,L[T].url,!0,L[T].label);q.addSeparator(y)}q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),y);q.addSeparator(y);q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var N=this.editorUi.editor.graph,P=N.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],S="s",U=null;if(N.isEditing()){var W=
+N.getSelectedEditingElement();if(null!=W){var X=mxUtils.getCurrentStyle(W);if(null!=X){P=mxUtils.getCssFontFamily(X.fontFamily);X=N.getView().getState(N.cellEditor.getEditingCell());U=null!=X?X.style.fontSource:null;for(null!=U&&(U=decodeURIComponent(U));null!=W&&W!=N.cellEditor.textarea;){if(W.nodeType==mxConstants.NODETYPE_ELEMENT)if(null!=W.getAttribute("data-font-src")){U=W.getAttribute("data-font-src");break}else if(W.getAttribute("face")==P){U=null;break}W=W.parentNode}null!=U&&(Graph.isGoogleFontUrl(U)?
+(U=null,S="g"):S="w")}}}else X=N.getView().getState(N.getSelectionCell()),null!=X&&(P=X.style[mxConstants.STYLE_FONTFAMILY]||P,W=X.style.fontSource,null!=W&&(W=decodeURIComponent(W),Graph.isGoogleFontUrl(W)?S="g":(S="w",U=W)));null!=U&&U.substring(0,PROXY_URL.length)==PROXY_URL&&(U=decodeURIComponent(U.substr((PROXY_URL+"?url=").length)));var Z=null;document.activeElement==N.cellEditor.textarea&&(Z=N.cellEditor.saveSelection());P=new FontDialog(this.editorUi,P,U,S,mxUtils.bind(this,function(Y,ba,
+ea){null!=Z&&(N.cellEditor.restoreSelection(Z),Z=null);if(null!=Y&&0<Y.length)if(this.addCustomFont(Y,ba),N.isEditing())N.setFont(Y,ba);else{N.getModel().beginUpdate();try{N.stopEditing(!1),N.setCellStyles(mxConstants.STYLE_FONTFAMILY,Y),N.setCellStyles("fontSource",null!=ba?encodeURIComponent(ba):null),N.setCellStyles("FType",null)}finally{N.getModel().endUpdate()}}}));this.editorUi.showDialog(P.container,380,130+(Editor.enableWebFonts?70:0)+("0"!=urlParams.isGoogleFontsEnabled?50:0),!0,!0);P.init()}),
y,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.diagramModified=!1;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};DiagramPage.prototype.setDiagramModified=function(b){this.diagramModified=b};DiagramPage.prototype.isDiagramModified=function(){return this.diagramModified};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}
RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};function MovePage(b,e,f){this.ui=b;this.oldIndex=e;this.newIndex=f}
@@ -14479,7 +14483,7 @@ function(){b.checkDefaultParent()}));var n=mxUtils.bind(this,function(){this.upd
this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(p,u){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};
EditorUi.prototype.scrollToPage=function(b,e){var f=null!=b?this.getPageIndex(b):this.getSelectedPageIndex(),c=null!=b?b:this.currentPage;null!=f&&null!=this.tabScroller&&this.tabScroller.children.length>f&&null!=this.tabScroller.children[f]&&(c!=this.lastScrollPage||e)&&(this.tabScroller.children[f].scrollIntoView({block:"nearest",inline:null!=b?"nearest":"center"}),this.tabScroller.children[f].className="geTab gePageTab geActivePage",this.lastScrollPage=c)};
EditorUi.prototype.restoreViewState=function(b,e,f){b=null!=b?this.getPageById(b.getId()):null;var c=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,e):(c.setViewState(e),this.editor.updateGraphComponents(),c.view.revalidate(),c.sizeDidChange()),c.container.scrollLeft=c.view.translate.x*c.view.scale+e.scrollLeft,c.container.scrollTop=c.view.translate.y*c.view.scale+e.scrollTop,c.restoreSelection(f))};
-Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),p=this.parseBackgroundImage(b.getAttribute("backgroundImage")),u=b.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(G){G=G.split("^");return{name:G[0],url:G[1]}})}catch(G){console.log("ExtFonts format error: "+G.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+Graph.prototype.createViewState=function(b){var e=b.getAttribute("page"),f=parseFloat(b.getAttribute("pageScale")),c=parseFloat(b.getAttribute("pageWidth")),l=parseFloat(b.getAttribute("pageHeight")),n=b.getAttribute("background"),p=this.parseBackgroundImage(b.getAttribute("backgroundImage")),u=b.getAttribute("extFonts");if(u)try{u=u.split("|").map(function(F){F=F.split("^");return{name:F[0],url:F[1]}})}catch(F){console.log("ExtFonts format error: "+F.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=e?"0"!=e:this.defaultPageVisible,background:null!=n&&0<n.length?n:null,backgroundImage:p,pageScale:isNaN(f)?mxGraph.prototype.pageScale:f,pageFormat:isNaN(c)||isNaN(l)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,c,l),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),adaptiveColors:b.getAttribute("adaptiveColors"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:u||[]}};
Graph.prototype.saveViewState=function(b,e,f,c){f||(e.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),e.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),e.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),e.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),e.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),e.setAttribute("connect",null==b||b.connect?"1":"0"),e.setAttribute("arrows",null==b||b.arrows?"1":"0"),e.setAttribute("fold",
@@ -14503,7 +14507,7 @@ EditorUi.prototype.insertPage=function(b,e,f){this.editor.graph.isEnabled()&&(th
EditorUi.prototype.createPage=function(b,e,f){e=new DiagramPage((null!=this.fileNode?this.fileNode.ownerDocument:document).createElement("diagram"),e);e.setName(null!=b?b:this.createPageName());this.initDiagramNode(e,f);return e};EditorUi.prototype.createPageName=function(){for(var b={},e=0;e<this.pages.length;e++){var f=this.pages[e].getName();null!=f&&0<f.length&&(b[f]=f)}e=this.pages.length;do f=mxResources.get("pageWithNumber",[++e]);while(null!=b[f]);return f};
EditorUi.prototype.removePage=function(b){try{var e=this.editor.graph,f=mxUtils.indexOf(this.pages,b);if(e.isEnabled()&&0<=f){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);e.model.beginUpdate();try{var c=this.currentPage;c==b&&1<this.pages.length?(f==this.pages.length-1?f--:f++,c=this.pages[f]):1>=this.pages.length&&(c=this.insertPage(),e.model.execute(new RenamePage(this,c,mxResources.get("pageWithNumber",[1]))));e.model.execute(new ChangePage(this,b,c))}finally{e.model.endUpdate()}}}catch(l){this.handleError(l)}return b};
EditorUi.prototype.duplicatePage=function(b,e){var f=null;try{var c=this.editor.graph;if(c.isEnabled()){c.isEditing()&&c.stopEditing();var l=b.node.cloneNode(!1);l.removeAttribute("id");var n={},p=c.createCellLookup([c.model.root]);f=new DiagramPage(l);f.root=c.cloneCell(c.model.root,null,n);var u=new mxGraphModel;u.prefix=Editor.guid()+"-";u.setRoot(f.root);c.updateCustomLinks(c.createCellMapping(n,p),[f.root]);f.viewState=b==this.currentPage?c.getViewState():b.viewState;this.initDiagramNode(f);
-f.viewState.scale=1;delete f.viewState.scrollLeft;delete f.viewState.scrollTop;delete f.viewState.currentRoot;delete f.viewState.defaultParent;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(G){this.handleError(G)}return f};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};
+f.viewState.scale=1;delete f.viewState.scrollLeft;delete f.viewState.scrollTop;delete f.viewState.currentRoot;delete f.viewState.defaultParent;f.setName(e);f=this.insertPage(f,mxUtils.indexOf(this.pages,b)+1)}}catch(F){this.handleError(F)}return f};EditorUi.prototype.initDiagramNode=function(b,e){null==e&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root)));this.editor.graph.saveViewState(b.viewState,e);EditorUi.removeChildNodes(b.node);b.node.appendChild(e)};
EditorUi.prototype.clonePages=function(b){for(var e=[],f=[],c=0;c<b.length;c++)try{f.push(this.clonePage(b[c]))}catch(l){e.push(mxResources.get("pageWithNumber",[c+1])+": "+l.toString())}if(0<e.length){b=Error(e.join("\n"));try{0<f.length&&(b.fallbackFileData=this.getXmlForPages(f))}catch(l){}throw b;}return f};
EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var e=new DiagramPage(b.node.cloneNode(!0)),f=b==this.currentPage?this.editor.graph.getViewState():b.viewState;e.viewState=mxUtils.clone(f,EditorUi.transientViewStateProperties);e.root=this.editor.graph.model.cloneCell(b.root,null,!0);e.diagramModified=b.diagramModified;return e};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(f){null!=f&&0<f.length&&this.editor.graph.model.execute(new RenamePage(this,b,f))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
@@ -14521,25 +14525,25 @@ EditorUi.prototype.createLeftScrollTab=function(){return this.createControlTab(n
EditorUi.prototype.createRightScrollTab=function(){return this.createControlTab(null,Editor.thinArrowRightImage,mxUtils.bind(this,function(b){var e=Math.max(60,this.tabScroller.clientWidth/2);null!=this.tabScroller.scrollBy?this.tabScroller.scrollBy({left:e,top:0,behavior:"smooth"}):this.tabScroller.scrollLeft+=e;mxEvent.consume(b)}))};
EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxResources.get("pages"),Editor.verticalDotsImage,mxUtils.bind(this,function(b){this.editor.graph.popupMenuHandler.hideMenu();var e=new mxPopupMenu(mxUtils.bind(this,function(l,n){this.menus.get("pages").funct(l,n)}));e.div.className+=" geMenubarMenu";e.smartSeparators=!0;e.showDisabled=!0;e.autoExpand=!0;e.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(e,arguments);e.destroy()});var f=mxEvent.getClientX(b),
c=mxEvent.getClientY(b);e.popup(f,c,null,b);this.setCurrentMenu(e);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,e){var f=this.createTab(),c=b.getName()||mxResources.get("untitled"),l=b.getId();f.setAttribute("title",c+(null!=l?" ("+l+")":"")+" ["+e+"]");e=document.createElement("span");e.style.maxWidth="160px";e.style.textOverflow="ellipsis";e.style.overflow="hidden";mxUtils.write(e,c);f.appendChild(e);this.addTabListeners(b,f);return f};
-EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(G){this.renamePage(b);mxEvent.consume(G)}));var c=document.createElement("div");c.className="geTabMenuButton";c.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";c.style.backgroundSize="10px";e.appendChild(c);var l=!1,n=!1,p=mxUtils.bind(this,
-function(G){l=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);f.isMouseDown||n||this.selectPage(b)}),u=mxUtils.bind(this,function(G){if(f.isEnabled()&&!f.isMouseDown&&(n&&(mxEvent.isTouchEvent(G)||mxEvent.getSource(G)==c)||mxEvent.isPopupTrigger(G))&&(f.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(G)||!l)){var H=new mxPopupMenu(this.createPageMenu(b));H.div.className+=" geMenubarMenu";H.smartSeparators=!0;H.showDisabled=!0;H.autoExpand=!0;H.hideMenu=mxUtils.bind(this,
-function(){mxPopupMenu.prototype.hideMenu.apply(H,arguments);this.resetCurrentMenu();H.destroy()});var F=mxEvent.getClientX(G),K=mxEvent.getClientY(G);H.popup(F,K,null,G);this.setCurrentMenu(H,e)}mxEvent.consume(G)});mxEvent.addGestureListeners(c,p,null,u);mxEvent.addGestureListeners(e,p,null,u)};
+EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var f=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(F){this.renamePage(b);mxEvent.consume(F)}));var c=document.createElement("div");c.className="geTabMenuButton";c.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";c.style.backgroundPosition="center center";c.style.backgroundRepeat="no-repeat";c.style.backgroundSize="10px";e.appendChild(c);var l=!1,n=!1,p=mxUtils.bind(this,
+function(F){l=null!=this.currentMenu;n=b==this.currentPage;this.scrollToPage(b);f.isMouseDown||n||this.selectPage(b)}),u=mxUtils.bind(this,function(F){if(f.isEnabled()&&!f.isMouseDown&&(n&&(mxEvent.isTouchEvent(F)||mxEvent.getSource(F)==c)||mxEvent.isPopupTrigger(F))&&(f.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(F)||!l)){var H=new mxPopupMenu(this.createPageMenu(b));H.div.className+=" geMenubarMenu";H.smartSeparators=!0;H.showDisabled=!0;H.autoExpand=!0;H.hideMenu=mxUtils.bind(this,
+function(){mxPopupMenu.prototype.hideMenu.apply(H,arguments);this.resetCurrentMenu();H.destroy()});var E=mxEvent.getClientX(F),K=mxEvent.getClientY(F);H.popup(E,K,null,F);this.setCurrentMenu(H,e)}mxEvent.consume(F)});mxEvent.addGestureListeners(c,p,null,u);mxEvent.addGestureListeners(e,p,null,u)};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(f,c){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||f.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),c));f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),c);f.addSeparator(c);this.currentPage==
b&&1<this.pages.length&&this.menus.addSubmenu("movePage",f,c,mxResources.get("move"));f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),c);f.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,e)}),c)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.oldIndex;c.oldIndex=c.newIndex;c.newIndex=e;return c};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){e=c.previous;c.previous=c.name;c.name=e;return c};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,["ui","relatedPage","index","page","previousPage"]);b.afterEncode=function(e,f,c){c.setAttribute("relatedPage",f.relatedPage.getId());null==f.index&&(c.setAttribute("name",f.relatedPage.getName()),null!=f.relatedPage.viewState&&c.setAttribute("viewState",JSON.stringify(f.relatedPage.viewState,function(l,n){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,l)?n:void 0})),null!=f.relatedPage.root&&e.encodeCell(f.relatedPage.root,c));return c};
b.beforeDecode=function(e,f,c){c.ui=e.ui;c.relatedPage=c.ui.getPageById(f.getAttribute("relatedPage"));if(null==c.relatedPage){var l=f.ownerDocument.createElement("diagram");l.setAttribute("id",f.getAttribute("relatedPage"));l.setAttribute("name",f.getAttribute("name"));c.relatedPage=new DiagramPage(l);l=f.getAttribute("viewState");null!=l&&(c.relatedPage.viewState=JSON.parse(l),f.removeAttribute("viewState"));f=f.cloneNode(!0);l=f.firstChild;if(null!=l)for(c.relatedPage.root=e.decodeCell(l,!1),c=
-l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var n=l.getAttribute("id");null==e.lookup(n)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,n,p,u){l=null!=l?l:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var G=n.slice(),H=0;H<n.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[H]),"treeFolding","0")&&this.foldTreeCell(c,n[H]);n=G;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(c,l){this.model.beginUpdate();try{var n=
-[];this.traverse(l,!0,mxUtils.bind(this,function(u,G){var H=null!=G&&this.isTreeEdge(G);H&&n.push(G);u==l||null!=G&&!H||n.push(u);return(null==G||H)&&(u==l||!this.model.isCollapsed(u))}));this.model.setCollapsed(l,c);for(var p=0;p<n.length;p++)this.model.setVisible(n[p],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,n,p,u,G){return this.model.filterCells(this.getEdges(c,l,n,p,u,G),mxUtils.bind(this,
+l.nextSibling,l.parentNode.removeChild(l),l=c;null!=l;){c=l.nextSibling;if(l.nodeType==mxConstants.NODETYPE_ELEMENT){var n=l.getAttribute("id");null==e.lookup(n)&&e.decodeCell(l)}l.parentNode.removeChild(l);l=c}}return f};b.afterDecode=function(e,f,c){c.index=c.previousIndex;return c};mxCodecRegistry.register(b)})();(function(){var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(c,l,n,p,u){l=null!=l?l:!1;null==n&&(n=this.getFoldableCells(this.getSelectionCells(),c));this.stopEditing();this.model.beginUpdate();try{for(var F=n.slice(),H=0;H<n.length;H++)"1"==mxUtils.getValue(this.getCurrentCellStyle(n[H]),"treeFolding","0")&&this.foldTreeCell(c,n[H]);n=F;n=b.apply(this,arguments)}finally{this.model.endUpdate()}return n};Graph.prototype.foldTreeCell=function(c,l){this.model.beginUpdate();try{var n=
+[];this.traverse(l,!0,mxUtils.bind(this,function(u,F){var H=null!=F&&this.isTreeEdge(F);H&&n.push(F);u==l||null!=F&&!H||n.push(u);return(null==F||H)&&(u==l||!this.model.isCollapsed(u))}));this.model.setCollapsed(l,c);for(var p=0;p<n.length;p++)this.model.setVisible(n[p],!c)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(c){return!this.isEdgeIgnored(c)};Graph.prototype.getTreeEdges=function(c,l,n,p,u,F){return this.model.filterCells(this.getEdges(c,l,n,p,u,F),mxUtils.bind(this,
function(H){return this.isTreeEdge(H)}))};Graph.prototype.getIncomingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,l){return this.getTreeEdges(c,l,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(C){return v.isVertex(C)&&n(C)}function l(C){var M=!1;null!=C&&(M="1"==
k.getCurrentCellStyle(C).treeMoving);return M}function n(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),M="tree"==(null!=M?M.style:k.getCellStyle(C)).containerType);return M}function p(C){var M=!1;null!=C&&(C=v.getParent(C),M=k.view.getState(C),k.view.getState(C),M=null!=(null!=M?M.style:k.getCellStyle(C)).childLayout);return M}function u(C){C=k.view.getState(C);if(null!=C){var M=k.getIncomingTreeEdges(C.cell);if(0<M.length&&(M=k.view.getState(M[0]),null!=M&&(M=M.absolutePoints,null!=
-M&&0<M.length&&(M=M[M.length-1],null!=M)))){if(M.y==C.y&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_SOUTH;if(M.y==C.y+C.height&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_NORTH;if(M.x>C.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function G(C,M){M=null!=M?M:!0;k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=k.cloneCells([m[0],C]);k.model.setTerminal(z[0],k.model.getTerminal(m[0],
-!0),!0);var I=u(C),L=T.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=M?C.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=M?C.geometry.height+10:-z[1].geometry.height-10;k.view.currentRoot!=T&&(z[1].geometry.x-=L.x,z[1].geometry.y-=L.y);var N=k.view.getState(C),O=k.view.scale;if(null!=N){var S=mxRectangle.fromRectangle(N);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?S.x+=(M?C.geometry.width+10:-z[1].geometry.width-10)*O:S.y+=(M?
-C.geometry.height+10:-z[1].geometry.height-10)*O;var U=k.getOutgoingTreeEdges(k.model.getTerminal(m[0],!0));if(null!=U){for(var W=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,X=L=m=0;X<U.length;X++){var Z=k.model.getTerminal(U[X],!1);if(I==u(Z)){var Y=k.view.getState(Z);Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(S,Y)&&(m=10+Math.max(m,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/O),L=10+Math.max(L,(Math.min(S.y+
-S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/O))}}W?L=0:m=0;for(X=0;X<U.length;X++)if(Z=k.model.getTerminal(U[X],!1),I==u(Z)&&(Y=k.view.getState(Z),Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY()))){var ba=[];k.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&k.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});k.moveCells(ba,(M?1:-1)*m,(M?1:-1)*L)}}}return k.addCells(z,T)}finally{k.model.endUpdate()}}function H(C){k.model.beginUpdate();
-try{var M=u(C),T=k.getIncomingTreeEdges(C),m=k.cloneCells([T[0],C]);k.model.setTerminal(T[0],m[1],!1);k.model.setTerminal(m[0],m[1],!0);k.model.setTerminal(m[0],C,!1);var z=k.model.getParent(C),I=z.geometry,L=[];k.view.currentRoot!=z&&(m[1].geometry.x-=I.x,m[1].geometry.y-=I.y);k.traverse(C,!0,function(S,U){var W=null!=U&&k.isTreeEdge(U);W&&L.push(U);(null==U||W)&&L.push(S);return null==U||W});var N=C.geometry.width+40,O=C.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?N=0:M==mxConstants.DIRECTION_NORTH?
-(N=0,O=-O):M==mxConstants.DIRECTION_WEST?(N=-N,O=0):M==mxConstants.DIRECTION_EAST&&(O=0);k.moveCells(L,N,O);return k.addCells(m,z)}finally{k.model.endUpdate()}}function F(C,M){k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=u(C);0==m.length&&(m=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],z=M);var I=k.cloneCells([m[0],C]);k.model.setTerminal(I[0],C,!0);null==k.model.getTerminal(I[0],!1)&&(k.model.setTerminal(I[0],I[1],!1),k.applyNewEdgeStyle(I[1],
-[I[0]],z));m=k.getOutgoingTreeEdges(C);var L=T.geometry;M=[];k.view.currentRoot==T&&(L=new mxRectangle);for(var N=0;N<m.length;N++){var O=k.model.getTerminal(m[N],!1);null!=O&&M.push(O)}var S=k.view.getBounds(M),U=k.view.translate,W=k.view.scale;z==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(S.x+S.width)/W-U.x-L.x+10,I[1].geometry.y+=I[1].geometry.height-L.y+40):z==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-
+M&&0<M.length&&(M=M[M.length-1],null!=M)))){if(M.y==C.y&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_SOUTH;if(M.y==C.y+C.height&&Math.abs(M.x-C.getCenterX())<C.width/2)return mxConstants.DIRECTION_NORTH;if(M.x>C.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function F(C,M){M=null!=M?M:!0;k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=k.cloneCells([m[0],C]);k.model.setTerminal(z[0],k.model.getTerminal(m[0],
+!0),!0);var I=u(C),L=T.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?z[1].geometry.x+=M?C.geometry.width+10:-z[1].geometry.width-10:z[1].geometry.y+=M?C.geometry.height+10:-z[1].geometry.height-10;k.view.currentRoot!=T&&(z[1].geometry.x-=L.x,z[1].geometry.y-=L.y);var N=k.view.getState(C),P=k.view.scale;if(null!=N){var S=mxRectangle.fromRectangle(N);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?S.x+=(M?C.geometry.width+10:-z[1].geometry.width-10)*P:S.y+=(M?
+C.geometry.height+10:-z[1].geometry.height-10)*P;var U=k.getOutgoingTreeEdges(k.model.getTerminal(m[0],!0));if(null!=U){for(var W=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,X=L=m=0;X<U.length;X++){var Z=k.model.getTerminal(U[X],!1);if(I==u(Z)){var Y=k.view.getState(Z);Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY())&&mxUtils.intersects(S,Y)&&(m=10+Math.max(m,(Math.min(S.x+S.width,Y.x+Y.width)-Math.max(S.x,Y.x))/P),L=10+Math.max(L,(Math.min(S.y+
+S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/P))}}W?L=0:m=0;for(X=0;X<U.length;X++)if(Z=k.model.getTerminal(U[X],!1),I==u(Z)&&(Y=k.view.getState(Z),Z!=C&&null!=Y&&(W&&M!=Y.getCenterX()<N.getCenterX()||!W&&M!=Y.getCenterY()<N.getCenterY()))){var ba=[];k.traverse(Y.cell,!0,function(ea,ca){var fa=null!=ca&&k.isTreeEdge(ca);fa&&ba.push(ca);(null==ca||fa)&&ba.push(ea);return null==ca||fa});k.moveCells(ba,(M?1:-1)*m,(M?1:-1)*L)}}}return k.addCells(z,T)}finally{k.model.endUpdate()}}function H(C){k.model.beginUpdate();
+try{var M=u(C),T=k.getIncomingTreeEdges(C),m=k.cloneCells([T[0],C]);k.model.setTerminal(T[0],m[1],!1);k.model.setTerminal(m[0],m[1],!0);k.model.setTerminal(m[0],C,!1);var z=k.model.getParent(C),I=z.geometry,L=[];k.view.currentRoot!=z&&(m[1].geometry.x-=I.x,m[1].geometry.y-=I.y);k.traverse(C,!0,function(S,U){var W=null!=U&&k.isTreeEdge(U);W&&L.push(U);(null==U||W)&&L.push(S);return null==U||W});var N=C.geometry.width+40,P=C.geometry.height+40;M==mxConstants.DIRECTION_SOUTH?N=0:M==mxConstants.DIRECTION_NORTH?
+(N=0,P=-P):M==mxConstants.DIRECTION_WEST?(N=-N,P=0):M==mxConstants.DIRECTION_EAST&&(P=0);k.moveCells(L,N,P);return k.addCells(m,z)}finally{k.model.endUpdate()}}function E(C,M){k.model.beginUpdate();try{var T=k.model.getParent(C),m=k.getIncomingTreeEdges(C),z=u(C);0==m.length&&(m=[k.createEdge(T,null,"",null,null,k.createCurrentEdgeStyle())],z=M);var I=k.cloneCells([m[0],C]);k.model.setTerminal(I[0],C,!0);null==k.model.getTerminal(I[0],!1)&&(k.model.setTerminal(I[0],I[1],!1),k.applyNewEdgeStyle(I[1],
+[I[0]],z));m=k.getOutgoingTreeEdges(C);var L=T.geometry;M=[];k.view.currentRoot==T&&(L=new mxRectangle);for(var N=0;N<m.length;N++){var P=k.model.getTerminal(m[N],!1);null!=P&&M.push(P)}var S=k.view.getBounds(M),U=k.view.translate,W=k.view.scale;z==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-I[1].geometry.width)/2:(S.x+S.width)/W-U.x-L.x+10,I[1].geometry.y+=I[1].geometry.height-L.y+40):z==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==S?C.geometry.x+(C.geometry.width-
I[1].geometry.width)/2:(S.x+S.width)/W-U.x+-L.x+10,I[1].geometry.y-=I[1].geometry.height+L.y+40):(I[1].geometry.x=z==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+L.x+40):I[1].geometry.x+(I[1].geometry.width-L.x+40),I[1].geometry.y=null==S?C.geometry.y+(C.geometry.height-I[1].geometry.height)/2:(S.y+S.height)/W-U.y+-L.y+10);return k.addCells(I,T)}finally{k.model.endUpdate()}}function K(C,M,T){C=k.getOutgoingTreeEdges(C);T=k.view.getState(T);var m=[];if(null!=T&&null!=C){for(var z=
0;z<C.length;z++){var I=k.view.getState(k.model.getTerminal(C[z],!1));null!=I&&(!M&&Math.min(I.x+I.width,T.x+T.width)>=Math.max(I.x,T.x)||M&&Math.min(I.y+I.height,T.y+T.height)>=Math.max(I.y,T.y))&&m.push(I)}m.sort(function(L,N){return M?L.x+L.width-N.x-N.width:L.y+L.height-N.y-N.height})}return m}function d(C,M){var T=u(C),m=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==m&&T!=M?g.actions.get("selectParent").funct():T==
M?(M=k.getOutgoingTreeEdges(C),null!=M&&0<M.length&&k.setSelectionCell(k.model.getTerminal(M[0],!1))):(T=k.getIncomingTreeEdges(C),null!=T&&0<T.length&&(m=K(k.model.getTerminal(T[0],!0),m,C),C=k.view.getState(C),null!=C&&(C=mxUtils.indexOf(m,C),0<=C&&(C+=M==mxConstants.DIRECTION_NORTH||M==mxConstants.DIRECTION_WEST?-1:1,0<=C&&C<=m.length-1&&k.setSelectionCell(m[C].cell)))))}var g=this,k=g.editor.graph,v=k.getModel(),t=g.menus.createPopupMenu;g.menus.createPopupMenu=function(C,M,T){t.apply(this,arguments);
@@ -14547,37 +14551,37 @@ if(1==k.getSelectionCount()){M=k.getSelectionCell();var m=k.getOutgoingTreeEdges
1==k.getSelectionCount()){var M=k.getSelectionCell();C=mxEvent.isControlDown(C)?null:k.getOutgoingTreeEdges(M);if(null!=C&&0<C.length){M=[];for(var T=0;T<C.length;T++)M.push(k.model.getTerminal(C[T],!1));k.setSelectionCells(M)}else k.setSelectionCells(k.model.getChildren(M))}},null,null,"Alt+Shift+C");g.actions.addAction("selectDescendants",function(C){var M=k.getSelectionCell();if(k.isEnabled()&&null!=M){var T=[];mxEvent.isControlDown(C)||k.traverse(M,!0,function(m,z){var I=null!=z&&k.isTreeEdge(z);
I&&mxEvent.isControlDown(C)&&T.push(z);(null==z||I)&&T.push(m);return null==z||I});if(0==T.length||1==T.length&&T[0]==M)T=k.model.getDescendants(M);k.setSelectionCells(T)}},null,null,"Alt+Shift+X");g.actions.addAction("selectParent",function(C){var M=k.getSelectionCell();k.isEnabled()&&null!=M&&(C=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M),null!=C&&0<C.length?k.setSelectionCell(k.model.getTerminal(C[0],!0)):k.selectParentCell())},null,null,"Alt+Shift+P");g.actions.addAction("selectSiblings",
function(C){if(k.isEnabled()&&1==k.getSelectionCount()){var M=k.getSelectionCell(),T=mxEvent.isControlDown(C)?null:k.getIncomingTreeEdges(M);C=[];if(null!=T&&0<T.length&&(T=k.getOutgoingTreeEdges(k.model.getTerminal(T[0],!0)),null!=T))for(var m=0;m<T.length;m++)C.push(k.model.getTerminal(T[m],!1));0==C.length&&(C=k.model.getChildren(k.model.getParent(M)));k.setSelectionCells(C)}},null,null,"Alt+Shift+S");var x=k.removeCells;k.removeCells=function(C,M){M=null!=M?M:!0;null==C&&(C=this.getDeletableCells(this.getSelectionCells()));
-M&&(C=this.getDeletableCells(this.addAllEdges(C)));for(var T=[],m=0;m<C.length;m++){var z=C[m];v.isEdge(z)&&n(z)&&(T.push(z),z=v.getTerminal(z,!1));if(c(z)){var I=[];k.traverse(z,!0,function(L,N){var O=null!=N&&k.isTreeEdge(N);O&&I.push(N);(null==N||O)&&I.push(L);return null==N||O});0<I.length&&(T=T.concat(I),z=k.getIncomingTreeEdges(C[m]),C=C.concat(z))}else null!=z&&T.push(C[m])}C=T;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(C,M,T){return c(C.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,
-T))};var A=k.duplicateCells;k.duplicateCells=function(C,M){C=null!=C?C:this.getSelectionCells();for(var T=C.slice(0),m=0;m<T.length;m++){var z=k.view.getState(T[m]);if(null!=z&&c(z.cell)){var I=k.getIncomingTreeEdges(z.cell);for(z=0;z<I.length;z++)mxUtils.remove(I[z],C)}}this.model.beginUpdate();try{var L=A.call(this,C,M);if(L.length==C.length)for(m=0;m<C.length;m++)if(c(C[m])){var N=k.getIncomingTreeEdges(L[m]);I=k.getIncomingTreeEdges(C[m]);if(0==N.length&&0<I.length){var O=this.cloneCell(I[0]);
-this.addEdge(O,k.getDefaultParent(),this.model.getTerminal(I[0],!0),L[m])}}}finally{this.model.endUpdate()}return L};var J=k.moveCells;k.moveCells=function(C,M,T,m,z,I,L){for(var N=null,O=[],S=0;S<C.length;S++)(l(C[S])||c(C[S]))&&!p(C[S])&&this.isCellCollapsed(C[S])?O=O.concat(this.getSubtree(C[S])):O.push(C[S]);C=mxUtils.removeDuplicates(O);this.model.beginUpdate();try{O=z;var U=this.getCurrentCellStyle(z);if(null!=C&&c(z)&&"1"==mxUtils.getValue(U,"treeFolding","0")){for(S=0;S<C.length;S++)if(c(C[S])||
-k.model.isEdge(C[S])&&null==k.model.getTerminal(C[S],!0)){z=k.model.getParent(C[S]);break}if(null!=O&&z!=O&&null!=this.view.getState(C[0])){var W=k.getIncomingTreeEdges(C[0]);if(0<W.length){var X=k.view.getState(k.model.getTerminal(W[0],!0));if(null!=X){var Z=k.view.getState(O);null!=Z&&(M=(Z.getCenterX()-X.getCenterX())/k.view.scale,T=(Z.getCenterY()-X.getCenterY())/k.view.scale)}}}}N=J.apply(this,arguments);if(null!=N&&null!=C&&N.length==C.length)for(S=0;S<N.length;S++)if(this.model.isEdge(N[S]))c(O)&&
-0>mxUtils.indexOf(N,this.model.getTerminal(N[S],!0))&&this.model.setTerminal(N[S],O,!0);else if(c(C[S])&&(W=k.getIncomingTreeEdges(C[S]),0<W.length))if(!m)c(O)&&0>mxUtils.indexOf(C,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],O,!0);else if(0==k.getIncomingTreeEdges(N[S]).length){U=O;if(null==U||U==k.model.getParent(C[S]))U=k.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,k.getDefaultParent(),U,N[S])}}finally{this.model.endUpdate()}return N};if(null!=g.sidebar){var D=
-g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=function(C,M,T,m){var z=k.model,I=null;z.beginUpdate();try{if(I=D.apply(this,arguments),c(C))for(var L=0;L<I.length;L++)if(z.isEdge(I[L])&&null==z.getTerminal(I[L],!0)){z.setTerminal(I[L],C,!0);var N=k.getCellGeometry(I[L]);N.points=null;null!=N.getTerminalPoint(!0)&&N.setTerminalPoint(null,!0)}}finally{z.endUpdate()}return I}}var E={67:g.actions.get("selectChildren"),88:g.actions.get("selectDescendants"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},
-R={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},V=g.onKeyDown;g.onKeyDown=function(C){try{var M=k.getSelectionCell();if(k.isEnabled()&&!k.isEditing()&&null!=M){var T=mxEvent.isAltDown(C)&&mxEvent.isShiftDown(C)?E[C.keyCode]:mxEvent.isAltDown(C)?R[C.keyCode]:null;null!=T?(T.funct(C),mxEvent.consume(C)):c(M)&&(T=null,0<k.getIncomingTreeEdges(M).length&&(9==C.which?T=mxEvent.isShiftDown(C)?H(M):F(M):13==C.which&&(T=G(M,!mxEvent.isShiftDown(C)))),null!=T&&0<T.length?(1==T.length&&k.model.isEdge(T[0])?
+M&&(C=this.getDeletableCells(this.addAllEdges(C)));for(var T=[],m=0;m<C.length;m++){var z=C[m];v.isEdge(z)&&n(z)&&(T.push(z),z=v.getTerminal(z,!1));if(c(z)){var I=[];k.traverse(z,!0,function(L,N){var P=null!=N&&k.isTreeEdge(N);P&&I.push(N);(null==N||P)&&I.push(L);return null==N||P});0<I.length&&(T=T.concat(I),z=k.getIncomingTreeEdges(C[m]),C=C.concat(z))}else null!=z&&T.push(C[m])}C=T;return x.apply(this,arguments)};g.hoverIcons.getStateAt=function(C,M,T){return c(C.cell)?null:this.graph.view.getState(this.graph.getCellAt(M,
+T))};var A=k.duplicateCells;k.duplicateCells=function(C,M){C=null!=C?C:this.getSelectionCells();for(var T=C.slice(0),m=0;m<T.length;m++){var z=k.view.getState(T[m]);if(null!=z&&c(z.cell)){var I=k.getIncomingTreeEdges(z.cell);for(z=0;z<I.length;z++)mxUtils.remove(I[z],C)}}this.model.beginUpdate();try{var L=A.call(this,C,M);if(L.length==C.length)for(m=0;m<C.length;m++)if(c(C[m])){var N=k.getIncomingTreeEdges(L[m]);I=k.getIncomingTreeEdges(C[m]);if(0==N.length&&0<I.length){var P=this.cloneCell(I[0]);
+this.addEdge(P,k.getDefaultParent(),this.model.getTerminal(I[0],!0),L[m])}}}finally{this.model.endUpdate()}return L};var J=k.moveCells;k.moveCells=function(C,M,T,m,z,I,L){for(var N=null,P=[],S=0;S<C.length;S++)(l(C[S])||c(C[S]))&&!p(C[S])&&this.isCellCollapsed(C[S])?P=P.concat(this.getSubtree(C[S])):P.push(C[S]);C=mxUtils.removeDuplicates(P);this.model.beginUpdate();try{P=z;var U=this.getCurrentCellStyle(z);if(null!=C&&c(z)&&"1"==mxUtils.getValue(U,"treeFolding","0")){for(S=0;S<C.length;S++)if(c(C[S])||
+k.model.isEdge(C[S])&&null==k.model.getTerminal(C[S],!0)){z=k.model.getParent(C[S]);break}if(null!=P&&z!=P&&null!=this.view.getState(C[0])){var W=k.getIncomingTreeEdges(C[0]);if(0<W.length){var X=k.view.getState(k.model.getTerminal(W[0],!0));if(null!=X){var Z=k.view.getState(P);null!=Z&&(M=(Z.getCenterX()-X.getCenterX())/k.view.scale,T=(Z.getCenterY()-X.getCenterY())/k.view.scale)}}}}N=J.apply(this,arguments);if(null!=N&&null!=C&&N.length==C.length)for(S=0;S<N.length;S++)if(this.model.isEdge(N[S]))c(P)&&
+0>mxUtils.indexOf(N,this.model.getTerminal(N[S],!0))&&this.model.setTerminal(N[S],P,!0);else if(c(C[S])&&(W=k.getIncomingTreeEdges(C[S]),0<W.length))if(!m)c(P)&&0>mxUtils.indexOf(C,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],P,!0);else if(0==k.getIncomingTreeEdges(N[S]).length){U=P;if(null==U||U==k.model.getParent(C[S]))U=k.model.getTerminal(W[0],!0);m=this.cloneCell(W[0]);this.addEdge(m,k.getDefaultParent(),U,N[S])}}finally{this.model.endUpdate()}return N};if(null!=g.sidebar){var D=
+g.sidebar.dropAndConnect;g.sidebar.dropAndConnect=function(C,M,T,m){var z=k.model,I=null;z.beginUpdate();try{if(I=D.apply(this,arguments),c(C))for(var L=0;L<I.length;L++)if(z.isEdge(I[L])&&null==z.getTerminal(I[L],!0)){z.setTerminal(I[L],C,!0);var N=k.getCellGeometry(I[L]);N.points=null;null!=N.getTerminalPoint(!0)&&N.setTerminalPoint(null,!0)}}finally{z.endUpdate()}return I}}var G={67:g.actions.get("selectChildren"),88:g.actions.get("selectDescendants"),80:g.actions.get("selectParent"),83:g.actions.get("selectSiblings")},
+R={67:g.actions.get("copyStyle"),86:g.actions.get("pasteStyle")},V=g.onKeyDown;g.onKeyDown=function(C){try{var M=k.getSelectionCell();if(k.isEnabled()&&!k.isEditing()&&null!=M){var T=mxEvent.isAltDown(C)&&mxEvent.isShiftDown(C)?G[C.keyCode]:mxEvent.isAltDown(C)?R[C.keyCode]:null;null!=T?(T.funct(C),mxEvent.consume(C)):c(M)&&(T=null,0<k.getIncomingTreeEdges(M).length&&(9==C.which?T=mxEvent.isShiftDown(C)?H(M):E(M):13==C.which&&(T=F(M,!mxEvent.isShiftDown(C)))),null!=T&&0<T.length?(1==T.length&&k.model.isEdge(T[0])?
k.setSelectionCell(k.model.getTerminal(T[0],!1)):k.setSelectionCell(T[T.length-1]),null!=g.hoverIcons&&g.hoverIcons.update(k.view.getState(M)),k.startEditingAtCell(M),mxEvent.consume(C)):37==C.keyCode?(d(M,mxConstants.DIRECTION_WEST),mxEvent.consume(C)):38==C.keyCode?(d(M,mxConstants.DIRECTION_NORTH),mxEvent.consume(C)):39==C.keyCode?(d(M,mxConstants.DIRECTION_EAST),mxEvent.consume(C)):40==C.keyCode&&(d(M,mxConstants.DIRECTION_SOUTH),mxEvent.consume(C)))}}catch(m){g.handleError(m)}mxEvent.isConsumed(C)||
-V.apply(this,arguments)};var Q=k.connectVertex;k.connectVertex=function(C,M,T,m,z,I,L){var N=k.getIncomingTreeEdges(C);if(c(C)){var O=u(C),S=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST,U=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return O==M||0==N.length?F(C,M):S==U?H(C):G(C,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return Q.apply(this,arguments)};k.getSubtree=function(C){var M=[C];!l(C)&&!c(C)||p(C)||k.traverse(C,!0,function(T,m){var z=null!=
-m&&k.isTreeEdge(m);z&&0>mxUtils.indexOf(M,m)&&M.push(m);(null==m||z)&&0>mxUtils.indexOf(M,T)&&M.push(T);return null==m||z});return M};var P=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){P.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+V.apply(this,arguments)};var Q=k.connectVertex;k.connectVertex=function(C,M,T,m,z,I,L){var N=k.getIncomingTreeEdges(C);if(c(C)){var P=u(C),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,U=M==mxConstants.DIRECTION_EAST||M==mxConstants.DIRECTION_WEST;return P==M||0==N.length?E(C,M):S==U?H(C):F(C,M!=mxConstants.DIRECTION_NORTH&&M!=mxConstants.DIRECTION_WEST)}return Q.apply(this,arguments)};k.getSubtree=function(C){var M=[C];!l(C)&&!c(C)||p(C)||k.traverse(C,!0,function(T,m){var z=null!=
+m&&k.isTreeEdge(m);z&&0>mxUtils.indexOf(M,m)&&M.push(m);(null==m||z)&&0>mxUtils.indexOf(M,T)&&M.push(T);return null==m||z});return M};var O=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){O.apply(this,arguments);(l(this.state.cell)||c(this.state.cell))&&!p(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(C){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(C),mxEvent.getClientY(C),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=
mxEvent.isMouseEvent(C);this.graph.isMouseDown=!0;g.hoverIcons.reset();mxEvent.consume(C)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var q=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){q.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:
0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var y=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(C){y.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=C?"":"none")};var B=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(C,M){B.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=
null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),l=this.graph,n=this;return c.concat([this.addEntry("tree container",function(){var p=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var u=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-u.vertex=!0;var G=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);G.insertEdge(H,!1);p.insert(H);p.insert(u);p.insert(G);
+u.vertex=!0;var F=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);F.insertEdge(H,!1);p.insert(H);p.insert(u);p.insert(F);
return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var p=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");p.vertex=!0;var u=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-u.vertex=!0;var G=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
-H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);G.insertEdge(H,!1);var F=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-F.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),H.style);K.geometry.relative=!0;K.edge=!0;u.insertEdge(K,!0);F.insertEdge(K,!1);var d=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+u.vertex=!0;var F=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
+H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);F.insertEdge(H,!1);var E=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+E.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),H.style);K.geometry.relative=!0;K.edge=!0;u.insertEdge(K,!0);E.insertEdge(K,!1);var d=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),H.style);g.geometry.relative=!0;g.edge=!0;u.insertEdge(g,!0);d.insertEdge(g,!1);var k=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-k.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),H.style);v.geometry.relative=!0;v.edge=!0;u.insertEdge(v,!0);k.insertEdge(v,!1);p.insert(H);p.insert(K);p.insert(g);p.insert(v);p.insert(u);p.insert(G);p.insert(F);p.insert(d);p.insert(k);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+k.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),H.style);v.geometry.relative=!0;v.edge=!0;u.insertEdge(v,!0);k.insertEdge(v,!1);p.insert(H);p.insert(K);p.insert(g);p.insert(v);p.insert(u);p.insert(F);p.insert(E);p.insert(d);p.insert(k);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var p=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
p.vertex=!0;return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var p=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var p=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
u.geometry.setTerminalPoint(new mxPoint(-40,40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree orgchart organization division",function(){var p=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var u=new mxCell("Organization",new mxGeometry(80,
-40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;var G=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);G.insertEdge(H,!1);var F=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");K.geometry.relative=
-!0;K.edge=!0;u.insertEdge(K,!0);F.insertEdge(K,!1);p.insert(H);p.insert(K);p.insert(u);p.insert(G);p.insert(F);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(p,"treeRoot","1");p.vertex=!0;return n.createVertexTemplateFromCells([p],
+40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(u,"treeRoot","1");u.vertex=!0;var F=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
+H.geometry.relative=!0;H.edge=!0;u.insertEdge(H,!0);F.insertEdge(H,!1);var E=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");K.geometry.relative=
+!0;K.edge=!0;u.insertEdge(K,!0);E.insertEdge(K,!1);p.insert(H);p.insert(K);p.insert(u);p.insert(F);p.insert(E);return n.createVertexTemplateFromCells([p],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree root",function(){var p=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');l.setAttributeForCell(p,"treeRoot","1");p.vertex=!0;return n.createVertexTemplateFromCells([p],
p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree division",function(){var p=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
u.geometry.setTerminalPoint(new mxPoint(0,0),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);return n.createVertexTemplateFromCells([p,u],p.geometry.width,p.geometry.height,p.value)}),this.addEntry("tree sub sections",function(){var p=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
-u.geometry.setTerminalPoint(new mxPoint(110,-40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);var G=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");G.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),u.style);H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;G.insertEdge(H,!1);return n.createVertexTemplateFromCells([u,H,p,G],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
+u.geometry.setTerminalPoint(new mxPoint(110,-40),!0);u.geometry.relative=!0;u.edge=!0;p.insertEdge(u,!1);var F=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");F.vertex=!0;var H=new mxCell("",new mxGeometry(0,0,0,0),u.style);H.geometry.setTerminalPoint(new mxPoint(110,-40),!0);H.geometry.relative=!0;H.edge=!0;F.insertEdge(H,!1);return n.createVertexTemplateFromCells([u,H,p,F],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(d,g){if(EditorUi.windowed){var k=d.editor.graph;k.popupMenuHandler.hideMenu();null==d.formatWindow?(g=Math.max(10,d.diagramContainer.clientWidth-248),k=Math.min(566,k.container.clientHeight-10),d.formatWindow=new WrapperWindow(d,mxResources.get("format"),g,60,240,k,function(v){d.createFormat(v).init()}),d.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){d.formatWindow.window.fit()})),d.formatWindow.window.minimumSize=new mxRectangle(0,
0,240,80)):d.formatWindow.window.setVisible(null!=g?g:!d.formatWindow.window.isVisible())}else null==d.formatElt&&(d.formatElt=d.createSidebarContainer(),d.createFormat(d.formatElt).init(),d.formatElt.style.border="none",d.formatElt.style.width="240px",d.formatElt.style.borderLeftWidth="1px",d.formatElt.style.borderLeftStyle="solid",d.formatElt.style.right="0px"),k=d.diagramContainer.parentNode,null!=d.formatElt.parentNode?(d.formatElt.parentNode.removeChild(d.formatElt),k.style.right="0px"):(k.parentNode.appendChild(d.formatElt),
k.style.right=d.formatElt.style.width)}function e(d,g){function k(x,A){var J=d.menus.get(x);x=v.addMenu(A,mxUtils.bind(this,function(){J.funct.apply(this,arguments)}));x.setAttribute("title",A);x.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";x.className="geTitle";g.appendChild(x);return x}var v=new Menubar(d,g);if(Editor.enableCustomLibraries&&
@@ -14589,87 +14593,87 @@ k.style.left="0px"):(k.parentNode.appendChild(d.sidebarElt),k.style.left=d.sideb
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur=
"1.2";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight=46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert=!mxClient.IS_IOS&&!mxClient.IS_ANDROID;Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var l=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(d){l.apply(this,arguments);
null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramContainer.style.bottom=this.tabContainerHeight+"px")};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var p=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(d,g){null!=g.shortcut&&900>c&&!mxClient.IS_IOS?d.firstChild.nextSibling.setAttribute("title",g.shortcut):
-p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(d){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=d?d:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();u.apply(this,arguments)};var G=EditorUi.prototype.setGraphEnabled;
-EditorUi.prototype.setGraphEnabled=function(d){G.apply(this,arguments);if(d){var g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=g&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=g&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};
+p.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(d){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=d?d:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var u=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();u.apply(this,arguments)};var F=EditorUi.prototype.setGraphEnabled;
+EditorUi.prototype.setGraphEnabled=function(d){F.apply(this,arguments);if(d){var g=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=g&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=g&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};
var H=Menus.prototype.init;Menus.prototype.init=function(){H.apply(this,arguments);var d=this.editorUi;EditorUi.enablePlantUml&&!d.isOffline()&&d.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var v=new ParseDialog(d,mxResources.get("plantUml")+"...","plantUml");d.showDialog(v.container,620,420,!0,!1);v.init()}));d.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var v=new ParseDialog(d,mxResources.get("mermaid")+"...","mermaid");d.showDialog(v.container,
620,420,!0,!1);v.init()}));var g="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),k=function(v,t,x,A){v.addItem(x,null,mxUtils.bind(this,function(){var J=new CreateGraphDialog(d,x,A);d.showDialog(J.container,620,420,!0,!1);J.init()}),t)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(v,t){for(var x=0;x<g.length;x++)"-"==g[x]?v.addSeparator(t):k(v,t,mxResources.get(g[x])+"...",g[x])})))};EditorUi.prototype.installFormatToolbar=function(d){var g=
-this.editor.graph,k=document.createElement("div");k.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";g.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,t){0<g.getSelectionCount()?(d.appendChild(k),k.innerHTML="Selected: "+g.getSelectionCount()):null!=k.parentNode&&k.parentNode.removeChild(k)}))};var F=!1;EditorUi.prototype.initFormatWindow=
-function(){if(!F&&null!=this.formatWindow){F=!0;var d=this.formatWindow.window.toggleMinimized,g=240;this.formatWindow.window.toggleMinimized=function(){d.apply(this,arguments);this.minimized?(g=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+g-140+"px"):(this.div.style.width=g+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-g+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(k){mxEvent.getSource(k)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(W,X,Z){var Y=A.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),E);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=
+this.editor.graph,k=document.createElement("div");k.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";g.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(v,t){0<g.getSelectionCount()?(d.appendChild(k),k.innerHTML="Selected: "+g.getSelectionCount()):null!=k.parentNode&&k.parentNode.removeChild(k)}))};var E=!1;EditorUi.prototype.initFormatWindow=
+function(){if(!E&&null!=this.formatWindow){E=!0;var d=this.formatWindow.window.toggleMinimized,g=240;this.formatWindow.window.toggleMinimized=function(){d.apply(this,arguments);this.minimized?(g=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+g-140+"px"):(this.div.style.width=g+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-g+140)+"px");this.fit()};
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(k){mxEvent.getSource(k)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var K=EditorUi.prototype.init;EditorUi.prototype.init=function(){function d(W,X,Z){var Y=A.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),G);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=
"border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(W));A.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function g(W,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=A.statusContainer?D.insertBefore(ca,A.statusContainer):D.appendChild(ca);null!=ea?(ca.style.backgroundImage=
"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?
(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),J.addListener("enabledChanged",W),W());return ca}function k(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&
-(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=A.statusContainer?D.insertBefore(Z,A.statusContainer):D.appendChild(Z);return Z}function v(){for(var W=D.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}E=D.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>c;var Z=null;W||(Z=d("diagram"));X=W?d("diagram",null,
-Editor.menuImage):null;null!=X&&(Z=X);k([Z,g(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),W?Editor.shapesImage:null),g(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=d("insert",!0,W?P:null);k([X,g(mxResources.get("delete"),A.actions.get("delete").funct,null,mxResources.get("delete"),
-A.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);J.isEnabled()||X.classList.add("mxDisabled");411<=c&&(k([L,N],60),520<=c&&k([O,640<=c?g("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?g("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}K.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),
+(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=A.statusContainer?D.insertBefore(Z,A.statusContainer):D.appendChild(Z);return Z}function v(){for(var W=D.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}G=D.firstChild;c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>c;var Z=null;W||(Z=d("diagram"));X=W?d("diagram",null,
+Editor.menuImage):null;null!=X&&(Z=X);k([Z,g(mxResources.get("shapes"),A.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),A.actions.get("image"),W?Editor.shapesImage:null),g(mxResources.get("format"),A.actions.get("format").funct,null,mxResources.get("format")+" ("+A.actions.get("format").shortcut+")",A.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=d("insert",!0,W?O:null);k([X,g(mxResources.get("delete"),A.actions.get("delete").funct,null,mxResources.get("delete"),
+A.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);J.isEnabled()||X.classList.add("mxDisabled");411<=c&&(k([L,N],60),520<=c&&k([P,640<=c?g("",M.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",M,Editor.zoomInImage):null,640<=c?g("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}K.apply(this,arguments);var t=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=t&&(t.classList.add("geSimple"),
t.classList.add("geMinimal"));t=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var x=document.createElement("div");x.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";x.style.bottom=t?"32px":"0px";this.sidebar=this.createSidebar(x);if(1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
-this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=c&&(b(this,!0),this.formatWindow.window.setVisible(!0));var A=this,J=A.editor.graph;A.toolbar=this.createToolbar(A.createDiv("geToolbar"));A.defaultLibraryName=mxResources.get("untitledLibrary");var D=document.createElement("div");D.className="geMenubarContainer";var E=null,R=new Menubar(A,D);A.statusContainer=A.createStatusContainer();A.statusContainer.style.position="relative";A.statusContainer.style.maxWidth="";A.statusContainer.style.cursor=
+this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=c&&(b(this,!0),this.formatWindow.window.setVisible(!0));var A=this,J=A.editor.graph;A.toolbar=this.createToolbar(A.createDiv("geToolbar"));A.defaultLibraryName=mxResources.get("untitledLibrary");var D=document.createElement("div");D.className="geMenubarContainer";var G=null,R=new Menubar(A,D);A.statusContainer=A.createStatusContainer();A.statusContainer.style.position="relative";A.statusContainer.style.maxWidth="";A.statusContainer.style.cursor=
"default";var V=A.hideCurrentMenu;A.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var Q=A.descriptorChanged;A.descriptorChanged=function(){Q.apply(this,arguments);var W=A.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);D.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else D.removeAttribute("title")};
A.setStatusText(A.editor.getStatus());D.appendChild(A.statusContainer);A.buttonContainer=document.createElement("div");A.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";D.appendChild(A.buttonContainer);A.menubarContainer=A.buttonContainer;A.tabContainer=document.createElement("div");A.tabContainer.className="geTabContainer geTabItem";A.tabContainer.style.cssText=
-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=A.diagramContainer.parentNode;x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var P=Editor.addBoxImage;if(null!=A.hoverIcons){var q=A.hoverIcons.update;A.hoverIcons.update=function(){J.freehand.isDrawing()||q.apply(this,arguments)}}if(null!=J.freehand){var y=J.freehand.createStyle;J.freehand.createStyle=
+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";t=A.diagramContainer.parentNode;x=document.createElement("div");x.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";A.diagramContainer.style.top="47px";var O=Editor.addBoxImage;if(null!=A.hoverIcons){var q=A.hoverIcons.update;A.hoverIcons.update=function(){J.freehand.isDrawing()||q.apply(this,arguments)}}if(null!=J.freehand){var y=J.freehand.createStyle;J.freehand.createStyle=
function(W){return y.apply(this,arguments)+"sketch=0;"}}A.editor.addListener("statusChanged",mxUtils.bind(this,function(){A.setStatusText(A.editor.getStatus())}));A.setStatusText(A.editor.getStatus());var B=A.menus.get("viewZoom");if(null!=B){var C=function(W){if(mxEvent.isAltDown(W))A.hideCurrentMenu(),A.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))A.hideCurrentMenu(),A.actions.get("smartFit").funct(),mxEvent.consume(W)},
-M=A.actions.get("zoomIn"),T=A.actions.get("zoomOut"),m=A.actions.get("resetView"),z=A.actions.get("undo"),I=A.actions.get("redo"),L=g("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,Editor.undoImage),N=g("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),O=g("",C,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,Editor.zoomFitImage);D.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
+M=A.actions.get("zoomIn"),T=A.actions.get("zoomOut"),m=A.actions.get("resetView"),z=A.actions.get("undo"),I=A.actions.get("redo"),L=g("",z.funct,null,mxResources.get("undo")+" ("+z.shortcut+")",z,Editor.undoImage),N=g("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),P=g("",C,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",m,Editor.zoomFitImage);D.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
this.tabContainer.style.right="70px";var S=R.addMenu("100%",B.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=A.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom=
"0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";x.appendChild(S);(function(W){mxEvent.addListener(W,"click",C);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*A.editor.graph.view.scale*(null!=ba?ba:1))+"%")});A.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);A.editor.addListener("resetGraphView",
X);A.editor.addListener("pageSelected",X);A.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var U=A.setGraphEnabled;A.setGraphEnabled=function(){U.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}x.appendChild(D);x.appendChild(A.diagramContainer);
t.appendChild(x);A.updateTabContainer();!EditorUi.windowed&&1E3<=c&&b(this,!0);x.appendChild(A.tabContainer);v();A.addListener("lockedChanged",v);mxEvent.addListener(window,"resize",function(){v();null!=A.sidebarWindow&&A.sidebarWindow.window.fit();null!=A.formatWindow&&A.formatWindow.window.fit();null!=A.actions.outlineWindow&&A.actions.outlineWindow.window.fit();null!=A.actions.layersWindow&&A.actions.layersWindow.window.fit();null!=A.menus.chatWindow&&A.menus.chatWindow.window.fit();null!=A.menus.tagsWindow&&
-A.menus.tagsWindow.window.fit();null!=A.menus.findWindow&&A.menus.findWindow.window.fit();null!=A.menus.findReplaceWindow&&A.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,n,p){var u=l.y,G=l.x,H=!1,F=!1;if(null!=this.states&&null!=c&&null!=l){var K=this,d=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);d.x=c.x+G;d.y=c.y+u;d.width=c.width;d.height=c.height;for(var v=[],t=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(p||!this.graph.isCellSelected(A.cell))&&((d.x>=A.x&&d.x<=A.x+A.width||A.x>=d.x&&A.x<=d.x+d.width)&&(d.y>
-A.y+A.height+4||d.y+d.height+4<A.y)?v.push(A):(d.y>=A.y&&d.y<=A.y+A.height||A.y>=d.y&&A.y<=d.y+d.height)&&(d.x>A.x+A.width+4||d.x+d.width+4<A.x)&&t.push(A))}var J=0,D=0,E=A=0,R=0,V=0,Q=0,P=0,q=5*g;if(1<v.length){v.push(d);v.sort(function(M,T){return M.y-T.y});var y=!1;x=d==v[0];g=d==v[v.length-1];if(!x&&!g)for(x=1;x<v.length-1;x++)if(d==v[x]){g=v[x-1];x=v[x+1];A=D=E=(x.y-g.y-g.height-d.height)/2;break}for(x=0;x<v.length-1;x++){g=v[x];var B=v[x+1],C=d==g||d==B;B=B.y-g.y-g.height;y|=d==g;if(0==D&&0==
-J)D=B,J=1;else if(Math.abs(D-B)<=(C||1==x&&y?k:0))J+=1;else if(1<J&&y){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!y)J=0,A=D=0!=E?E:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||C||(D=A=B)}3==v.length&&v[1]==d&&(A=0)}if(1<t.length){t.push(d);t.sort(function(M,T){return M.x-T.x});y=!1;x=d==t[0];g=d==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(d==t[x]){g=t[x-1];x=t[x+1];Q=V=P=(x.x-g.x-g.width-d.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];B=t[x+1];C=d==g||d==B;B=B.x-g.x-g.width;y|=d==g;
-if(0==V&&0==R)V=B,R=1;else if(Math.abs(V-B)<=(C||1==x&&y?k:0))R+=1;else if(1<R&&y){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!y)R=0,Q=V=0!=P?P:0,t.splice(0,0==x?1:x),x=-1;else break;0!=Q||C||(V=Q=B)}3==t.length&&t[1]==d&&(Q=0)}k=function(M,T,m,z){var I=[];if(z){z=q;var L=0}else z=0,L=q;I.push(new mxPoint(M.x-z,M.y-L));I.push(new mxPoint(M.x+z,M.y+L));I.push(M);I.push(T);I.push(new mxPoint(T.x-z,T.y-L));I.push(new mxPoint(T.x+z,T.y+L));if(null!=m)return m.points=I,m;M=new mxPolyline(I,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(K.graph.getView().getOverlayPane());return M};V=function(M,T){if(M&&null!=K.guidesArrHor)for(M=0;M<K.guidesArrHor.length;M++)K.guidesArrHor[M].node.style.visibility="hidden";if(T&&null!=K.guidesArrVer)for(M=0;M<K.guidesArrVer.length;M++)K.guidesArrVer[M].node.style.visibility="hidden"};if(1<R&&R==t.length-1){R=[];P=K.guidesArrHor;H=[];G=0;x=t[0]==d?1:0;y=t[x].y+t[x].height;if(0<Q)for(x=0;x<t.length-1;x++)g=
-t[x],B=t[x+1],d==g?(G=B.x-g.width-Q,H.push(new mxPoint(G+g.width+q,y)),H.push(new mxPoint(B.x-q,y))):d==B?(H.push(new mxPoint(g.x+g.width+q,y)),G=g.x+g.width+Q,H.push(new mxPoint(G-q,y))):(H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(B.x-q,y)));else g=t[0],x=t[2],G=g.x+g.width+(x.x-g.x-g.width-d.width)/2,H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(G-q,y)),H.push(new mxPoint(G+d.width+q,y)),H.push(new mxPoint(x.x-q,y));for(x=0;x<H.length;x+=2)t=H[x],Q=H[x+1],t=k(t,Q,null!=P?
-P[x/2]:null),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=H.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrHor=R;G-=c.x;H=!0}else V(!0);if(1<J&&J==v.length-1){R=[];P=K.guidesArrVer;F=[];u=0;x=v[0]==d?1:0;J=v[x].x+v[x].width;if(0<A)for(x=0;x<v.length-1;x++)g=v[x],B=v[x+1],d==g?(u=B.y-g.height-A,F.push(new mxPoint(J,u+g.height+q)),F.push(new mxPoint(J,B.y-q))):d==B?(F.push(new mxPoint(J,g.y+g.height+q)),u=g.y+g.height+A,F.push(new mxPoint(J,u-q))):(F.push(new mxPoint(J,g.y+
-g.height+q)),F.push(new mxPoint(J,B.y-q)));else g=v[0],x=v[2],u=g.y+g.height+(x.y-g.y-g.height-d.height)/2,F.push(new mxPoint(J,g.y+g.height+q)),F.push(new mxPoint(J,u-q)),F.push(new mxPoint(J,u+d.height+q)),F.push(new mxPoint(J,x.y-q));for(x=0;x<F.length;x+=2)t=F[x],Q=F[x+1],t=k(t,Q,null!=P?P[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=F.length/2;null!=P&&x<P.length;x++)P[x].destroy();K.guidesArrVer=R;u-=c.y;F=!0}else V(!1,!0)}if(H||F)return d=new mxPoint(G,u),v=b.call(this,
-c,d,n,p),H&&!F?d.y=v.y:F&&!H&&(d.x=v.x),v.y!=d.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=d.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),d;V(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,n=this.guidesArrHor;if(null!=l)for(var p=0;p<l.length;p++)l[p].node.style.visibility=c?"visible":"hidden";if(null!=
-n)for(p=0;p<n.length;p++)n[p].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=l){for(n=0;n<l.length;n++)l[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;K.style.top=J.offsetTop-G+"px";K.style.left=J.offsetLeft-G+"px";K.style.width=(f?0:J.offsetWidth)+G+"px";K.style.height=(f?J.offsetHeight:0)+G+"px"}function n(J,D,E){if(null!=p)return J;var R;return function(){var V=this,Q=arguments,P=E&&!R;clearTimeout(R);R=setTimeout(function(){R=null;E||J.apply(V,Q)},D);P&&J.apply(V,Q)}}var p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-u=window.cancelAnimationFrame||window.mozCancelAnimationFrame,G=this.RULER_THICKNESS,H=this;this.unit=e;var F=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},K=document.createElement("div");K.className="geRuler";K.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){F=
-Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};K.style[f?"borderRight":"borderBottom"]="0.5px solid "+F.strokeClr;K.style.borderLeft="0.5px solid "+F.strokeClr});this.updateStyle();b.diagramContainer.appendChild(K);mxEvent.disableContextMenu(K);this.editorUiRefresh=b.refresh;b.refresh=function(J){H.editorUiRefresh.apply(b,
-arguments);l()};l();var d=document.createElement("canvas");d.width=K.offsetWidth;d.height=K.offsetHeight;K.style.overflow="hidden";d.style.position="relative";K.appendChild(d);var g=d.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=K;this.canvas=d;var v=function(J,D,E,R,V){J=Math.round(J);D=Math.round(D);E=Math.round(E);R=Math.round(R);g.beginPath();g.moveTo(J+.5,D+.5);g.lineTo(E+.5,R+.5);g.stroke();V&&(f?(g.save(),g.translate(J,D),g.rotate(-Math.PI/2),g.fillText(V,0,0),
-g.restore()):g.fillText(V,J,D))},t=function(){g.clearRect(0,0,d.width,d.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=F.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var J=k.view.scale,D=k.view.getBackgroundPageBounds(),E=k.view.translate,R=k.pageVisible;E=R?G+(f?D.y-k.container.scrollTop:D.x-k.container.scrollLeft):G+(f?E.y*J-k.container.scrollTop:E.x*J-k.container.scrollLeft);var V=0;R&&(V=k.getPageLayout(),V=f?V.y*k.pageFormat.height:V.x*k.pageFormat.width);var Q;switch(H.unit){case mxConstants.POINTS:var P=
-Q=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;P=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;P=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:Q=.5>=J||4<=J?8:16,P=mxConstants.PIXELS_PER_INCH/Q,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=P;2<=J?y=P/(2*Math.floor(J/2)):.5>=J&&(y=P*Math.floor(1/J/2)*(H.unit==mxConstants.MILLIMETERS?2:1));P=null;D=R?Math.min(E+(f?D.height:D.width),f?
-d.height:d.width):f?d.height:d.width;if(R)if(g.fillStyle=F.outBkgClr,f){var B=E-G;0<B&&g.fillRect(0,G,G,B);D<d.height&&g.fillRect(0,D,G,d.height)}else B=E-G,0<B&&g.fillRect(G,0,B,G),D<d.width&&g.fillRect(D,0,d.width,G);g.fillStyle=F.fontClr;for(R=R?E:E%(y*J);R<=D;R+=y*J)if(B=Math.round((R-E)/J/y),!(R<G||B==P)){P=B;var C=null;0==B%Q&&(C=H.formatText(V+B*y)+"");f?v(G-q[Math.abs(B)%Q],R,G,R,C):v(R,G-q[Math.abs(B)%Q],R,G,C)}g.lineWidth=1;v(f?0:G,f?G:0,G,G);g.fillStyle=F.cornerClr;g.fillRect(0,0,G,G)},
-x=-1,A=function(){null!=p?(null!=u&&u(x),x=p(t)):t()};this.drawRuler=A;this.sizeListener=e=n(function(){var J=k.container;f?(J=J.offsetHeight+G,d.height!=J&&(d.height=J,K.style.height=J+"px",A())):(J=J.offsetWidth+G,d.width!=J&&(d.width=J,K.style.width=J+"px",A()))},10);this.pageListener=function(){A()};this.scrollListener=c=n(function(){var J=f?k.container.scrollTop:k.container.scrollLeft;H.lastScroll!=J&&(H.lastScroll=J,A())},10);this.unitListener=function(J,D){H.setUnit(D.getProperty("unit"))};
-k.addListener(mxEvent.SIZE,e);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){F=J;K.style.background=F.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,D,E,R){if(f&&4<J.height||!f&&4<J.width){if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,
-H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var V=H.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=F.guideClr;g.setLineDash([2]);if(f){var Q=J.y+V.y+G-this.graph.container.scrollTop;var P=0;var q=Q+J.height/2;var y=G/2;var B=Q+J.height;var C=0;var M=g.getImageData(P,Q-1,G,3);v(P,Q,G,Q);Q--;var T=g.getImageData(y,q-1,G,3);v(y,q,G,q);q--;var m=g.getImageData(C,
-B-1,G,3);v(C,B,G,B);B--}else Q=0,P=J.x+V.x+G-this.graph.container.scrollLeft,q=G/2,y=P+J.width/2,B=0,C=P+J.width,M=g.getImageData(P-1,Q,3,G),v(P,Q,P,G),P--,T=g.getImageData(y-1,q,3,G),v(y,q,y,G),y--,m=g.getImageData(C-1,B,3,G),v(C,B,C,G),C--;if(null==H.guidePart||H.guidePart.x1!=P||H.guidePart.y1!=Q)H.guidePart={imgData1:M,x1:P,y1:Q,imgData2:T,x2:y,y2:q,imgData3:m,x3:C,y3:B}}catch(z){}}else V=H.origGuideMove.apply(this,arguments);return V};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+A.menus.tagsWindow.window.fit();null!=A.menus.findWindow&&A.menus.findWindow.window.fit();null!=A.menus.findReplaceWindow&&A.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,l,n,p){var u=l.y,F=l.x,H=!1,E=!1;if(null!=this.states&&null!=c&&null!=l){var K=this,d=new mxCellState,g=this.graph.getView().scale,k=Math.max(2,this.getGuideTolerance()/2);d.x=c.x+F;d.y=c.y+u;d.width=c.width;d.height=c.height;for(var v=[],t=[],x=0;x<this.states.length;x++){var A=this.states[x];A instanceof mxCellState&&(p||!this.graph.isCellSelected(A.cell))&&((d.x>=A.x&&d.x<=A.x+A.width||A.x>=d.x&&A.x<=d.x+d.width)&&(d.y>
+A.y+A.height+4||d.y+d.height+4<A.y)?v.push(A):(d.y>=A.y&&d.y<=A.y+A.height||A.y>=d.y&&A.y<=d.y+d.height)&&(d.x>A.x+A.width+4||d.x+d.width+4<A.x)&&t.push(A))}var J=0,D=0,G=A=0,R=0,V=0,Q=0,O=0,q=5*g;if(1<v.length){v.push(d);v.sort(function(M,T){return M.y-T.y});var y=!1;x=d==v[0];g=d==v[v.length-1];if(!x&&!g)for(x=1;x<v.length-1;x++)if(d==v[x]){g=v[x-1];x=v[x+1];A=D=G=(x.y-g.y-g.height-d.height)/2;break}for(x=0;x<v.length-1;x++){g=v[x];var B=v[x+1],C=d==g||d==B;B=B.y-g.y-g.height;y|=d==g;if(0==D&&0==
+J)D=B,J=1;else if(Math.abs(D-B)<=(C||1==x&&y?k:0))J+=1;else if(1<J&&y){v=v.slice(0,x+1);break}else if(3<=v.length-x&&!y)J=0,A=D=0!=G?G:0,v.splice(0,0==x?1:x),x=-1;else break;0!=A||C||(D=A=B)}3==v.length&&v[1]==d&&(A=0)}if(1<t.length){t.push(d);t.sort(function(M,T){return M.x-T.x});y=!1;x=d==t[0];g=d==t[t.length-1];if(!x&&!g)for(x=1;x<t.length-1;x++)if(d==t[x]){g=t[x-1];x=t[x+1];Q=V=O=(x.x-g.x-g.width-d.width)/2;break}for(x=0;x<t.length-1;x++){g=t[x];B=t[x+1];C=d==g||d==B;B=B.x-g.x-g.width;y|=d==g;
+if(0==V&&0==R)V=B,R=1;else if(Math.abs(V-B)<=(C||1==x&&y?k:0))R+=1;else if(1<R&&y){t=t.slice(0,x+1);break}else if(3<=t.length-x&&!y)R=0,Q=V=0!=O?O:0,t.splice(0,0==x?1:x),x=-1;else break;0!=Q||C||(V=Q=B)}3==t.length&&t[1]==d&&(Q=0)}k=function(M,T,m,z){var I=[];if(z){z=q;var L=0}else z=0,L=q;I.push(new mxPoint(M.x-z,M.y-L));I.push(new mxPoint(M.x+z,M.y+L));I.push(M);I.push(T);I.push(new mxPoint(T.x-z,T.y-L));I.push(new mxPoint(T.x+z,T.y+L));if(null!=m)return m.points=I,m;M=new mxPolyline(I,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);M.dialect=mxConstants.DIALECT_SVG;M.pointerEvents=!1;M.init(K.graph.getView().getOverlayPane());return M};V=function(M,T){if(M&&null!=K.guidesArrHor)for(M=0;M<K.guidesArrHor.length;M++)K.guidesArrHor[M].node.style.visibility="hidden";if(T&&null!=K.guidesArrVer)for(M=0;M<K.guidesArrVer.length;M++)K.guidesArrVer[M].node.style.visibility="hidden"};if(1<R&&R==t.length-1){R=[];O=K.guidesArrHor;H=[];F=0;x=t[0]==d?1:0;y=t[x].y+t[x].height;if(0<Q)for(x=0;x<t.length-1;x++)g=
+t[x],B=t[x+1],d==g?(F=B.x-g.width-Q,H.push(new mxPoint(F+g.width+q,y)),H.push(new mxPoint(B.x-q,y))):d==B?(H.push(new mxPoint(g.x+g.width+q,y)),F=g.x+g.width+Q,H.push(new mxPoint(F-q,y))):(H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(B.x-q,y)));else g=t[0],x=t[2],F=g.x+g.width+(x.x-g.x-g.width-d.width)/2,H.push(new mxPoint(g.x+g.width+q,y)),H.push(new mxPoint(F-q,y)),H.push(new mxPoint(F+d.width+q,y)),H.push(new mxPoint(x.x-q,y));for(x=0;x<H.length;x+=2)t=H[x],Q=H[x+1],t=k(t,Q,null!=O?
+O[x/2]:null),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=H.length/2;null!=O&&x<O.length;x++)O[x].destroy();K.guidesArrHor=R;F-=c.x;H=!0}else V(!0);if(1<J&&J==v.length-1){R=[];O=K.guidesArrVer;E=[];u=0;x=v[0]==d?1:0;J=v[x].x+v[x].width;if(0<A)for(x=0;x<v.length-1;x++)g=v[x],B=v[x+1],d==g?(u=B.y-g.height-A,E.push(new mxPoint(J,u+g.height+q)),E.push(new mxPoint(J,B.y-q))):d==B?(E.push(new mxPoint(J,g.y+g.height+q)),u=g.y+g.height+A,E.push(new mxPoint(J,u-q))):(E.push(new mxPoint(J,g.y+
+g.height+q)),E.push(new mxPoint(J,B.y-q)));else g=v[0],x=v[2],u=g.y+g.height+(x.y-g.y-g.height-d.height)/2,E.push(new mxPoint(J,g.y+g.height+q)),E.push(new mxPoint(J,u-q)),E.push(new mxPoint(J,u+d.height+q)),E.push(new mxPoint(J,x.y-q));for(x=0;x<E.length;x+=2)t=E[x],Q=E[x+1],t=k(t,Q,null!=O?O[x/2]:null,!0),t.node.style.visibility="visible",t.redraw(),R.push(t);for(x=E.length/2;null!=O&&x<O.length;x++)O[x].destroy();K.guidesArrVer=R;u-=c.y;E=!0}else V(!1,!0)}if(H||E)return d=new mxPoint(F,u),v=b.call(this,
+c,d,n,p),H&&!E?d.y=v.y:E&&!H&&(d.x=v.x),v.y!=d.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),v.x!=d.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),d;V(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var l=this.guidesArrVer,n=this.guidesArrHor;if(null!=l)for(var p=0;p<l.length;p++)l[p].node.style.visibility=c?"visible":"hidden";if(null!=
+n)for(p=0;p<n.length;p++)n[p].node.style.visibility=c?"visible":"hidden"};var f=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){f.call(this);var c=this.guidesArrVer,l=this.guidesArrHor;if(null!=c){for(var n=0;n<c.length;n++)c[n].destroy();this.guidesArrVer=null}if(null!=l){for(n=0;n<l.length;n++)l[n].destroy();this.guidesArrHor=null}}})();function mxRuler(b,e,f,c){function l(){var J=b.diagramContainer;K.style.top=J.offsetTop-F+"px";K.style.left=J.offsetLeft-F+"px";K.style.width=(f?0:J.offsetWidth)+F+"px";K.style.height=(f?J.offsetHeight:0)+F+"px"}function n(J,D,G){if(null!=p)return J;var R;return function(){var V=this,Q=arguments,O=G&&!R;clearTimeout(R);R=setTimeout(function(){R=null;G||J.apply(V,Q)},D);O&&J.apply(V,Q)}}var p=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+u=window.cancelAnimationFrame||window.mozCancelAnimationFrame,F=this.RULER_THICKNESS,H=this;this.unit=e;var E=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},K=document.createElement("div");K.className="geRuler";K.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){E=
+Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};K.style[f?"borderRight":"borderBottom"]="0.5px solid "+E.strokeClr;K.style.borderLeft="0.5px solid "+E.strokeClr});this.updateStyle();b.diagramContainer.appendChild(K);mxEvent.disableContextMenu(K);this.editorUiRefresh=b.refresh;b.refresh=function(J){H.editorUiRefresh.apply(b,
+arguments);l()};l();var d=document.createElement("canvas");d.width=K.offsetWidth;d.height=K.offsetHeight;K.style.overflow="hidden";d.style.position="relative";K.appendChild(d);var g=d.getContext("2d");this.ui=b;var k=b.editor.graph;this.graph=k;this.container=K;this.canvas=d;var v=function(J,D,G,R,V){J=Math.round(J);D=Math.round(D);G=Math.round(G);R=Math.round(R);g.beginPath();g.moveTo(J+.5,D+.5);g.lineTo(G+.5,R+.5);g.stroke();V&&(f?(g.save(),g.translate(J,D),g.rotate(-Math.PI/2),g.fillText(V,0,0),
+g.restore()):g.fillText(V,J,D))},t=function(){g.clearRect(0,0,d.width,d.height);g.beginPath();g.lineWidth=.7;g.strokeStyle=E.strokeClr;g.setLineDash([]);g.font="9px Arial";g.textAlign="center";var J=k.view.scale,D=k.view.getBackgroundPageBounds(),G=k.view.translate,R=k.pageVisible;G=R?F+(f?D.y-k.container.scrollTop:D.x-k.container.scrollLeft):F+(f?G.y*J-k.container.scrollTop:G.x*J-k.container.scrollLeft);var V=0;R&&(V=k.getPageLayout(),V=f?V.y*k.pageFormat.height:V.x*k.pageFormat.width);var Q;switch(H.unit){case mxConstants.POINTS:var O=
+Q=10;var q=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:Q=10;O=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:Q=20;O=mxConstants.PIXELS_PER_MM;q=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:Q=.5>=J||4<=J?8:16,O=mxConstants.PIXELS_PER_INCH/Q,q=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var y=O;2<=J?y=O/(2*Math.floor(J/2)):.5>=J&&(y=O*Math.floor(1/J/2)*(H.unit==mxConstants.MILLIMETERS?2:1));O=null;D=R?Math.min(G+(f?D.height:D.width),f?
+d.height:d.width):f?d.height:d.width;if(R)if(g.fillStyle=E.outBkgClr,f){var B=G-F;0<B&&g.fillRect(0,F,F,B);D<d.height&&g.fillRect(0,D,F,d.height)}else B=G-F,0<B&&g.fillRect(F,0,B,F),D<d.width&&g.fillRect(D,0,d.width,F);g.fillStyle=E.fontClr;for(R=R?G:G%(y*J);R<=D;R+=y*J)if(B=Math.round((R-G)/J/y),!(R<F||B==O)){O=B;var C=null;0==B%Q&&(C=H.formatText(V+B*y)+"");f?v(F-q[Math.abs(B)%Q],R,F,R,C):v(R,F-q[Math.abs(B)%Q],R,F,C)}g.lineWidth=1;v(f?0:F,f?F:0,F,F);g.fillStyle=E.cornerClr;g.fillRect(0,0,F,F)},
+x=-1,A=function(){null!=p?(null!=u&&u(x),x=p(t)):t()};this.drawRuler=A;this.sizeListener=e=n(function(){var J=k.container;f?(J=J.offsetHeight+F,d.height!=J&&(d.height=J,K.style.height=J+"px",A())):(J=J.offsetWidth+F,d.width!=J&&(d.width=J,K.style.width=J+"px",A()))},10);this.pageListener=function(){A()};this.scrollListener=c=n(function(){var J=f?k.container.scrollTop:k.container.scrollLeft;H.lastScroll!=J&&(H.lastScroll=J,A())},10);this.unitListener=function(J,D){H.setUnit(D.getProperty("unit"))};
+k.addListener(mxEvent.SIZE,e);k.container.addEventListener("scroll",c);k.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(J){E=J;K.style.background=E.bkgClr;t()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(J,D,G,R){if(f&&4<J.height||!f&&4<J.width){if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,
+H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3)}catch(z){}var V=H.origGuideMove.apply(this,arguments);try{g.lineWidth=.5;g.strokeStyle=E.guideClr;g.setLineDash([2]);if(f){var Q=J.y+V.y+F-this.graph.container.scrollTop;var O=0;var q=Q+J.height/2;var y=F/2;var B=Q+J.height;var C=0;var M=g.getImageData(O,Q-1,F,3);v(O,Q,F,Q);Q--;var T=g.getImageData(y,q-1,F,3);v(y,q,F,q);q--;var m=g.getImageData(C,
+B-1,F,3);v(C,B,F,B);B--}else Q=0,O=J.x+V.x+F-this.graph.container.scrollLeft,q=F/2,y=O+J.width/2,B=0,C=O+J.width,M=g.getImageData(O-1,Q,3,F),v(O,Q,O,F),O--,T=g.getImageData(y-1,q,3,F),v(y,q,y,F),y--,m=g.getImageData(C-1,B,3,F),v(C,B,C,F),C--;if(null==H.guidePart||H.guidePart.x1!=O||H.guidePart.y1!=Q)H.guidePart={imgData1:M,x1:O,y1:Q,imgData2:T,x2:y,y2:q,imgData3:m,x3:C,y3:B}}catch(z){}}else V=H.origGuideMove.apply(this,arguments);return V};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
function(){var J=H.origGuideDestroy.apply(this,arguments);if(null!=H.guidePart)try{g.putImageData(H.guidePart.imgData1,H.guidePart.x1,H.guidePart.y1),g.putImageData(H.guidePart.imgData2,H.guidePart.x2,H.guidePart.y2),g.putImageData(H.guidePart.imgData3,H.guidePart.x3,H.guidePart.y3),H.guidePart=null}catch(D){}return J}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,e){var f=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return f};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,e,!0);this.hRuler=new mxRuler(b,e,!1,!0);e=mxUtils.bind(this,function(c){var l=!1;mxEvent.addGestureListeners(c,mxUtils.bind(this,
-function(n){l=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,function(n){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(n)||mxEvent.isPopupTrigger(n))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!l){var p=new mxPopupMenu(mxUtils.bind(this,function(H,F){b.menus.addMenuItems(H,["points","inches","millimeters","meters"],F)}));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=
-!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);b.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(n),G=mxEvent.getClientY(n);p.popup(u,G,null,n);b.setCurrentMenu(p,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,l=[],n,p=[],u,G=!1,H=!0,F=!0,K=!0,d=!0,g=[],k=!1,v=!1,t=!1,x="default",A={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},J=!0;this.setClosedPath=function(q){G=q};this.setAutoClose=function(q){H=q};this.setAutoInsert=
-function(q){F=q};this.setAutoScroll=function(q){K=q};this.setOpenFill=function(q){d=q};this.setStopClickEnabled=function(q){v=q};this.setSelectInserted=function(q){t=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){J=q};this.isPerfectFreehandMode=function(){return J};this.setBrushSize=function(q){A.size=q};this.getBrushSize=function(){return A.size};var D=function(q){k=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);
-b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return k};var E=mxUtils.bind(this,function(q){if(c){var y=u.length,B=v&&0<p.length&&null!=u&&2>u.length;B||p.push.apply(p,u);u=[];p.push(null);l.push(c);c=null;(B||F)&&this.stopDrawing();F&&(!B||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(q){var y=null!=
+function(n){l=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,function(n){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(n)||mxEvent.isPopupTrigger(n))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(n)||!l){var p=new mxPopupMenu(mxUtils.bind(this,function(H,E){b.menus.addMenuItems(H,["points","inches","millimeters","meters"],E)}));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=
+!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);b.resetCurrentMenu();p.destroy()});var u=mxEvent.getClientX(n),F=mxEvent.getClientY(n);p.popup(u,F,null,n);b.setCurrentMenu(p,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.MILD_SMOOTHING,c=null,l=[],n,p=[],u,F=!1,H=!0,E=!0,K=!0,d=!0,g=[],k=!1,v=!1,t=!1,x="default",A={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},J=!0;this.setClosedPath=function(q){F=q};this.setAutoClose=function(q){H=q};this.setAutoInsert=
+function(q){E=q};this.setAutoScroll=function(q){K=q};this.setOpenFill=function(q){d=q};this.setStopClickEnabled=function(q){v=q};this.setSelectInserted=function(q){t=q};this.setSmoothing=function(q){f=q};this.getSmoothing=function(){return f};this.setPerfectFreehandMode=function(q){J=q};this.isPerfectFreehandMode=function(){return J};this.setBrushSize=function(q){A.size=q};this.getBrushSize=function(){return A.size};var D=function(q){k=q;b.getRubberband().setEnabled(!q);b.graphHandler.setSelectEnabled(!q);
+b.graphHandler.setMoveEnabled(!q);b.container.style.cursor=q?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){D(!0)};this.isDrawing=function(){return k};var G=mxUtils.bind(this,function(q){if(c){var y=u.length,B=v&&0<p.length&&null!=u&&2>u.length;B||p.push.apply(p,u);u=[];p.push(null);l.push(c);c=null;(B||E)&&this.stopDrawing();E&&(!B||2<=y)&&this.startDrawing();mxEvent.consume(q)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(q){var y=null!=
x?x:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=y||q||(y=b.shapeForegroundColor);return y};this.setStrokeColor=function(q){x=q};this.createStyle=function(q){var y=";fillColor=none;";J&&(y=";lineShape=1;");y+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+q+y};this.stopDrawing=function(){if(0<l.length){if(J){for(var q=[],y=0;y<p.length;y++)null!=p[y]&&q.push([p[y].x,
-p[y].y]);q=PerfectFreehand.getStroke(q,A);p=[];for(y=0;y<q.length;y++)p.push({x:q[y][0],y:q[y][1]});p.push(null)}q=p[0].x;var B=p[0].x,C=p[0].y,M=p[0].y;for(y=1;y<p.length;y++)null!=p[y]&&(q=Math.max(q,p[y].x),B=Math.min(B,p[y].x),C=Math.max(C,p[y].y),M=Math.min(M,p[y].y));q-=B;C-=M;if(0<q&&0<C){var T=100/q,m=100/C;p.map(function(O){if(null==O)return O;O.x=(O.x-B)*T;O.y=(O.y-M)*m;return O});var z='<shape strokewidth="inherit"><foreground>',I=0;for(y=0;y<p.length;y++){var L=p[y];if(null==L){L=!1;I=
-p[I];var N=p[y-1];!G&&H&&(L=I.x-N.x,N=I.y-N.y,L=Math.sqrt(L*L+N*N)<=b.tolerance);if(G||L)z+='<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>';z+="</path>"+(d||G||L?"<fillstroke/>":"<stroke/>");I=y+1}else z=y==I?z+('<path><move x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>'):z+('<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>')}z+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=this.createStyle("stencil("+Graph.compress(z)+")");z=b.view.scale;I=b.view.translate;
+p[y].y]);q=PerfectFreehand.getStroke(q,A);p=[];for(y=0;y<q.length;y++)p.push({x:q[y][0],y:q[y][1]});p.push(null)}q=p[0].x;var B=p[0].x,C=p[0].y,M=p[0].y;for(y=1;y<p.length;y++)null!=p[y]&&(q=Math.max(q,p[y].x),B=Math.min(B,p[y].x),C=Math.max(C,p[y].y),M=Math.min(M,p[y].y));q-=B;C-=M;if(0<q&&0<C){var T=100/q,m=100/C;p.map(function(P){if(null==P)return P;P.x=(P.x-B)*T;P.y=(P.y-M)*m;return P});var z='<shape strokewidth="inherit"><foreground>',I=0;for(y=0;y<p.length;y++){var L=p[y];if(null==L){L=!1;I=
+p[I];var N=p[y-1];!F&&H&&(L=I.x-N.x,N=I.y-N.y,L=Math.sqrt(L*L+N*N)<=b.tolerance);if(F||L)z+='<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>';z+="</path>"+(d||F||L?"<fillstroke/>":"<stroke/>");I=y+1}else z=y==I?z+('<path><move x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>'):z+('<line x="'+L.x.toFixed(2)+'" y="'+L.y.toFixed(2)+'"/>')}z+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){y=this.createStyle("stencil("+Graph.compress(z)+")");z=b.view.scale;I=b.view.translate;
y=new mxCell("",new mxGeometry(B/z-I.x,M/z-I.y,q/z,C/z),y);y.vertex=1;b.model.beginUpdate();try{y=b.addCell(y),b.fireEvent(new mxEventObject("cellsInserted","cells",[y])),b.fireEvent(new mxEventObject("freehandInserted","cell",y))}finally{b.model.endUpdate()}t&&b.setSelectionCells([y])}}for(y=0;y<l.length;y++)l[y].parentNode.removeChild(l[y]);c=null;l=[];p=[]}D(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(q,y){q=y.getProperty("eventName");y=y.getProperty("event");q==mxEvent.MOUSE_MOVE&&
k&&(null!=y.sourceState&&y.sourceState.setCursor("crosshair"),y.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(q,y){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q=y.getEvent(),k&&!mxEvent.isPopupTrigger(q)&&!mxEvent.isMiddleMouseButton(q)&&!mxEvent.isMultiTouchEvent(q))){var B=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);B=Math.max(1,B*b.view.scale);var C=this.getStrokeColor();c=document.createElementNS("http://www.w3.org/2000/svg","path");
c.setAttribute("fill",J?C:"none");c.setAttribute("pointer-events","none");c.setAttribute("stroke",C);c.setAttribute("stroke-width",B);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(C=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",C=C.split(" ").map(function(M){return parseFloat(M)*B}).join(" "),c.setAttribute("stroke-dasharray",C));g=[];q=V(q);Q(q);n="M"+q.x+" "+q.y;p.push(q);u=[];c.setAttribute("d",J?PerfectFreehand.getSvgPathFromStroke([[q.x,q.y]],A):n);e.appendChild(c);y.consume()}}),
-mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=V(q);Q(q);var B=P(0);if(B)if(p.push(B),J){var C=[];for(B=0;B<p.length;B++)C.push([p[B].x,p[B].y]);u=[];for(var M=2;M<g.length;M+=2)B=P(M),C.push([B.x,B.y]),u.push(B);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(C,A))}else{n+=" L"+B.x+" "+B.y;C="";u=[];for(M=2;M<g.length;M+=2)B=P(M),C+=" L"+B.x+" "+B.y,u.push(B);c.setAttribute("d",n+C)}K&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x-
-B.x,q.y-B.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(E(y.getEvent()),y.consume())})});var V=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},Q=function(q){for(g.push(q);g.length>f;)g.shift()},P=function(q){var y=g.length;if(1===y%2||y>=f){var B=0,C=0,M,T=0;for(M=q;M<y;M++)T++,q=g[M],B+=q.x,C+=q.y;return{x:B/T,y:C/T}}return null}}}
-mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(I,L){try{if(!P){var N=e.file.getCurrentUser();if(Q&&null!=N&&null!=N.displayName){var O={from:D,id:v,type:I,sessionId:e.clientId,userId:N.id,username:N.displayName,data:L,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};O={bytes:e.objectToString(O),data:"aes"};O=JSON.stringify(O);q&&"cursor"!=I&&EditorUi.debug("P2PCollab: sending to socket server",[O]);v++;N=!q&&("cursor"==I||"selectionChange"==I);V&&!N&&M("message",O);if(N)for(p2pId in R)R[p2pId].send(O)}}}catch(S){null!=
-window.console&&console.error(S,I,L)}}function l(I){if(b.shareCursorPosition&&!F.isMouseDown){var L=mxUtils.getOffset(F.container),N=F.view.translate,O=F.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((I.getX()-L.x+F.container.scrollLeft)/O-N.x),y:Math.round((I.getY()-L.y+F.container.scrollTop)/O-N.y)})}}function n(I,L){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=I&&null!=I.cursor&&null!=I.lastCursor)if(null!=I.lastCursor.hide||!b.isShowRemoteCursors()||
-null!=I.lastCursor.pageId&&I.lastCursor.pageId!=N)I.cursor.style.display="none";else{N=function(){var Z=Math.max(F.container.scrollLeft,Math.min(F.container.scrollLeft+F.container.clientWidth-I.cursor.clientWidth,U)),Y=Math.max(F.container.scrollTop-22,Math.min(F.container.scrollTop+F.container.clientHeight-I.cursor.clientHeight,W));X.style.opacity=Z!=U||Y!=W?0:1;I.cursor.style.left=Z+"px";I.cursor.style.top=Y+"px";I.cursor.style.display=""};var O=F.view.translate,S=F.view.scale,U=(O.x+I.lastCursor.x)*
-S+8,W=(O.y+I.lastCursor.y)*S-12,X=I.cursor.getElementsByTagName("img")[0];L?(mxUtils.setPrefixedStyle(I.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(I.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function p(I,L){try{var N=function(){if(null==k[S]){var ca=J[S];null==ca&&(ca=K%g.length,J[S]=ca,K++);var fa=g[ca];ca=11<ca?"black":"white";
+mouseMove:mxUtils.bind(this,function(q,y){if(null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){q=y.getEvent();q=V(q);Q(q);var B=O(0);if(B)if(p.push(B),J){var C=[];for(B=0;B<p.length;B++)C.push([p[B].x,p[B].y]);u=[];for(var M=2;M<g.length;M+=2)B=O(M),C.push([B.x,B.y]),u.push(B);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(C,A))}else{n+=" L"+B.x+" "+B.y;C="";u=[];for(M=2;M<g.length;M+=2)B=O(M),C+=" L"+B.x+" "+B.y,u.push(B);c.setAttribute("d",n+C)}K&&(B=b.view.translate,b.scrollRectToVisible((new mxRectangle(q.x-
+B.x,q.y-B.y)).grow(20)));y.consume()}}),mouseUp:mxUtils.bind(this,function(q,y){null!=c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(G(y.getEvent()),y.consume())})});var V=function(q){return mxUtils.convertPoint(b.container,mxEvent.getClientX(q),mxEvent.getClientY(q))},Q=function(q){for(g.push(q);g.length>f;)g.shift()},O=function(q){var y=g.length;if(1===y%2||y>=f){var B=0,C=0,M,T=0;for(M=q;M<y;M++)T++,q=g[M],B+=q.x,C+=q.y;return{x:B/T,y:C/T}}return null}}}
+mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(I,L){try{if(!O){var N=e.file.getCurrentUser();if(Q&&null!=N&&null!=N.displayName){var P={from:D,id:v,type:I,sessionId:e.clientId,userId:N.id,username:N.displayName,data:L,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION};P={bytes:e.objectToString(P),data:"aes"};P=JSON.stringify(P);q&&"cursor"!=I&&EditorUi.debug("P2PCollab: sending to socket server",[P]);v++;N=!q&&("cursor"==I||"selectionChange"==I);V&&!N&&M("message",P);if(N)for(p2pId in R)R[p2pId].send(P)}}}catch(S){null!=
+window.console&&console.error(S,I,L)}}function l(I){if(b.shareCursorPosition&&!E.isMouseDown){var L=mxUtils.getOffset(E.container),N=E.view.translate,P=E.view.scale,S=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:S,x:Math.round((I.getX()-L.x+E.container.scrollLeft)/P-N.x),y:Math.round((I.getY()-L.y+E.container.scrollTop)/P-N.y)})}}function n(I,L){var N=null!=b.currentPage?b.currentPage.getId():null;if(null!=I&&null!=I.cursor&&null!=I.lastCursor)if(null!=I.lastCursor.hide||!b.isShowRemoteCursors()||
+null!=I.lastCursor.pageId&&I.lastCursor.pageId!=N)I.cursor.style.display="none";else{N=function(){var Z=Math.max(E.container.scrollLeft,Math.min(E.container.scrollLeft+E.container.clientWidth-I.cursor.clientWidth,U)),Y=Math.max(E.container.scrollTop-22,Math.min(E.container.scrollTop+E.container.clientHeight-I.cursor.clientHeight,W));X.style.opacity=Z!=U||Y!=W?0:1;I.cursor.style.left=Z+"px";I.cursor.style.top=Y+"px";I.cursor.style.display=""};var P=E.view.translate,S=E.view.scale,U=(P.x+I.lastCursor.x)*
+S+8,W=(P.y+I.lastCursor.y)*S-12,X=I.cursor.getElementsByTagName("img")[0];L?(mxUtils.setPrefixedStyle(I.cursor.style,"transition","all 900ms ease-out"),mxUtils.setPrefixedStyle(X.style,"transition","all 900ms ease-out"),window.setTimeout(N,0)):(mxUtils.setPrefixedStyle(I.cursor.style,"transition",null),mxUtils.setPrefixedStyle(X.style,"transition",null),N())}}function p(I,L){try{var N=function(){if(null==k[S]){var ca=J[S];null==ca&&(ca=K%g.length,J[S]=ca,K++);var fa=g[ca];ca=11<ca?"black":"white";
k[S]={cursor:document.createElement("div"),color:fa,selection:{}};x[L]=S;U=k[S].cursor;U.style.pointerEvents="none";U.style.position="absolute";U.style.display="none";U.style.opacity="0.9";var aa=document.createElement("img");mxUtils.setPrefixedStyle(aa.style,"transform","rotate(-45deg)translateX(-14px)");aa.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+fa+'" fill="'+fa+'"/>').src);aa.style.width="10px";U.appendChild(aa);aa=document.createElement("div");
-aa.style.backgroundColor=fa;aa.style.color=ca;aa.style.fontSize="9pt";aa.style.padding="3px 7px";aa.style.marginTop="8px";aa.style.borderRadius="10px";aa.style.maxWidth="100px";aa.style.overflow="hidden";aa.style.textOverflow="ellipsis";aa.style.whiteSpace="nowrap";mxUtils.write(aa,O);U.appendChild(aa);b.diagramContainer.appendChild(U)}else U=k[S].cursor;W=k[S].selection};if(!P){I=JSON.parse(I);null!=I.bytes&&(I=e.stringToObject(I.bytes));q&&"cursor"!=I.type&&EditorUi.debug("P2PCollab: msg received",
-[I]);if(null!=L){if(I.from==D||t[I.from]>=I.id){EditorUi.debug("P2PCollab: Dropped Message",I,D,t[I.from]);return}t[I.from]=I.id}var O=I.username?I.username:"Anonymous",S=I.sessionId,U,W;null!=k[S]&&(clearTimeout(k[S].inactiveTO),k[S].inactiveTO=setTimeout(function(){G(null,S)},12E4));var X=I.data;switch(I.type){case "cursor":N();k[S].lastCursor=X;n(k[S],!0);break;case "diff":try{I=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(I.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",
-ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){N();for(N=0;N<X.removed.length;N++){var Y=X.removed[N];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(N=0;N<X.added.length;N++)if(Y=X.added[N],null!=Y){var ea=F.model.getCell(Y);null!=ea&&(W[Y]=F.highlightCell(ea,k[S].color,6E4,70,3))}}}break;case "notify":I=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,
-e.handleMessageData(I.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",I))}}catch(ca){null!=window.console&&console.warn(ca,I,L)}}function u(I,L){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:L,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(O){M("sendSignal",{to:I,from:D,signal:O})});N.on("error",function(O){delete E[I];EditorUi.debug("P2PCollab: p2p socket error",O);!P&&L&&N.destroyed&&A[I]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
-I),u(I,!0))});N.on("connect",function(){delete E[I];null==R[I]||R[I].destroyed?(R[I]=N,A[I]=!0,EditorUi.debug("P2PCollab: p2p socket connected",I)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",I))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",I),H(x[I]),delete R[I])});N.on("data",p);return E[I]=N}}function G(I,L){H(L||x[I]);null!=I&&(delete x[I],A[I]=!1)}function H(I){var L=k[I];if(null!=L){var N=L.selection,O;for(O in N)null!=
-N[O]&&N[O].destroy();null!=L.cursor&&null!=L.cursor.parentNode&&L.cursor.parentNode.removeChild(L.cursor);clearTimeout(L.inactiveTO);delete k[I]}}var F=b.editor.graph,K=0,d=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},v=1,t={},x={},A={},J={},D,E={},R={},V=!0,Q=!1,P=!1,q="0"!=urlParams["no-p2p"],y=!1,B=0,C=null,M=mxUtils.bind(this,function(I,L){if(!P)try{null!=
+aa.style.backgroundColor=fa;aa.style.color=ca;aa.style.fontSize="9pt";aa.style.padding="3px 7px";aa.style.marginTop="8px";aa.style.borderRadius="10px";aa.style.maxWidth="100px";aa.style.overflow="hidden";aa.style.textOverflow="ellipsis";aa.style.whiteSpace="nowrap";mxUtils.write(aa,P);U.appendChild(aa);b.diagramContainer.appendChild(U)}else U=k[S].cursor;W=k[S].selection};if(!O){I=JSON.parse(I);null!=I.bytes&&(I=e.stringToObject(I.bytes));q&&"cursor"!=I.type&&EditorUi.debug("P2PCollab: msg received",
+[I]);if(null!=L){if(I.from==D||t[I.from]>=I.id){EditorUi.debug("P2PCollab: Dropped Message",I,D,t[I.from]);return}t[I.from]=I.id}var P=I.username?I.username:"Anonymous",S=I.sessionId,U,W;null!=k[S]&&(clearTimeout(k[S].inactiveTO),k[S].inactiveTO=setTimeout(function(){F(null,S)},12E4));var X=I.data;switch(I.type){case "cursor":N();k[S].lastCursor=X;n(k[S],!0);break;case "diff":try{I=null!=X.patch?e.stringToObject(decodeURIComponent(X.patch)):X.diff,e.receiveRemoteChanges(I.d)}catch(ca){EditorUi.debug("P2PCollab: Diff msg error",
+ca)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var Z=null!=b.currentPage?b.currentPage.getId():null;if(null==Z||null!=X.pageId&&X.pageId==Z){N();for(N=0;N<X.removed.length;N++){var Y=X.removed[N];if(null!=Y){var ba=W[Y];delete W[Y];null!=ba&&ba.destroy()}}for(N=0;N<X.added.length;N++)if(Y=X.added[N],null!=Y){var ea=E.model.getCell(Y);null!=ea&&(W[Y]=E.highlightCell(ea,k[S].color,6E4,70,3))}}}break;case "notify":I=null!=X.data?e.stringToObject(decodeURIComponent(X.data)):X.msg,
+e.handleMessageData(I.d)}e.file.fireEvent(new mxEventObject("realtimeMessage","message",I))}}catch(ca){null!=window.console&&console.warn(ca,I,L)}}function u(I,L){if(!q&&SimplePeer.WEBRTC_SUPPORT){var N=new SimplePeer({initiator:L,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});N.on("signal",function(P){M("sendSignal",{to:I,from:D,signal:P})});N.on("error",function(P){delete G[I];EditorUi.debug("P2PCollab: p2p socket error",P);!O&&L&&N.destroyed&&A[I]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",
+I),u(I,!0))});N.on("connect",function(){delete G[I];null==R[I]||R[I].destroyed?(R[I]=N,A[I]=!0,EditorUi.debug("P2PCollab: p2p socket connected",I)):(N.noP2PMapDel=!0,N.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",I))});N.on("close",function(){N.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",I),H(x[I]),delete R[I])});N.on("data",p);return G[I]=N}}function F(I,L){H(L||x[I]);null!=I&&(delete x[I],A[I]=!1)}function H(I){var L=k[I];if(null!=L){var N=L.selection,P;for(P in N)null!=
+N[P]&&N[P].destroy();null!=L.cursor&&null!=L.cursor.parentNode&&L.cursor.parentNode.removeChild(L.cursor);clearTimeout(L.inactiveTO);delete k[I]}}var E=b.editor.graph,K=0,d=null,g="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),k={},v=1,t={},x={},A={},J={},D,G={},R={},V=!0,Q=!1,O=!1,q="0"!=urlParams["no-p2p"],y=!1,B=0,C=null,M=mxUtils.bind(this,function(I,L){if(!O)try{null!=
d?(d.send(JSON.stringify({action:I,msg:L})),q||EditorUi.debug("P2PCollab: sending to socket server",[I],[L])):this.joinFile(!0)}catch(N){C=N,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,N)}});this.sendMessage=c;this.sendDiff=function(I){this.sendMessage("diff",{diff:I})};this.sendNotification=function(I){this.sendMessage("notify",{msg:I})};this.getState=function(){return null!=d?d.readyState:3};this.getLastError=function(){return C};
-this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(I,L){},mouseMove:function(I,L){var N,O=-1;return function(){clearTimeout(N);var S=this,U=arguments,W=function(){N=null;O=Date.now();I.apply(S,U)};Date.now()-O>L?W():N=setTimeout(W,L)}}(function(I,L){l(L)},300),mouseUp:function(I,L){l(L)}};F.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
-var T=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(I,L){var N=function(O){return null!=O?O.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var O=F.getSelectionCount()>T?[]:F.getSelectionCells().map(N),S=null!=b.currentPage?b.currentPage.getId():null,U={},W=[],X=[],Z=0;Z<O.length;Z++){var Y=O[Z];null!=Y&&(U[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)U[Y]||W.push(Y);z=U;c("selectionChange",{pageId:S,removed:W,added:X})},300)};F.getSelectionModel().addListener(mxEvent.CHANGE,
-this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var I in k)n(k[I])});mxEvent.addListener(F.container,"scroll",this.cursorHandler);F.getView().addListener(mxEvent.SCALE,this.cursorHandler);F.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);F.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(I){if(!P)try{y&&
-(EditorUi.debug("P2PCollab: joinInProgress on",y),C="busy");y=++B;try{null!=d&&1==d.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",d.joinId),d.close(1E3),d=null)}catch(O){EditorUi.debug("P2PCollab: closing socket error",O)}var L=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==d&&(d=L);L.addEventListener("open",function(O){d=L;d.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",d.joinId);Editor.enableRealtimeCache||
-window.setTimeout(function(){e.sendJoinMessage()},0);I&&e.scheduleCleanup()});L.addEventListener("message",function(O){try{q||EditorUi.debug("P2PCollab: msg received",[O]);var S=JSON.parse(O.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[O]);switch(S.action){case "message":p(S.msg,S.from);break;case "clientsList":var U=S.msg;D=U.cId;Q=!0;for(S=0;S<U.list.length;S++)u(U.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(E[W.from])var X=E[W.from];else X=u(W.from,!1),V=!0;
-X.signal(W.signal)}break;case "newClient":V=!0;break;case "clientLeft":G(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete E[Z.to];A[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,O)}});var N=!1;L.addEventListener("close",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket closed",L.joinId,"reconnecting",O.code,O.reason);EditorUi.debug("P2PCollab: closing socket on",L.joinId);P||1E3==O.code||B!=
-L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in close on",L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));L.addEventListener("error",mxUtils.bind(this,function(O){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",O);EditorUi.debug("P2PCollab: error socket on",L.joinId);P||B!=L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
-L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(O){C=O,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!P){EditorUi.debug("P2PCollab: destroyed");P=!0;for(sessionId in k)H(sessionId);null!=this.mouseListeners&&F.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
-F.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(F.container,"scroll",this.cursorHandler),F.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=d&&1<=d.readyState&&(d.close(1E3),d=null);for(var I in R)null!=R[I]&&R[I].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
+this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(I,L){},mouseMove:function(I,L){var N,P=-1;return function(){clearTimeout(N);var S=this,U=arguments,W=function(){N=null;P=Date.now();I.apply(S,U)};Date.now()-P>L?W():N=setTimeout(W,L)}}(function(I,L){l(L)},300),mouseUp:function(I,L){l(L)}};E.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);
+var T=mxGraphHandler.prototype.maxCells,m=null,z={};this.selectionChangeListener=function(I,L){var N=function(P){return null!=P?P.id:null};null!=m&&window.clearTimeout(m);m=window.setTimeout(function(){for(var P=E.getSelectionCount()>T?[]:E.getSelectionCells().map(N),S=null!=b.currentPage?b.currentPage.getId():null,U={},W=[],X=[],Z=0;Z<P.length;Z++){var Y=P[Z];null!=Y&&(U[Y]=!0,null==z[Y]&&X.push(Y))}for(Y in z)U[Y]||W.push(Y);z=U;c("selectionChange",{pageId:S,removed:W,added:X})},300)};E.getSelectionModel().addListener(mxEvent.CHANGE,
+this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var I in k)n(k[I])});mxEvent.addListener(E.container,"scroll",this.cursorHandler);E.getView().addListener(mxEvent.SCALE,this.cursorHandler);E.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);E.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(I){if(!O)try{y&&
+(EditorUi.debug("P2PCollab: joinInProgress on",y),C="busy");y=++B;try{null!=d&&1==d.readyState&&(EditorUi.debug("P2PCollab: force closing socket on",d.joinId),d.close(1E3),d=null)}catch(P){EditorUi.debug("P2PCollab: closing socket error",P)}var L=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);null==d&&(d=L);L.addEventListener("open",function(P){d=L;d.joinId=y;y=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",d.joinId);Editor.enableRealtimeCache||
+window.setTimeout(function(){e.sendJoinMessage()},0);I&&e.scheduleCleanup()});L.addEventListener("message",function(P){try{q||EditorUi.debug("P2PCollab: msg received",[P]);var S=JSON.parse(P.data);q&&"message"!=S.action&&EditorUi.debug("P2PCollab: msg received",[P]);switch(S.action){case "message":p(S.msg,S.from);break;case "clientsList":var U=S.msg;D=U.cId;Q=!0;for(S=0;S<U.list.length;S++)u(U.list[S],!0);break;case "signal":var W=S.msg;if(!q){if(G[W.from])var X=G[W.from];else X=u(W.from,!1),V=!0;
+X.signal(W.signal)}break;case "newClient":V=!0;break;case "clientLeft":F(S.msg);break;case "sendSignalFailed":var Z=S.msg;EditorUi.debug("P2PCollab: signal failed (socket not found on server)",Z);delete G[Z.to];A[Z.to]=!1}}catch(Y){null!=window.console&&console.warn(Y,P)}});var N=!1;L.addEventListener("close",mxUtils.bind(this,function(P){EditorUi.debug("P2PCollab: WebSocket closed",L.joinId,"reconnecting",P.code,P.reason);EditorUi.debug("P2PCollab: closing socket on",L.joinId);O||1E3==P.code||B!=
+L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in close on",L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),window.setTimeout(mxUtils.bind(this,function(){N=!0;this.joinFile(!0)}),500)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));L.addEventListener("error",mxUtils.bind(this,function(P){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",P);EditorUi.debug("P2PCollab: error socket on",L.joinId);O||B!=L.joinId||(y==B&&(EditorUi.debug("P2PCollab: joinInProgress in error on",
+L.joinId),y=!1),N||(EditorUi.debug("P2PCollab: calling rejoin on",L.joinId),N=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(P){C=P,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!O){EditorUi.debug("P2PCollab: destroyed");O=!0;for(sessionId in k)H(sessionId);null!=this.mouseListeners&&E.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&
+E.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(E.container,"scroll",this.cursorHandler),E.view.removeListener(this.cursorHandler),b.editor.removeListener(this.cursorHandler),b.removeListener(this.cursorHandler));null!=d&&1<=d.readyState&&(d.close(1E3),d=null);for(var I in R)null!=R[I]&&R[I].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}}
;
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index 3406c8544..6761bd744 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -1,36 +1,36 @@
LucidImporter={};
(function(){function g(w){if(w&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[w])w=F[w];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var u=F[D];w=w.replace(u.searchVal,u.replVal)}LucidImporter.hasExtImgs=!0}}return w}function y(w){lb="";try{if(w){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[w]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:
""}if("Liberation Sans"!=w)return lb="fontFamily="+w+";","font-family: "+w+";"}}catch(u){}return""}function z(w){return Math.round(10*w)/10}function B(w,F,D){function u(la,Ma){var ya="",za=la.t,Pb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Pb.v)null==za&&(Na&&(ya+=P(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=P(!0));Na=za.v;Ka=Pb.v;"ul"==za.v?(ya+="<ul ",Ca.push("ul")):(ya+="<ol ",Ca.push("ol"));ya+='style="margin: 0px; padding-left: 10px;list-style-position: inside; list-style-type:';
-if("hl"==za.v)ya+="upper-roman";else switch(Pb.v){case "auto":ya+="disc";break;case "inv":ya+="circle";break;case "disc":ya+="circle";break;case "trib":ya+="square";break;case "square":ya+="square";break;case "dash":ya+="square";break;case "heart":ya+="disc";break;default:ya+="decimal"}ya+='">'}if(null!=za){ya+='<li style="text-align:'+(la.a?la.a.v:D.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var fa=Ma.c.v;if(Ma.s)var xb=Ma.s.v}try{var Va=aa[ja],rc=ra[Aa];Ma=ja;if(Va&&rc&&Va.s<rc.e)for(var vc=
+if("hl"==za.v)ya+="upper-roman";else switch(Pb.v){case "auto":ya+="disc";break;case "inv":ya+="circle";break;case "disc":ya+="circle";break;case "trib":ya+="square";break;case "square":ya+="square";break;case "dash":ya+="square";break;case "heart":ya+="disc";break;default:ya+="decimal"}ya+='">'}if(null!=za){ya+='<li style="text-align:'+(la.a?la.a.v:D.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var fa=Ma.c.v;if(Ma.s)var xb=Ma.s.v}try{var Va=aa[ka],rc=ra[Aa];Ma=ka;if(Va&&rc&&Va.s<rc.e)for(var vc=
Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(fa=Va.v),Va=aa[++Ma]}catch(Fb){console.log(Fb)}fa=R(fa);null!=fa&&(fa=fa.substring(0,7),ya+="color:"+fa+";");xb&&(ya+="font-size:"+z(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=fa=la.a?la.a.v:D.TextAlign||"center","left"==fa?xb="flex-start":"right"==fa&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+fa+"; align-items: baseline; font-size: 0; line-height: 1.25;");la.il&&(ya+="margin-left: "+
Math.max(0,z(.75*la.il.v-(Na?28:0)))+"px;");la.ir&&(ya+="margin-right: "+z(.75*la.ir.v)+"px;");la.mt&&(ya+="margin-top: "+z(.75*la.mt.v)+"px;");la.mb&&(ya+="margin-bottom: "+z(.75*la.mb.v)+"px;");ya+='margin-top: -2px;">';Na||(ya+="<span>",Ca.push("span"));return ya}function e(la){if(mxUtils.isEmptyObject(la))return"";var Ma="",ya=0;if(la.lk){var za=la.lk;null!=za.v&&0<za.v.length&&(Ma+='<a href="'+n(za.v[0])+'">',Ba.push("a"),ya++)}Ma+='<span style="';Ba.push("span");ya++;Ma+="font-size:"+(la.s&&
la.s.v?z(.75*la.s.v):"13")+"px;";la.c&&(za=R(la.c.v),null!=za&&(za=za.substring(0,7),Ma+="color:"+za+";"));if(la.b&&la.b.v||la.fc&&la.fc.v&&0==la.fc.v.indexOf("Bold"))Ma+="font-weight: bold;";la.i&&la.i.v&&(Ma+="font-style: italic;");la.ac&&la.ac.v&&(Ma+="text-transform: uppercase;");za=null;la.f?za=la.f.v:D.Font&&(za=D.Font);Ma+=y(za);za=[];la.u&&la.u.v&&za.push("underline");la.k&&la.k.v&&za.push("line-through");0<za.length&&(Ma+="text-decoration: "+za.join(" ")+";");Ma+='">';Pa.push(ya);return Ma}
function P(la){var Ma="";do{var ya=Ca.pop();if(!la&&Na&&("ul"==ya||"ol"==ya)){Ca.push(ya);break}Ma+="</"+ya+">"}while(0<Ca.length);return Ma}function r(la,Ma,ya,za){la=la?la.substring(Ma,ya):"";Na&&(la=la.trim());0==Ba.length&&0<la.length&&(la=e({dummy:1})+la);la=la.replace(/</g,"&lt;").replace(/>/g,"&gt;");do for(Ma=Pa.pop(),ya=0;ya<Ma;ya++){var Pb=Ba.pop();la+="</"+Pb+">"}while(za&&0<Ba.length);return la}var p={a:!0,il:!0,ir:!0,mt:!0,mb:!0,p:!0,t:!0,l:!0},Z={lk:!0,s:!0,c:!0,b:!0,fc:!0,i:!0,u:!0,
-k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return p[la.n]});for(var V=[0],wa=0;0<(wa=w.indexOf("\n",wa));)wa++,V.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>V[wa])F.splice(ja,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==V[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||
-"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ja=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=w.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(w,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:w.length;V+=u(ma,na);ua&&(V+=e(na));ua=!0}for(;ja>=Aa&&(ja<aa.length||Aa<ra.length);)if(Ea=aa[ja],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<
-La-l&&(V+=e(na)+r(w,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(w,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ja,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(w,l,Ia)),V+=P(!0));return V}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:
+k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return p[la.n]});for(var V=[0],wa=0;0<(wa=w.indexOf("\n",wa));)wa++,V.push(wa);for(var ka=wa=0;ka<F.length;ka++){if(F[ka].s>V[wa])F.splice(ka,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ka+na<F.length&&F[ka+na].s==V[wa];)na++;1<na&&(ka+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||
+"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ka=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=w.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(w,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:w.length;V+=u(ma,na);ua&&(V+=e(na));ua=!0}for(;ka>=Aa&&(ka<aa.length||Aa<ra.length);)if(Ea=aa[ka],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<
+La-l&&(V+=e(na)+r(w,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ka];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(w,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ka,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(w,l,Ia)),V+=P(!0));return V}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:
null!=w.Lane_0&&w.Lane_0.t?w.Lane_0:null;null==D&&null!=w.State?w.State.t&&(D=w.State):null==D&&null!=w.Note?w.Note.t&&(D=w.Note):null==D&&null!=w.Title?w.Title.t&&(D=w.Title):w.t&&(D=w);null==D&&null!=w.TextAreas?null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&w.TextAreas.Text.Value.t&&(D=w.TextAreas.Text.Value):null==D&&null!=w.t0&&w.t0.t&&(D=w.t0);if(null!=D){if(null!=D.t){var u=D.t;u=u.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(u)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<
D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(P){console.log(P)}u=u.replace(/</g,"&lt;");return u=u.replace(/>/g,"&gt;")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"&lt;"),D.Value.t=D.Value.t.replace(/>/g,"&gt;"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function c(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&
-null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+M(w)+K(w)+Q(w))+S(w)+H(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");lb=
+null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+N(w)+K(w)+O(w))+S(w)+H(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");lb=
"";return w}function b(w,F,D,u,e,P){P=null==P?!1:P;var r="",p=!1,Z=!1;if(null!=w)if(P){P=w.split(";");w="";for(var aa=0;aa<P.length;aa++)"fillColor=none"==P[aa]?Z=!0:"strokeColor=none"==P[aa]?p=!0:""!=P[aa]&&(w+=P[aa]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Xc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(w,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,
w,F,D,u)+d(mxConstants.STYLE_FONTSTYLE,w,F,D,u)+d(mxConstants.STYLE_ALIGN,w,F,D,u)+d(mxConstants.STYLE_SPACING_LEFT,w,F,D,u)+d(mxConstants.STYLE_SPACING_RIGHT,w,F,D,u)+d(mxConstants.STYLE_SPACING_TOP,w,F,D,u)+d(mxConstants.STYLE_SPACING_BOTTOM,w,F,D,u))+d(mxConstants.STYLE_ALIGN+"Global",w,F,D,u)+d(mxConstants.STYLE_SPACING,w,F,D,u)+d(mxConstants.STYLE_VERTICAL_ALIGN,w,F,D,u)+d(mxConstants.STYLE_STROKECOLOR,w,F,D,u)+d(mxConstants.STYLE_OPACITY,w,F,D,u)+d(mxConstants.STYLE_ROUNDED,w,F,D,u)+d(mxConstants.STYLE_ROTATION,
w,F,D,u)+d(mxConstants.STYLE_FLIPH,w,F,D,u)+d(mxConstants.STYLE_FLIPV,w,F,D,u)+d(mxConstants.STYLE_SHADOW,w,F,D,u)+d(mxConstants.STYLE_FILLCOLOR,w,F,D,u)+d(mxConstants.STYLE_DASHED,w,F,D,u)+d(mxConstants.STYLE_STROKEWIDTH,w,F,D,u)+d(mxConstants.STYLE_IMAGE,w,F,D,u)+d(mxConstants.STYLE_POINTER_EVENTS,w,F,D,u);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");p&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(w,F,D,u,e){if(!Xc(F,w))switch(w){case mxConstants.STYLE_FONTSIZE:return f(D);
-case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return Q(D);case mxConstants.STYLE_SPACING:return S(D);
-case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return J(D,u);case mxConstants.STYLE_OPACITY:return O(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return ba(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return W(D);
-case mxConstants.STYLE_FILLCOLOR:return ca(D,u);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=
+case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return N(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return O(D);case mxConstants.STYLE_SPACING:return S(D);
+case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return J(D,u);case mxConstants.STYLE_OPACITY:return Q(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return ca(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return W(D);
+case mxConstants.STYLE_FILLCOLOR:return ba(D,u);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=
0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return lb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=R(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(c(w))}function A(w){if(null!=
w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=
-c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function Q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+
-z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function H(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function J(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,T(w.LineColor),
-"#000000")}function N(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+T(w)+";":""}function L(w){return null!=w?"swimlaneFillColor="+T(w)+";":""}function O(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=R(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=R(w.FillColor),7<w.FillColor.length&&(w=
-"0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function ba(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
-F.Class)?(w-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(w+=180);0!=w&&(u+="rotation="+w+";");e||(u+="horizontal=0;")}return u}function W(w){return null!=w.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(w){if(w){if("object"===typeof w)try{w=w.cs[0].c}catch(F){console.log(F),w="#ffffff"}"rgb"==w.substring(0,3)?w="#"+w.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=w.charAt(0)&&(w="#"+w)}return w}function T(w){return(w=R(w))?
-w.substring(0,7):null}function ka(w,F){return(w=R(w))&&7<w.length?F+"="+Math.round(parseInt("0x"+w.substr(7))/2.55)+";":""}function ca(w,F){if(null!=w.FillColor)if("object"===typeof w.FillColor){if(null!=w.FillColor.cs&&1<w.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,T(w.FillColor.cs[1].c))}else return"string"===typeof w.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
+c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function N(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function O(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+
+z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function H(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function J(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,U(w.LineColor),
+"#000000")}function M(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+U(w)+";":""}function L(w){return null!=w?"swimlaneFillColor="+U(w)+";":""}function Q(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=R(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=R(w.FillColor),7<w.FillColor.length&&(w=
+"0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function ca(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
+F.Class)?(w-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(w+=180);0!=w&&(u+="rotation="+w+";");e||(u+="horizontal=0;")}return u}function W(w){return null!=w.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(w){if(w){if("object"===typeof w)try{w=w.cs[0].c}catch(F){console.log(F),w="#ffffff"}"rgb"==w.substring(0,3)?w="#"+w.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=w.charAt(0)&&(w="#"+w)}return w}function U(w){return(w=R(w))?
+w.substring(0,7):null}function ia(w,F){return(w=R(w))&&7<w.length?F+"="+Math.round(parseInt("0x"+w.substr(7))/2.55)+";":""}function ba(w,F){if(null!=w.FillColor)if("object"===typeof w.FillColor){if(null!=w.FillColor.cs&&1<w.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,U(w.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,U(w.FillColor.cs[1].c))}else return"string"===typeof w.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,U(w.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
return""}function qa(w){return"dotted"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 4;":"dashdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5;":"dashdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 2;":"longdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=16 6;":"dashlongdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 6 16 6;":"dashed24"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=3 8;":
"dashed32"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=w.StrokeStyle&&"dashed"==w.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(w){return null!=w.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(w.LineWidth)),"1"):""}function Fa(w,F,D){var u="";w.FillColor&&w.FillColor.url?(D=w.FillColor.url,"fill"==w.FillColor.pos&&(u="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=w.URL:"UserImage2Block"==
F.Class&&null!=w.ImageFillProps&&null!=w.ImageFillProps.url&&(D=w.ImageFillProps.url);return null!=D?"image="+g(D)+";"+u:""}function pa(w,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(w,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(w,"Notes",F.NoteHint.t);var u=[],e=D.convertValueToString(w),P=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var p=match[0];P=!0;if(2<p.length){var Z=p.substring(2,p.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":
"totalPages"==Z?Z="pagecount":"page"==Z?Z="pagenumber":"date:"==Z.substring(0,5)?Z="date{"+Z.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==Z.substring(0,16)?Z=Z.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==Z.substring(0,9)&&(Z="date{"+Z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");Z="%"+Z+"%";u.push(e.substring(r,match.index)+(null!=Z?Z:p));r=
-match.index+p.length}}P&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(w,wa,V.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(w,F,D,u){for(var e=F,P=0;null!=u.getAttributeForCell(w,e);)P++,e=F+"_"+P;u.setAttributeForCell(w,
+match.index+p.length}}P&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(w,wa,V.Value,D)}catch(ka){window.console&&console.log("Ignored "+aa+":",ka)}}function Za(w,F,D,u){for(var e=F,P=0;null!=u.getAttributeForCell(w,e);)P++,e=F+"_"+P;u.setAttributeForCell(w,
e,null!=D?D:"")}function Qb(w,F,D,u,e,P){var r=h(F);if(null!=r){var p=Od[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=P?"":m(p),w.style+=b(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=J(p,r)),pa(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=w.geometry,D=new mxCell(m(p.Title),
new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,w.insert(D),D.style+=a(p.Title,G)),w.edge)){w.style=null!=p.Rounding&&"diagonal"!=p.Shape?w.style+("rounded=1;arcSize="+p.Rounding+";"):w.style+"rounded=0;";if(D="curve"==p.Shape)w.style+="curved=1;";else if("diagonal"!=p.Shape)if(null!=p.ElbowPoints&&0<p.ElbowPoints.length)for(w.geometry.points=[],r=0;r<p.ElbowPoints.length;r++)w.geometry.points.push(new mxPoint(Math.round(.75*p.ElbowPoints[r].x+wc),Math.round(.75*
p.ElbowPoints[r].y+xc)));else if("elbow"==p.Shape||null!=p.Endpoint1.Block&&null!=p.Endpoint2.Block)w.style+="edgeStyle=orthogonalEdgeStyle;";if(p.LineJumps||LucidImporter.globalProps.LineJumps)w.style+="jumpStyle=arc;";null!=p.Endpoint1.Style&&(P=Ee[p.Endpoint1.Style],null!=P?(P=P.replace(/xyz/g,"start"),w.style+="startArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint1.Style)));null!=p.Endpoint2.Style&&(P=Ee[p.Endpoint2.Style],null!=
@@ -40,46 +40,46 @@ D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==w.geometry.points||0==w.geometry
2?-20:20:0;xc=D.y==P.y?Math.abs(D.y-u.geometry.y)<u.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(P.x+wc,P.y+xc);Z.generated=!0;aa.generated=!0;w.geometry.points=[Z,aa];D=D.x==P.x}null!=u&&u.geometry.isRotated||(Z=Fe(w,p.Endpoint1,!0,D,null,u));null!=u&&null!=Z&&(null==u.stylePoints&&(u.stylePoints=[]),u.stylePoints.push(Z),LucidImporter.stylePointsSet.add(u));null!=e&&e.geometry.isRotated||(aa=Fe(w,p.Endpoint2,!1,D,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=
[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(w.style+=";lucidId="+F.id+";");w.lucidchartObject=F}function vb(w,F){var D=h(w).Properties,u=D.BoundingBox;null==w.Class||"AWS"!==w.Class.substring(0,3)&&"Amazon"!==w.Class.substring(0,6)||w.Class.includes("AWS19")||(u.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*u.x+wc),Math.round(.75*u.y+xc),Math.round(.75*u.w),Math.round(.75*u.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Qb(v,w,F);
v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(w,F,D,u){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;Qb(e,w,F,D,u,!0);var P=h(w).Properties,r=null!=P?P.TextAreas:w.TextAreas;if(null!=r){for(var p=0;void 0!==r["t"+p];){var Z=r["t"+p];null!=Z&&(e=Pd(Z,e,w,D,u,F));p++}for(p=0;void 0!==r["m"+p]||1>p;)Z=r["m"+p],null!=Z&&(e=Pd(Z,e,w,D,u,F)),p++;null!=r.Text&&(e=Pd(r.Text,e,w,D,u,F));r=null!=P?P.TextAreas:w.TextAreas;null!=
-r.Message&&(e=Pd(r.Message,e,w,D,u,F))}w.Hidden&&(e.visible=!1);return e}function Pd(w,F,D,u,e,P){var r=2*(parseFloat(w.Location)-.5);isNaN(r)&&null!=w.Text&&null!=w.Text.Location&&(r=2*(parseFloat(w.Text.Location)-.5));P=m(w);var p=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=w&&null!=w.Value&&null!=w.Value.m){wa=A(w.Value.m);for(var ja=0;ja<w.Value.m.length;ja++)if("s"==w.Value.m[ja].n&&w.Value.m[ja].v)V=z(.75*parseFloat(w.Value.m[ja].v));
-else if("c"==w.Value.m[ja].n){var na=R(w.Value.m[ja].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}p=new p(P,r,Z+aa);p.geometry.relative=!0;p.vertex=!0;if(w.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=u&&null!=e){var ra=u.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*
+r.Message&&(e=Pd(r.Message,e,w,D,u,F))}w.Hidden&&(e.visible=!1);return e}function Pd(w,F,D,u,e,P){var r=2*(parseFloat(w.Location)-.5);isNaN(r)&&null!=w.Text&&null!=w.Text.Location&&(r=2*(parseFloat(w.Text.Location)-.5));P=m(w);var p=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=w&&null!=w.Value&&null!=w.Value.m){wa=A(w.Value.m);for(var ka=0;ka<w.Value.m.length;ka++)if("s"==w.Value.m[ka].n&&w.Value.m[ka].v)V=z(.75*parseFloat(w.Value.m[ka].v));
+else if("c"==w.Value.m[ka].n){var na=R(w.Value.m[ka].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}p=new p(P,r,Z+aa);p.geometry.relative=!0;p.vertex=!0;if(w.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=u&&null!=e){var ra=u.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*
D.Endpoint2.LinkY))}else ma=Math.abs(D.Endpoint1.x-D.Endpoint2.x),Ba=Math.abs(D.Endpoint1.y-D.Endpoint2.y);var Pa=mxUtils.getSizeForString(P.replace(/\n/g,"<br>"));p.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*w.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*w.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}p.lucidchartObject=w;F.insert(p);return F}function Zb(w,F,D,u){null!=F&&null!=u&&(F=u(F));return null!=F&&F!=D?w+"="+F+";":
""}function Fe(w,F,D,u,e,P){if(null!=F&&null!=F.LinkX&&null!=F.LinkY&&(F.LinkX=Math.round(1E3*F.LinkX)/1E3,F.LinkY=Math.round(1E3*F.LinkY)/1E3,null!=P&&P.style&&-1<P.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=P&&P.style&&-1<P.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),w.style+=(u?"":(D?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(D?"exitY":"entryY")+"="+F.LinkY+";")+(D?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(w,F,D,u,e){try{var P=function(ma,
-Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,p=Math.min(p,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=w.Action&&null!=w.Action.Properties&&(w=w.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=w.ZOrder;var p=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=w.Members;e=[];for(var ja in wa){var na=
-F[ja];null!=na?e.push(na):null!=u[ja]&&(e.push(u[ja]),D[ja]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=p;r.geometry.y=Z;
+Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,p=Math.min(p,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=w.Action&&null!=w.Action.Properties&&(w=w.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=w.ZOrder;var p=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=w.Members;e=[];for(var ka in wa){var na=
+F[ka];null!=na?e.push(na):null!=u[ka]&&(e.push(u[ka]),D[ka]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=p;r.geometry.y=Z;
r.geometry.width=aa-p;r.geometry.height=V-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=p;Aa.y-=Z}w.IsState?(r.lucidLayerInfo={name:w.Name,visible:!w.Hidden,locked:w.Restrictions.b&&w.Restrictions.p&&w.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):w.Hidden&&(r.visible=!1);r.lucidchartObject=w;return r}catch(ma){console.log(ma)}}function zf(w,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;w.getModel().beginUpdate();
try{var u=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?P[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?P[ua.Endpoint2.Block]:null,l=yf(Ca,w,Ka,La);if(ua.Endpoint1&&ua.Endpoint1.Line||ua.Endpoint2&&ua.Endpoint2.Line)console.log("Edge to Edge case"),LucidImporter.hasUnknownShapes=!0;null==Ka&&null!=ua.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint1.x),Math.round(.75*ua.Endpoint1.y)),!0);null==
La&&null!=ua.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint2.x),Math.round(.75*ua.Endpoint2.y)),!1);Ca=r[Ca.id];if(null!=Ca){for(var Ia=l.geometry,bb=ua=0,Ea=Ca;null!=Ea&&null!=Ea.geometry;)ua+=Ea.geometry.x,bb+=Ea.geometry.y,Ea=Ea.parent;Na(Ia.sourcePoint,ua,bb);Na(Ia.targetPoint,ua,bb);Na(Ia.offset,ua,bb);Ia=Ia.points;if(null!=Ia)for(Ea=0;Ea<Ia.length;Ea++)Na(Ia[Ea],ua,bb)}e.push(w.addCell(l,Ca,null,Ka,La))},e=[],P={},r={},p={},Z=[];null!=F.Lines&&(p=F.Lines);if(null!=
-F.Blocks){Object.assign(p,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,w),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,w),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,w,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)V=F.Objects[ja],p[V.id]=V,null!=V.Action&&"mxCompositeShape"==
-Od[V.Action.Class]?P[V.id]=Ie(V,e,w):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,w):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,w,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ja=0;ja<F.Objects.length;ja++)if(V=F.Objects[ja],V.IsGroup){var na=He(V,P,r,p,w);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=
-F.Groups[aa],V.id=aa,na=He(V,P,r,p,w))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ja=0;ja<Z.length;ja++){V=Z[ja];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;w.addCell(Aa,w.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
+F.Blocks){Object.assign(p,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,w),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,w),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,w,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ka=0;ka<F.Objects.length;ka++)V=F.Objects[ka],p[V.id]=V,null!=V.Action&&"mxCompositeShape"==
+Od[V.Action.Class]?P[V.id]=Ie(V,e,w):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,w):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,w,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ka=0;ka<F.Objects.length;ka++)if(V=F.Objects[ka],V.IsGroup){var na=He(V,P,r,p,w);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=
+F.Groups[aa],V.id=aa,na=He(V,P,r,p,w))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ka=0;ka<Z.length;ka++){V=Z[ka];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;w.addCell(Aa,w.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
ra.lucidLayerInfo.locked&&Aa.setStyle("locked=1;");Aa.setValue(ra.lucidLayerInfo.name);delete ra.lucidLayerInfo;w.addCell(ra,Aa)}else e.push(w.addCell(ra))}else V.IsLine&&null!=V.Action&&null!=V.Action.Properties?u(V,V.Action.Properties):null!=V.StrokeStyle&&u(V,V)}LucidImporter.stylePointsSet.forEach(function(Ca){Ca.style="points=["+Ca.stylePoints.join(",")+"];"+Ca.style;delete Ca.stylePoints});try{var ma=w.getModel().cells;w.view.validate();for(var Ba in ma){var Pa=ma[Ba];null!=Pa&&(Af(w,Pa),Bf(w,
Pa),Cf(w,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),w),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||w.setSelectionCells(e)}finally{w.getModel().endUpdate()}}function Cf(w,F){if(w.model.contains(F)&&F.edge){var D=w.view.getState(F);if(null!=D&&null!=F.children){var u=mxRectangle.fromRectangle(D.paintBounds);u.grow(5);for(var e=0;e<F.children.length;e++){var P=w.view.getState(F.children[e]);
null==P||mxUtils.contains(u,P.paintBounds.x,P.paintBounds.y)||(P.cell.geometry.offset=new mxPoint(0,0))}}w=F.lucidchartObject;null!=w&&"elbow"==w.Shape&&null==w.ElbowControlPoints&&null==w.ElbowPoints&&null!=D.style.exitX&&null!=D.style.exitY&&null!=D.style.entryX&&null!=D.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*D.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*D.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*D.style.entryX)/
20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*D.style.entryY)/20))}}function Bf(w,F){if(w.model.contains(F)&&null!=F.style&&""!=F.style){w=F.style.split(";");for(var D={},u=[],e=w.length-1;0<=e;e--){var P=w[e].split("=");if(2!=P.length||null==D[P[0]])D[P[0]]=P[1],""!=w[e]&&u.push(w[e])}F.style=u.reverse().join(";")+";"}}function Af(w,F){if(w.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,u=0;u<F.children.length;u++)if(F.children[u].vertex){var e=
F.children[u].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=D)return;D=F.children[u]}}F=D;if(null!=F&&(D=F.parent,""==w.convertValueToString(D))){if(null!=F.edges)for(u=0;u<F.edges.length;u++)F.edges[u].source==F&&F.edges[u].setTerminal(F.parent,!0),F.edges[u].target==F&&F.edges[u].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),u=0;u<e.length;u++)D.insert(e[u]);w.cellLabelChanged(D,w.convertValueToString(F));
D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var w=new Graph;w.setExtendParents(!1);w.setExtendParentsOnAdd(!1);w.setConstrainChildren(!1);w.setHtmlLabels(!0);w.getModel().maintainEdgeParent=!1;return w}function Qd(w,F,D,u,e,P,r,p){this.nurbsValues=[1,3,0,0,100*(w+D),100-100*(1-(F+u)),0,1,100*(e+r),100-100*(1-(P+p)),0,1]}function Ke(w,F){try{for(var D=[],u=F.BoundingBox.w,e=F.BoundingBox.h,P=0;P<F.Shapes.length;P++){var r=
-F.Shapes[P],p=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ja=['<shape strokewidth="inherit"><foreground>'];ja.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/u;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ja.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=u,Na=e,Ka=new Qd(V[Aa.p1].x/u,V[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,V[Aa.p2].x/u,V[Aa.p2].y/
+F.Shapes[P],p=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ka=['<shape strokewidth="inherit"><foreground>'];ka.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/u;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ka.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=u,Na=e,Ka=new Qd(V[Aa.p1].x/u,V[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,V[Aa.p2].x/u,V[Aa.p2].y/
e,Aa.n2.x/u,Aa.n2.y/e);if(2<=Ka.getSize()){Ka.getX(0);Ka.getY(0);Ka.getX(1);Ka.getY(1);Pa=Math.round(100*Pa/ua*100)/100;Ca=Math.round(100*Ca/Na*100)/100;ua=[];Na=[];for(var La=[],l=Ka.getSize(),Ia=0;Ia<l-1;Ia+=3)ua.push(new mxPoint(Ka.getX(Ia),Ka.getY(Ia))),Na.push(new mxPoint(Ka.getX(Ia+1),Ka.getY(Ia+1))),Ia<l-2?La.push(new mxPoint(Ka.getX(Ia+2),Ka.getY(Ia+2))):La.push(new mxPoint(Pa,Ca));var bb="";for(Ia=0;Ia<ua.length;Ia++)bb+='<curve x1="'+ua[Ia].x+'" y1="'+ua[Ia].y+'" x2="'+Na[Ia].x+'" y2="'+
-Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/u,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ja.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ja.push("</path>");ja.push("<fillstroke/>");ja.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:p,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
+Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ka.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/u,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ka.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ka.push("</path>");ka.push("<fillstroke/>");ka.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ka.join(""))+")",FillColor:p,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(w,F,D,u,e,P,r,p){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;r.insert(w);P=[w];D=D.clone();p.insertEdge(D,!1);w.insertEdge(D,!0);P.push(D);u.push(e.addCell(D,null,null,null,null))}function fb(w,F,D,u,e,P,r,p,Z){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;Z.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");
D.vertex=!0;Z.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);P.push(r.addCell(e,null,null,null,null))}function Sa(w,F,D,u,e,P){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=b(u.style,e,P,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
w.style+=b(w.style,e,P,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Wa(w,F,D,u,e,P,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";P.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";P.style+=b(P.style,r,p,P);P.value=m(r);P.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=b(w.style,r,p,w,G);P.insert(w)}function Xc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(w,F){function D(u){u=Math.round(parseInt("0x"+u)*F).toString(16);return 1==u.length?"0"+u:u}return"#"+D(w.substr(1,2))+D(w.substr(3,2))+D(w.substr(5,2))}function Ie(w,F,D){var u=h(w),e=u.Properties,
P=e.BoundingBox,r=Math.round(.75*P.w),p=Math.round(.75*P.h),Z=Math.round(.75*P.x+wc),aa=Math.round(.75*P.y+xc);null==w.Class||"GCPInputDatabase"!==w.Class&&"GCPInputRecord"!==w.Class&&"GCPInputPayment"!==w.Class&&"GCPInputGateway"!==w.Class&&"GCPInputLocalCompute"!==w.Class&&"GCPInputBeacon"!==w.Class&&"GCPInputStorage"!==w.Class&&"GCPInputList"!==w.Class&&"GCPInputStream"!==w.Class&&"GCPInputMobileDevices"!==w.Class&&"GCPInputCircuitBoard"!==w.Class&&"GCPInputLive"!==w.Class&&"GCPInputUsers"!==w.Class&&
"GCPInputLaptop"!==w.Class&&"GCPInputApplication"!==w.Class&&"GCPInputLightbulb"!==w.Class&&"GCPInputGame"!==w.Class&&"GCPInputDesktop"!==w.Class&&"GCPInputDesktopAndMobile"!==w.Class&&"GCPInputWebcam"!==w.Class&&"GCPInputSpeaker"!==w.Class&&"GCPInputRetail"!==w.Class&&"GCPInputReport"!==w.Class&&"GCPInputPhone"!==w.Class&&"GCPInputBlank"!==w.Class||(p+=20);v=new mxCell("",new mxGeometry(Z,aa,r,p),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var V=null!=w.Class?
-w.Class:null!=u?u.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ja=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ja=new mxCell("",new mxGeometry(r-.125*p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ja=new mxCell("",
-new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,u,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,u,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
+w.Class:null!=u?u.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ka=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ka=new mxCell("",new mxGeometry(r-.125*p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ka=new mxCell("",
+new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ka.vertex=!0;v.insert(ka);ka.style+=b(ka.style,e,u,ka);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,u,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
"MainText",Ba=null,Pa="HeaderFill_",Ca="BodyFill_",ua=25,Na=25,Ka=0;if(null!=e.Lanes)Ka=e.Lanes.length;else if(null!=e.PrimaryLane){var La=function(gb){if(gb)32>gb?gb=32:208<gb&&(gb=208);else return 0;return.75*gb};Ka=e.PrimaryLane.length;for(var l=p=r=0;l<Ka;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)p+=e.SecondaryLane[l];ua=La(e.PrimaryPoolTitleHeight);Na=La(e.PrimaryLaneTitleHeight);r*=.75;p=.75*p+ua+Na;v.geometry.width=r;v.geometry.height=p;ma="poolPrimaryTitleKey";Pa="PrimaryLaneHeaderFill_";
Ca="CellFill_0,";Ba=e.PrimaryLaneTextAreaIds;if(null==Ba)for(Ba=[],l=0;l<Ka;l++)Ba.push("Primary_"+l)}if(0==e.IsPrimaryLaneVertical){e.Rotation=-1.5707963267948966;var Ia=v.geometry.x,bb=v.geometry.y}var Ea=0!=e.Rotation,Ra=0<V.indexOf("Pool"),la=0==V.indexOf("BPMN"),Ma=null!=e[ma];v.style=(Ra?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":
-"");v.style+=b(v.style,e,u,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+q(e[ma])+k(e[ma])+t(e[ma])+C(e[ma],v)+I(e[ma])+M(e[ma])+K(e[ma])+Q(e[ma]))+S(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);
-l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,p-vc,r*xb):new mxGeometry(rc,vc,r*xb,p-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,u,za[fa],G)+(G?"fontSize=13;":f(e[Va])+q(e[Va])+t(e[Va])+C(e[Va],za[fa])+I(e[Va])+M(e[Va])+K(e[Va])+Q(e[Va]))+S(e[Va])+H(e[Va])+N(e[Pa+l])+L(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
+"");v.style+=b(v.style,e,u,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+q(e[ma])+k(e[ma])+t(e[ma])+C(e[ma],v)+I(e[ma])+N(e[ma])+K(e[ma])+O(e[ma]))+S(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);
+l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,p-vc,r*xb):new mxGeometry(rc,vc,r*xb,p-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,u,za[fa],G)+(G?"fontSize=13;":f(e[Va])+q(e[Va])+t(e[Va])+C(e[Va],za[fa])+I(e[Va])+N(e[Va])+K(e[Va])+O(e[Va]))+S(e[Va])+H(e[Va])+M(e[Pa+l])+L(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
break;case "UMLMultidimensionalSwimlane":var Fb=0,Rb=0,Kb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Fb=e.Rows.length;Rb=e.Columns.length;var Xa=.75*e.TitleHeight||25,pb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Fb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;pb=.75*e.SecondaryLaneTitleHeight||25;Xa=.75*e.PrimaryLaneTitleHeight||25;for(l=p=r=0;l<Fb;l++)p+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+pb;p=.75*p+Xa;v.geometry.width=r;v.geometry.height=
p;Kb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Nc=new mxCell("",new mxGeometry(0,Xa,r,p-Xa),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Nc.vertex=!0;var Fc=new mxCell("",new mxGeometry(pb,0,r-pb,p),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Fc.vertex=!0;v.insert(Nc);
v.insert(Fc);aa=0;var Gc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+pb+";";for(fa=0;fa<Fb;fa++){if(null==Kb){var Sd=.75*parseInt(e.Rows[fa].height);l=parseInt(e.Rows[fa].id)||fa;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[fa],Sb=Kb[fa];var Hc=new mxCell("",new mxGeometry(0,aa,r,Sd),Gc);aa+=Sd;Hc.vertex=!0;Nc.insert(Hc);Hc.value=m(e[Sb]);Hc.style+=b(Hc.style,e,u,Hc,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],
-Hc)+I(e[Sb])+M(e[Sb])+K(e[Sb])+Q(e[Sb]))+S(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,p),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":
-f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Ic)+I(e[Tb])+M(e[Tb])+K(e[Tb])+Q(e[Tb]))+S(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");var yb=
-new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,p-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
-yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ba(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
+Hc)+I(e[Sb])+N(e[Sb])+K(e[Sb])+O(e[Sb]))+S(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,p),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":
+f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Ic)+I(e[Tb])+N(e[Tb])+K(e[Tb])+O(e[Tb]))+S(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=ba(e,u).replace("fillColor","swimlaneFillColor");var yb=
+new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,G);v.style+=ba(e,u).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,p-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
+yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ca(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
.727,.77*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",yc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*p),mb),e.KeyboardShown&&(Zc=new mxCell("",
new mxGeometry(.04,.708,.92*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));yc.vertex=!0;yc.geometry.relative=!0;v.insert(yc);"Dark"==e.Scheme?yc.style+="fillColor=#111111;":"Light"==e.Scheme&&(yc.style+="fillColor=#ffffff;");null!=Zc&&(Zc.vertex=!0,Zc.geometry.relative=!0,v.insert(Zc));null!=$c&&($c.vertex=!0,$c.geometry.relative=
!0,v.insert($c))}v.style+=b(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var qd=new mxCell("",new mxGeometry(0,30,r,p-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");
@@ -105,12 +105,12 @@ break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new
r,.15*p,.7*r,.7*p),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Pc.vertex=!0,v.insert(Pc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Pc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(Pc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,u,v);break;case "AndroidCheckBox":var ie=
null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),ie.vertex=!0,v.insert(ie));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":
e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Gb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),
-"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ca(e,u):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),
-Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+ca(e,u));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),
+"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ba(e,u):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),
+Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+ba(e,u));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),
new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Cb=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.Carrier,G);v.style+=b(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");
Ja.vertex=!0;v.insert(Ja);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Cb=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*
r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Gb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,u,v);0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),"strokeColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+
-lb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+M(e["Tab_"+l])+K(e["Tab_"+l])+Q(e["Tab_"+l])+S(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*
+lb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+N(e["Tab_"+l])+K(e["Tab_"+l])+O(e["Tab_"+l])+S(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*
r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*
p,.15*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var qb=new mxCell("",new mxGeometry(0,.4*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);var rb=new mxCell("",new mxGeometry(.5*r,
.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var sb=new mxCell("",new mxGeometry(.8*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);var tb=new mxCell("",new mxGeometry(0,
@@ -138,48 +138,48 @@ b(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=non
lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";
Da=new mxCell("",new mxGeometry(0,0,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);Cb=new mxCell("",new mxGeometry(0,.6*p,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Cb.vertex=!0;v.insert(Cb);Cb.value=m(e["bottom-text"]);Cb.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);
-break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=J(e,u)+ca(e,u)+O(e,u,x)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*
-p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=J(e,u)+ca(e,u)+O(e,u,E)+W(e)+sa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=J(e,u)+ca(e,u)+O(e,u,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=
+break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=J(e,u)+ba(e,u)+Q(e,u,x)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*
+p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=J(e,u)+ba(e,u)+Q(e,u,E)+W(e)+sa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=J(e,u)+ba(e,u)+Q(e,u,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=
null;switch(w.Class){case "SMHome":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":x=new mxCell("",new mxGeometry(.5*r-.4*p,.19*p,.8*p,.62*p),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
break;case "SMSettings":x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":x=new mxCell("",new mxGeometry(.5*r-.35*p,.2*p,.7*p,.6*p),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":x=new mxCell("",new mxGeometry(.5*r-.3*p,.25*p,.6*p,.5*p),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
break;case "SMVideo":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":x=new mxCell("",new mxGeometry(.5*r-.3*p,.2*p,.6*p,.6*p),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
-break;case "SMChart":var Y=ca(e,u);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
+break;case "SMChart":var Y=ba(e,u);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
break;case "SMForm":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}x.vertex=
!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=b(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");
-Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bc.style+=O(e,u,Bc);Cc.style+=O(e,u,Cc);na.style+=q(e,na);Bc.style+=b(Bc.style,e,u,Bc);Cc.style+=b(Cc.style,e,u,Cc);na.style+=b(na.style,e,u,na,G);break;case "UMLTextBlock":v.value=
-m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ba(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,p),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,
-.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ba(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,
+Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bc.style+=Q(e,u,Bc);Cc.style+=Q(e,u,Cc);na.style+=q(e,na);Bc.style+=b(Bc.style,e,u,Bc);Cc.style+=b(Cc.style,e,u,Cc);na.style+=b(na.style,e,u,na,G);break;case "UMLTextBlock":v.value=
+m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ca(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,p),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,
+.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ca(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,
G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Re=.225*r,Se=.1*r;Td=r-Re-Se;Qc=new mxCell("",new mxGeometry(.225,0,Td,p),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);zb=new mxCell("",new mxGeometry(0,.5,Re,1),"line;"+Vb);zb.geometry.relative=!0;zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(.9,.5,Se,1),"line;"+Vb);Ab.geometry.relative=
!0;Ab.vertex=!0;v.insert(Ab);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 2:x=new mxCell("",new mxGeometry(0,
0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 3:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");x.geometry.offset=new mxPoint(4,5);break;case 4:x=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");x.geometry.offset=new mxPoint(4,7);break;case 5:x=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");x.geometry.offset=new mxPoint(4,7);break;case 6:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");
-x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),x.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,u);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");x.style+=Rc+Y+"part=1;"}else x.style+=ca(e,u)+J(e,u)+"part=1;";x.geometry.relative=!0;x.vertex=!0;v.insert(x)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
-0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
-x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",
-new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,
--20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);
-Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=
+x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),x.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ba(e,u);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");x.style+=Rc+Y+"part=1;"}else x.style+=ba(e,u)+J(e,u)+"part=1;";x.geometry.relative=!0;x.vertex=!0;v.insert(x)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
+0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
+x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",
+new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ba(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,
+-20);x.style+=ba(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);
+Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ba(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=
"outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(e.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";
-break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ia=T(e.FillColor),je=Rd(ia,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ia="swimlaneFillColor="+je+";";v.value=
-m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");
+break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ja=U(e.FillColor),je=Rd(ja,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ja="swimlaneFillColor="+je+";";v.value=
+m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");
Dc.value=m(e.TaskName);Dc.vertex=!0;v.insert(Dc);Dc.style+=a(e.TaskName,G);Dc.style+=b(Dc.style,e,u,Dc,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Ud=e["Participant"+(l+1)];Jc=f(Ud).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Ud.t,Jc?Jc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Ud,G);X[l].style+=b(X[l].style,e,u,X[l],G);
-X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=ca(e,u)+J(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";
+X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=ba(e,u)+J(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";
switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,u,v);
-v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,
-3);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=J(e,u),x.geometry.relative=
+v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=ba(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,
+3);x.style+=ba(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=J(e,u),x.geometry.relative=
!0,x.vertex=!0,v.insert(x),Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),x.style+=Y,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");
x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);
v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=b(x.style,e,u,x,G);break;case "OrgBlock":var Te="";for(Ga in e.Active)"Photo"!=Ga&&e.Active[Ga]&&(Te+=m(e[Ga],!0));if(e.Active.Photo){var ke=.4*r;v.style+="spacingLeft="+ke+";imageWidth="+(ke-4)+";imageHeight="+(ke-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Te;v.style+=b(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Fb=
-e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ka(We,"fillOpacity"),Ye=e.LineColor,Jf=ka(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;p=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l+
-","+fa;if(Dd[Lb])Z+=Cd[fa];else{var kb=e["CellFill_"+Lb],ne=e["NoBand_"+Lb],Xd=e["CellSize_"+Lb],qc=e["Cell_"+Lb],Ze=e["Cell_"+Lb+"_VAlign"],Kf=e["Cell_"+Lb+"_TRotation"],Lf=e["CellBorderWidthH_"+Lb],Mf=e["CellBorderColorH_"+Lb],Nf=e["CellBorderStrokeStyleH_"+Lb],Of=e["CellBorderWidthV_"+Lb],Pf=e["CellBorderColorV_"+Lb],Qf=e["CellBorderStrokeStyleV_"+Lb],$e=Wd?Pf:Mf,af=ka($e,"strokeOpacity"),bf=Wd?Of:Lf,Sc=Wd?Qf:Nf;kb=Gf&&!ne?0==l%2?le:Ue&&!ne?0==fa%2?le:me:me:Ue&&!ne?0==fa%2?le:me:kb;var Rf=ka(kb,
-"fillOpacity")||If;r=Cd[fa];var cf=p;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ca({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,T($e),
-T(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,u,oa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,oa)+I(qc)+M(qc)+K(qc)+Q(qc))+S(qc)+H(qc);v.insert(oa);Z+=r}}aa+=p}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
+e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ia(We,"fillOpacity"),Ye=e.LineColor,Jf=ia(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;p=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l+
+","+fa;if(Dd[Lb])Z+=Cd[fa];else{var kb=e["CellFill_"+Lb],ne=e["NoBand_"+Lb],Xd=e["CellSize_"+Lb],qc=e["Cell_"+Lb],Ze=e["Cell_"+Lb+"_VAlign"],Kf=e["Cell_"+Lb+"_TRotation"],Lf=e["CellBorderWidthH_"+Lb],Mf=e["CellBorderColorH_"+Lb],Nf=e["CellBorderStrokeStyleH_"+Lb],Of=e["CellBorderWidthV_"+Lb],Pf=e["CellBorderColorV_"+Lb],Qf=e["CellBorderStrokeStyleV_"+Lb],$e=Wd?Pf:Mf,af=ia($e,"strokeOpacity"),bf=Wd?Of:Lf,Sc=Wd?Qf:Nf;kb=Gf&&!ne?0==l%2?le:Ue&&!ne?0==fa%2?le:me:me:Ue&&!ne?0==fa%2?le:me:kb;var Rf=ia(kb,
+"fillOpacity")||If;r=Cd[fa];var cf=p;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ba({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,U($e),
+U(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,u,oa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,oa)+I(qc)+N(qc)+K(qc)+O(qc))+S(qc)+H(qc);v.insert(oa);Z+=r}}aa+=p}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=b(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=
m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";
-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;",e,u,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ia),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";
-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,u,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=
+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ja=b("part=1;",e,u,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ja),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";
+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ja=b("part=1;fillColor=none;",e,u,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ja),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=
m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);
-x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);E.vertex=!0;v.insert(E);E.style+=b(E.style,
-e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=b(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=
+x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ja="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);E.vertex=!0;v.insert(E);E.style+=b(E.style,
+e,u,E);var T=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ja);T.vertex=!0;v.insert(T);T.value=m(e.Text);T.style+=b(T.style,e,u,T,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=
1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),
"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),
E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=
@@ -188,15 +188,15 @@ new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry
0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):
e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):
(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";
-v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ca(e,u);va=new mxCell("",new mxGeometry(0,
+v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ba(e,u);va=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;sc(.5*r,0,va,F,D,Oa,v,oa);sc(.855*r,.145*p,va,F,D,Oa,v,oa);sc(r,.5*p,va,F,D,Oa,v,oa);sc(.855*r,.855*p,va,F,D,Oa,v,oa);sc(.5*r,p,va,F,D,Oa,v,oa);sc(.145*r,.855*p,va,F,D,Oa,v,oa);sc(0,.5*p,va,F,D,Oa,v,oa);sc(.145*r,.145*p,va,F,D,Oa,v,oa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(0,.5*p-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");
oa.vertex=!0;v.insert(oa);Oa=[oa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Oa=[oa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,oa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,p,va,F,D,Oa,v,oa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);
e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==
w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),x.geometry.offset=
new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(.15*r,.25*p,.85*r,.25*p,va,F,D,Oa,v,oa);break;
-case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
-U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=J(e,u);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
-da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Fd=
+case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);T=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
+T.geometry.relative=!0;T.geometry.offset=new mxPoint(.4*-r,-10);T.vertex=!0;v.insert(T);T.style+=b(T.style,e,u,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=J(e,u);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
+da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);T.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Fd=
e.Messages,oe=(p-17)/Fd;E=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(w.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=
"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,u,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(0,.5*p,.4*r,.5*p,va,F,D,Oa,v,oa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
@@ -207,21 +207,21 @@ xa.geometry.relative=!0;xa.edge=!0;xa.style+=J(e,u);fb(.7*r,.1*p,.7*r,.5*p,xa,F,
e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.45*r,.33*p,.8*r,.33*p,ea,F,D,Oa,v,oa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,
e,u,E);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.55*r,.67*p,.2*r,.67*p,da,F,D,Oa,v,oa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);
x.style+=b(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,u,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*p));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=J(e,u)+sa(e);U.style+=b(U.style,e,u,U);ta=new mxCell("",new mxGeometry(.76*
-r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=J(e,u)+O(e,u,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*p));da.geometry.points=
-df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*r,.4*p,.1*r,.19*p),
-"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
-x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*p)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
+0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,u,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*p));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));T=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");T.vertex=!0;v.insert(T);T.style+=J(e,u)+sa(e);T.style+=b(T.style,e,u,T);ta=new mxCell("",new mxGeometry(.76*
+r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=J(e,u)+Q(e,u,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;T.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*p));da.geometry.points=
+df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*r,.4*p,.1*r,.19*p),
+"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);T=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,u,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
+x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*p)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);T.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");
-x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,
-.61*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);
+x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);T=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");T.vertex=!0;v.insert(T);T.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,
+.61*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);T.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);
F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,u,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Lc,
!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,u,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");
ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*p,.6*r,.25*p,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*p,.6*r,.75*p,da,F,D,Oa,v,oa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);U=new mxCell("",
-new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,
+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);T=new mxCell("",
+new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,u,T);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,
p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,u,ta,G);Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Ya.geometry.relative=!0;Ya.edge=!0;x.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,u,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+p-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(p-75)/Fd;E=[];va=
-[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Kc=[],Kc.push(new mxPoint(Z+
+[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,T.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Kc=[],Kc.push(new mxPoint(Z+
r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.style=v.style.replace("rotation=180;",
"");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*p,ff,.75*p),"ellipse;part=1;"),
E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(gf*l,0,gf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Eb=.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,
@@ -231,35 +231,35 @@ Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeomet
"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=J(e,u);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,u,v);ha=p/e.numLines;da=[];Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(0,(l+.5)*ha,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEVesselBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=b(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");
v.style+=b(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");
-x.vertex=!0;v.insert(x);x.style+=ia;x.style+=b(x.style,e,u,x);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.2*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.67*p,r,p,da,F,D,Oa,v,oa)):(x.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=
-!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.33*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.8*p,r,p,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=b(xa.style,e,u,xa),fb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
+x.vertex=!0;v.insert(x);x.style+=ja;x.style+=b(x.style,e,u,x);ja="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ja,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.2*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=b(da.style,e,u,da),fb(r,.67*p,r,p,da,F,D,Oa,v,oa)):(x.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=
+!0,ea.edge=!0,ea.style+=ja,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.33*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=b(da.style,e,u,da),fb(r,.8*p,r,p,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ja,xa.style+=b(xa.style,e,u,xa),fb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+=
"shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=b(v.style,e,u,v);"PEIndicator2Block"==w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",
new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));
E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,u,E,G);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var te=!1;"PEPoweredValveBlock"==w.Class?1!=e.poweredHandOperated&&(te=!0):1!=
e.handOperated&&(te=!0);if(te){e=h(w).Properties;P=e.BoundingBox;var Sf=P.h;P.h="PEAngleValveBlock"==w.Class||"PEAngleGlobeValveBlock"==w.Class?.7*P.h:.6*P.h;v=new mxCell("",new mxGeometry(Math.round(.75*P.x+wc),Math.round(.75*(P.y+Sf-P.h)+xc),Math.round(.75*P.w),Math.round(.75*P.h)),"");v.vertex=!0;Qb(v,w,D)}if("PEPoweredValveBlock"==w.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",
-x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+M(e.PoweredText)+Q(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(w.Class){case "PEGateValveBlock":v.style+=
-"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
-new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,110),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
-ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
-0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=
+x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+N(e.PoweredText)+O(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(w.Class){case "PEGateValveBlock":v.style+=
+"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
+new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,110),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
+ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
+0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=
!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);
-E.vertex=!0;x.insert(E);1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,
+E.vertex=!0;x.insert(E);1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,
1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ha=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"):
l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,p-(e.Panels-e.Selected)*ha+(l-e.Selected)*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Panel_"+(l+1)]),x[l].style+=a(e["Panel_"+(l+1)],G),0>x[l].style.indexOf(";align=")&&(x[l].style+="align=left;spacingLeft=5;");var Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?
new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-20-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,
-e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-
+e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,u,T));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-
20-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;var Hb=3,Ha=(r+Hb)/
(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=
!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
-E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=
-Ua,U.style+=b(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=
+E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=
+Ua,T.style+=b(T.style,e,u,T));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=
b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
-new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
-U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,p),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+
+new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
+T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,u,T));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,p),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+
(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,ha-Hb),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,
e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",
-E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
+E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,u,T));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ha+.5*ha-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,
2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ha,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=
a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,
@@ -268,35 +268,35 @@ b(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeCol
Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";
"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=b(v.style,e,u,v);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");
E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+
-Y+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{kb=T(e.FillColor);var Kd=T(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:T(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:T(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
+Y+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{kb=U(e.FillColor);var Kd=U(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:U(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:U(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
Kd,be=19;else if("row"==e.GridLines)Sc="border-bottom: 1px solid "+Kd,be=19;else if("default"==e.GridLines||"column"==e.GridLines)Sc="border-right: 1px solid "+Kd;tc=tc.filter(function(gb){return gb});/^\{[^}]*\}$/.test(tc[tc.length-1])&&tc.pop();Fc=tc[0].split(",").length;var jf="";for(fa=0;fa<Fc-1;fa++)jf+=" , ";for(l=tc.length;l<Math.ceil(p/20);l++)tc.push(jf);for(l=0;l<tc.length;l++){Ld+='<tr style="height: '+be+"px;background:"+(0==l?Oc:l%2?kb:hf)+'">';var kf=tc[l].split(",");for(fa=0;fa<kf.length;fa++){var Md=
-e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?T(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"strokeColor=none;"),
+e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?U(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"strokeColor=none;"),
x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];ha=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),""),E[l].vertex=!0,v.insert(E[l])):
(x[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=
l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*
Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);x=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-
1?new mxCell("",new mxGeometry(0,0,Ha,p),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),x[l].geometry.relative=!0,x[l].geometry.offset=new mxPoint(l*Ha,0),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["MenuItem_"+(l+1)]),x[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";
-break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];nb=[];var jd=[];ha=p/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),
-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=J(e,u),
-Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ia&&(ia=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ia,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*
+break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];nb=[];var jd=[];ha=p/e.Lines;ja=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ja&&(ja=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),
+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=J(e,u),
+Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ja&&(ja=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ja,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*
r,ha),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=J(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=
m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=
-new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=b(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,u);db=Math.round(.75*e.TitleHeight)||25;ia=ia.replace("fillColor",
-"swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ue=[],wb=db/p;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
+new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);T=[];for(l=0;l<e.Buttons;l++)T[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),T[l].geometry.relative=!0,T[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),T[l].vertex=!0,v.insert(T[l]),T[l].value=m(e["Button_"+(l+1)]),T[l].style+=a(e["Button_"+(l+1)],G),T[l].style+=b(T[l].style,e,u,T[l],G);break;case "UMLClassBlock":if(0==e.Simple){ja=ba(e,u);db=Math.round(.75*e.TitleHeight)||25;ja=ja.replace("fillColor",
+"swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ue=[],wb=db/p;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
Wb+=8,ue[l].vertex=!0,v.insert(ue[l])),ha=0,0==e.Attributes?ha=l=1:l<e.Attributes?(ha=e["Text"+(l+1)+"Percent"],wb+=ha):ha=1-wb,pc=Math.round((p-db)*ha)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=
-ia+O(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+
-db+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ia=T(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,u);X=[];wb=db/p;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),
-X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?
-v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],
-G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=
-ia+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+
-";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),
-Ga[l].style+=ia+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+
-ia+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ia+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+O(e,u,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,u,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Sa("blank",
+ja+Q(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+
+db+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ja=U(e.FillColor),je=Rd(ja,.85),v.style+="fillColor="+je+";"):v.style+=ba(e,u);X=[];wb=db/p;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),
+X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?
+v.style+"fillColor=#e0e0e0;":v.style+ba(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ja+a(e["Key"+(l+1)],
+G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+Q(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=
+ja+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+db+
+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ba(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),
+Ga[l].style+=ja+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+Q(e,u,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+
+ja+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ba(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ja+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+Q(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ja+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+Q(e,u,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,u,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Sa("blank",
r,p,v,e,u);break;case "GCPServiceCardReallyBlankBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardBucketBlock":Sa("bucket",r,p,v,e,u);break;case "GCPServiceCardCDNInterconnectBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardCloudDNSBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardClusterBlock":Sa("cluster",r,p,v,e,u);break;case "GCPServiceCardDiskSnapshotBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardEdgePopBlock":Sa("google_network_edge_cache",
r,p,v,e,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Sa("frontend_platform_services",r,p,v,e,u);break;case "GCPServiceCardGatewayBlock":Sa("gateway",r,p,v,e,u);break;case "GCPServiceCardGoogleNetworkBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardImageServicesBlock":Sa("image_services",r,p,v,e,u);break;case "GCPServiceCardLoadBalancerBlock":Sa("network_load_balancer",r,p,v,e,u);break;case "GCPServiceCardLocalComputeBlock":Sa("dedicated_game_server",r,p,v,
e,u);break;case "GCPServiceCardLocalStorageBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardLogsAPIBlock":Sa("logs_api",r,p,v,e,u);break;case "GCPServiceCardMemcacheBlock":Sa("memcache",r,p,v,e,u);break;case "GCPServiceCardNATBlock":Sa("nat",r,p,v,e,u);break;case "GCPServiceCardPaymentFormBlock":Sa("external_payment_form",r,p,v,e,u);break;case "GCPServiceCardPushNotificationsBlock":Sa("push_notification_service",r,p,v,e,u);break;case "GCPServiceCardScheduledTasksBlock":Sa("scheduled_tasks",
@@ -305,9 +305,9 @@ e,u);break;case "GCPInputPayment":Wa("payment",1,.8,r,p,v,e,u);break;case "GCPIn
case "GCPInputCircuitBoard":Wa("circuit_board",1,.9,r,p,v,e,u);break;case "GCPInputLive":Wa("live",.74,1,r,p,v,e,u);break;case "GCPInputUsers":Wa("users",1,.63,r,p,v,e,u);break;case "GCPInputLaptop":Wa("laptop",1,.66,r,p,v,e,u);break;case "GCPInputApplication":Wa("application",1,.8,r,p,v,e,u);break;case "GCPInputLightbulb":Wa("lightbulb",.7,1,r,p,v,e,u);break;case "GCPInputGame":Wa("game",1,.54,r,p,v,e,u);break;case "GCPInputDesktop":Wa("desktop",1,.9,r,p,v,e,u);break;case "GCPInputDesktopAndMobile":Wa("desktop_and_mobile",
1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Wa("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Wa("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Wa("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Wa("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,
e,u,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,lf=e.FillColor,mf=e.DrawData.Data,de='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',ve=null;for(l=0;l<mf.length;l++){var uc=mf[l],Xf=uc.a,Yf=("prop"==uc.w||null==uc.w?Vf:uc.w)/Math.min(r,p)*.75;Rc="prop"==uc.s||null==uc.s?Wf:uc.s;Y="prop"==uc.f||null==uc.f?lf:uc.f;"object"==typeof Y&&(null!=Y.url&&(ve="shape=image;image="+g(Y.url)+";"),Y=Array.isArray(Y.cs)?Y.cs[0].c:lf);de+='<path d="'+Xf+'" fill="'+Y+'" stroke="'+
-Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,u,v,G);mb=ba(e,u,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:p),100),xe=
+Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,u,v,G);mb=ca(e,u,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:p),100),xe=
new mxCell("",new mxGeometry(0,0,we,p),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,p),"shape=curlyBracket;rounded=1;flipH=1;"+nf+of);ye.vertex=!0;ye.geometry.relative=!0;v.insert(xe);v.insert(ye);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=
-"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,u,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ba(e,u,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
+"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,u,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ca(e,u,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
Ke(e.Stencil.id,e.Stencil));var Ob=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Ob.x/Ob.w,$f=-Ob.y/Ob.h;for(l=0;l<Ob.stencils.length;l++){var ob=Ob.stencils[l];oa=new mxCell("",new mxGeometry(Zf,$f,r,p),"shape="+ob.shapeStencil+";");var ag=ob.FillColor,bg=ob.LineColor,cg=ob.LineWidth;"prop"==ob.FillColor&&(ob.FillColor=e.FillColor);null==ob.FillColor&&(ob.FillColor="#ffffff00");"prop"==ob.LineColor&&(ob.LineColor=e.LineColor);null==ob.LineColor&&(ob.LineColor="#ffffff00");"prop"==ob.LineWidth&&(ob.LineWidth=
e.LineWidth);oa.style+=b(oa.style,ob,u,oa,G);ob.FillColor=ag;ob.LineColor=bg;ob.LineWidth=cg;Y=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;oa.style+=b(oa.style,e,u,oa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;oa.vertex=!0;oa.geometry.relative=!0;v.insert(oa)}var Xb=0;for(mb=e.Rotation;e["t"+Xb];){var pf=e["t"+Xb],qf=m(pf);if(qf){ra=new mxCell(qf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=
b(ra.style,pf,u,ra,G);ra.style+=b(ra.style,e,u,ra,G);e.Rotation=mb;if(null!=Ob.text&&null!=Ob.text["t"+Xb]){var eb=Ob.text["t"+Xb];eb.Rotation=mb+(eb.rotation?eb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,eb,u,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Ob.w);eb.h&&(Yb.height*=eb.h/Ob.h);eb.x&&(Yb.x=eb.x/Ob.w);eb.y&&(Yb.y=eb.y/Ob.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/p);eb.fx&&(Yb.x=(0<
@@ -316,16 +316,16 @@ e,u,v,G);break;case "DoubleArrowBlock":ze=e.Head*p/r;v.style="shape=doubleArrow;
"shape=mxgraph.aws3.virtual_private_cloud;fillColor=#F58536;";md=52;nd=36;break;case "ElasticBeanStalkContainer2017":ld="shape=mxgraph.aws3.elastic_beanstalk;fillColor=#F58536;";md=30;nd=41;break;case "EC2InstanceContents2017":ld="shape=mxgraph.aws3.instance;fillColor=#F58536;";md=40;nd=41;break;case "AWSCloudContainer2017":ld="shape=mxgraph.aws3.cloud;fillColor=#F58536;";md=52;nd=36;break;case "CorporateDataCenterContainer2017":ld="shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;",md=
30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;nb=new mxCell("",new mxGeometry(20,-20,md,nd),ld);nb.vertex=!0;v.insert(nb);break;case "FlexiblePolygonBlock":var Wc=['<shape strokewidth="inherit"><foreground>'];Wc.push("<path>");for(fa=0;fa<e.Vertices.length;fa++)Qa=e.Vertices[fa],0==fa?Wc.push('<move x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>'):Wc.push('<line x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>');Wc.push("</path>");
Wc.push("<fillstroke/>");Wc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Wc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "InfographicsBlock":var rf=e.ShapeData_1.Value,Ae=e.ShapeData_2.Value-rf,Be=e.ShapeData_3.Value-rf,ee=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;kb=e["ShapeData_"+Xb].Value;kb="=fillColor()"==kb?e.FillColor:kb;var od=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="+
-ee+";strokeColor=none;fillColor="+T(od)+";"+ka(od,"fillOpacity");v.style+=b(v.style,e,u,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity"));ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+
-sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+T(od)+";"+ka(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
-T(od)+";"+ka(od,"fillOpacity"),v.style+=b(v.style,e,u,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,p),"strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity")),ab.style+=b(ab.style,e,u,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||
-fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ia=ca(e,u);db=p/2;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,
+ee+";strokeColor=none;fillColor="+U(od)+";"+ia(od,"fillOpacity");v.style+=b(v.style,e,u,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+U(kb)+";"+ia(kb,"fillOpacity"));ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+
+sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+U(kb)+";"+ia(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+U(od)+";"+ia(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
+U(od)+";"+ia(od,"fillOpacity"),v.style+=b(v.style,e,u,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,p),"strokeColor=none;fillColor="+U(kb)+";"+ia(kb,"fillOpacity")),ab.style+=b(ab.style,e,u,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||
+fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ja=ba(e,u);db=p/2;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,
e,u,v,G);var Ec=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Ec.value=m(e.Name);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.Name,G);Ec.style+=b(Ec.style,e,u,Ec,G)}catch(gb){console.log(gb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var tf=v.geometry,uf=new mxCell(m(e.Title),new mxGeometry(0,tf.height+4,tf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");
-uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,P=u,r=e,p=0,Z=0;if(-90==D||-270==D){P=e;r=u;var aa=(e-u)/2;p=-aa/u;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=w.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&
-0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ja){console.log(ja)}}function Je(w,F,D,u,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";
+uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,P=u,r=e,p=0,Z=0;if(-90==D||-270==D){P=e;r=u;var aa=(e-u)/2;p=-aa/u;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=w.style.split(";").filter(function(ka){return 0>ka.indexOf("fillColor=")&&
+0>ka.indexOf("strokeColor=")&&0>ka.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ka){console.log(ka)}}function Je(w,F,D,u,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";
break;case "italic":Xa+="font-style: italic;";break;case "underline":Xa+="text-decoration: underline;";break;case "size":Xa+="font-size:"+z(.75*Gc)+"px;";break;case "color":Xa+="color:"+R(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+R(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Kb,$b,Xa){Kb=Aa+Kb;ra[Kb]=$b;$b="";for(var pb=0;pb<V.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[V[pb]]||"&nbsp;")+"</div>";pb=
-mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;u.addCell(Xa,aa)},p=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;u.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||
-{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<V.length;w++)ma.push(P(ja,V[w]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];
+mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;u.addCell(Xa,aa)},p=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;u.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ka=F.BlockItemDefaultStyle||
+{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ka.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ka.props,{},aa,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<V.length;w++)ma.push(P(ka,V[w]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];
r(La.pk,La.ie[0]?La.ie[0].nf:null,La.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ia=F.ContractMap.c.People;var bb=Ia.id;bb=bb.substr(0,bb.lastIndexOf("_"));for(w=0;w<V.length;w++)V[w]=Ia.f[V[w]]||V[w]}else for(Ka=0;Ka<l.length;Ka++)if("ForeignKeyGraph"==l[Ka].type)bb=l[Ka].c[0].id,bb=bb.substr(0,bb.lastIndexOf("_"));else if("MappedGraph"==l[Ka].type)for(w=0;w<V.length;w++)V[w]=l[Ka].nfs[V[w]]||V[w];var Ea;for(Ea in D){La=D[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&
La[Ra].Properties.ForeignKeys[0]){var la=La[Ra].Properties.ForeignKeys[0].SourceFields[0];var Ma=La[Ra].Properties.Schema.PrimaryKey[0]}if(Na)break}F={};for(var ya in Na){La=Na[ya];var za=La[Ma],Pb=La[la];za==Pb?(F[za]=za+Date.now(),za=F[za],La[Ma]=za,r(za,Pb,La)):r(za,F[Pb]||Pb,La)}}for(Ea in ra){var fa=ra[Ea];if(null!=fa){var xb=e[Aa+fa],Va=e[Ea];if(null!=xb&&null!=Va){var rc=new mxCell("",new mxGeometry(0,0,100,100),"");rc.geometry.relative=!0;rc.edge=!0;null!=na&&null!=na.props&&Qb(rc,na.props,
u,null,null,!0);u.addCell(rc,aa,null,xb,Va)}}}var vc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(u,0,vc,.75*wa.NodeSpacing.NeighborSeparation)).execute(aa);for(Ka=wa=r=0;aa.children&&Ka<aa.children.length;Ka++){var Fb=aa.children[Ka].geometry;r=Math.max(r,Fb.x+Fb.width);wa=Math.max(wa,Fb.y+Fb.height)}var Rb=aa.geometry;Rb.y-=vc;Rb.width=r;Rb.height=wa}catch(Kb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Kb)}}var wc=0,xc=0,ge="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",
@@ -1048,40 +1048,40 @@ ExtShapeLaptopBlock:"strokeColor=none;shape=mxgraph.citrix.laptop_2;verticalLabe
InfographicsBlock:"mxCompositeShape",FlexiblePolygonBlock:"mxCompositeShape",PersonRoleBlock:"mxCompositeShape"},xf=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qd.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qd.prototype.getX=function(w){return Math.round(100*this.nurbsValues[4*(w+1)])/100};Qd.prototype.getY=function(w){return Math.round(100*this.nurbsValues[4*(w+1)+1])/100};LucidImporter.importState=function(w,F,D){function u(p){null!=p.state&&EditorUi.debug("convertLucidChart addPages",
p);if(p.Properties){for(var Z in p.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),p.Properties[Z]);LucidImporter.globalProps=p.Properties}for(var aa in p.Pages)Z=p.Pages[aa],Z.id=aa,Z.Data=p.Data,e.push(Z);e.sort(function(V,wa){return V.Properties.Order<wa.Properties.Order?-1:V.Properties.Order>wa.Properties.Order?1:0});for(p=0;p<e.length;p++)LucidImporter.pageIdsMap[e[p].id]=p}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=D;LucidImporter.globalProps=
{};LucidImporter.pageIdsMap={};LucidImporter.hasUnknownShapes=!1;LucidImporter.hasOrgChart=!1;LucidImporter.hasTimeLine=!1;LucidImporter.hasExtImgs=!1;F=['<?xml version="1.0" encoding="UTF-8"?>','<mxfile type="Lucidchart-Import" version="'+EditorUi.VERSION+'" host="'+mxUtils.htmlEntities(window.location.hostname)+'" agent="'+mxUtils.htmlEntities(navigator.appVersion)+'" modified="'+mxUtils.htmlEntities((new Date).toISOString())+'">'];D&&D.transparentEdgeLabels&&(ge=ge.replace("labelBackgroundColor=default;",
-"labelBackgroundColor=none;"));var e=[];null!=w.state?u(JSON.parse(w.state)):null==w.Page&&null!=w.Pages?u(w):e.push(w);w=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(w,e[P],!0);var r=D.encode(w.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",T(e[P].Properties.FillColor)),
+"labelBackgroundColor=none;"));var e=[];null!=w.state?u(JSON.parse(w.state)):null==w.Page&&null!=w.Pages?u(w):e.push(w);w=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(w,e[P],!0);var r=D.encode(w.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",U(e[P].Properties.FillColor)),
e[P].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[P].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[P].Properties.Size.w),r.setAttribute("pageHeight",.75*e[P].Properties.Size.h)),null!=e[P].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[P].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);w.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=
-null;return F.join("")}})();function VsdxExport(g){function y(H,J){var N={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
+null;return F.join("")}})();function VsdxExport(g){function y(H,J){var M={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
"_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>",
"docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>",
"docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>",
"visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>",
"visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>",
"visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"},
-L;for(L in N)if(1<J&&L==M.CONTENT_TYPES_XML){for(var O=mxUtils.parseXml(N[L]),ba=O.documentElement,W=ba.children,R=null,T=0;T<W.length;T++){var ka=W[T];"/visio/pages/page1.xml"==ka.getAttribute(M.PART_NAME)&&(R=ka)}for(T=2;T<=J;T++)W=R.cloneNode(),W.setAttribute(M.PART_NAME,"/visio/pages/page"+T+".xml"),ba.appendChild(W);A(H,L,O,!0)}else H.file(L,N[L])}function z(H,J,N){return null!=H.createElementNS?H.createElementNS(J,N):H.createElement(N)}function B(H){var J=Q[H];null==J&&(J=S++,Q[H]=J);return J}
-function m(H){var J={};try{var N=H.getGraphBounds().clone(),L=H.view.scale,O=H.view.translate,ba=Math.round(N.x/L)-O.x,W=Math.round(N.y/L)-O.y,R=H.pageFormat.width,T=H.pageFormat.height;0>ba&&(ba+=Math.ceil((O.x-N.x/L)/R)*R);0>W&&(W+=Math.ceil((O.y-N.y/L)/T)*T);var ka=Math.max(1,Math.ceil((N.width/L+ba)/R)),ca=Math.max(1,Math.ceil((N.height/L+W)/T));J.gridEnabled=H.gridEnabled;J.gridSize=H.gridSize;J.guidesEnabled=H.graphHandler.guidesEnabled;J.pageVisible=H.pageVisible;J.pageScale=H.pageScale;J.pageWidth=
-H.pageFormat.width*ka;J.pageHeight=H.pageFormat.height*ca;J.backgroundClr=H.background;J.mathEnabled=H.mathEnabled;J.shadowVisible=H.shadowVisible}catch(qa){}return J}function h(H,J,N,L){return c(H,J/M.CONVERSION_FACTOR,N,L)}function c(H,J,N,L){N=z(N,M.XMLNS,"Cell");N.setAttribute("N",H);N.setAttribute("V",J);L&&N.setAttribute("F",L);return N}function a(H,J,N,L,O){var ba=z(O,M.XMLNS,"Row");ba.setAttribute("T",H);ba.setAttribute("IX",J);ba.appendChild(h("X",N,O));ba.appendChild(h("Y",L,O));return ba}
-function b(H,J,N){var L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(L&&"none"!=L){if(J.appendChild(c("FillForegnd",L,N)),(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=L){J.appendChild(c("FillBkgnd",L,N));L=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var O=28;if(L)switch(L){case mxConstants.DIRECTION_EAST:O=25;break;case mxConstants.DIRECTION_WEST:O=27;break;case mxConstants.DIRECTION_NORTH:O=30}J.appendChild(c("FillPattern",O,N))}}else J.appendChild(c("FillPattern",
-0,N));(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=L?J.appendChild(c("LineColor",L,N)):J.appendChild(c("LinePattern",0,N));(L=H.style[mxConstants.STYLE_STROKEWIDTH])&&J.appendChild(h("LineWeight",L,N));(O=H.style[mxConstants.STYLE_OPACITY])?L=O:(L=H.style[mxConstants.STYLE_FILL_OPACITY],O=H.style[mxConstants.STYLE_STROKE_OPACITY]);L&&J.appendChild(c("FillForegndTrans",1-parseInt(L)/100,N));O&&J.appendChild(c("LineColorTrans",1-parseInt(O)/100,N));if(1==H.style[mxConstants.STYLE_DASHED]){L=
-H.style[mxConstants.STYLE_DASH_PATTERN];O=9;if(L)switch(L){case "1 1":O=10;break;case "1 2":O=3;break;case "1 4":O=17}J.appendChild(c("LinePattern",O,N))}1==H.style[mxConstants.STYLE_SHADOW]&&(J.appendChild(c("ShdwPattern",1,N)),J.appendChild(c("ShdwForegnd","#000000",N)),J.appendChild(c("ShdwForegndTrans",.6,N)),J.appendChild(c("ShapeShdwType",1,N)),J.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",N)),J.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",N)),J.appendChild(c("ShapeShdwScaleFactor",
-"1",N)),J.appendChild(c("ShapeShdwBlur","0.05555555555555555",N)),J.appendChild(c("ShapeShdwShow",2,N)));1==H.style[mxConstants.STYLE_FLIPH]&&J.appendChild(c("FlipX",1,N));1==H.style[mxConstants.STYLE_FLIPV]&&J.appendChild(c("FlipY",1,N));1==H.style[mxConstants.STYLE_ROUNDED]&&J.appendChild(h("Rounding",.1*H.cell.geometry.width,N));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&J.appendChild(c("TextBkgnd",H,N))}function d(H,J,N,L,O,ba){var W=z(L,M.XMLNS,"Shape");W.setAttribute("ID",
-H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=J.width/2;var R=J.height/2;W.appendChild(h("PinX",J.x+H+(ba?0:K.shiftX),L));W.appendChild(h("PinY",O-J.y-R-(ba?0:K.shiftY),L));W.appendChild(h("Width",J.width,L));W.appendChild(h("Height",J.height,L));W.appendChild(h("LocPinX",H,L));W.appendChild(h("LocPinY",R,L));W.appendChild(c("LayerMember",N+"",L));return W}function f(H,J){H=M.ARROWS_MAP[(null==H?"none":H)+"|"+
-(null==J?"1":J)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,J,N,L,O,ba){var W=N.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;N=z(L,M.XMLNS,"Shape");var R=B(H.id);N.setAttribute("ID",R);N.setAttribute("NameU","Dynamic connector."+R);N.setAttribute("Name","Dynamic connector."+R);N.setAttribute("Type","Shape");N.setAttribute("Master","4");var T=K.state;R=W.absolutePoints;var ka=W.cellBounds,ca=
-ka.width/2,qa=ka.height/2;N.appendChild(h("PinX",ka.x+ca+(ba?0:K.shiftX),L));N.appendChild(h("PinY",O-ka.y-qa-(ba?0:K.shiftY),L));N.appendChild(h("Width",ka.width,L));N.appendChild(h("Height",ka.height,L));N.appendChild(h("LocPinX",ca,L));N.appendChild(h("LocPinY",qa,L));K.newEdge(N,W,L);ca=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*T.scale-ka.x+T.dx+(pa||ba?0:K.shiftX);sa=(Fa?0:ka.height)-sa*T.scale+ka.y-T.dy-(pa||ba?0:K.shiftY);return{x:Za,y:sa}};qa=ca(R[0],!0);N.appendChild(h("BeginX",ka.x+qa.x,
-L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));N.appendChild(h("BeginY",O-ka.y+qa.y,L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(R[R.length-1],!0);N.appendChild(h("EndX",ka.x+qa.x,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(h("EndY",O-ka.y+qa.y,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(c("BegTrigger","2",L,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));N.appendChild(c("EndTrigger","2",L,H.target?"_XFTRIGGER(Sheet."+
-B(H.target.id)+"!EventXFMod)":null));N.appendChild(c("ConFixedCode","6",L));N.appendChild(c("LayerMember",J+"",L));b(W,N,L);J=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);N.appendChild(c("BeginArrow",H,L));N.appendChild(c("BeginArrowSize",k(J),L));J=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);N.appendChild(c("EndArrow",H,L));N.appendChild(c("EndArrowSize",k(J),
-L));null!=W.text&&W.text.checkBounds()&&(K.save(),W.text.paint(K),K.restore());W=z(L,M.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)J=ca(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,J.x,J.y,L));W.appendChild(c("NoFill","1",L));W.appendChild(c("NoLine","0",L));N.appendChild(W);return N}function q(H,J,N,L,O,ba,W){var R=H.geometry,T=R;if(null!=R)try{R.relative&&ba&&(T=R.clone(),R.x*=ba.width,R.y*=ba.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,
-R.y+=R.offset.y),R.relative=0);var ka=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(ka+"10000",R,J,L,O,W);ca.setAttribute("Type","Group");var qa=z(L,M.XMLNS,"Shapes");K.save();K.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=q(H,J,N,L,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(O=0;O<H.getChildCount();O++)Fa=q(H.children[O],J,N,L,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);
-K.restore();return ca}if(H.vertex){ca=d(ka,R,J,L,O,W);var pa=N.view.getState(H,!0);null!=pa&&(b(pa,ca,L),K.newShape(ca,pa,L),null!=pa.text&&pa.text.checkBounds()&&(K.save(),pa.text.paint(K),K.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(K.save(),pa.shape.paint(K),K.restore()),ca.appendChild(K.getShapeGeo()),K.endShape(),ca.setAttribute("Type",K.getShapeType()));return ca}return n(H,J,N,L,O,W)}finally{H.geometry=T}else return null}function t(H,J){var N=mxUtils.createXmlDocument(),L=z(N,M.XMLNS,
-"PageContents");L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var O=z(N,M.XMLNS,"Shapes");L.appendChild(O);var ba=H.model,W=H.view.translate,R=H.view.scale,T=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(T.x/R<W.x||T.y/R<W.y)K.shiftX=Math.ceil((W.x-T.x/R)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((W.y-T.y/R)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-W.x,-W.y);K.scale(1/R);K.newPage();
-R=H.model.getChildCells(H.model.root);W={};for(T=0;T<R.length;T++)W[R[T].id]=T;for(var ka in ba.cells)R=ba.cells[ka],T=null!=R.parent?W[R.parent.id]:null,null!=T&&(R=q(R,T,H,N,J.pageHeight),null!=R&&O.appendChild(R));H=z(N,M.XMLNS,"Connects");L.appendChild(H);for(ka in ba.cells)R=ba.cells[ka],R.edge&&(R.source&&(J=z(N,M.XMLNS,"Connect"),J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","BeginX"),J.setAttribute("ToSheet",B(R.source.id)),H.appendChild(J)),R.target&&(J=z(N,M.XMLNS,"Connect"),
-J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","EndX"),J.setAttribute("ToSheet",B(R.target.id)),H.appendChild(J)));N.appendChild(L);K.restore();return N}function A(H,J,N,L){H.file(J,(L?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(N,"\n"))}function C(H,J,N,L){var O=mxUtils.createXmlDocument(),ba=mxUtils.createXmlDocument(),W=z(O,M.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",
-"xmlns:r",M.XMLNS_R);var R=z(ba,M.RELS_XMLNS,"Relationships"),T=1,ka;for(ka in J){var ca="page"+T+".xml",qa=z(O,M.XMLNS,"Page");qa.setAttribute("ID",T-1);qa.setAttribute("NameU",ka);qa.setAttribute("Name",ka);var sa=z(O,M.XMLNS,"PageSheet"),Fa=L[ka];sa.appendChild(h("PageWidth",Fa.pageWidth,O));sa.appendChild(h("PageHeight",Fa.pageHeight,O));sa.appendChild(c("PageScale",Fa.pageScale,O));sa.appendChild(c("DrawingScale",1,O));Fa=z(O,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+T);var pa=
-z(O,M.XMLNS,"Section");pa.setAttribute("N","Layer");for(var Za=N[ka],Qb=0;Qb<Za.length;Qb++){var vb=z(O,M.XMLNS,"Row");vb.setAttribute("IX",Qb+"");pa.appendChild(vb);vb.appendChild(c("Name",Za[Qb].name,O));vb.appendChild(c("Color","255",O));vb.appendChild(c("Status","0",O));vb.appendChild(c("Visible",Za[Qb].visible?"1":"0",O));vb.appendChild(c("Print","1",O));vb.appendChild(c("Active","0",O));vb.appendChild(c("Lock",Za[Qb].locked?"1":"0",O));vb.appendChild(c("Snap","1",O));vb.appendChild(c("Glue",
-"1",O));vb.appendChild(c("NameUniv",Za[Qb].name,O));vb.appendChild(c("ColorTrans","0",O))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ba,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+T);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);R.appendChild(qa);A(H,M.VISIO_PAGES+ca,J[ka]);T++}O.appendChild(W);ba.appendChild(R);A(H,M.VISIO_PAGES+"pages.xml",O);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ba)}function I(H,J){J=M.VISIO_PAGES_RELS+"page"+
-J+".xml.rels";var N=mxUtils.createXmlDocument(),L=z(N,M.RELS_XMLNS,"Relationships"),O=z(N,M.RELS_XMLNS,"Relationship");O.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");O.setAttribute("Id","rId1");O.setAttribute("Target","../masters/master1.xml");L.appendChild(O);var ba=K.images;if(0<ba.length)for(var W=0;W<ba.length;W++)O=z(N,M.RELS_XMLNS,"Relationship"),O.setAttribute("Type",M.XMLNS_R+"/image"),O.setAttribute("Id","rId"+(W+2)),O.setAttribute("Target","../media/"+
-ba[W]),L.appendChild(O);N.appendChild(L);A(H,J,N)}var M=this,K=new mxVsdxCanvas2D,Q={},S=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var J=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);O[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&O[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},N=new JSZip;K.init(N);Q={};S=1;var L={},O={},ba={},W=null!=
-g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);L[Fa]=t(pa,Za);J(pa,Fa);I(N,ca+1);ba[Fa]=Za},T=g.editor.graph.getSelectionCells(),ka=g.currentPage;if(H)R(ka);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ka!=g.currentPage&&g.selectPage(ka,!0);g.editor.graph.setSelectionCells(T)}}else{R=g.editor.graph;var sa=m(R);L.Page1=t(R,sa);J(R,"Page1");I(N,1);ba.Page1=sa}y(N,W);C(N,L,O,ba);
-H=function(){N.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<K.filesLoading?K.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
+L;for(L in M)if(1<J&&L==N.CONTENT_TYPES_XML){for(var Q=mxUtils.parseXml(M[L]),ca=Q.documentElement,W=ca.children,R=null,U=0;U<W.length;U++){var ia=W[U];"/visio/pages/page1.xml"==ia.getAttribute(N.PART_NAME)&&(R=ia)}for(U=2;U<=J;U++)W=R.cloneNode(),W.setAttribute(N.PART_NAME,"/visio/pages/page"+U+".xml"),ca.appendChild(W);A(H,L,Q,!0)}else H.file(L,M[L])}function z(H,J,M){return null!=H.createElementNS?H.createElementNS(J,M):H.createElement(M)}function B(H){var J=O[H];null==J&&(J=S++,O[H]=J);return J}
+function m(H){var J={};try{var M=H.getGraphBounds().clone(),L=H.view.scale,Q=H.view.translate,ca=Math.round(M.x/L)-Q.x,W=Math.round(M.y/L)-Q.y,R=H.pageFormat.width,U=H.pageFormat.height;0>ca&&(ca+=Math.ceil((Q.x-M.x/L)/R)*R);0>W&&(W+=Math.ceil((Q.y-M.y/L)/U)*U);var ia=Math.max(1,Math.ceil((M.width/L+ca)/R)),ba=Math.max(1,Math.ceil((M.height/L+W)/U));J.gridEnabled=H.gridEnabled;J.gridSize=H.gridSize;J.guidesEnabled=H.graphHandler.guidesEnabled;J.pageVisible=H.pageVisible;J.pageScale=H.pageScale;J.pageWidth=
+H.pageFormat.width*ia;J.pageHeight=H.pageFormat.height*ba;J.backgroundClr=H.background;J.mathEnabled=H.mathEnabled;J.shadowVisible=H.shadowVisible}catch(qa){}return J}function h(H,J,M,L){return c(H,J/N.CONVERSION_FACTOR,M,L)}function c(H,J,M,L){M=z(M,N.XMLNS,"Cell");M.setAttribute("N",H);M.setAttribute("V",J);L&&M.setAttribute("F",L);return M}function a(H,J,M,L,Q){var ca=z(Q,N.XMLNS,"Row");ca.setAttribute("T",H);ca.setAttribute("IX",J);ca.appendChild(h("X",M,Q));ca.appendChild(h("Y",L,Q));return ca}
+function b(H,J,M){var L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(L&&"none"!=L){if(J.appendChild(c("FillForegnd",L,M)),(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=L){J.appendChild(c("FillBkgnd",L,M));L=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var Q=28;if(L)switch(L){case mxConstants.DIRECTION_EAST:Q=25;break;case mxConstants.DIRECTION_WEST:Q=27;break;case mxConstants.DIRECTION_NORTH:Q=30}J.appendChild(c("FillPattern",Q,M))}}else J.appendChild(c("FillPattern",
+0,M));(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=L?J.appendChild(c("LineColor",L,M)):J.appendChild(c("LinePattern",0,M));(L=H.style[mxConstants.STYLE_STROKEWIDTH])&&J.appendChild(h("LineWeight",L,M));(Q=H.style[mxConstants.STYLE_OPACITY])?L=Q:(L=H.style[mxConstants.STYLE_FILL_OPACITY],Q=H.style[mxConstants.STYLE_STROKE_OPACITY]);L&&J.appendChild(c("FillForegndTrans",1-parseInt(L)/100,M));Q&&J.appendChild(c("LineColorTrans",1-parseInt(Q)/100,M));if(1==H.style[mxConstants.STYLE_DASHED]){L=
+H.style[mxConstants.STYLE_DASH_PATTERN];Q=9;if(L)switch(L){case "1 1":Q=10;break;case "1 2":Q=3;break;case "1 4":Q=17}J.appendChild(c("LinePattern",Q,M))}1==H.style[mxConstants.STYLE_SHADOW]&&(J.appendChild(c("ShdwPattern",1,M)),J.appendChild(c("ShdwForegnd","#000000",M)),J.appendChild(c("ShdwForegndTrans",.6,M)),J.appendChild(c("ShapeShdwType",1,M)),J.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",M)),J.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",M)),J.appendChild(c("ShapeShdwScaleFactor",
+"1",M)),J.appendChild(c("ShapeShdwBlur","0.05555555555555555",M)),J.appendChild(c("ShapeShdwShow",2,M)));1==H.style[mxConstants.STYLE_FLIPH]&&J.appendChild(c("FlipX",1,M));1==H.style[mxConstants.STYLE_FLIPV]&&J.appendChild(c("FlipY",1,M));1==H.style[mxConstants.STYLE_ROUNDED]&&J.appendChild(h("Rounding",.1*H.cell.geometry.width,M));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&J.appendChild(c("TextBkgnd",H,M))}function d(H,J,M,L,Q,ca){var W=z(L,N.XMLNS,"Shape");W.setAttribute("ID",
+H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=J.width/2;var R=J.height/2;W.appendChild(h("PinX",J.x+H+(ca?0:K.shiftX),L));W.appendChild(h("PinY",Q-J.y-R-(ca?0:K.shiftY),L));W.appendChild(h("Width",J.width,L));W.appendChild(h("Height",J.height,L));W.appendChild(h("LocPinX",H,L));W.appendChild(h("LocPinY",R,L));W.appendChild(c("LayerMember",M+"",L));return W}function f(H,J){H=N.ARROWS_MAP[(null==H?"none":H)+"|"+
+(null==J?"1":J)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,J,M,L,Q,ca){var W=M.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;M=z(L,N.XMLNS,"Shape");var R=B(H.id);M.setAttribute("ID",R);M.setAttribute("NameU","Dynamic connector."+R);M.setAttribute("Name","Dynamic connector."+R);M.setAttribute("Type","Shape");M.setAttribute("Master","4");var U=K.state;R=W.absolutePoints;var ia=W.cellBounds,ba=
+ia.width/2,qa=ia.height/2;M.appendChild(h("PinX",ia.x+ba+(ca?0:K.shiftX),L));M.appendChild(h("PinY",Q-ia.y-qa-(ca?0:K.shiftY),L));M.appendChild(h("Width",ia.width,L));M.appendChild(h("Height",ia.height,L));M.appendChild(h("LocPinX",ba,L));M.appendChild(h("LocPinY",qa,L));K.newEdge(M,W,L);ba=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*U.scale-ia.x+U.dx+(pa||ca?0:K.shiftX);sa=(Fa?0:ia.height)-sa*U.scale+ia.y-U.dy-(pa||ca?0:K.shiftY);return{x:Za,y:sa}};qa=ba(R[0],!0);M.appendChild(h("BeginX",ia.x+qa.x,
+L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));M.appendChild(h("BeginY",Q-ia.y+qa.y,L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ba(R[R.length-1],!0);M.appendChild(h("EndX",ia.x+qa.x,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));M.appendChild(h("EndY",Q-ia.y+qa.y,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));M.appendChild(c("BegTrigger","2",L,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));M.appendChild(c("EndTrigger","2",L,H.target?"_XFTRIGGER(Sheet."+
+B(H.target.id)+"!EventXFMod)":null));M.appendChild(c("ConFixedCode","6",L));M.appendChild(c("LayerMember",J+"",L));b(W,M,L);J=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);M.appendChild(c("BeginArrow",H,L));M.appendChild(c("BeginArrowSize",k(J),L));J=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);M.appendChild(c("EndArrow",H,L));M.appendChild(c("EndArrowSize",k(J),
+L));null!=W.text&&W.text.checkBounds()&&(K.save(),W.text.paint(K),K.restore());W=z(L,N.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)J=ba(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,J.x,J.y,L));W.appendChild(c("NoFill","1",L));W.appendChild(c("NoLine","0",L));M.appendChild(W);return M}function q(H,J,M,L,Q,ca,W){var R=H.geometry,U=R;if(null!=R)try{R.relative&&ca&&(U=R.clone(),R.x*=ca.width,R.y*=ca.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,
+R.y+=R.offset.y),R.relative=0);var ia=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ba=d(ia+"10000",R,J,L,Q,W);ba.setAttribute("Type","Group");var qa=z(L,N.XMLNS,"Shapes");K.save();K.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=q(H,J,M,L,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(Q=0;Q<H.getChildCount();Q++)Fa=q(H.children[Q],J,M,L,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ba.appendChild(qa);
+K.restore();return ba}if(H.vertex){ba=d(ia,R,J,L,Q,W);var pa=M.view.getState(H,!0);null!=pa&&(b(pa,ba,L),K.newShape(ba,pa,L),null!=pa.text&&pa.text.checkBounds()&&(K.save(),pa.text.paint(K),K.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(K.save(),pa.shape.paint(K),K.restore()),ba.appendChild(K.getShapeGeo()),K.endShape(),ba.setAttribute("Type",K.getShapeType()));return ba}return n(H,J,M,L,Q,W)}finally{H.geometry=U}else return null}function t(H,J){var M=mxUtils.createXmlDocument(),L=z(M,N.XMLNS,
+"PageContents");L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",N.XMLNS);L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",N.XMLNS_R);var Q=z(M,N.XMLNS,"Shapes");L.appendChild(Q);var ca=H.model,W=H.view.translate,R=H.view.scale,U=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(U.x/R<W.x||U.y/R<W.y)K.shiftX=Math.ceil((W.x-U.x/R)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((W.y-U.y/R)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-W.x,-W.y);K.scale(1/R);K.newPage();
+R=H.model.getChildCells(H.model.root);W={};for(U=0;U<R.length;U++)W[R[U].id]=U;for(var ia in ca.cells)R=ca.cells[ia],U=null!=R.parent?W[R.parent.id]:null,null!=U&&(R=q(R,U,H,M,J.pageHeight),null!=R&&Q.appendChild(R));H=z(M,N.XMLNS,"Connects");L.appendChild(H);for(ia in ca.cells)R=ca.cells[ia],R.edge&&(R.source&&(J=z(M,N.XMLNS,"Connect"),J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","BeginX"),J.setAttribute("ToSheet",B(R.source.id)),H.appendChild(J)),R.target&&(J=z(M,N.XMLNS,"Connect"),
+J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","EndX"),J.setAttribute("ToSheet",B(R.target.id)),H.appendChild(J)));M.appendChild(L);K.restore();return M}function A(H,J,M,L){H.file(J,(L?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(M,"\n"))}function C(H,J,M,L){var Q=mxUtils.createXmlDocument(),ca=mxUtils.createXmlDocument(),W=z(Q,N.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",N.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns:r",N.XMLNS_R);var R=z(ca,N.RELS_XMLNS,"Relationships"),U=1,ia;for(ia in J){var ba="page"+U+".xml",qa=z(Q,N.XMLNS,"Page");qa.setAttribute("ID",U-1);qa.setAttribute("NameU",ia);qa.setAttribute("Name",ia);var sa=z(Q,N.XMLNS,"PageSheet"),Fa=L[ia];sa.appendChild(h("PageWidth",Fa.pageWidth,Q));sa.appendChild(h("PageHeight",Fa.pageHeight,Q));sa.appendChild(c("PageScale",Fa.pageScale,Q));sa.appendChild(c("DrawingScale",1,Q));Fa=z(Q,N.XMLNS,"Rel");Fa.setAttributeNS(N.XMLNS_R,"r:id","rId"+U);var pa=
+z(Q,N.XMLNS,"Section");pa.setAttribute("N","Layer");for(var Za=M[ia],Qb=0;Qb<Za.length;Qb++){var vb=z(Q,N.XMLNS,"Row");vb.setAttribute("IX",Qb+"");pa.appendChild(vb);vb.appendChild(c("Name",Za[Qb].name,Q));vb.appendChild(c("Color","255",Q));vb.appendChild(c("Status","0",Q));vb.appendChild(c("Visible",Za[Qb].visible?"1":"0",Q));vb.appendChild(c("Print","1",Q));vb.appendChild(c("Active","0",Q));vb.appendChild(c("Lock",Za[Qb].locked?"1":"0",Q));vb.appendChild(c("Snap","1",Q));vb.appendChild(c("Glue",
+"1",Q));vb.appendChild(c("NameUniv",Za[Qb].name,Q));vb.appendChild(c("ColorTrans","0",Q))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ca,N.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+U);qa.setAttribute("Type",N.PAGES_TYPE);qa.setAttribute("Target",ba);R.appendChild(qa);A(H,N.VISIO_PAGES+ba,J[ia]);U++}Q.appendChild(W);ca.appendChild(R);A(H,N.VISIO_PAGES+"pages.xml",Q);A(H,N.VISIO_PAGES+"_rels/pages.xml.rels",ca)}function I(H,J){J=N.VISIO_PAGES_RELS+"page"+
+J+".xml.rels";var M=mxUtils.createXmlDocument(),L=z(M,N.RELS_XMLNS,"Relationships"),Q=z(M,N.RELS_XMLNS,"Relationship");Q.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");Q.setAttribute("Id","rId1");Q.setAttribute("Target","../masters/master1.xml");L.appendChild(Q);var ca=K.images;if(0<ca.length)for(var W=0;W<ca.length;W++)Q=z(M,N.RELS_XMLNS,"Relationship"),Q.setAttribute("Type",N.XMLNS_R+"/image"),Q.setAttribute("Id","rId"+(W+2)),Q.setAttribute("Target","../media/"+
+ca[W]),L.appendChild(Q);M.appendChild(L);A(H,J,M)}var N=this,K=new mxVsdxCanvas2D,O={},S=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var J=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);Q[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&Q[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},M=new JSZip;K.init(M);O={};S=1;var L={},Q={},ca={},W=null!=
+g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);L[Fa]=t(pa,Za);J(pa,Fa);I(M,ba+1);ca[Fa]=Za},U=g.editor.graph.getSelectionCells(),ia=g.currentPage;if(H)R(ia);else{for(var ba=0;ba<g.pages.length;ba++){var qa=g.pages[ba];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ia!=g.currentPage&&g.selectPage(ia,!0);g.editor.graph.setSelectionCells(U)}}else{R=g.editor.graph;var sa=m(R);L.Page1=t(R,sa);J(R,"Page1");I(M,1);ca.Page1=sa}y(M,W);C(M,L,Q,ca);
+H=function(){M.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<K.filesLoading?K.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";
VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";
VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};
@@ -1105,15 +1105,15 @@ mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(t
var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(q){b.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;
B*=m.scale;f=this.xmGeo;g=(g-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};
mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),
-m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,M=0,K=0,Q=0,S=0,H=0,J=0,N=function(R,T,ka,ca,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(S+=pa.width,K=Math.min(Math.max(K,S),
-z),S=0,H=Math.max(H,pa.height),Q+=H+J,J=H,H=0):(S+=pa.width,K=Math.min(Math.max(K,S),z),H=Math.max(H,pa.height),Q=Math.max(Q,H));pa=q.createElt("Row");pa.setAttribute("IX",I);R.fontColor&&pa.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(q.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(q.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(q.createCellElem("Style",sa));pa.appendChild(q.createCellElem("Case",
-"0"));pa.appendChild(q.createCellElem("Pos","0"));pa.appendChild(q.createCellElem("FontScale","1"));pa.appendChild(q.createCellElem("Letterspace","0"));T.appendChild(pa);T=q.createElt("Row");T.setAttribute("IX",M);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}T.appendChild(q.createCellElem("HorzAlign",sa));ka.appendChild(T);ka=q.createElt("cp");ka.setAttribute("IX",I++);ca.appendChild(ka);
-R=q.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ca.appendChild(R)},L=function(R,T){T=T||{};for(var ka=0;ka<R.length;ka++){var ca=R[ka];if(3==ca.nodeType){var qa=q.cellState.style.fontStyle;qa={fontColor:T.fontColor||q.cellState.style.fontColor,fontSize:T.fontSize||q.cellState.style.fontSize,fontFamily:T.fontFamily||q.cellState.style.fontFamily,align:T.align||q.cellState.style.align,bold:T.bold||qa&1,italic:T.italic||qa&2,underline:T.underline||qa&4};var sa=!1;ka+1<R.length&&"BR"==R[ka+1].nodeName.toUpperCase()&&
-(sa=!0,ka++);N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent+(sa?"\n":""))}else if(1==ca.nodeType){sa=ca.nodeName.toUpperCase();var Fa=ca.childNodes.length;qa=window.getComputedStyle(ca,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||T.bold,italic:"italic"==qa.getPropertyValue("font-style")||T.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||T.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),
-fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:T.OL,LiIndex:T.LiIndex};if("UL"==sa){var pa=q.createElt("Row");pa.setAttribute("IX",M);pa.appendChild(q.createCellElem("HorzAlign","0"));pa.appendChild(q.createCellElem("Bullet","1"));A.appendChild(pa);pa=q.createElt("pp");pa.setAttribute("IX",M++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ka+1);0<Fa?(L(ca.childNodes,qa),"UL"==sa&&(pa=q.createElt("Row"),
-pa.setAttribute("IX",M),pa.appendChild(q.createCellElem("Bullet","0")),A.appendChild(pa),pa=q.createElt("pp"),pa.setAttribute("IX",M++),C.appendChild(pa)),N(qa,t,A,C,"")):N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&L(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,
-Q);z=Math.max(z,K);n=z/2;var O=B/2,ba=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ba*Math.PI/180;switch(h){case "right":0!=ba?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=K/2;break;case "left":0!=ba?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-K/2}switch(c){case "top":0!=ba?(g+=O*Math.sin(W),y+=O*Math.cos(W)):b=Q/2;break;case "bottom":0!=ba?(g-=O*Math.sin(W),y-=O*Math.cos(W)):b=-Q/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",
-g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",O+b));k-=ba;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};
+m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,N=0,K=0,O=0,S=0,H=0,J=0,M=function(R,U,ia,ba,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(S+=pa.width,K=Math.min(Math.max(K,S),
+z),S=0,H=Math.max(H,pa.height),O+=H+J,J=H,H=0):(S+=pa.width,K=Math.min(Math.max(K,S),z),H=Math.max(H,pa.height),O=Math.max(O,H));pa=q.createElt("Row");pa.setAttribute("IX",I);R.fontColor&&pa.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(q.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(q.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(q.createCellElem("Style",sa));pa.appendChild(q.createCellElem("Case",
+"0"));pa.appendChild(q.createCellElem("Pos","0"));pa.appendChild(q.createCellElem("FontScale","1"));pa.appendChild(q.createCellElem("Letterspace","0"));U.appendChild(pa);U=q.createElt("Row");U.setAttribute("IX",N);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}U.appendChild(q.createCellElem("HorzAlign",sa));ia.appendChild(U);ia=q.createElt("cp");ia.setAttribute("IX",I++);ba.appendChild(ia);
+R=q.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ba.appendChild(R)},L=function(R,U){U=U||{};for(var ia=0;ia<R.length;ia++){var ba=R[ia];if(3==ba.nodeType){var qa=q.cellState.style.fontStyle;qa={fontColor:U.fontColor||q.cellState.style.fontColor,fontSize:U.fontSize||q.cellState.style.fontSize,fontFamily:U.fontFamily||q.cellState.style.fontFamily,align:U.align||q.cellState.style.align,bold:U.bold||qa&1,italic:U.italic||qa&2,underline:U.underline||qa&4};var sa=!1;ia+1<R.length&&"BR"==R[ia+1].nodeName.toUpperCase()&&
+(sa=!0,ia++);M(qa,t,A,C,(U.OL?U.LiIndex+". ":"")+ba.textContent+(sa?"\n":""))}else if(1==ba.nodeType){sa=ba.nodeName.toUpperCase();var Fa=ba.childNodes.length;qa=window.getComputedStyle(ba,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||U.bold,italic:"italic"==qa.getPropertyValue("font-style")||U.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||U.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),
+fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:U.OL,LiIndex:U.LiIndex};if("UL"==sa){var pa=q.createElt("Row");pa.setAttribute("IX",N);pa.appendChild(q.createCellElem("HorzAlign","0"));pa.appendChild(q.createCellElem("Bullet","1"));A.appendChild(pa);pa=q.createElt("pp");pa.setAttribute("IX",N++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ia+1);0<Fa?(L(ba.childNodes,qa),"UL"==sa&&(pa=q.createElt("Row"),
+pa.setAttribute("IX",N),pa.appendChild(q.createCellElem("Bullet","0")),A.appendChild(pa),pa=q.createElt("pp"),pa.setAttribute("IX",N++),C.appendChild(pa)),M(qa,t,A,C,"")):M(qa,t,A,C,(U.OL?U.LiIndex+". ":"")+ba.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&L(m.childNodes,{})):M({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,
+O);z=Math.max(z,K);n=z/2;var Q=B/2,ca=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ca*Math.PI/180;switch(h){case "right":0!=ca?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=K/2;break;case "left":0!=ca?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-K/2}switch(c){case "top":0!=ca?(g+=Q*Math.sin(W),y+=Q*Math.cos(W)):b=O/2;break;case "bottom":0!=ca?(g-=Q*Math.sin(W),y-=Q*Math.cos(W)):b=-O/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",
+g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",Q+b));k-=ca;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};
mxVsdxCanvas2D.prototype.rotate=function(g,y,z,B,m){0!=g&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-g)*Math.PI/180)),y.rotation+=g,y.rotationCx=B,y.rotationCy=m)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};
mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(g,y){this.pos=0;this.buffer=g;this.is_with_alpha=!!y;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()}
BmpDecoder.prototype.parseHeader=function(){var g=this.buffer;this.fileSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.reserved=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.offset=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.headerSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.width=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];
@@ -1130,54 +1130,54 @@ BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y
(function(g){(function(y){(function(z){var B=function(){function m(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c;this.shapeIndexShift=0}function h(c,a,b,d,f){c=b.createLabelSubShape(c,a);null!=c&&(0!==d&&(a=c.getStyle().match(/;rotation=(\d+\.*\d+)/),
null!=a&&(d+=parseFloat(a[1])),c.setStyle(c.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=c.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};
m.parseXml=function(c){try{var a=mxUtils.parseXml(c);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(b){return null}};m.decodeUTF16LE=function(c){for(var a="",b=0;b<c.length;b+=2)a+=String.fromCharCode(c.charCodeAt(b)|c.charCodeAt(b+1)<<8);return a};m.prototype.scaleGraph=function(c,a){if(1!==a){c=c.getModel();for(var b in c.cells){var d=c.cells[b],f=c.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),c.isEdge(d)&&(this.scalePoint(f.sourcePoint,
-a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&amp;"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,Q,S){function H(){C++;I();Q++;Q==J&&f(K,Q,S)}for(var J=Math.min(Q+M,K.length),N=Q;N<J;N++)(function(L){function O(W){var R=new FormData;R.append("img",W,L.name);R.append("inputformat","emf");R.append("outputformat","png");var T=new XMLHttpRequest;
-T.open("POST",EMF_CONVERT_URL);T.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(T);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState)if(200<=T.status&&299>=T.status)try{var ka=new FileReader;ka.readAsDataURL(T.response);ka.onloadend=function(){var ca=ka.result.indexOf(",")+1;S[L.name]=ka.result.substr(ca);H()}}catch(ca){console.log(ca),H()}else ba++,3>ba?O(W):H()});T.send(R)}var ba=0;L.async("blob").then(O)})(K[N])}var k=this,n={},q={},t=function(){function K(){J=
-J.concat(k.RESPONSE_END);a&&a(J)}for(var Q=m.vsdxPlaceholder+"/document.xml",S=n[Q]?n[Q]:null,H=S.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(S,H,Q,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);Q=k.vsdxModel.getPages();var J=k.RESPONSE_HEADER;var N=function(ba){null==ba.entries&&(ba.entries=[]);return ba.entries}(Q),L=function(ba,W){var R=N[ba].getValue(),T=O.createMxGraph();T.getModel().beginUpdate();O.importPage(R,T,T.getDefaultParent(),
-!0);O.scaleGraph(T,R.getPageScale()/R.getDrawingScale());T.getModel().endUpdate();O.postImportPage(R,T,function(){O.sanitiseGraph(T);J=J.concat(k.RESPONSE_DIAGRAM_START);J=J.concat(k.processPage(T,R));J=J.concat(k.RESPONSE_DIAGRAM_END);ba<N.length-1?L(ba+1,W):W()})},O=k;0<N.length?L(0,K):K()},A=0,C=0,I=function(){if(C==A)try{t()}catch(K){console.log(K),null!=d?d(K):a("")}},M=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var Q=[];
-K.forEach(function(S,H){var J=H.name;S=J.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,H.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var O=m.parseXml(L);if(null==O)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))O=m.parseXml(m.decodeUTF16LE(L));else{for(O=0;O<m.incorrectXMLReqExp.length;O++)m.incorrectXMLReqExp[O].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[O].regExp,m.incorrectXMLReqExp[O].repl));
-O=m.parseXml(L)}null!=O&&(O.vsdxFileName=J,n[J]=O)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?Q.push(H):(C++,I()):function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(L){L=new BmpDecoder(L);var O=document.createElement("canvas");O.width=L.width;O.height=L.height;
-O.getContext("2d").putImageData(L.imageData,0,0);L=O.toDataURL("image/jpeg");q[J]=L.substr(23);C++;I()}):H.async("base64").then(function(L){q[J]=L;C++;I()}))});f(Q,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");
-c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&
-(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=
-t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),
-c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;
-for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var M=0;M<
-C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===q&&(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var M=
-0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries[M].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){q=!0;break}q&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),
-b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,M=function(Q,S){null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)if(null!=Q.entries[H].key.equals&&
-Q.entries[H].key.equals(S)||Q.entries[H].key===S)return Q.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var Q=I.iData,S=I.iType;try{var H=K.width/I.imgWidth,J=K.height/I.imgHeight,N=-I.imgOffsetX*H,L=(I.imgHeight-I.height+I.imgOffsetY)*J,O=document.createElement("canvas");O.width=I.width*H;O.height=I.height*J;var ba=O.getContext("2d");ba.fillStyle="#FFFFFF";ba.fillRect(0,0,O.width,O.height);ba.drawImage(K,N,L,O.width,O.height,
-0,0,O.width,O.height);Q=O.toDataURL("image/jpeg").substr(23);S="jpg"}catch(W){console.log(W)}M.style+=";image=data:image/"+S+","+Q;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){M.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||
-function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,
-value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.extLink?c.setLinkForCell(k,b.extLink):b.pageLink&&c.setLinkForCell(k,"data:page/id,"+b.pageLink.replace(/\s/g,"_"));a=a.getProperties();for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,
-a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=
-q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";
-if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*
-n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var Q=0;return{next:function(){return Q<K.length?K[Q++]:null},hasNext:function(){return Q<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var M=
-g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=M&&(function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(M=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&M.geometry&&(b=Math.max(M.geometry.height,
-b)));null==q&&function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&
-K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},
-getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,Q,S){null==
-K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*
-f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]="none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]=
-"wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,M){null==C.entries&&(C.entries=
-[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=M;return}C.entries.push({key:I,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,
-b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,f);var k=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===
-N)return J.entries[L].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());
-this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,I)):null;var M=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*
-t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),Q=I.geometry;C=new mxPoint((K.x+t.x-C.x)/Q.width,(K.y+t.y-C.y)/Q.height)}else M=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,
-a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),Q=a.geometry,t=new mxPoint((t.x+A.x-b.x)/Q.width,(t.y+A.y-b.y)/Q.height)):K=!1;b=k.getStyleFromEdgeShape(d);Q=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==Q,H=k.getLblEdgeOffset(c.getView(),q);S||(A=
-k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,Q,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));M&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();M=c.getModel().getGeometry(A);if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=
-0;n<q.length;n++)q[n].x+=C,q[n].y+=a}M.points=q;b.hasOwnProperty("curved")&&function(J,N){return J&&J.equals?J.equals(N):J===N}(function(J,N){return J[N]?J[N]:null}(b,"curved"),"1")&&(M=c.getModel().getGeometry(A),d=k.getControlPoints(d),M.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),
-n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=
-I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(M,K){return M&&M.equals?M.equals(K):M===K}(function(M,K){return M[K]?M[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&
-null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);
-f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class=
-"com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
-(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(Q){var S=0;return{next:function(){return S<Q.length?Q[S++]:null},hasNext:function(){return S<Q.length}}}(function(Q){var S=
-[];null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)S.push(Q.entries[H].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(Q){return Object.keys(Q).map(function(S){return Q[S]})}(q);n=function(Q){Q=I[Q];var S=M.createMxGraph(),H=1;if(null!=Q.pageSheet){var J=H=1,N=Q.pageSheet.DrawingScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);N=Q.pageSheet.PageScale;null!=N&&(J=parseFloat(N.getAttribute("V"))||
-1);H=J/H}J=!1;for(N=0;null!=Q.firstLevelShapes&&N<Q.firstLevelShapes.length;N++){var L=Q.firstLevelShapes[N].getShape(),O=new g.mxgraph.io.vsdx.VsdxShape(t,L,!t.isEdge(L),q,null,M.vsdxModel);L=null;if(O.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];L=M.addShape(S,O,S.getDefaultParent(),0,1169);O=function(T){null==T.entries&&(T.entries=[]);return T.entries}(M.edgeShapeMap);for(var ba=0;ba<O.length;ba++){var W=O[ba],R=function(T,ka){null==T.entries&&(T.entries=[]);for(var ca=0;ca<T.entries.length;ca++)if(null!=
-T.entries[ca].key.equals&&T.entries[ca].key.equals(ka)||T.entries[ca].key===ka)return T.entries[ca].value;return null}(M.parentsMap,W.getKey());M.addUnconnectedEdge(S,R,W.getValue(),1169)}}else L=M.addUnconnectedEdge(S,null,O,1169);J|=null!=L}if(J){M.scaleGraph(S,H);H=M.normalizeGraph(S);M.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(M,S,null);A.str=A.str.concat(S);A.str=
-A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');Q=Q.getName();null==Q&&(Q="");Q=mxUtils.htmlEntities(JSON.stringify(Q));A.str=A.str.concat(Q);A.str=A.str.concat("}");C=","}};for(var M=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(Q){null!=d?d(Q):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=
+a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&amp;"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,O,S){function H(){C++;I();O++;O==J&&f(K,O,S)}for(var J=Math.min(O+N,K.length),M=O;M<J;M++)(function(L){function Q(W){var R=new FormData;R.append("img",W,L.name);R.append("inputformat","emf");R.append("outputformat","png");var U=new XMLHttpRequest;
+U.open("POST",EMF_CONVERT_URL);U.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(U);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState)if(200<=U.status&&299>=U.status)try{var ia=new FileReader;ia.readAsDataURL(U.response);ia.onloadend=function(){var ba=ia.result.indexOf(",")+1;S[L.name]=ia.result.substr(ba);H()}}catch(ba){console.log(ba),H()}else ca++,3>ca?Q(W):H()});U.send(R)}var ca=0;L.async("blob").then(Q)})(K[M])}var k=this,n={},q={},t=function(){function K(){J=
+J.concat(k.RESPONSE_END);a&&a(J)}for(var O=m.vsdxPlaceholder+"/document.xml",S=n[O]?n[O]:null,H=S.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(S,H,O,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);O=k.vsdxModel.getPages();var J=k.RESPONSE_HEADER;var M=function(W){null==W.entries&&(W.entries=[]);return W.entries}(O);m.pageTitleMap={};m.pageIdsSet={};try{for(O=0;O<M.length;O++){var L=M[O].getValue();m.pageTitleMap[L.getPageName()]=
+L.getPageNameU();m.pageIdsSet[L.getPageNameU()]=!0}}catch(W){}var Q=function(W,R){var U=M[W].getValue(),ia=ca.createMxGraph();ia.getModel().beginUpdate();ca.importPage(U,ia,ia.getDefaultParent(),!0);ca.scaleGraph(ia,U.getPageScale()/U.getDrawingScale());ia.getModel().endUpdate();ca.postImportPage(U,ia,function(){ca.sanitiseGraph(ia);J=J.concat(k.RESPONSE_DIAGRAM_START);J=J.concat(k.processPage(ia,U));J=J.concat(k.RESPONSE_DIAGRAM_END);W<M.length-1?Q(W+1,R):R()})},ca=k;0<M.length?Q(0,K):K()},A=0,C=
+0,I=function(){if(C==A)try{t()}catch(K){console.log(K),null!=d?d(K):a("")}},N=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var O=[];K.forEach(function(S,H){var J=H.name;S=J.toLowerCase();var M=S.length;S.indexOf(".xml")==M-4||S.indexOf(".rels")==M-5?(A++,H.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var Q=m.parseXml(L);if(null==Q)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))Q=
+m.parseXml(m.decodeUTF16LE(L));else{for(Q=0;Q<m.incorrectXMLReqExp.length;Q++)m.incorrectXMLReqExp[Q].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[Q].regExp,m.incorrectXMLReqExp[Q].repl));Q=m.parseXml(L)}null!=Q&&(Q.vsdxFileName=J,n[J]=Q)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(L,Q){var ca=L.length-Q.length;L=L.indexOf(Q,ca);return-1!==L&&L===ca}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?O.push(H):(C++,I()):function(L,Q){var ca=L.length-Q.length;L=L.indexOf(Q,
+ca);return-1!==L&&L===ca}(S,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(L){L=new BmpDecoder(L);var Q=document.createElement("canvas");Q.width=L.width;Q.height=L.height;Q.getContext("2d").putImageData(L.imageData,0,0);L=Q.toDataURL("image/jpeg");q[J]=L.substr(23);C++;I()}):H.async("base64").then(function(L){q[J]=L;C++;I()}))});f(O,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);
+c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};
+m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=
+a.item(f),n=function(C,I){return C[I]?C[I]:null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<
+a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<
+C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=
+c.next(),n=this.addConnectedEdge(a,n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var N=0;N<C.entries.length;N++)if(null!=C.entries[N].key.equals&&C.entries[N].key.equals(I)||C.entries[N].key===I)return C.entries.splice(N,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),
+n.getKey().getPageNumber()===q&&(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var N=0;N<C.entries.length;N++)if(null!=C.entries[N].key.equals&&C.entries[N].key.equals(I)||C.entries[N].key===I)return C.entries[N].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,
+this.layerNames[n])){q=!0;break}q&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,
+N=function(O,S){null==O.entries&&(O.entries=[]);for(var H=0;H<O.entries.length;H++)if(null!=O.entries[H].key.equals&&O.entries[H].key.equals(S)||O.entries[H].key===S)return O.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var O=I.iData,S=I.iType;try{var H=K.width/I.imgWidth,J=K.height/I.imgHeight,M=-I.imgOffsetX*H,L=(I.imgHeight-I.height+I.imgOffsetY)*J,Q=document.createElement("canvas");Q.width=I.width*H;Q.height=I.height*J;
+var ca=Q.getContext("2d");ca.fillStyle="#FFFFFF";ca.fillRect(0,0,Q.width,Q.height);ca.drawImage(K,M,L,Q.width,Q.height,0,0,Q.width,Q.height);O=Q.toDataURL("image/jpeg").substr(23);S="jpg"}catch(W){console.log(W)}N.style+=";image=data:image/"+S+","+O;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){N.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());
+if(null!=k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=
+q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.pageLink?(d=b.pageLink,m.pageIdsSet[d]||null==m.pageTitleMap[d]||(d=m.pageTitleMap[d]+""),c.setLinkForCell(k,"data:page/id,"+d.replace(/\s/g,"_"))):b.extLink&&c.setLinkForCell(k,b.extLink);a=a.getProperties();
+for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},
+getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,
+a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||
+k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var O=0;return{next:function(){return O<
+K.length?K[O++]:null},hasNext:function(){return O<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var N=g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=N&&(function(K,O){return K&&K.equals?K.equals(O):K===O}(N,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,O){return K&&K.equals?K.equals(O):K===O}(N,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,O){return K&&K.equals?K.equals(O):
+K===O}(N,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(N=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&N.geometry&&(b=Math.max(N.geometry.height,b)));null==q&&function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,
+new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=
+K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=
+k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,
+a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]=
+"none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*
+f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,N){null==C.entries&&(C.entries=[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=N;return}C.entries.push({key:I,value:N,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,
+t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,
+f);var k=function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,
+k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,
+I)):null;var N=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),O=I.geometry;C=new mxPoint((K.x+t.x-C.x)/O.width,(K.y+t.y-C.y)/O.height)}else N=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=
+J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),O=a.geometry,t=new mxPoint((t.x+A.x-b.x)/O.width,(t.y+A.y-b.y)/
+O.height)):K=!1;b=k.getStyleFromEdgeShape(d);O=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==O,H=k.getLblEdgeOffset(c.getView(),q);S||(A=k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,O,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));N&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();N=c.getModel().getGeometry(A);
+if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=0;n<q.length;n++)q[n].x+=C,q[n].y+=a}N.points=q;b.hasOwnProperty("curved")&&function(J,M){return J&&J.equals?J.equals(M):J===M}(function(J,M){return J[M]?J[M]:null}(b,"curved"),"1")&&(N=c.getModel().getGeometry(A),d=k.getControlPoints(d),N.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);
+return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,
+null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(N,K){return N&&N.equals?N.equals(K):N===K}(function(N,K){return N[K]?N[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),
+a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,
+a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+
+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
+(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(O){var S=0;return{next:function(){return S<O.length?O[S++]:null},hasNext:function(){return S<O.length}}}(function(O){var S=
+[];null==O.entries&&(O.entries=[]);for(var H=0;H<O.entries.length;H++)S.push(O.entries[H].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(O){return Object.keys(O).map(function(S){return O[S]})}(q);n=function(O){O=I[O];var S=N.createMxGraph(),H=1;if(null!=O.pageSheet){var J=H=1,M=O.pageSheet.DrawingScale;null!=M&&(H=parseFloat(M.getAttribute("V"))||1);M=O.pageSheet.PageScale;null!=M&&(J=parseFloat(M.getAttribute("V"))||
+1);H=J/H}J=!1;for(M=0;null!=O.firstLevelShapes&&M<O.firstLevelShapes.length;M++){var L=O.firstLevelShapes[M].getShape(),Q=new g.mxgraph.io.vsdx.VsdxShape(t,L,!t.isEdge(L),q,null,N.vsdxModel);L=null;if(Q.isVertex()){N.edgeShapeMap.entries=[];N.parentsMap.entries=[];L=N.addShape(S,Q,S.getDefaultParent(),0,1169);Q=function(U){null==U.entries&&(U.entries=[]);return U.entries}(N.edgeShapeMap);for(var ca=0;ca<Q.length;ca++){var W=Q[ca],R=function(U,ia){null==U.entries&&(U.entries=[]);for(var ba=0;ba<U.entries.length;ba++)if(null!=
+U.entries[ba].key.equals&&U.entries[ba].key.equals(ia)||U.entries[ba].key===ia)return U.entries[ba].value;return null}(N.parentsMap,W.getKey());N.addUnconnectedEdge(S,R,W.getValue(),1169)}}else L=N.addUnconnectedEdge(S,null,Q,1169);J|=null!=L}if(J){N.scaleGraph(S,H);H=N.normalizeGraph(S);N.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(N,S,null);A.str=A.str.concat(S);A.str=
+A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');O=O.getName();null==O&&(O="");O=mxUtils.htmlEntities(JSON.stringify(O));A.str=A.str.concat(O);A.str=A.str.concat("}");C=","}};for(var N=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(O){null!=d?d(O):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=
b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var q=c.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);
else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:b,y:d};for(n in c.model.cells)if(q=c.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=b,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,
a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&
@@ -1186,9 +1186,9 @@ a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefau
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=d}c.prototype.getX=function(){return this.x};c.prototype.getY=function(){return this.y};c.prototype.getA=function(){return this.a};c.prototype.getB=function(){return this.b};c.prototype.getC=function(){return this.c};c.prototype.getD=function(){return this.d};c.prototype.getFormulaA=
function(){return this.formulaA};c.prototype.getFormulaE=function(){return this.formulaE};c.prototype.getIndex=function(){return this.index};return c}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var q=k=b=null,t=null,
-A=null,C=null,I=null,M=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),M=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],Q=K.getAttribute("N"),S=K.getAttribute("V");switch(Q){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);M=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);
+A=null,C=null,I=null,N=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),N=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],O=K.getAttribute("N"),S=K.getAttribute("V");switch(O){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);N=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);
break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,
-b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,M);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,
+b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,N);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,
b,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){this.colorElementMap={};this.fontElementMap={}}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.defaultColors_$LI$=function(){h.__static_initialize();null==h.defaultColors&&(h.defaultColors={});return h.defaultColors};h.__static_initializer_0=function(){h.defaultColors_$LI$()["0"]="#000000";h.defaultColors_$LI$()["1"]="#FFFFFF";h.defaultColors_$LI$()["2"]=
"#FF0000";h.defaultColors_$LI$()["3"]="#00FF00";h.defaultColors_$LI$()["4"]="#0000FF";h.defaultColors_$LI$()["5"]="#FFFF00";h.defaultColors_$LI$()["6"]="#FF00FF";h.defaultColors_$LI$()["7"]="#00FFFF";h.defaultColors_$LI$()["8"]="#800000";h.defaultColors_$LI$()["9"]="#008000";h.defaultColors_$LI$()["10"]="#000080";h.defaultColors_$LI$()["11"]="#808000";h.defaultColors_$LI$()["12"]="#800080";h.defaultColors_$LI$()["13"]="#008080";h.defaultColors_$LI$()["14"]="#C0C0C0";h.defaultColors_$LI$()["15"]="#E6E6E6";
@@ -1374,8 +1374,8 @@ q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=b-q;var t=this.
'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=
h;h.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
-t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,M=d.getLastY()*f/100,K=b*k/100,Q=n*f/100,S=f-t,H=-A;A=Math.sqrt(I*I+M*M)*Math.cos(Math.atan2(M,I)-H);t=Math.sqrt(I*I+M*M)*Math.sin(Math.atan2(M,I)-H);var J=Math.sqrt(K*K+Q*Q)*Math.cos(Math.atan2(Q,K)-H),N=Math.sqrt(K*K+Q*Q)*Math.sin(Math.atan2(Q,K)-H),L=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-H),O=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-H),ba=((A-J)*(A+J)*(N-O)-(J-
-L)*(J+L)*(t-N)+C*C*(t-N)*(N-O)*(t-O))/(2*((A-J)*(N-O)-(J-L)*(t-N))),W=((A-J)*(J-L)*(A-L)/(C*C)+(J-L)*(t-N)*(t+N)-(A-J)*(N-O)*(N+O))/(2*((J-L)*(t-N)-(A-J)*(N-O))),R=A-ba,T=t-W;R=Math.sqrt(R*R+T*T*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-I)*(S-M)-(Q-M)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ba,W,A,t,J,N,L,O)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+
+t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,N=d.getLastY()*f/100,K=b*k/100,O=n*f/100,S=f-t,H=-A;A=Math.sqrt(I*I+N*N)*Math.cos(Math.atan2(N,I)-H);t=Math.sqrt(I*I+N*N)*Math.sin(Math.atan2(N,I)-H);var J=Math.sqrt(K*K+O*O)*Math.cos(Math.atan2(O,K)-H),M=Math.sqrt(K*K+O*O)*Math.sin(Math.atan2(O,K)-H),L=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-H),Q=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-H),ca=((A-J)*(A+J)*(M-Q)-(J-
+L)*(J+L)*(t-M)+C*C*(t-M)*(M-Q)*(t-Q))/(2*((A-J)*(M-Q)-(J-L)*(t-M))),W=((A-J)*(J-L)*(A-L)/(C*C)+(J-L)*(t-M)*(t+M)-(A-J)*(M-Q)*(M+Q))/(2*((J-L)*(t-M)-(A-J)*(M-Q))),R=A-ca,U=t-W;R=Math.sqrt(R*R+U*U*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-I)*(S-N)-(O-N)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ca,W,A,t,J,M,L,Q)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+
(new String(R)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,q,t,A){f-=b;k-=d;q-=d;n=t-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,t)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=
360:-180>f&&(f+=360);180<n?n-=360:-180>n&&(n+=360);return(0<f&&0>n||0>f&&0<n)&&180<Math.abs(f-n)?!0:!1};return a}(g.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
@@ -1460,18 +1460,18 @@ b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo
(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,
k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(c,h);c.UNICODE_LINE_SEP_$LI$=function(){null==c.UNICODE_LINE_SEP&&(c.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",
c.UNICODE_LINE_SEP=String.fromCharCode(8232));return c.UNICODE_LINE_SEP};c.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};c.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};c.prototype.getQuickStyleVals=function(){return this.quickStyleVals};c.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);
-this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var M="",K="";try{M=C.substring(0,A),K=C.substring(A,C.length)}catch(Q){break}A=b.getRelationship(I,M+"/_rels"+K+".rels");
-if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(Q){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?
+this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var N="",K="";try{N=C.substring(0,A),K=C.substring(A,C.length)}catch(O){break}A=b.getRelationship(I,N+"/_rels"+K+".rels");
+if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(O){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?
A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,
C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=
-a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,M){return I&&I.equals?I.equals(M):I===M}("1",
+a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,N){return I&&I.equals?I.equals(N):I===N}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,N){return I&&I.equals?I.equals(N):I===N}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,N){return I&&I.equals?I.equals(N):I===N}("1",
b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":
"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=
this.text?this.text.textContent:null};c.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};c.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(b){}return 0===this.width&&0<this.height?1:this.width};c.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=
Math.max(this.childShapes.entries[a].value.height,this.height)}catch(b){}return 0===this.height&&0<this.width?1:this.height};c.prototype.getRotation=function(){return this.rotation};c.prototype.getStyleMap=function(){return this.styleMap};c.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};c.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};c.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};c.prototype.getTextParagraphFormated=function(a){var b="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,
-d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,M){return I&&I.equals?I.equals(M):
-I===M})(C,"1")?a=a.toUpperCase():function(I,M){return I&&I.equals?I.equals(M):I===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,M){return I&&I.equals?I.equals(M):I===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,M){return I&&I.equals?I.equals(M):I===M}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
+d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,N){return I&&I.equals?I.equals(N):
+I===N})(C,"1")?a=a.toUpperCase():function(I,N){return I&&I.equals?I.equals(N):I===N}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,N){return I&&I.equals?I.equals(N):I===N})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,N){return I&&I.equals?I.equals(N):I===N}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+q+t+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):
b===d}(a,"1")&&(a="rtl");return a};c.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};c.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};c.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);b=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return a+
b+f}return a};c.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,
@@ -1482,9 +1482,9 @@ a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(ne
a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=
n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/b))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
{}))})(com||(com={}));
-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var M=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,Q=M.fields?Object.values(M.fields).join(""):M.text.textContent;K==Q&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}
+(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var N=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,O=N.fields?Object.values(N.fields).join(""):N.text.textContent;K==O&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}
var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,b,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);
-null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,M){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(M)||I.entries[K].key===M)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&
+null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&
console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,b);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,b);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),
"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleShadowColor"),
"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=t.masterShape?(t.masterShape.processGeomList(null),t.processGeomList(t.masterShape.getGeomList()),0===t.width&&(t.width=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===t.height&&(t.height=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
@@ -1561,10 +1561,10 @@ if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Organiz
f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",q=0;q<b.length;q++){var t=b[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&
(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;
d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):
-A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&
-null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(Q,S){return Q[S]?Q[S]:null}(d,"iType"),k=function(Q,S){return Q[S]?Q[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),
-"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(M,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(M);a[mxConstants.STYLE_SHAPE]=
-"stencil("+K+")"}catch(Q){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+
+A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(O,S){return O&&O.equals?O.equals(S):O===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&
+null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(O,S){return O[S]?O[S]:null}(d,"iType"),k=function(O,S){return O[S]?O[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),
+"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var N=this.parseGeom();if(function(O,S){return O&&O.equals?O.equals(S):O===S}(N,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(N);a[mxConstants.STYLE_SHAPE]=
+"stencil("+K+")"}catch(O){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+
this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=
(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,
"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):
@@ -1586,8 +1586,8 @@ k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return
a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=
function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),
f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var I=mxUtils.clone(this.getStyleMap())||{};I[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;I[mxConstants.STYLE_STROKECOLOR]=
-mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height-
-(t+f-n);k=q-k;0<M&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,M,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),
+mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var N=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+N)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height-
+(t+f-n);k=q-k;0<N&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,N,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),
this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),
0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER=
"0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
@@ -1609,8 +1609,8 @@ com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.ar
com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$();
EditorUi.prototype.doImportVisio=function(g,y,z,B){B=B||g.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(g,y,null,z):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(g,y,null,z)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;
mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],c=this.createMxGraph(),a=c.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,c,c.getDefaultParent()),B=0;B<this.edges.length;B++)for(var b=this.edges[B],d=b.edges,f=b.parent,k=b.dx,n=b.dy,
-q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var M=c.view.getState(C),K=M.absolutePoints,Q=K[0],S=K[K.length-1],H=I.x,J=I.y;k=S.x-Q.x;n=S.y-Q.y;var N=Q.x+H*k,L=Q.y+H*n,O=Math.sqrt(k*k+n*n);k/=O;n/=O;N-=J*n;L+=J*k;var ba=c.view.getRelativePoint(M,N,L);I.x=ba.x;I.y=
-ba.y}}}}catch(W){throw console.log(W),W;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(W){z&&z(W)}};
+q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var N=c.view.getState(C),K=N.absolutePoints,O=K[0],S=K[K.length-1],H=I.x,J=I.y;k=S.x-O.x;n=S.y-O.y;var M=O.x+H*k,L=O.y+H*n,Q=Math.sqrt(k*k+n*n);k/=Q;n/=Q;M-=J*n;L+=J*k;var ca=c.view.getRelativePoint(N,M,L);I.x=ca.x;I.y=
+ca.y}}}}catch(W){throw console.log(W),W;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(W){z&&z(W)}};
mxGraphMlCodec.prototype.initializeKeys=function(g){var y=this.getDirectChildNamedElements(g,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]=
{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],c=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],b=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:b;switch(c){case mxGraphMlConstants.NODE:this.nodesKeys[a]=
{key:h,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:h,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(B=0;B<g.length;B++)if(g[B].getAttribute(mxGraphMlConstants.KEY)==z)for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<c.length;y++)for(a=
@@ -1634,10 +1634,10 @@ type:g},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,
var c=mxUtils.clone(g);c.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var b=mxUtils.clone(g);b.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=
mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var q=mxUtils.clone(g);q.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};q.drawShadow={key:"shadow",mod:"bool"};var t=mxUtils.clone(g);t.defaults={shape:"swimlane",
startSize:20,strokeWidth:4,spacingLeft:10};t.isCollapsible={key:"collapsible",mod:"bool"};t.borderColor={key:"strokeColor",mod:"color"};t.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};
-var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(H,J){J.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,J){J.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(H,J){"roundrectangle"==H&&(J.rounded=1,J.arcSize=5)};var Q=mxUtils.clone(g);Q.defaults={shape:"js:table2"};
+var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(H,J){J.image=H};var N=mxUtils.clone(g);N.defaults={shape:"image"};N["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,J){J.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(H,J){"roundrectangle"==H&&(J.rounded=1,J.arcSize=5)};var O=mxUtils.clone(g);O.defaults={shape:"js:table2"};
var S=mxUtils.clone(g);S.defaults={gradientDirection:"east"};S["y:Fill"].color2={key:"gradientColor",mod:"color"};S["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",
mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,
-"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":Q,"y:SVGNode":M,"y:GroupNode":K},z)};
+"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":O,"y:SVGNode":N,"y:GroupNode":K},z)};
mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var c,a=[],b=/\{TemplateBinding\s+([^}]+)\}/g;null!=(c=b.exec(g));){var d="";switch(c[1]){case "width":d=m;break;case "height":d=h}a.push({match:c[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(c=m.exec(g));)if(h=c[1].split(","),
b=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(b=[b],h[2]&&b.push(h[2].substr(11)),b=d.apply(null,b)),a.push({match:c[0],repl:mxUtils.htmlEntities(b)});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(c=y.exec(g));)b=c[0].substr(0,c[0].length-7)+c[1]+"</text>",a.push({match:c[0],repl:b});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);g=z+g+"</g></svg>";B.shape="image";B.image=
"data:image/svg+xml,"+(window.btoa?btoa(g):Base64.encode(g))}};
@@ -1680,16 +1680,16 @@ mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1
h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(b.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,b)}},"y:BendStyle":{smoothed:{key:"rounded",
mod:"bool"}}},c=mxUtils.clone(h);c.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",
mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":c,"y:BezierEdge":c,"y:QuadCurveEdge":c,"y:SplineEdge":c},z)};
-mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,Q){K&&(K=K.toUpperCase());var S=Q.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}Q.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",
-mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,Q){K&&(Q.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
-fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,Q){Q.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,Q){var S=Q.fontStyle||0;"true"==K&&(S|=4);Q.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=
+mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,O){K&&(K=K.toUpperCase());var S=O.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}O.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",
+mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,O){K&&(O.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
+fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,O){O.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,O){var S=O.fontStyle||0;"true"==K&&(S|=4);O.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=
0;b<y.length;b++)if(y[b]&&(!a[b]||!a[b]["bpmn:ParticipantParameter"])){y[b]=mxUtils.htmlEntities(y[b],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(c[b]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[b]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[b],c[b].fontSize,c[b].fontFamily),(d=a[b]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),
h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[b]["y:InteriorLabelModel"]){switch(a[b]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"])switch(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"].Position){case "North":h.height=
1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[b]["bpmn:PoolHeaderLabelModel"]){switch(a[b]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[b]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[b]["y:ExteriorLabelModel"])switch(a[b]["y:ExteriorLabelModel"]){case "East":f.style+=
";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[b]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[b]["y:FreeEdgeLabelModelParameter"];
d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=
parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=
-new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var M=t=0;M<n;M++)t+=C.segments[M];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,
+new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var N=t=0;N<n;N++)t+=C.segments[N];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,
lblStyles:c}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};
mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(g,y){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType&&y==g.nodeName)return g;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(g){var y=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y.push(g);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(g){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType)return g;return null};
var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(g,y){if("string"===typeof g){for(var z=g;20<z.length&&-1<z.indexOf(" ");)z=z.substring(0,z.lastIndexOf(" "));return"true"===y?z:g.substring(z.length)}return""},"orgchartconverters.borderconverter":function(g,y){return"boolean"===typeof g?g?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(g,y){return"string"===typeof g?"string"===typeof y?"#"+g+y:"#"+g:g},"orgchartconverters.intermediateconverter":function(g,
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 7305065d5..899e758e1 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -1,7 +1,7 @@
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(S,t)});var S;function b(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function N(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function w(t){const n=l(null);for(const[o,r]of e(t)){E(t,o)&&(Array.isArray(r)?n[o]=R(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=w(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return b(n.get);if("function"==typeof n.value)return b(n.value)}e=o(e)}return function(){return null}}const D=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),v=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),I=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\$\{[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:q,ERB_EXPR:F,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,MUSTACHE_EXPR:H,TMPLIT_EXPR:B});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.2.3",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:S,Node:b,Element:R,NodeFilter:H,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=O(j,"cloneNode"),$=O(j,"remove"),ne=O(j,"nextSibling"),oe=O(j,"childNodes"),re=O(j,"parentNode");if("function"==typeof S){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Ae}=K;let{IS_ALLOWED_URI:_e}=K,Se=null;const be=N({},[...D,...L,...v,...x,...k]);let Ne=null;const Re=N({},[...I,...U,...z,...P]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,De=null,Le=!0,ve=!0,Ce=!1,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=N({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=N({},[Je,Qe,et],d);let it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["annotation-xml"]);const lt=N({},["title","style","font","a","script"]);let ct=null;const st=["application/xhtml+xml","text/html"];let ut=null,mt=null;const pt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=w(e),ct=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?d:f,Se=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,ut):be,Ne=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,ut):Re,ot=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?N(w(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?N(w(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,ut):qe,Oe=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,ut):{},De=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,ut):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ve=!1),He&&(Pe=!0),je&&(Se=N({},k),Ne=[],!0===je.html&&(N(Se,D),N(Ne,I)),!0===je.svg&&(N(Se,L),N(Ne,U),N(Ne,P)),!0===je.svgFilters&&(N(Se,v),N(Ne,U),N(Ne,P)),!0===je.mathMl&&(N(Se,x),N(Ne,z),N(Ne,P))),e.ADD_TAGS&&(Se===be&&(Se=w(Se)),N(Se,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ne===Re&&(Ne=w(Ne)),N(Ne,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&N(Ve,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),N(Xe,e.FORBID_CONTENTS,ut)),Ge&&(Se["#text"]=!0),Ie&&N(Se,["html","head","body"]),Se.table&&(N(Se,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),mt=e}},ht=N({},[...L,...v,...C]),gt=N({},[...x,...M]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(ze)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,ct)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},At=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof b&&e instanceof b};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,mt)}))}const Nt=function(e){let t=null;if(bt(pe.beforeSanitizeElements,e,null),_t(e))return Tt(e),!0;const n=ut(e.nodeName);if(bt(pe.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(ke&&e.nodeType===Q&&A(/<[/\w]/g,e.data))return Tt(e),!0;if(!Se[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[o])&&!(t.namespaceURI===Je&&!it[o])&&!gt[n]&&(lt[n]||!ht[n]):!("application/xhtml+xml"!==ct||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(pe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in pt))return!1;if(ve&&!De[t]&&A(ge,t));else if(Le&&A(Te,t));else if(!Ne[t]||De[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(A(_e,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Ce&&!A(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,Ae)},Ot=function(e){bt(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ut(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(pe.uponSanitizeAttribute,e,n),p=n.attrValue,!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ke&&A(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,p)){yt(a,e);continue}Me&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=ut(e.nodeName);if(Rt(f,s,p)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),_t(e)?Tt(e):m(o.removed)}catch(e){}}}bt(pe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=At(t);for(bt(pe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(pe.uponSanitizeShadowNode,n,null),Nt(n),Ot(n),n.content instanceof s&&e(n.content);bt(pe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||dt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Se[t]||Oe[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Pe&&!Me&&!Ie&&-1===e.indexOf("<"))return ie&&Fe?ie.createHTML(e):e;if(n=Et(e),!n)return Pe?null:Fe?ae:""}n&&ze&&Tt(n.firstChild);const c=At(Ye?e:n);for(;i=c.nextNode();)Nt(i),Ot(i),i.content instanceof s&&Dt(i.content);if(Ye)return e;if(Pe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Me&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&Fe?ie.createHTML(m):m},o.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){mt=null,Ue=!1},o.isValidAttribute=function(e,t,n){mt||dt({});const o=ut(e),r=ut(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&p(pe[e],t)},o.removeHook=function(e){return m(pe[e])},o.removeHooks=function(e){pe[e]=[]},o.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return ne}));
+/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...k,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,k),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...M]),yt=w({},[...k,...I]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Me&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!ke&&S(/\/>/i,m)){At(a,e);continue}Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Ie&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
/*
CryptoJS v3.1.2
code.google.com/p/crypto-js
@@ -64,7 +64,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.13",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -123,17 +123,17 @@ b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=
isRgbColor:function(a){return mxUtils.rgbaColorRegex.test(a)},isValidColor:function(a){if(null==a)return!1;a=String(a).replace(/\s/g,"");if(a.toLowerCase()==mxUtils.normalizedValidInvalidColor)return!0;mxUtils.canvasContext.fillStyle=mxUtils.validInvalidColor;mxUtils.canvasContext.fillStyle=a;return mxUtils.canvasContext.fillStyle!=mxUtils.validInvalidColor},isDarkColor:function(a){a=mxUtils.parseColor(a);return null!=a?128>.213*a.r+.715*a.g+.072*a.b:!1},parseLightDarkColor:function(a,b,c){var d=
a,e=null;null!=a&&(a=a.match(mxUtils.lightDarkColorRegex))&&3===a.length&&(d=mxUtils.trim(a[1]),e=mxUtils.trim(a[2]));null==e&&(c||mxUtils.isVarColor(d))&&(e=d);e=null!=e?e:null!=b?b:mxUtils.getInverseColor(d);return{light:d,dark:e}},getInverseColor:function(a,b,c){function d(m){return Math.round(b/100*(255-m)+m*(1-b/100))}function e(m){return Math.round(Math.max(0,Math.min(255,m)))}c=null!=c?c:180;b=null!=b?b:93;var f=0,g=0,k=0;if("transparent"==a.toLowerCase())return a;k=mxUtils.parseColor(a);if(null==
k)return a;f=k.r;g=k.g;k=k.b;f=d(f);g=d(g);k=d(k);a=[1,0,0,0,1,0,0,0,1];var l=Math.cos(c*Math.PI/180);c=Math.sin(c*Math.PI/180);a[0]=.2126+.7874*l-.2126*c;a[1]=.7152-.7152*l-.7152*c;a[2]=.0722-.0722*l+.9278*c;a[3]=.2126-.2126*l+.143*c;a[4]=.7152+(1-.7152)*l+.14*c;a[5]=.0722-.0722*l-.283*c;a[6]=.2126-.2126*l-.7874*c;a[7]=.7152-.7152*l+.7152*c;a[8]=.0722+.9278*l+.0722*c;c=e(a[0]*f+a[1]*g+a[2]*k);l=e(a[3]*f+a[4]*g+a[5]*k);f=e(a[6]*f+a[7]*g+a[8]*k);return"#"+(16777216|c<<16|l<<8|f).toString(16).slice(1)},
-addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?"light-dark("+e.light+", "+e.dark+")":mxUtils.preferDarkColor?
-e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText="light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===Element)d=a.cloneNode(null!=c?!c:!1);else{d=
-new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/
-180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
+addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?e.light==e.dark?e.light:"light-dark("+e.light+
+", "+e.dark+")":mxUtils.preferDarkColor?e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText=b.light==b.dark?b.light:"light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===
+Element)d=a.cloneNode(null!=c?!c:!1);else{d=new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);
+d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);
+d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
reversePortConstraints:function(a){var 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,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,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=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,
@@ -2003,12 +2003,12 @@ Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFi
Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(f,h){b.undoableEditHappened(h.getProperty("edit"))};var e=mxUtils.bind(this,function(f,h){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(f,h){f=h.getProperty("edit").changes;f=a.getSelectionCellsForChanges(f);h=!1;if(0<f.length){for(var d=[],g=0;g<f.length;g++)null!=a.view.getState(f[g])&&(d.push(f[g]),
h||(a.scrollCellToVisible(f[g]),h=!0));a.setSelectionCells(d)}};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var x=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var I=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&
-(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;I+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",I+=a.embedViewport.y,D+=a.embedViewport.x);
-h&&document.body.appendChild(this.bg);var T=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,I,e,f);D=h.x;I=h.y;T.style.width=e+"px";T.style.height=f+"px";T.style.left=D+"px";T.style.top=I+"px";T.style.zIndex=this.zIndex;T.appendChild(b);document.body.appendChild(T);!m&&b.clientHeight>T.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),
-d.className="geDialogClose",d.style.top=I+14+"px",d.style.left=D+e+38-x+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){K=!0}),null,mxUtils.bind(this,function(U){K&&(a.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||
-null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);G=U.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(z,document.body.scrollWidth-E):z;f=Math.min(C,G-E);U=Math.max(1,Math.round((U.width-e-E)/2));var Y=Math.max(1,Math.round((G-f-a.footerHeight)/3));Y=this.getPosition(U,Y,e,f);U=Y.x;Y=Y.y;var Q=mxUtils.getDocumentScrollOrigin(document);U+=Q.x;Y+=Q.y;Editor.inlineFullscreen||
-null==a.embedViewport||(Y+=a.embedViewport.y,U+=a.embedViewport.x);T.style.left=U+"px";T.style.top=Y+"px";T.style.width=e+"px";T.style.height=f+"px";!m&&b.clientHeight>T.clientHeight-E&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Y+14+"px",this.dialogImg.style.left=U+e+38-x+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=g;this.container=T;a.editor.fireEvent(new mxEventObject("showDialog"))}
+function Dialog(a,b,e,f,h,d,g,m,p,k,u){this.editorUi=a;var w=p?57:0,z=e,C=f,E=p?0:64,D=Editor.inlineFullscreen||null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);null==a.embedViewport&&null!=window.innerHeight&&(D.height=window.innerHeight);var G=D.height;D=Math.max(1,Math.round((D.width-e-E)/2));var K=Math.max(1,Math.round((G-f-a.footerHeight)/3));b.style.maxHeight="100%";e=null!=document.body?Math.min(e,document.body.scrollWidth-E):e;f=Math.min(f,G-E);0<a.dialogs.length&&
+(this.zIndex+=2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var L=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=L.x+"px";this.bg.style.top=L.y+"px";D+=L.x;K+=L.y;Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",K+=a.embedViewport.y,D+=a.embedViewport.x);
+h&&document.body.appendChild(this.bg);var Q=a.createDiv(p?"geTransDialog":"geDialog");h=this.getPosition(D,K,e,f);D=h.x;K=h.y;Q.style.width=e+"px";Q.style.height=f+"px";Q.style.left=D+"px";Q.style.top=K+"px";Q.style.zIndex=this.zIndex;Q.appendChild(b);document.body.appendChild(Q);!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");b.style.overflowX="hidden";if(d&&(d=document.createElement("img"),d.setAttribute("src",Dialog.prototype.closeImage),d.setAttribute("title",mxResources.get("close")),
+d.className="geDialogClose",d.style.top=K+14+"px",d.style.left=D+e+38-w+"px",d.style.zIndex=this.zIndex,mxEvent.addListener(d,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(d),this.dialogImg=d,!u)){var N=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(U){N=!0}),null,mxUtils.bind(this,function(U){N&&(a.hideDialog(!0),N=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=k){var U=k();null!=U&&(z=e=U.w,C=f=U.h)}U=Editor.inlineFullscreen||
+null==a.embedViewport?this.getDocumentSize():mxUtils.clone(a.embedViewport);G=U.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==a.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");e=null!=document.body?Math.min(z,document.body.scrollWidth-E):z;f=Math.min(C,G-E);U=Math.max(1,Math.round((U.width-e-E)/2));var Y=Math.max(1,Math.round((G-f-a.footerHeight)/3));Y=this.getPosition(U,Y,e,f);U=Y.x;Y=Y.y;var P=mxUtils.getDocumentScrollOrigin(document);U+=P.x;Y+=P.y;Editor.inlineFullscreen||
+null==a.embedViewport||(Y+=a.embedViewport.y,U+=a.embedViewport.x);Q.style.left=U+"px";Q.style.top=Y+"px";Q.style.width=e+"px";Q.style.height=f+"px";!m&&b.clientHeight>Q.clientHeight-E&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=Y+14+"px",this.dialogImg.style.left=U+e+38-w+"px")});null!=a.embedViewport?a.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=g;this.container=Q;a.editor.fireEvent(new mxEventObject("showDialog"))}
Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2016,91 +2016,92 @@ Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKA
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getDocumentSize=function(){return mxUtils.getDocumentSize()};Dialog.prototype.getPosition=function(a,b){return new mxPoint(a,b)};
Dialog.prototype.close=function(a,b){if(null!=this.onDialogClose){if(0==this.onDialogClose(a,b))return!1;this.onDialogClose=null}null!=this.dialogImg&&null!=this.dialogImg.parentNode&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);null!=this.editorUi.embedViewport?this.editorUi.removeListener(this.resizeListener):mxEvent.removeListener(window,"resize",this.resizeListener);null!=this.container.parentNode&&
this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);x.appendChild(z)}b=
-document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);x.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
-var C=mxUtils.button(f,function(){p&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};x.appendChild(e);this.container=x},PrintDialog=function(a,b,e){this.create(a,b,e)};
-PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(x.value)/100;isNaN(D)&&(D=1,x.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(I=mxUtils.getScaleForPageCount(L,e,G))}var T=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);I*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,T-=D.y*G.height):
-E=!0;E=PrintDialog.createPrintPreview(e,I,G,0,L,T,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
+var ErrorDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div");w.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);w.appendChild(z)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"<br/>"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=k&&(k=mxUtils.button(k,function(){null!=u&&u()}),k.className="geBtn",e.appendChild(k));
+var C=mxUtils.button(f,function(){p&&a.hideDialog();null!=h&&h()});C.className="geBtn";e.appendChild(C);null!=g&&(f=mxUtils.button(g,function(){p&&a.hideDialog();null!=m&&m()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b,e){this.create(a,b,e)};
+PrintDialog.prototype.create=function(a){function b(C){var E=g.checked||k.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,K=1/e.pageScale;if(E){var L=g.checked?1:parseInt(u.value);isNaN(L)||(K=mxUtils.getScaleForPageCount(L,e,G))}var Q=L=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);K*=D;!E&&e.pageVisible?(D=e.getPageLayout(),L-=D.x*G.width,Q-=D.y*G.height):
+E=!0;E=PrintDialog.createPrintPreview(e,K,G,0,L,Q,E);E.open();C&&PrintDialog.printPreview(E)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");var d=document.createElement("tr");var g=document.createElement("input");g.setAttribute("type","checkbox");var m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";m.appendChild(g);var p=document.createElement("span");mxUtils.write(p," "+mxResources.get("fitPage"));
m.appendChild(p);mxEvent.addListener(p,"click",function(C){g.checked=!g.checked;k.checked=!g.checked;mxEvent.consume(C)});mxEvent.addListener(g,"change",function(){k.checked=!g.checked});d.appendChild(m);h.appendChild(d);d=d.cloneNode(!1);var k=document.createElement("input");k.setAttribute("type","checkbox");m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(k);p=document.createElement("span");mxUtils.write(p," "+mxResources.get("posterPrint")+":");m.appendChild(p);mxEvent.addListener(p,
"click",function(C){k.checked=!k.checked;g.checked=!k.checked;mxEvent.consume(C)});d.appendChild(m);var u=document.createElement("input");u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.setAttribute("size","4");u.setAttribute("disabled","disabled");u.style.width="50px";m=document.createElement("td");m.style.fontSize="10pt";m.appendChild(u);mxUtils.write(m," "+mxResources.get("pages")+" (max)");d.appendChild(m);h.appendChild(d);mxEvent.addListener(k,"change",
-function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");g.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";m.appendChild(x);d.appendChild(m);h.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
+function(){k.checked?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled");g.checked=!k.checked});d=d.cloneNode(!1);m=document.createElement("td");mxUtils.write(m,mxResources.get("pageScale")+":");d.appendChild(m);m=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";m.appendChild(w);d.appendChild(m);h.appendChild(d);d=document.createElement("tr");m=document.createElement("td");m.colSpan=2;
m.style.paddingTop="20px";m.setAttribute("align","right");p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);if(PrintDialog.previewEnabled){var z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});z.className="geBtn";m.appendChild(z)}z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});z.className="geBtn gePrimaryBtn";m.appendChild(z);a.editor.cancelFirst||
m.appendChild(p);d.appendChild(m);h.appendChild(d);f.appendChild(h);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}};
PrintDialog.createPrintPreview=function(a,b,e,f,h,d,g){b=new mxPrintPreview(a,b,e,f,h,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=g;g=a.background;if(null==g||""==g||g==mxConstants.NONE)g="#ffffff";b.backgroundColor=g;var m=b.isTextLabel;b.isTextLabel=function(k){return"geHint"==!k.className&&m.apply(this,arguments)};var p=b.getLinkForCellState;b.getLinkForCellState=function(k){return a.getAbsoluteUrl(p.apply(this,arguments))};return b};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){var D=x;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(u.style.backgroundColor=z,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");
+var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(u.style.backgroundImage="url("+D.src+")",u.style.display="inline-block"):(u.style.backgroundImage="",u.style.display="none");u.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(u.style.backgroundColor=z,u.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var h=document.createElement("tbody");
var d=document.createElement("tr");var g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";mxUtils.write(g,mxResources.get("paperSize")+":");d.appendChild(g);g=document.createElement("td");g.style.verticalAlign="top";g.style.fontSize="10pt";var m=PageSetupDialog.addPageFormatPanel(g,"pagesetupdialog",e.pageFormat);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("gridSize")+":");d.appendChild(g);
g=document.createElement("td");g.style.whiteSpace="nowrap";var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=e.getGridSize();g.appendChild(p);mxEvent.addListener(p,"change",function(){var D=parseInt(p.value);p.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");mxUtils.write(g,mxResources.get("background")+":");
d.appendChild(g);g=document.createElement("td");var k=document.createElement("button");k.className="geBtn";k.style.margin="0px";mxUtils.write(k,mxResources.get("change")+"...");var u=document.createElement("div");u.style.display="inline-block";u.style.verticalAlign="middle";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="contain";u.style.border="1px solid lightGray";u.style.borderRadius="4px";u.style.marginRight="14px";u.style.height="32px";
-u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var x=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,I,L,T){I||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),x=G,C=T);z=L;b()},x,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
-g.colSpan=2;g.style.paddingTop="16px";g.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,x,m.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=x?x.src:null);null!=C&&
+u.style.width="64px";u.style.cursor="pointer";u.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,E=function(D){a.showBackgroundImageDialog(function(G,K,L,Q){K||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=Q);z=L;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(k,"click",E);mxEvent.addListener(u,"click",E);b();g.appendChild(u);g.appendChild(k);d.appendChild(g);h.appendChild(d);d=document.createElement("tr");g=document.createElement("td");
+g.colSpan=2;g.style.paddingTop="16px";g.setAttribute("align","right");k=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});k.className="geBtn";a.editor.cancelFirst&&g.appendChild(k);E=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(p.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,w,m.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=C&&
(D.shadowVisible=C);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});E.className="geBtn gePrimaryBtn";g.appendChild(E);a.editor.cancelFirst||g.appendChild(k);d.appendChild(g);h.appendChild(d);f.appendChild(h);this.container=f};
PageSetupDialog.addPageFormatPanel=function(a,b,e,f){b="format-"+b;var h=document.createElement("input");h.setAttribute("name",b);h.setAttribute("type","radio");h.setAttribute("value","portrait");var d=document.createElement("input");d.setAttribute("name",b);d.setAttribute("type","radio");d.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="4px";g.style.borderRadius="4px";g.style.borderWidth="1px";g.style.borderStyle="solid";g.style.boxSizing="border-box";
g.style.padding="2px";g.style.width="210px";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.marginLeft="4px";m.style.width="210px";m.style.height="24px";h.style.marginRight="6px";m.appendChild(h);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));m.appendChild(b);d.style.marginLeft="10px";d.style.marginRight="6px";m.appendChild(d);var p=document.createElement("span");p.style.width="100px";mxUtils.write(p,mxResources.get("landscape"));
-m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var x=document.createElement("input");x.setAttribute("size","7");x.setAttribute("title",mxResources.get("height"));x.style.textAlign="right";k.appendChild(x);
+m.appendChild(p);var k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.marginLeft="4px";k.style.fontSize="12px";k.style.width="210px";k.style.height="24px";var u=document.createElement("input");u.setAttribute("size","7");u.setAttribute("title",mxResources.get("width"));u.style.textAlign="right";k.appendChild(u);mxUtils.write(k," x ");var w=document.createElement("input");w.setAttribute("size","7");w.setAttribute("title",mxResources.get("height"));w.style.textAlign="right";k.appendChild(w);
var z=document.createElement("select");z.style.marginLeft="4px";z.style.maxWidth="78px";z.style.width="78px";for(var C=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],E=0;E<C.length;E++){var D=document.createElement("option");D.setAttribute("value",C[E].unit);mxUtils.write(D,C[E].label);z.appendChild(D)}z.value=Editor.pageSizeUnit;k.appendChild(z);m.style.display=
-"none";k.style.display="none";var G={},I=PageSetupDialog.getFormats();for(E=0;E<I.length;E++)C=I[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var K=0;K<I.length;K++){var U=I[K];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=
+"none";k.style.display="none";var G={},K=PageSetupDialog.getFormats();for(E=0;E<K.length;E++)C=K[E],G[C.key]=C,D=document.createElement("option"),D.setAttribute("value",C.key),mxUtils.write(D,C.title),g.appendChild(D);var L=function(){g.value="custom";for(var N=0;N<K.length;N++){var U=K[N];null!=U.format&&("a4"==U.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==U.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=
583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==U.format.width&&e.height==U.format.height?(g.value=U.key,h.setAttribute("checked","checked"),h.defaultChecked=!0,h.checked=!0,d.removeAttribute("checked"),d.defaultChecked=!1,d.checked=!1,detected=!0):e.width==U.format.height&&e.height==U.format.width&&(g.value=U.key,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,d.setAttribute("checked","checked"),d.defaultChecked=!0,detected=d.checked=!0))}"custom"==g.value?
-(u.value=Editor.toUnit(e.width,z.value),x.value=Editor.toUnit(e.height,z.value),h.setAttribute("checked","checked"),g.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};L();a.appendChild(g);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var T=function(K,U){K=G[g.value];null!=K.format?(u.value=Editor.toUnit(d.checked?K.format.height:K.format.width,z.value),x.value=Editor.toUnit(d.checked?K.format.width:K.format.height,z.value),k.style.display="none",
-m.style.display=""):(m.style.display="none",k.style.display="");K=parseFloat(u.value);if(isNaN(K)||0>=K)u.value=Editor.toUnit(e.width,z.value);K=parseFloat(x.value);if(isNaN(K)||0>=K)x.value=Editor.toUnit(e.height,z.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(x.value),z.value)));U||K.width==e.width&&K.height==e.height||(e=K,null!=f&&f(e))};mxEvent.addListener(b,"click",function(K){h.checked=!0;T(K);mxEvent.consume(K)});
-mxEvent.addListener(p,"click",function(K){d.checked=!0;T(K);mxEvent.consume(K)});mxEvent.addListener(u,"blur",T);mxEvent.addListener(u,"click",T);mxEvent.addListener(x,"blur",T);mxEvent.addListener(x,"click",T);mxEvent.addListener(d,"change",T);mxEvent.addListener(h,"change",T);mxEvent.addListener(g,"change",function(K){T(K,"custom"==g.value);mxEvent.consume(K)});mxEvent.addListener(z,"change",function(K){u.value=Editor.toUnit(Editor.fromUnit(u.value,Editor.pageSizeUnit),z.value);x.value=Editor.toUnit(Editor.fromUnit(x.value,
-Editor.pageSizeUnit),z.value);Editor.pageSizeUnit=z.value;T(K,!0);mxEvent.consume(K)});T(null,!0);return{set:function(K){e=K;L(null,null,!0)},get:function(){return e},widthInput:u,heightInput:x}};
+(u.value=Editor.toUnit(e.width,z.value),w.value=Editor.toUnit(e.height,z.value),h.setAttribute("checked","checked"),g.value="custom",m.style.display="none",k.style.display=""):(m.style.display="",k.style.display="none")};L();a.appendChild(g);mxUtils.br(a);a.appendChild(m);a.appendChild(k);var Q=function(N,U){N=G[g.value];null!=N.format?(u.value=Editor.toUnit(d.checked?N.format.height:N.format.width,z.value),w.value=Editor.toUnit(d.checked?N.format.width:N.format.height,z.value),k.style.display="none",
+m.style.display=""):(m.style.display="none",k.style.display="");N=parseFloat(u.value);if(isNaN(N)||0>=N)u.value=Editor.toUnit(e.width,z.value);N=parseFloat(w.value);if(isNaN(N)||0>=N)w.value=Editor.toUnit(e.height,z.value);N=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(u.value),z.value)),Math.floor(Editor.fromUnit(parseFloat(w.value),z.value)));U||N.width==e.width&&N.height==e.height||(e=N,null!=f&&f(e))};mxEvent.addListener(b,"click",function(N){h.checked=!0;Q(N);mxEvent.consume(N)});
+mxEvent.addListener(p,"click",function(N){d.checked=!0;Q(N);mxEvent.consume(N)});mxEvent.addListener(u,"blur",Q);mxEvent.addListener(u,"click",Q);mxEvent.addListener(w,"blur",Q);mxEvent.addListener(w,"click",Q);mxEvent.addListener(d,"change",Q);mxEvent.addListener(h,"change",Q);mxEvent.addListener(g,"change",function(N){Q(N,"custom"==g.value);mxEvent.consume(N)});mxEvent.addListener(z,"change",function(N){u.value=Editor.toUnit(Editor.fromUnit(u.value,Editor.pageSizeUnit),z.value);w.value=Editor.toUnit(Editor.fromUnit(w.value,
+Editor.pageSizeUnit),z.value);Editor.pageSizeUnit=z.value;Q(N,!0);mxEvent.consume(N)});Q(null,!0);return{set:function(N){e=N;L(null,null,!0)},get:function(){return e},widthInput:u,heightInput:w}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var x=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
+var FilenameDialog=function(a,b,e,f,h,d,g,m,p,k,u){p=null!=p?p:!0;var w=document.createElement("div"),z=document.createElement("div");z.style.width="100%";z.style.display="grid";z.style.gap="5px 8px";z.style.gridAutoColumns="auto 1fr";z.style.boxSizing="border-box";z.style.padding="3px";var C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.justifyContent="flex-end";C.style.minWidth="0";var E=document.createElement("div");E.style.display="inline-block";
E.style.textOverflow="ellipsis";E.style.whiteSpace="nowrap";E.style.overflow="hidden";E.style.fontSize="10pt";E.style.padding="2px 0";E.setAttribute("title",h||mxResources.get("filename"));mxUtils.write(E,(h||mxResources.get("filename"))+":");C.appendChild(E);z.appendChild(C);var D=document.createElement("input");D.setAttribute("value",b||"");D.style.flexGrow="1";var G=mxUtils.button(e,function(){if(null==d||d(D.value))p&&a.hideDialog(),f(D.value)});G.className="geBtn gePrimaryBtn";this.init=function(){if(null!=
-h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var I=z.parentNode;if(null!=I){var L=null;mxEvent.addListener(I,"dragleave",function(T){null!=L&&(L.style.backgroundColor="",L=null);T.stopPropagation();T.preventDefault()});mxEvent.addListener(I,"dragover",mxUtils.bind(this,function(T){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=
-"#ebf2f9");T.stopPropagation();T.preventDefault()}));mxEvent.addListener(I,"drop",mxUtils.bind(this,function(T){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(T.dataTransfer.getData("text/uri-list")),G.click());T.stopPropagation();T.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);
+h||null==g)if(null!=u?Editor.selectFilename(D):(D.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?D.select():document.execCommand("selectAll",!1,null)),Graph.fileSupport){var K=z.parentNode;if(null!=K){var L=null;mxEvent.addListener(K,"dragleave",function(Q){null!=L&&(L.style.backgroundColor="",L=null);Q.stopPropagation();Q.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Q){null==L&&(!mxClient.IS_IE||10<document.documentMode)&&(L=D,L.style.backgroundColor=
+"#ebf2f9");Q.stopPropagation();Q.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Q){null!=L&&(L.style.backgroundColor="",L=null);0<=mxUtils.indexOf(Q.dataTransfer.types,"text/uri-list")&&(D.value=decodeURIComponent(Q.dataTransfer.getData("text/uri-list")),G.click());Q.stopPropagation();Q.preventDefault()}))}}};C=document.createElement("div");C.style.display="inline-flex";C.style.alignItems="center";C.style.gap="4px";C.style.whiteSpace="nowrap";C.appendChild(D);z.appendChild(C);
null==h&&null!=g||null==u||null==a.editor.diagramFileTypes||(C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.textOverflow="ellipsis",C.style.justifyContent="flex-end",C.style.fontSize="10pt",mxUtils.write(C,mxResources.get("type")+":"),z.appendChild(C),C=document.createElement("div"),C.style.display="inline-flex",C.style.alignItems="center",C.style.whiteSpace="nowrap",z.appendChild(C),b=FilenameDialog.createFileTypes(a,D,a.editor.diagramFileTypes),
b.style.width="100%",C.appendChild(b));null!=g&&z.appendChild(g);row=document.createElement("div");row.style.gridColumn="1 / span 2";row.style.paddingTop=null!=u?"6px":"14px";row.style.whiteSpace="nowrap";row.style.display="inline-flex";row.style.alignItems="center";row.style.justifyContent="flex-end";row.setAttribute("align","right");C=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=k&&k()});C.className="geBtn";null==m||a.isOffline()||row.appendChild(a.createHelpIcon(m));
-a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(I){13==I.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);x.appendChild(z);this.container=x};FilenameDialog.filenameHelpLink=null;
+a.editor.cancelFirst&&row.appendChild(C);mxEvent.addListener(D,"keypress",function(K){13==K.keyCode&&G.click()});row.appendChild(G);a.editor.cancelFirst||row.appendChild(C);z.appendChild(row);w.appendChild(z);this.container=w};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createFileTypes=function(a,b,e){var f=document.createElement("select");for(a=0;a<e.length;a++){var h=document.createElement("option");h.setAttribute("value",a);mxUtils.write(h,mxResources.get(e[a].description)+" (."+e[a].extension+")");f.appendChild(h)}mxEvent.addListener(f,"change",function(d){d=e[f.value].extension;var g=b.value.lastIndexOf(".drawio.");g=0<g?g:b.value.lastIndexOf(".");"drawio"!=d&&(d="drawio."+d);b.value=0<g?b.value.substring(0,g+1)+d:b.value+"."+d;"createEvent"in
document?(d=document.createEvent("HTMLEvents"),d.initEvent("change",!1,!0),b.dispatchEvent(d)):b.fireEvent("onchange")});a=function(d){d=b.value.toLowerCase();for(var g=0,m=0;m<e.length;m++){var p=e[m].extension,k=null;"drawio"!=p&&(k=p,p=".drawio."+p);if(d.substring(d.length-p.length-1)=="."+p||null!=k&&d.substring(d.length-k.length-1)=="."+k){g=m;break}}f.value=g};mxEvent.addListener(b,"change",a);mxEvent.addListener(b,"keyup",a);a();return f};
var WrapperWindow=function(a,b,e,f,h,d,g){var m=a.createSidebarContainer();g(m);this.window=new mxWindow(b,m,e,f,h,d,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);a.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(p){null==p&&(p=window.event);return null!=p&&a.isSelectionAllowed(p)}))};
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph;if(null!=g.container&&!g.transparentBackground){if(g.pageVisible){var m=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var p=g.container.firstChild;null!=p&&p.nodeType!=mxConstants.NODETYPE_ELEMENT;)p=p.nextSibling;null!=p&&(this.backgroundPageShape=this.createBackgroundPageShape(m),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(g.container),p.style.position="absolute",g.container.insertBefore(this.backgroundPageShape.node,p),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(k){g.dblClick(k)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){null!=
g.tooltipHandler&&g.tooltipHandler.isHideOnHover()&&g.tooltipHandler.hide();g.isMouseDown&&!mxEvent.isConsumed(k)&&g.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(k))}),mxUtils.bind(this,function(k){g.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(k))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=m,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,x=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
-10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,I=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
-this.scale-z+m,E)+I*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=x,k.view.backgroundPageShape.node.style.colorScheme=
-"none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=
-function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var x=u*p;k.push("M 0 "+x+" L "+m+" "+x+" M "+x+" 0 L "+x+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
-m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);
-if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,x=this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();
-m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,x.width*z,x.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,I=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(T){if(null!=T){for(var K=T==this.horizontalPageBreaks?D:G,U=0;U<=K;U++){var Y=T==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),
-Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(I),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=T[U]?(T[U].points=Y,T[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),T[U]=Y)}for(U=K;U<T.length;U++)null!=T[U]&&T[U].destroy();T.splice(K,T.length-K)}});g(this.horizontalPageBreaks);
-g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var g=
-e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,
-u=this.graph.pageScale,x=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/x);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*x),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/x)-u)*x,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,x){var z=h.apply(this,arguments);null==x||x||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||
-this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var x=this.graph.isCellSelected(p);u=u||x;if(x||!u&&(this.graph.isTableCell(g)||this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var M=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var aa=this.view.translate,ia=this.view.scale;M=mxRectangle.fromRectangle(M);M.add(new mxRectangle((aa.x+V.x)*ia,(aa.y+V.y)*ia,V.width*ia,V.height*ia))}return M};h.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(M,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
-0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(M){for(var V=M.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(M.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(M){try{h.getModel().isEdge(M)?
-p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(M,!1),aa=[],ia=[],na;for(na in V)aa.push(V[na]),ia.push(na);h.getModel().isEdge(M)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",aa,"cells",[M],"force",!0));h.getModel().isEdge(M)?p=h.pasteEdgeStyle=!0:m=!0}catch(qa){this.handleError(qa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=
-p=h.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(M,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(M,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(M){null==M&&(M=window.event);return h.isEditing()||null!=M&&this.isSelectionAllowed(M)});this.container!=document.body||
-this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&
-(this.tabContainer.onselectstart=k),mxClient.IS_IOS&&(b=function(){var M=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{M=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(aa){}}return M}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",
-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(M){if(null!=M){var V=mxEvent.getSource(M);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(M)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||
-9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b):h.panningHandler.usePopupTrigger=!1;h.init(this.diagramContainer);mxClient.IS_SVG&&null!=h.view.getDrawPane()&&(b=h.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=h.graphHandler){var u=h.graphHandler.start;h.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,
-"mousemove",mxUtils.bind(this,function(M){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(M)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(M)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var x=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(M,V){return f.isSpaceDown()||x.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,
-function(M){16==M.which?this.shiftDown=!0:32!=M.which||h.isEditing()?mxEvent.isConsumed(M)||27!=M.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(M)!=h.container||mxEvent.consume(M))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(M){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var z=h.panningHandler.isForcePanningEvent;h.panningHandler.isForcePanningEvent=function(M){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(M.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(M.getEvent()))&&(!mxEvent.isControlDown(M.getEvent())&&mxEvent.isRightMouseButton(M.getEvent())||mxEvent.isMiddleMouseButton(M.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(M){return C.apply(this,arguments)||13==M.keyCode&&(!mxClient.IS_SF&&
-mxEvent.isControlDown(M)||mxClient.IS_MAC&&mxEvent.isMetaDown(M)||mxClient.IS_SF&&mxEvent.isShiftDown(M))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,I=null,L=null,T=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var M=this.toolbar.container.firstChild,V=[];null!=M;){var aa=M.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,M)&&(M.parentNode.removeChild(M),V.push(M));
-M=aa}M=this.toolbar.fontMenu;aa=this.toolbar.sizeMenu;if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=I}D=h.cellEditor.isContentEditing();G=M;I=aa;L=V}}),K=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){K.apply(this,arguments);T();if(h.cellEditor.isContentEditing()){var M=!1,V=function(){M||(M=!0,window.setTimeout(function(){var aa=h.getSelectedEditingElement();null!=
-aa&&(aa=mxUtils.getCurrentStyle(aa),null!=aa&&null!=f.toolbar&&(f.toolbar.setFontName(mxUtils.getCssFontFamily(aa.fontFamily)),f.toolbar.setFontSize(parseInt(aa.fontSize))));M=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(M,V){try{U.apply(this,arguments),
-T()}catch(aa){f.handleError(aa)}};h.container.setAttribute("tabindex","0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(M){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(M,V,aa){try{M==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var Q=h.foldCells;h.foldCells=function(M,V,aa,ia,na){try{Q.apply(this,arguments)}catch(qa){f.handleError(qa)}};h.popupMenuHandler.autoExpand=
-!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(M,V,aa){this.menus.createPopupMenu(M,V,aa)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(M){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(M,V){var aa=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(aa.push(V.getProperty("terminal")),window.setTimeout(function(){null!=
-f.hoverIcons&&f.hoverIcons.update(h.view.getState(aa[aa.length-1]))},0));h.pasteCellStyles(aa)});this.addListener("styleChanged",mxUtils.bind(this,function(M,V){M=V.getProperty("force");(this.updateDefaultStyle||M)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||
-Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==h.currentEdgeStyle.edgeStyle&&"1"==h.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==h.currentEdgeStyle.edgeStyle||"none"==h.currentEdgeStyle.edgeStyle||
-null==h.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==h.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+
-")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==h.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==h.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+
-")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var M=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),aa=h.getView().getState(h.getSelectionCell());null!=aa&&(M=aa.style[mxConstants.STYLE_FONTFAMILY]||M,V=aa.style[mxConstants.STYLE_FONTSIZE]||V,10<M.length&&(M=M.substring(0,8)+"..."));this.toolbar.setFontName(M);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,
-a));h.addListener(mxEvent.CELLS_ADDED,function(M,V){M=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=M&&0<M.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var M=h.getLayerForCells(h.getSelectionCells());null!=M&&h.setDefaultParent(M)}});this.gestureHandler=mxUtils.bind(this,function(M){null!=this.currentMenu&&mxEvent.getSource(M)!=
-this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var P=null;this.resizeHandler=mxUtils.bind(this,function(){null!=P&&window.clearTimeout(P);P=window.setTimeout(mxUtils.bind(this,function(){P=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&
-!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));h.addListener("gridSizeChanged",
-mxUtils.bind(this,function(){h.isGridEnabled()&&h.view.validateBackground()}));this.editor.resetGraph()}this.init();h.standalone||this.open()};EditorUi.compactUi=!0;
+mxGraphView.prototype.validateBackgroundStyles=function(g,m,p){var k=this.graph;g=null!=g?g:1;var u=mxUtils.getLightDarkColor(null==k.background||k.background==mxConstants.NONE?k.defaultPageBackgroundColor:k.background).cssText,w=mxUtils.getLightDarkColor(k.defaultPageBorderColor).cssText,z=null!=u&&this.gridColor!=u.toLowerCase()?this.gridColor:"#ffffff",C="none",E="";"simple"==k.getAdaptiveColors()&&k.background!=mxConstants.NONE&&null!=k.background&&(u=k.background);if(k.isGridEnabled()||k.gridVisible){E=
+10;mxClient.IS_SVG?(C=unescape(encodeURIComponent(this.createSvgGrid(z,g))),C=window.btoa?btoa(C):Base64.encode(C,!0),C="url(data:image/svg+xml;base64,"+C+")",E=k.gridSize*this.scale*this.gridSteps*g):C="url("+this.gridImage+")";var D=z=0;m=null!=m?m-this.translate.x*this.scale:0;p=null!=p?p-this.translate.y*this.scale:0;var G=k.gridSize*this.scale*this.gridSteps,K=m%G;G=p%G;null!=k.view.backgroundPageShape&&(D=this.getBackgroundPageBounds(),z=1+D.x,D=1+D.y);E=-Math.round(E-mxUtils.mod(this.translate.x*
+this.scale-z+m,E)+K*g)+"px "+-Math.round(E-mxUtils.mod(this.translate.y*this.scale-D+p,E)+G*g)+"px"}g=k.view.canvas;null!=g.ownerSVGElement&&(g=g.ownerSVGElement);z=!Editor.isDarkMode()&&k.enableDiagramBackground;null!=k.view.backgroundPageShape?(k.view.backgroundPageShape.node.style.backgroundPosition=E,k.view.backgroundPageShape.node.style.backgroundImage=C,k.view.backgroundPageShape.node.style.backgroundColor=u,k.view.backgroundPageShape.node.style.borderColor=w,k.view.backgroundPageShape.node.style.colorScheme=
+"none"==k.getAdaptiveColors()?"light":"",k.container.classList.add("geDiagramBackdrop"),g.style.backgroundImage="none",g.style.backgroundColor="",k.container.style.backgroundColor=z?k.diagramBackgroundColor:""):(k.container.classList.remove("geDiagramBackdrop"),g.style.backgroundPosition=E,g.style.backgroundImage=C,"1"==urlParams.transparent?k.container.style.background="transparent":!z||null!=k.background&&k.background!=mxConstants.NONE?g.style.backgroundColor=u:(g.style.backgroundColor=k.diagramBackgroundColor,
+k.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(g,m){for(var p=this.graph.gridSize*this.scale*(null!=m?m:1);p<this.minGridSize;)p*=2;m=this.gridSteps*p;for(var k=[],u=1;u<this.gridSteps;u++){var w=u*p;k.push("M 0 "+w+" L "+m+" "+w+" M "+w+" 0 L "+w+" "+m)}g=mxUtils.getLightDarkColor(g);p="color-scheme: light dark;";mxClient.IS_SF&&(p="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+p+'" width="'+
+m+'" height="'+m+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+m+'" height="'+m+'" patternUnits="userSpaceOnUse"><path d="'+k.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" opacity="0.2" stroke-width="1"/><path d="M '+m+" 0 L 0 0 0 "+m+'" fill="none" style="stroke:'+mxUtils.htmlEntities(g.cssText)+';" stroke="'+g.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;
+mxGraph.prototype.panGraph=function(g,m){a.apply(this,arguments);if(null!=this.shiftPreview1){var p=this.view.canvas;null!=p.ownerSVGElement&&(p=p.ownerSVGElement);var k=this.gridSize*this.view.scale*this.view.gridSteps;k=-Math.round(k-mxUtils.mod(this.view.translate.x*this.view.scale+g,k))+"px "+-Math.round(k-mxUtils.mod(this.view.translate.y*this.view.scale+m,k))+"px";p.style.backgroundPosition=k}};mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.view.scale,u=this.view.translate,w=
+this.pageFormat,z=k*this.pageScale,C=this.view.getBackgroundPageBounds();m=C.width;p=C.height;var E=new mxRectangle(k*u.x,k*u.y,w.width*z,w.height*z),D=(g=g&&Math.min(E.width,E.height)>this.minPageBreakDist)?Math.ceil(p/E.height)-1:0,G=g?Math.ceil(m/E.width)-1:0,K=C.x+m,L=C.y+p;null==this.horizontalPageBreaks&&0<D&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);g=mxUtils.bind(this,function(Q){if(null!=Q){for(var N=Q==this.horizontalPageBreaks?D:G,U=
+0;U<=N;U++){var Y=Q==this.horizontalPageBreaks?[new mxPoint(Math.round(C.x),Math.round(C.y+(U+1)*E.height)),new mxPoint(Math.round(K),Math.round(C.y+(U+1)*E.height))]:[new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(C.y)),new mxPoint(Math.round(C.x+(U+1)*E.width),Math.round(L))];null!=Q[U]?(Q[U].points=Y,Q[U].redraw()):(Y=new mxPolyline(Y,this.pageBreakColor),Y.dialect=this.dialect,Y.isDashed=this.pageBreakDashed,Y.pointerEvents=!1,Y.init(this.view.backgroundPane),Y.redraw(),Q[U]=Y)}for(U=N;U<
+Q.length;U++)null!=Q[U]&&Q[U].destroy();Q.splice(N,Q.length-N)}});g(this.horizontalPageBreaks);g(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(g,m,p){for(var k=0;k<m.length;k++){if(this.graph.isTableCell(m[k])||this.graph.isTableRow(m[k]))return!1;if(this.graph.getModel().isVertex(m[k])){var u=this.graph.getCellGeometry(m[k]);if(null!=u&&u.relative)return!1}}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;
+mxConnectionHandler.prototype.createMarker=function(){var g=e.apply(this,arguments);g.intersects=mxUtils.bind(this,function(m,p){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(g,arguments)});return g};mxGraphView.prototype.createBackgroundPageShape=function(g){return new mxRectangleShape(g,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var g=this.getGraphBounds(),m=0<g.width?g.x/this.scale-this.translate.x:0,p=0<g.height?
+g.y/this.scale-this.translate.y:0,k=this.graph.pageFormat,u=this.graph.pageScale,w=k.width*u;k=k.height*u;u=Math.floor(Math.min(0,m)/w);var z=Math.floor(Math.min(0,p)/k);return new mxRectangle(this.scale*(this.translate.x+u*w),this.scale*(this.translate.y+z*k),this.scale*(Math.ceil(Math.max(1,m+g.width/this.scale)/w)-u)*w,this.scale*(Math.ceil(Math.max(1,p+g.height/this.scale)/k)-z)*k)};var f=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(g,m){f.apply(this,arguments);this.dialect==
+mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=g+"px",this.view.backgroundPageShape.node.style.marginTop=m+"px")};var h=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(g,m,p,k,u,w){var z=h.apply(this,arguments);null==w||w||mxEvent.addListener(z,"mousedown",function(C){mxEvent.consume(C)});return z};var d=mxGraphHandler.prototype.isPropagateSelectionCell;
+mxGraphHandler.prototype.isPropagateSelectionCell=function(g,m,p){var k=this.graph.model.getParent(g);if(m){var u=this.graph.model.isEdge(g)?null:this.graph.getCellGeometry(g);u=!this.graph.model.isEdge(k)&&!this.graph.isSiblingSelected(g)&&(null!=u&&u.relative||!this.graph.isContainer(k)||this.graph.isPart(g))}else if(u=d.apply(this,arguments),this.graph.isTableCell(g)||this.graph.isTableRow(g))u=k,this.graph.isTable(u)||(u=this.graph.model.getParent(u)),u=!this.graph.selectionCellsHandler.isHandled(u)||
+this.graph.isCellSelected(u)&&this.graph.isToggleEvent(p.getEvent())||this.graph.isCellSelected(g)&&!this.graph.isToggleEvent(p.getEvent())||this.graph.isTableCell(g)&&this.graph.isCellSelected(k);return u};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(g){g=g.getCell();for(var m=this.graph.getModel(),p=m.getParent(g),k=this.graph.view.getState(p),u=this.graph.isCellSelected(g);null!=k&&(m.isVertex(p)||m.isEdge(p));){var w=this.graph.isCellSelected(p);u=u||w;if(w||!u&&(this.graph.isTableCell(g)||
+this.graph.isTableRow(g)))g=p;p=m.getParent(p)}return g}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var f=this,h=this.editor.graph;h.lightbox=e;var d=h.getGraphBounds;h.getGraphBounds=function(){var J=d.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var Z=this.view.translate,ia=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((Z.x+V.x)*ia,(Z.y+V.y)*ia,V.width*ia,V.height*ia))}return J};h.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(J,V){this.clearSelectionState()});h.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);h.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);h.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);h.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
+0;h.isEnabled=function(){return!1};h.panningHandler.isForcePanningEvent=function(J){for(var V=J.getSource();null!=V&&V!=h.container;){if("foreignObject"===V.nodeName||"text"===V.nodeName)return!1;V=V.parentNode}return!mxEvent.isPopupTrigger(J.getEvent())};var g=h.panningHandler.start;h.panningHandler.start=function(){g.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!h.standalone){var m=!1,p=!1;this.setDefaultStyle=function(J){try{h.getModel().isEdge(J)?
+p=h.pasteEdgeStyle=!1:m=!1;var V=h.getCellStyle(J,!1),Z=[],ia=[],oa;for(oa in V)Z.push(V[oa]),ia.push(oa);h.getModel().isEdge(J)?h.currentEdgeStyle={}:h.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ia,"values",Z,"cells",[J],"force",!0));h.getModel().isEdge(J)?p=h.pasteEdgeStyle=!0:m=!0}catch(sa){this.handleError(sa)}};this.clearDefaultStyle=function(){h.currentEdgeStyle=mxUtils.clone(h.defaultEdgeStyle);h.currentVertexStyle=mxUtils.clone(h.defaultVertexStyle);m=p=h.pasteEdgeStyle=
+!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};h.addListener("cellsInserted",function(J,V){h.pasteCellStyles(h.includeDescendants(V.getProperty("cells")))});h.addListener("textInserted",function(J,V){h.pasteCellStyles(V.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var k=mxUtils.bind(this,function(J){null==J&&(J=window.event);return h.isEditing()||null!=J&&this.isSelectionAllowed(J)});this.container!=document.body||this.editor.chromeless&&
+!this.editor.editable||(this.menubarContainer.onselectstart=k,this.menubarContainer.onmousedown=k,this.toolbarContainer.onselectstart=k,this.toolbarContainer.onmousedown=k,this.diagramContainer.onselectstart=k,this.diagramContainer.onmousedown=k,this.sidebarContainer.onselectstart=k,this.sidebarContainer.onmousedown=k,this.formatContainer.onselectstart=k,this.formatContainer.onmousedown=k,this.footerContainer.onselectstart=k,this.footerContainer.onmousedown=k,null!=this.tabContainer&&(this.tabContainer.onselectstart=
+k),mxClient.IS_IOS&&(b=function(){var J=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var V=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{J=[parseInt(V[1],10),parseInt(V[2],10),parseInt(V[3]||0,10)]}catch(Z){}}return J}(),null!=b&&16<=b[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.formatContainer.style,
+"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(b=function(J){if(null!=J){var V=mxEvent.getSource(J);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return k(J)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,
+"contextmenu",b):this.diagramContainer.oncontextmenu=b):h.panningHandler.usePopupTrigger=!1;h.init(this.diagramContainer);mxClient.IS_SVG&&null!=h.view.getDrawPane()&&(b=h.view.getDrawPane().ownerSVGElement,null!=b&&(b.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=h.graphHandler){var u=h.graphHandler.start;h.graphHandler.start=function(){null!=f.hoverIcons&&f.hoverIcons.reset();u.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,
+function(J){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(J)-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(J)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var w=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(J,V){return f.isSpaceDown()||w.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(J){16==J.which?this.shiftDown=
+!0:32!=J.which||h.isEditing()?mxEvent.isConsumed(J)||27!=J.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),h.container.style.cursor="move",h.isEditing()||mxEvent.getSource(J)!=h.container||mxEvent.consume(J))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(J){h.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var z=h.panningHandler.isForcePanningEvent;
+h.panningHandler.isForcePanningEvent=function(J){return z.apply(this,arguments)||f.isSpaceDown()||mxEvent.isMouseEvent(J.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(J.getEvent()))&&(!mxEvent.isControlDown(J.getEvent())&&mxEvent.isRightMouseButton(J.getEvent())||mxEvent.isMiddleMouseButton(J.getEvent()))};var C=h.cellEditor.isStopEditingEvent;h.cellEditor.isStopEditingEvent=function(J){return C.apply(this,arguments)||13==J.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(J)||mxClient.IS_MAC&&
+mxEvent.isMetaDown(J)||mxClient.IS_SF&&mxEvent.isShiftDown(J))};var E=h.isZoomWheelEvent;h.isZoomWheelEvent=function(){return f.isSpaceDown()||E.apply(this,arguments)};var D=!1,G=null,K=null,L=null,Q=mxUtils.bind(this,function(){if(null!=this.toolbar&&D!=h.cellEditor.isContentEditing()){for(var J=this.toolbar.container.firstChild,V=[];null!=J;){var Z=J.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,J)&&(J.parentNode.removeChild(J),V.push(J));J=Z}J=this.toolbar.fontMenu;Z=this.toolbar.sizeMenu;
+if(null==L)this.toolbar.createTextToolbar();else{for(var ia=0;ia<L.length;ia++)this.toolbar.container.appendChild(L[ia]);this.toolbar.fontMenu=G;this.toolbar.sizeMenu=K}D=h.cellEditor.isContentEditing();G=J;K=Z;L=V}}),N=h.cellEditor.startEditing;h.cellEditor.startEditing=function(){N.apply(this,arguments);Q();if(h.cellEditor.isContentEditing()){var J=!1,V=function(){J||(J=!0,window.setTimeout(function(){var Z=h.getSelectedEditingElement();null!=Z&&(Z=mxUtils.getCurrentStyle(Z),null!=Z&&null!=f.toolbar&&
+(f.toolbar.setFontName(mxUtils.getCssFontFamily(Z.fontFamily)),f.toolbar.setFontSize(parseInt(Z.fontSize))));J=!1},0))};mxEvent.addListener(h.cellEditor.textarea,"input",V);mxEvent.addListener(h.cellEditor.textarea,"touchend",V);mxEvent.addListener(h.cellEditor.textarea,"mouseup",V);mxEvent.addListener(h.cellEditor.textarea,"keyup",V);V()}};var U=h.cellEditor.stopEditing;h.cellEditor.stopEditing=function(J,V){try{U.apply(this,arguments),Q()}catch(Z){f.handleError(Z)}};h.container.setAttribute("tabindex",
+"0");h.container.style.cursor="default";if(window.self===window.top&&null!=h.container.parentNode)try{h.container.focus()}catch(J){}var Y=h.fireMouseEvent;h.fireMouseEvent=function(J,V,Z){try{J==mxEvent.MOUSE_DOWN&&this.container.focus(),Y.apply(this,arguments)}catch(ia){f.handleError(ia)}};var P=h.foldCells;h.foldCells=function(J,V,Z,ia,oa){try{P.apply(this,arguments)}catch(sa){f.handleError(sa)}};h.popupMenuHandler.autoExpand=!0;null!=this.menus&&(h.popupMenuHandler.factoryMethod=mxUtils.bind(this,
+function(J,V,Z){this.menus.createPopupMenu(J,V,Z)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(J){h.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};h.connectionHandler.addListener(mxEvent.CONNECT,function(J,V){var Z=[V.getProperty("cell")];V.getProperty("terminalInserted")&&(Z.push(V.getProperty("terminal")),window.setTimeout(function(){null!=f.hoverIcons&&f.hoverIcons.update(h.view.getState(Z[Z.length-
+1]))},0));h.pasteCellStyles(Z)});this.addListener("styleChanged",mxUtils.bind(this,function(J,V){J=V.getProperty("force");(this.updateDefaultStyle||J)&&h.copyCellStyles(V.getProperty("cells"),V.getProperty("keys"),V.getProperty("values"),h.currentVertexStyle,h.currentEdgeStyle,m,p);null!=this.toolbar&&(this.toolbar.setFontName(h.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(h.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&
+(V=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="orthogonalEdgeStyle"==h.currentEdgeStyle.edgeStyle&&"1"==h.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==h.currentEdgeStyle.edgeStyle||"none"==h.currentEdgeStyle.edgeStyle||null==h.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+
+")":"entityRelationEdgeStyle"==h.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==h.currentEdgeStyle.edgeStyle?"vertical"==h.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&
+(V=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],V.style.backgroundPosition="left center",V.style.backgroundRepeat="no-repeat",V.className="geAdaptiveAsset",V.style.height="100%",V.style.width="100%",V.style.backgroundImage="link"==h.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==h.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==h.currentEdgeStyle.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&
+(a=mxUtils.bind(this,function(){var J=h.currentVertexStyle.fontFamily||"Helvetica",V=String(h.currentVertexStyle.fontSize||"12"),Z=h.getView().getState(h.getSelectionCell());null!=Z&&(J=Z.style[mxConstants.STYLE_FONTFAMILY]||J,V=Z.style[mxConstants.STYLE_FONTSIZE]||V,10<J.length&&(J=J.substring(0,8)+"..."));this.toolbar.setFontName(J);this.toolbar.setFontSize(V)}),h.getSelectionModel().addListener(mxEvent.CHANGE,a),h.getModel().addListener(mxEvent.CHANGE,a));h.addListener(mxEvent.CELLS_ADDED,function(J,
+V){J=V.getProperty("cells");V=V.getProperty("parent");null!=V&&h.getModel().isLayer(V)&&!h.isCellVisible(V)&&null!=J&&0<J.length&&h.getModel().setVisible(V,!0)});Graph.selectParentLayer&&h.selectionModel.addListener(mxEvent.CHANGE,function(){if(h.isEnabled()&&!h.isSelectionEmpty()){var J=h.getLayerForCells(h.getSelectionCells());null!=J&&h.setDefaultParent(J)}});this.gestureHandler=mxUtils.bind(this,function(J){null!=this.currentMenu&&mxEvent.getSource(J)!=this.currentMenu.div&&this.hideCurrentMenu()});
+mxEvent.addGestureListeners(document,this.gestureHandler);var T=null;this.resizeHandler=mxUtils.bind(this,function(){null!=T&&window.clearTimeout(T);T=window.setTimeout(mxUtils.bind(this,function(){T=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==
+typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){h.view.validateBackground()}));h.addListener("gridSizeChanged",mxUtils.bind(this,function(){h.isGridEnabled()&&
+h.view.validateBackground()}));this.editor.resetGraph()}this.init();h.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(a,b,e){function f(m,p){var k=d;d+=p;return m.substring(k,d)}function h(m){m=f(m,4);return m.charCodeAt(3)+(m.charCodeAt(2)<<8)+(m.charCodeAt(1)<<16)+(m.charCodeAt(0)<<24)}var d=0;if(f(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=e&&e();else if(f(a,4),"IHDR"!=f(a,4))null!=e&&e();else{f(a,17);do{e=h(a);var g=f(a,4);if(null!=b&&b(d-8,g,e))break;value=f(a,e);f(a,4);if("IEND"==g)break}while(e)}};mxUtils.extend(EditorUi,mxEventSource);
EditorUi.prototype.splitSize=mxClient.IS_TOUCH||mxClient.IS_POINTER?12:8;EditorUi.prototype.menubarHeight=30;EditorUi.prototype.formatEnabled=!0;EditorUi.prototype.formatWidth=240;EditorUi.prototype.toolbarHeight=38;EditorUi.prototype.footerHeight=28;EditorUi.prototype.defaultSidebarWidth=Math.min(screen.width/2,"large"!=urlParams["sidebar-entries"]?212:240);EditorUi.prototype.hsplitPosition=screen.width<=Editor.smallScreenWidth?0:EditorUi.prototype.defaultSidebarWidth;
EditorUi.prototype.allowAnimation=!0;EditorUi.prototype.lightboxMaxFitScale=2;EditorUi.prototype.lightboxVerticalDivider=4;EditorUi.prototype.hsplitClickEnabled=!1;EditorUi.prototype.updateDefaultStyle=!1;EditorUi.prototype.spaceDown=!1;EditorUi.prototype.shiftDown=!1;
@@ -2109,30 +2110,30 @@ EditorUi.prototype.init=function(){var a=this.editor.graph;if(!a.standalone){"0"
arguments);e.updateActionStates()};a.showLinkDialog=mxUtils.bind(e,e.showLinkDialog);a.editLink=e.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var a=this.editor.graph,b=a.getSelectionCells(),e=this.initSelectionState(),f=!0,h=0;h<b.length;h++){var d=a.getCurrentCellStyle(b[h]);"0"!=mxUtils.getValue(d,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(e,b[h],b,f),f=!1)}this.updateSelectionStateForTableCells(e);return e};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,html:!0,rounded:!0,autoSize:!1,image:!1,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),h=e.getParent(f);if(null!=f&&null!=h){for(var d=f.getIndex(b[0]),g=h.getIndex(f),m=null,p=1,k=1,u=0,x=g<h.getChildCount()-1?e.getChildAt(e.getChildAt(h,g+1),d):null;u<b.length-1;){var z=b[++u];null==x||x!=z||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(x),x=g+k<h.getChildCount()?e.getChildAt(e.getChildAt(h,g+k),d):null);var C=this.editor.graph.view.getState(z);
+EditorUi.prototype.updateSelectionStateForTableCells=function(a){if(1<a.cells.length&&a.cell){var b=mxUtils.sortCells(a.cells),e=this.editor.graph.model,f=e.getParent(b[0]),h=e.getParent(f);if(null!=f&&null!=h){for(var d=f.getIndex(b[0]),g=h.getIndex(f),m=null,p=1,k=1,u=0,w=g<h.getChildCount()-1?e.getChildAt(e.getChildAt(h,g+1),d):null;u<b.length-1;){var z=b[++u];null==w||w!=z||null!=m&&p!=m||(m=p,p=0,k++,f=e.getParent(w),w=g+k<h.getChildCount()?e.getChildAt(e.getChildAt(h,g+k),d):null);var C=this.editor.graph.view.getState(z);
if(z==e.getChildAt(f,d+p)&&null!=C&&1==mxUtils.getValue(C.style,"colspan",1)&&1==mxUtils.getValue(C.style,"rowspan",1))p++;else break}u==k*p-1&&(a.mergeCell=b[0],a.colspan=p,a.rowspan=k)}}};EditorUi.prototype.windowResized=function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)};
EditorUi.prototype.createTimeout=function(a,b,e){var f=!0,h=null,d=mxUtils.bind(this,function(m){h.clear()&&(f=!1,m=null!=m?m:{code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:mxUtils.bind(this,function(){this.createTimeout(a,b,e)})},null!=e?e(m):this.handleError(m))}),g=window.setTimeout(d,null!=a?a:this.timeout);h={clear:function(){window.clearTimeout(g);return f},isAlive:function(){return f}};null!=b&&this.tryAndHandle(mxUtils.bind(this,function(){b(h)}),d);return h};
EditorUi.prototype.tryAndHandle=function(a,b){try{a()}catch(e){null!=b?b(e):this.handleError(e)}};
EditorUi.prototype.removeUserDefinedDarkColors=function(a,b,e){var f=this.editor.graph;a=null!=a?a:f.getSelectionCells();var h=Graph.colorStyles,d=document.createElement("div");f.model.beginUpdate();try{for(var g=0;g<a.length;g++)if(f.model.isEdge(a[g])||f.model.isVertex(a[g])){var m=f.getCellStyle(a[g],!1);if(null!=m)for(var p=0;p<h.length;p++)try{var k=m[h[p]];if(mxUtils.isLightDarkColor(k)){var u=mxUtils.getLightDarkColor(k);f.setCellStyles(h[p],u.light,[a[g]])}}catch(z){}b&&f.isHtmlLabel(a[g])&&
-"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[g])),Graph.addLightDarkColors(d,null,null,function(z,C,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),z.style.setProperty(C,E.light),!0):!1})&&f.cellLabelChanged(a[g],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var x=new ChangePageSetup(this,u.light);x.ignoreImage=!0;f.model.execute(x)}}finally{f.model.endUpdate()}return a};
+"0"!=mxUtils.getValue(m,"html","0")&&(d.innerHTML=Graph.sanitizeHtml(f.getLabel(a[g])),Graph.addLightDarkColors(d,null,null,function(z,C,E){return mxUtils.isLightDarkColor(E)?(E=mxUtils.getLightDarkColor(E),z.style.setProperty(C,E.light),!0):!1})&&f.cellLabelChanged(a[g],d.innerHTML))}if(e&&mxUtils.isLightDarkColor(f.background)){u=mxUtils.getLightDarkColor(f.background);var w=new ChangePageSetup(this,u.light);w.ignoreImage=!0;f.model.execute(w)}}finally{f.model.endUpdate()}return a};
EditorUi.prototype.updateSelectionStateForCell=function(a,b,e,f){e=this.editor.graph;a.cells.push(b);if(e.getModel().isVertex(b)){a.connections=0<e.model.getEdgeCount(b);a.unlocked=a.unlocked&&!e.isCellLocked(b);a.resizable=a.resizable&&e.isCellResizable(b);a.rotatable=a.rotatable&&e.isCellRotatable(b);a.movable=a.movable&&e.isCellMovable(b)&&!e.isTableRow(b)&&!e.isTableCell(b);a.swimlane=a.swimlane||e.isSwimlane(b);a.table=a.table||e.isTable(b);a.cell=a.cell||e.isTableCell(b);a.row=a.row||e.isTableRow(b);
a.vertices.push(b);var h=e.getCellGeometry(b);if(null!=h&&(0<h.width?null==a.width?a.width=h.width:a.width!=h.width&&(a.width=""):a.containsLabel=!0,0<h.height?null==a.height?a.height=h.height:a.height!=h.height&&(a.height=""):a.containsLabel=!0,!h.relative||null!=h.offset)){var d=h.relative?h.offset.x:h.x;h=h.relative?h.offset.y:h.y;null==a.x?a.x=d:a.x!=d&&(a.x="");null==a.y?a.y=h:a.y!=h&&(a.y="")}}else e.getModel().isEdge(b)&&(a.edges.push(b),a.connections=!0,a.resizable=!1,a.rotatable=!1,a.movable=
!1);d=e.view.getState(b);null!=d&&(a.html=a.html&&e.isHtmlLabel(b),a.autoSize=a.autoSize||e.isAutoSizeState(d),a.glass=a.glass&&e.isGlassState(d),a.rounded=a.rounded&&e.isRoundedState(d),a.lineJumps=a.lineJumps&&e.isLineJumpState(d),a.image=a.image||e.isImageState(d),a.shadow=a.shadow&&e.isShadowState(d),a.fill=a.fill&&e.isFillState(d),a.gradient=a.fill&&e.isGradientState(d),a.stroke=a.stroke&&e.isStrokeState(d),b=mxUtils.getValue(d.style,mxConstants.STYLE_SHAPE,null),a.containsImage=a.containsImage||
"image"==b,e.mergeStyle(d.style,a.style,f))};
EditorUi.prototype.installShapePicker=function(){var a=this.editor.graph,b=this;a.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(p,k){"mouseDown"==k.getProperty("eventName")&&b.hideShapePicker()}));var e=mxUtils.bind(this,function(){b.hideShapePicker(!0)});a.addListener("wheel",e);a.addListener(mxEvent.ESCAPE,e);a.view.addListener(mxEvent.SCALE,e);a.view.addListener(mxEvent.SCALE_AND_TRANSLATE,e);a.getSelectionModel().addListener(mxEvent.CHANGE,e);var f=a.popupMenuHandler.isMenuShowing;
a.popupMenuHandler.isMenuShowing=function(){return f.apply(this,arguments)||null!=b.shapePicker||null!=b.currentMenu};var h=a.dblClick;a.dblClick=function(p,k){if(this.isEnabled())if(null!=k||null==b.sidebar||mxEvent.isShiftDown(p)||a.isCellLocked(a.getDefaultParent()))h.apply(this,arguments);else{var u=mxUtils.convertPoint(this.container,mxEvent.getClientX(p),mxEvent.getClientY(p));mxEvent.consume(p);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.x,u.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var g=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var x=u.getEvent();this.graph.isCloneEvent(x)||mxEvent.isShiftDown(x)?g.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,x,null,null,mxUtils.bind(this,function(z,C,E){var D=a.getCompositeParent(p.cell);z=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=z&&z.relative;)cell=
-D,D=a.model.getParent(cell),z=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(G){E(G);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(G))}),k)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,x,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
-k.getProperty("arrow"),x=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(I){null!=I&&a.connectVertex(D,x,a.defaultEdgeLength,z,!0,!1,function(L,T,K){K(I);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(I))},
-function(L){a.selectCellsForConnectVertex(L)},z,this.hoverIcons)}),x,!0);null!=G&&(this.centerShapePicker(G,u,E,C,x),mxUtils.setOpacity(G,30),mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)}),mxEvent.addListener(G,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
+e);var d=this.hoverIcons.drag;this.hoverIcons.drag=function(){b.hideShapePicker();d.apply(this,arguments)};var g=this.hoverIcons.execute;this.hoverIcons.execute=function(p,k,u){var w=u.getEvent();this.graph.isCloneEvent(w)||mxEvent.isShiftDown(w)?g.apply(this,arguments):this.graph.connectVertex(p.cell,k,this.graph.defaultEdgeLength,w,null,null,mxUtils.bind(this,function(z,C,E){var D=a.getCompositeParent(p.cell);z=a.getCellGeometry(D);for(u.consume();null!=D&&a.model.isVertex(D)&&null!=z&&z.relative;)cell=
+D,D=a.model.getParent(cell),z=a.getCellGeometry(D);window.setTimeout(mxUtils.bind(this,function(){b.showShapePicker(u.getGraphX(),u.getGraphY(),D,mxUtils.bind(this,function(G){E(G);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(G))}),k)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,w,this)}))};var m=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m);m=window.setTimeout(mxUtils.bind(this,function(){var u=
+k.getProperty("arrow"),w=k.getProperty("direction"),z=k.getProperty("event");u=u.getBoundingClientRect();var C=mxUtils.getOffset(a.container),E=a.container.scrollLeft+u.x-C.x;C=a.container.scrollTop+u.y-C.y;var D=a.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=b.showShapePicker(E,C,D,mxUtils.bind(this,function(K){null!=K&&a.connectVertex(D,w,a.defaultEdgeLength,z,!0,!1,function(L,Q,N){N(K);null!=b.hoverIcons&&b.hoverIcons.update(a.view.getState(K))},
+function(L){a.selectCellsForConnectVertex(L)},z,this.hoverIcons)}),w,!0);null!=G&&(this.centerShapePicker(G,u,E,C,w),mxUtils.setOpacity(G,30),mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)}),mxEvent.addListener(G,"mouseleave",function(){b.hideShapePicker()}))}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(p,k){null!=m&&window.clearTimeout(m)}))}};
EditorUi.prototype.centerShapePicker=function(a,b,e,f,h){if(h==mxConstants.DIRECTION_EAST||h==mxConstants.DIRECTION_WEST)a.style.width="40px";var d=a.getBoundingClientRect();h==mxConstants.DIRECTION_NORTH?(e-=d.width/2-10,f-=d.height+6):h==mxConstants.DIRECTION_SOUTH?(e-=d.width/2-10,f+=b.height+6):h==mxConstants.DIRECTION_WEST?(e-=d.width+6,f-=d.height/2-10):h==mxConstants.DIRECTION_EAST&&(e+=b.width+6,f-=d.height/2-10);a.style.left=e+"px";a.style.top=f+"px"};
EditorUi.prototype.showShapePicker=function(a,b,e,f,h,d,g,m,p){var k=null;this.editor.graph.freehand.isDrawing()||(m=m||null==e,k=this.createShapePicker(a,b,e,f,h,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(e,d,m),d,g,m,p),null!=k&&(null==this.hoverIcons||d||this.hoverIcons.reset(),a=this.editor.graph,a.popupMenuHandler.hideMenu(),a.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=f,this.shapePicker=k));return k};
-EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var x=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,I=0,L=D.geometry;null!=L&&(x.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,I=L.height/2);return new mxPoint(x.snap(Math.round(a/x.view.scale)-x.view.translate.x-G),x.snap(Math.round(b/x.view.scale)-x.view.translate.y-I))};if(null!=g&&0<g.length){var C=this;x=this.editor.graph;z=document.createElement("div");
-h=x.view.getState(e);var E=null==e||null!=h&&x.isTransparentState(h)?null:x.copyStyle(e);h=6>g.length?35*g.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=Math.round(a)+"px";z.style.top=Math.round(b)+"px";z.style.width=h+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");m||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");x.container.appendChild(z);h=mxUtils.bind(this,function(D){var G=
-document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],x.currentVertexStyle,x.currentEdgeStyle);var I=D.geometry;x.model.isEdge(D)&&(I=I.getTerminalPoint(!1),I=new mxRectangle(0,0,I.x,I.y));null!=I&&
-G.appendChild(this.sidebar.createVertexTemplateFromCells([D],I.width,I.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&x.isSelectionEmpty()){var T=x.cloneCell(D);if(null!=f)f(T);else{var K=p([T]);x.model.isEdge(T)?T.geometry.translate(K.x,K.y):(T.geometry.x=K.x,T.geometry.y=K.y);x.model.beginUpdate();try{x.addCell(T),x.model.isVertex(T)&&x.isAutoSizeCell(T)&&x.updateCellSize(T)}finally{x.model.endUpdate()}x.setSelectionCell(T);x.scrollCellToVisible(T);u&&
-x.startEditing(T);null!=C.hoverIcons&&C.hoverIcons.update(x.view.getState(T))}}else T=x.getEditableCells(null!=e?[e]:x.getSelectionCells()),x.updateShapes(D,T);null!=d&&d(L);mxEvent.consume(L)}),25,25,null,null,e))});for(k=0;k<(m?Math.min(g.length,4):g.length);k++)h(g[k]);g=z.offsetTop+z.clientHeight-(x.container.scrollTop+x.container.offsetHeight);0<g&&(z.style.top=Math.max(x.container.scrollTop+22,b-g)+"px");g=z.offsetLeft+z.clientWidth-(x.container.scrollLeft+x.container.offsetWidth);0<g&&(z.style.left=
-Math.max(x.container.scrollLeft+22,a-g)+"px")}return z};
+EditorUi.prototype.createShapePicker=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;var w=this.editor.graph,z=null;p=null!=p?p:function(D){D=D[0];var G=0,K=0,L=D.geometry;null!=L&&(w.model.isEdge(D)&&(D=L.getTerminalPoint(!1),L=new mxRectangle(0,0,D.x,D.y)),G=L.width/2,K=L.height/2);return new mxPoint(w.snap(Math.round(a/w.view.scale)-w.view.translate.x-G),w.snap(Math.round(b/w.view.scale)-w.view.translate.y-K))};if(null!=g&&0<g.length){var C=this;w=this.editor.graph;z=document.createElement("div");
+h=w.view.getState(e);var E=null==e||null!=h&&w.isTransparentState(h)?null:w.copyStyle(e);h=6>g.length?35*g.length:140;z.className="geToolbarContainer geSidebarContainer geShapePicker";z.setAttribute("title",mxResources.get("sidebarTooltip"));z.style.left=Math.round(a)+"px";z.style.top=Math.round(b)+"px";z.style.width=h+"px";mxClient.IS_POINTER&&(z.style.touchAction="none");m||mxUtils.setPrefixedStyle(z.style,"transform","translate(-22px,-22px)");w.container.appendChild(z);h=mxUtils.bind(this,function(D){var G=
+document.createElement("a");G.className="geToolbarButton";G.style.display="inline-block";G.style.position="relative";G.style.overflow="hidden";G.style.cursor="pointer";G.style.width="30px";G.style.height="30px";G.style.padding="1px";z.appendChild(G);null!=E&&"1"!=urlParams.sketch?this.sidebar.graph.pasteStyle(E,[D]):this.sidebar.graph.pasteCellStyles([D],w.currentVertexStyle,w.currentEdgeStyle);var K=D.geometry;w.model.isEdge(D)&&(K=K.getTerminalPoint(!1),K=new mxRectangle(0,0,K.x,K.y));null!=K&&
+G.appendChild(this.sidebar.createVertexTemplateFromCells([D],K.width,K.height,"",!0,!1,null,!1,mxUtils.bind(this,function(L){if(!mxEvent.isShiftDown(L)||null==e&&w.isSelectionEmpty()){var Q=w.cloneCell(D);if(null!=f)f(Q);else{var N=p([Q]);w.model.isEdge(Q)?Q.geometry.translate(N.x,N.y):(Q.geometry.x=N.x,Q.geometry.y=N.y);w.model.beginUpdate();try{w.addCell(Q),w.model.isVertex(Q)&&w.isAutoSizeCell(Q)&&w.updateCellSize(Q)}finally{w.model.endUpdate()}w.setSelectionCell(Q);w.scrollCellToVisible(Q);u&&
+w.startEditing(Q);null!=C.hoverIcons&&C.hoverIcons.update(w.view.getState(Q))}}else Q=w.getEditableCells(null!=e?[e]:w.getSelectionCells()),w.updateShapes(D,Q);null!=d&&d(L);mxEvent.consume(L)}),25,25,null,null,e))});for(k=0;k<(m?Math.min(g.length,4):g.length);k++)h(g[k]);g=z.offsetTop+z.clientHeight-(w.container.scrollTop+w.container.offsetHeight);0<g&&(z.style.top=Math.max(w.container.scrollTop+22,b-g)+"px");g=z.offsetLeft+z.clientWidth-(w.container.scrollLeft+w.container.offsetWidth);0<g&&(z.style.left=
+Math.max(w.container.scrollLeft+22,a-g)+"px")}return z};
EditorUi.prototype.getCellsForShapePicker=function(a,b,e){var f=this.editor.graph,h=mxUtils.bind(this,function(d,g,m,p){return f.createVertex(null,null,p||"",0,0,g||120,m||60,d,!1)});b=mxUtils.bind(this,function(d,g,m){d=new mxCell(m||"",new mxGeometry(0,0,f.defaultEdgeLength+20,0),d);d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new mxPoint(d.geometry.width,null!=g?g:0),!1);d.geometry.points=null!=g?[new mxPoint(d.geometry.width/2,g)]:[];d.geometry.relative=!0;d.edge=
!0;return d});if(null!=a)try{a=f.cloneCell(a),f.model.isVertex(a)&&null!=a.geometry&&(a.geometry.x=0,a.geometry.y=0)}catch(d){a=null}null==a&&(a=h(f.appendFontSize("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",f.vertexFontSize),40,20,"Text"),f.model.isVertex(a)&&f.isAutoSizeCell(a)&&Graph.createOffscreenGraph(f.getStylesheet()).updateCellSize(a));a=[a,h("whiteSpace=wrap;html=1;"),h("ellipse;whiteSpace=wrap;html=1;",80,80),h("rhombus;whiteSpace=wrap;html=1;",
80,80),h("rounded=1;whiteSpace=wrap;html=1;"),h("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),h("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),h("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),h("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),h("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),h("triangle;whiteSpace=wrap;html=1;",
@@ -2149,47 +2150,47 @@ b?Format.blockMarkerImage.src:Format.blockFilledMarkerImage.src:a==mxConstants.A
b?Format.doubleBlockMarkerImage.src:Format.doubleBlockFilledMarkerImage.src:"box"==a?Format.boxMarkerImage.src:"halfCircle"==a?Format.halfCircleMarkerImage.src:"openAsync"==a?Format.openAsyncFilledMarkerImage.src:"async"==a?"1"!=b?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==a?Format.dashMarkerImage.src:"baseDash"==a?Format.baseDashMarkerImage.src:"cross"==a?Format.crossMarkerImage.src:"circle"==a?Format.circleMarkerImage.src:"circlePlus"==a?Format.circlePlusMarkerImage.src:
"ERone"==a?Format.EROneMarkerImage.src:"ERmandOne"==a?Format.ERmandOneMarkerImage.src:"ERmany"==a?Format.ERmanyMarkerImage.src:"ERoneToMany"==a?Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==a?Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==a?Format.ERzeroToManyMarkerImage.src:null};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var g=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{g=g||d.getSelectionCells();g=d.getExportableCells(d.model.getTopmostCells(g));for(var m={},p=d.createCellLookup(g),k=d.cloneCells(g,null,m),u=new mxGraphModel,x=u.getChildAt(u.getRoot(),
-0),z=0;z<k.length;z++){u.add(x,k[z]);var C=d.view.getState(g[z]);if(null!=C){var E=d.getCellGeometry(k[z]);null!=E&&E.relative&&!u.isEdge(g[z])&&null==p[mxObjectIdentity.get(u.getParent(g[z]))]&&(E.offset=null,E.relative=!1,E.x=C.x/C.view.scale-C.view.translate.x,E.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return g};var e=mxClipboard.paste;mxClipboard.paste=function(d){var g=
+EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};mxClipboard.copy=function(d){var g=null;if(d.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{g=g||d.getSelectionCells();g=d.getExportableCells(d.model.getTopmostCells(g));for(var m={},p=d.createCellLookup(g),k=d.cloneCells(g,null,m),u=new mxGraphModel,w=u.getChildAt(u.getRoot(),
+0),z=0;z<k.length;z++){u.add(w,k[z]);var C=d.view.getState(g[z]);if(null!=C){var E=d.getCellGeometry(k[z]);null!=E&&E.relative&&!u.isEdge(g[z])&&null==p[mxObjectIdentity.get(u.getParent(g[z]))]&&(E.offset=null,E.relative=!1,E.x=C.x/C.view.scale-C.view.translate.x,E.y=C.y/C.view.scale-C.view.translate.y)}}d.updateCustomLinks(d.createCellMapping(m,p),k);mxClipboard.insertCount=1;mxClipboard.setCells(k)}a.updatePasteActionStates();return g};var e=mxClipboard.paste;mxClipboard.paste=function(d){var g=
null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):g=e.apply(this,arguments);a.updatePasteActionStates();return g};var f=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){f.apply(this,arguments);a.updatePasteActionStates()};var h=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(d,g){h.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var H=this.graph.getPageLayout(),ea=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+H.x*ea.width),this.scale*(this.translate.y+H.y*ea.height),this.scale*H.width*ea.width,
-this.scale*H.height*ea.height)};a.getPreferredPageSize=function(H,ea,oa){H=this.getPageLayout();ea=this.getPageSize();return new mxRectangle(0,0,H.width*ea.width,H.height*ea.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(H,ea,oa,sa){if(null!=a.container&&!a.isViewer()){oa=null!=oa?oa:0;sa=null!=sa?sa:0;var Pa=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),la=mxUtils.hasScrollbars(a.container),Ba=a.view.translate,
-Ca=a.view.scale,Fa=mxRectangle.fromRectangle(Pa);Fa.x=Fa.x/Ca-Ba.x;Fa.y=Fa.y/Ca-Ba.y;Fa.width/=Ca;Fa.height/=Ca;Ba=a.container.scrollTop;var Ia=a.container.scrollLeft,Ha=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Ha+=3;var Ja=a.container.offsetWidth-Ha;Ha=a.container.offsetHeight-Ha;H=H?Math.max(.3,Math.min(ea||1,Ja/Fa.width)):Ca;ea=(Ja-H*Fa.width)/2/H;var ta=0==this.lightboxVerticalDivider?0:(Ha-H*Fa.height)/this.lightboxVerticalDivider/H;la&&(ea=Math.max(ea,
-0),ta=Math.max(ta,0));if(la||Pa.width<Ja||Pa.height<Ha)a.view.scaleAndTranslate(H,Math.floor(ea-Fa.x),Math.floor(ta-Fa.y)),a.container.scrollTop=Ba*H/Ca,a.container.scrollLeft=Ia*H/Ca;else if(0!=oa||0!=sa)Pa=a.view.translate,a.view.setTranslate(Math.floor(Pa.x+oa/Ca),Math.floor(Pa.y+sa/Ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+this.scale*H.height*ea.height)};a.getPreferredPageSize=function(H,ea,ra){H=this.getPageLayout();ea=this.getPageSize();return new mxRectangle(0,0,H.width*ea.width,H.height*ea.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(H,ea,ra,qa){if(null!=a.container&&!a.isViewer()){ra=null!=ra?ra:0;qa=null!=qa?qa:0;var Pa=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),ma=mxUtils.hasScrollbars(a.container),Ba=a.view.translate,
+Ca=a.view.scale,Ja=mxRectangle.fromRectangle(Pa);Ja.x=Ja.x/Ca-Ba.x;Ja.y=Ja.y/Ca-Ba.y;Ja.width/=Ca;Ja.height/=Ca;Ba=a.container.scrollTop;var Ia=a.container.scrollLeft,Da=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Da+=3;var Ga=a.container.offsetWidth-Da;Da=a.container.offsetHeight-Da;H=H?Math.max(.3,Math.min(ea||1,Ga/Ja.width)):Ca;ea=(Ga-H*Ja.width)/2/H;var ta=0==this.lightboxVerticalDivider?0:(Da-H*Ja.height)/this.lightboxVerticalDivider/H;ma&&(ea=Math.max(ea,
+0),ta=Math.max(ta,0));if(ma||Pa.width<Ga||Pa.height<Da)a.view.scaleAndTranslate(H,Math.floor(ea-Ja.x),Math.floor(ta-Ja.y)),a.container.scrollTop=Ba*H/Ca,a.container.scrollLeft=Ia*H/Ca;else if(0!=ra||0!=qa)Pa=a.view.translate,a.view.setTranslate(Math.floor(Pa.x+ra/Ca),Math.floor(Pa.y+qa/Ca))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var f=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",f);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",f)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(H){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(H){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var h=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var H=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=H?parseInt(H["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var g=0;d=mxUtils.bind(this,function(H,ea,oa){g++;
-var sa=document.createElement("span");sa.style.paddingLeft="8px";sa.style.paddingRight="8px";sa.style.cursor="pointer";mxEvent.addListener(sa,"click",H);null!=oa&&sa.setAttribute("title",oa);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",ea);H.style.width="36px";H.style.filter="invert(100%)";sa.appendChild(H);this.chromelessToolbar.appendChild(sa);return sa});if(null!=h.backBtn){var m=Graph.sanitizeLink(h.backBtn.url);null!=m&&d(mxUtils.bind(this,function(H){window.location.href=
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var d=mxUtils.bind(this,function(){var H=mxUtils.getCurrentStyle(a.container);a.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=H?parseInt(H["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var g=0;d=mxUtils.bind(this,function(H,ea,ra){g++;
+var qa=document.createElement("span");qa.style.paddingLeft="8px";qa.style.paddingRight="8px";qa.style.cursor="pointer";mxEvent.addListener(qa,"click",H);null!=ra&&qa.setAttribute("title",ra);H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("src",ea);H.style.width="36px";H.style.filter="invert(100%)";qa.appendChild(H);this.chromelessToolbar.appendChild(qa);return qa});if(null!=h.backBtn){var m=Graph.sanitizeLink(h.backBtn.url);null!=m&&d(mxUtils.bind(this,function(H){window.location.href=
m;mxEvent.consume(H)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var p=d(mxUtils.bind(this,function(H){this.actions.get("previousPage").funct();mxEvent.consume(H)}),Editor.previousImage,mxResources.get("previousPage")),k=document.createElement("div");k.style.fontFamily=Editor.defaultHtmlFont;k.style.display="inline-block";k.style.verticalAlign="top";k.style.fontWeight="bold";k.style.marginTop="8px";k.style.fontSize="14px";k.style.cursor="default";k.style.color=
-mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),x=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var H=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,H+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());
+mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(k);var u=d(mxUtils.bind(this,function(H){this.actions.get("nextPage").funct();mxEvent.consume(H)}),Editor.nextImage,mxResources.get("nextPage")),w=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){k.innerText="";var H=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(k,H+1+" / "+this.pages.length);k.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());
p.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(H-1,this.pages.length)].getName());u.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(H+1,this.pages.length)].getName())}});p.style.paddingLeft="0px";p.style.paddingRight="4px";u.style.paddingLeft="4px";u.style.paddingRight="0px";var z=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(u.style.display="",p.style.display="",k.style.display="inline-block"):
-(u.style.display="none",p.style.display="none",k.style.display="none");x()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(H){var ea=new mxPopupMenu(C.funct);ea.div.className+=" geMenubarMenu";ea.smartSeparators=!0;ea.showDisabled=!0;ea.autoExpand=!0;ea.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(ea,arguments);ea.destroy()});var oa=mxUtils.getOffset(k);ea.popup(oa.x,oa.y+k.offsetHeight,null,H);mxEvent.addListener(ea.div,
-"mouseleave",mxUtils.bind(this,function(){ea.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",x)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?
+(u.style.display="none",p.style.display="none",k.style.display="none");w()});if(null!=this.menus){var C=this.menus.get("pages");null!=C&&mxEvent.addListener(k,"click",mxUtils.bind(this,function(H){var ea=new mxPopupMenu(C.funct);ea.div.className+=" geMenubarMenu";ea.smartSeparators=!0;ea.showDisabled=!0;ea.autoExpand=!0;ea.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(ea,arguments);ea.destroy()});var ra=mxUtils.getOffset(k);ea.popup(ra.x,ra.y+k.offsetHeight,null,H);mxEvent.addListener(ea.div,
+"mouseleave",mxUtils.bind(this,function(){ea.hideMenu()}))}))}this.editor.addListener("resetGraphView",z);this.editor.addListener("pageSelected",w)}d(mxUtils.bind(this,function(H){this.actions.get("zoomOut").funct();mxEvent.consume(H)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){this.actions.get("zoomIn").funct();mxEvent.consume(H)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(H){a.isLightboxView()?
(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(H)}),Editor.zoomFitImage,mxResources.get("fit"));var E=null,D=null,G=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);E=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);E=null;D=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";D=null}),
-600)}),H||200)}),I=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
+600)}),H||200)}),K=mxUtils.bind(this,function(H){null!=E&&(window.clearTimeout(E),E=null);null!=D&&(window.clearTimeout(D),D=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,H||30)});if("1"==urlParams.layers){this.layersDialog=null;var L=d(mxUtils.bind(this,function(H){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var ea=L.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
ea.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));ea=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-ea.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),T=a.getModel();T.addListener(mxEvent.CHANGE,function(){L.style.display=1<T.getChildCount(T.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var K=this.lightboxToolbarActions[z];K.elem=d(K.fn,K.icon,K.tooltip)}if(null!=h.refreshBtn){var U=null==h.refreshBtn.url?null:Graph.sanitizeLink(h.refreshBtn.url);d(mxUtils.bind(this,function(H){null!=
+ea.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(H)}),Editor.layersImage,mxResources.get("layers")),Q=a.getModel();Q.addListener(mxEvent.CHANGE,function(){L.style.display=1<Q.getChildCount(Q.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(d);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||d(mxUtils.bind(this,function(H){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(H)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(z=0;z<this.lightboxToolbarActions.length;z++){var N=this.lightboxToolbarActions[z];N.elem=d(N.fn,N.icon,N.tooltip)}if(null!=h.refreshBtn){var U=null==h.refreshBtn.url?null:Graph.sanitizeLink(h.refreshBtn.url);d(mxUtils.bind(this,function(H){null!=
U?window.location.href=U:window.location.reload();mxEvent.consume(H)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=h.fullscreenBtn&&window.self!==window.top&&d(mxUtils.bind(this,function(H){h.fullscreenBtn.url?a.openLink(h.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(H)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!h.noCloseBtn&&(h.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=
document.body))&&d(mxUtils.bind(this,function(H){"1"==urlParams.close||h.closeBtn?window.close():(this.destroy(),mxEvent.consume(H))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||
-(mxEvent.isShiftDown(H)||I(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():I(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||I(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<
-Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Q=a.view.validate,P=new mxPoint,M=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;M=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
-H&&(H=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));H=a.getPageLayout(H,P,1);var ea=a.getDefaultTranslate(H);this.x0=H.x;this.y0=H.y;if(ea.x!=this.translate.x||ea.y!=this.translate.y)this.invalidate(),this.translate.x=ea.x,this.translate.y=ea.y}ea=a.getPagePadding();var oa=a.getPageSize();H=ea.x-(this.x0||0)*oa.width;ea=ea.y-(this.y0||0)*oa.height;if(this.translate.x!=H||this.translate.y!=ea)this.invalidate(),this.translate.x=H,this.translate.y=ea}Q.apply(this,
-arguments)};if(!a.isViewer()){var aa=a.sizeDidChange;a.sizeDidChange=function(){var H=M;M=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),oa=this.getDefaultTranslate(ea),sa=this.view.translate.x,Pa=this.view.translate.y;if(oa.x!=sa||oa.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(oa.x,oa.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((oa.x-
-sa)*this.view.scale),this.container.scrollTop+=Math.round((oa.y-Pa)*this.view.scale));return}}aa.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ia=a.view.getBackgroundPane(),na=a.view.getDrawPane();a.cumulativeZoomFactor=1;var qa=null,O=null,Z=null,ca=null,W=null,ja=function(H){null!=qa&&window.clearTimeout(qa);0<=H&&window.setTimeout(function(){if(!a.isMouseDown||ca)qa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&
-(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),na.style.transformOrigin="",ia.style.transformOrigin="",mxClient.IS_SF?(na.style.transform="scale(1)",ia.style.transform="scale(1)",window.setTimeout(function(){na.style.transform="";ia.style.transform=""},0)):(na.style.transform="",ia.style.transform=""),
-a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),oa=mxUtils.getOffset(a.container),sa=a.view.scale,Pa=0,la=0;null!=O&&(Pa=a.container.offsetWidth/2-O.x+oa.x,la=a.container.offsetHeight/2-O.y+oa.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=sa&&(null!=Z&&(Pa+=ea.x-Z.x,la+=ea.y-Z.y),null!=b&&e.chromelessResize(!1,null,Pa*(a.cumulativeZoomFactor-1),la*(a.cumulativeZoomFactor-
-1)),!mxUtils.hasScrollbars(a.container)||0==Pa&&0==la||(a.container.scrollLeft-=Pa*(a.cumulativeZoomFactor-1),a.container.scrollTop-=la*(a.cumulativeZoomFactor-1)));null!=W&&na.setAttribute("filter",W);a.cumulativeZoomFactor=1;W=ca=O=Z=qa=null}),null!=H?H:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(H,ea,oa,sa){sa=null!=sa?sa:this.zoomFactor;(ea=ea||!a.scrollbars)&&(O=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/
-2));H?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=sa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=sa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);
-this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==W&&""!=na.getAttribute("filter")&&(W=na.getAttribute("filter"),na.removeAttribute("filter"));Z=new mxPoint(a.container.scrollLeft,a.container.scrollTop);H=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);sa=ea||null==O?a.container.scrollLeft+a.container.clientWidth/2:O.x+a.container.scrollLeft-a.container.offsetLeft;
-var Pa=ea||null==O?a.container.scrollTop+a.container.clientHeight/2:O.y+a.container.scrollTop-a.container.offsetTop;na.style.transformOrigin=sa+"px "+Pa+"px";na.style.transform="scale("+H+")";ia.style.transformOrigin=sa+"px "+Pa+"px";ia.style.transform="scale("+H+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(sa=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(sa.style,"transform-origin",(ea||null==O?a.container.clientWidth/2+a.container.scrollLeft-sa.offsetLeft+
-"px":O.x+a.container.scrollLeft-sa.offsetLeft-a.container.offsetLeft+"px")+" "+(ea||null==O?a.container.clientHeight/2+a.container.scrollTop-sa.offsetTop+"px":O.y+a.container.scrollTop-sa.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(sa.style,"transform","scale("+H+")")):a.view.validateBackgroundStyles(H,sa,Pa);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",
-"factor",H))}ja(a.isFastZoomEnabled()?oa:0)};mxEvent.addGestureListeners(a.container,function(H){null!=qa&&window.clearTimeout(qa)},null,function(H){1!=a.cumulativeZoomFactor&&ja(0)});mxEvent.addListener(a.container,"scroll",function(H){null==qa||a.isMouseDown||1==a.cumulativeZoomFactor||ja(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(H,ea,oa,sa,Pa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!oa&&a.isScrollWheelEvent(H))oa=
-a.view.getTranslate(),sa=40/a.view.scale,mxEvent.isShiftDown(H)?a.view.setTranslate(oa.x+(ea?-sa:sa),oa.y):a.view.setTranslate(oa.x,oa.y+(ea?sa:-sa));else if(oa||a.isZoomWheelEvent(H))for(var la=mxEvent.getSource(H);null!=la;){if(la==a.container)return a.tooltipHandler.hideTooltip(),O=null!=sa&&null!=Pa?new mxPoint(sa,Pa):new mxPoint(mxEvent.getClientX(H),mxEvent.getClientY(H)),ca=oa,oa=a.zoomFactor,sa=null,H.ctrlKey&&null!=H.deltaY&&40>Math.abs(H.deltaY)&&Math.round(H.deltaY)!=H.deltaY?oa=1+Math.abs(H.deltaY)/
-20*(oa-1):null!=H.movementY&&"pointermove"==H.type&&(oa=1+Math.max(1,Math.abs(H.movementY))/20*(oa-1),sa=-1),a.lazyZoom(ea,null,sa,oa),mxEvent.consume(H),!1;la=la.parentNode}}),a.container);a.panningHandler.zoomGraph=function(H){a.cumulativeZoomFactor=H.scale;a.lazyZoom(0<H.scale,!0);mxEvent.consume(H)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
+(mxEvent.isShiftDown(H)||K(30),G())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(H){mxEvent.consume(H)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(H){a.tooltipHandler.resetTimer();a.tooltipHandler.hideTooltip();mxEvent.isShiftDown(H)?G():K(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(H){mxEvent.isShiftDown(H)?G():K(100);mxEvent.consume(H)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(H){mxEvent.isTouchEvent(H)||K(30)}));var Y=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(H,ea){this.startX=ea.getGraphX();this.startY=ea.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(H,ea){},mouseUp:function(H,ea){mxEvent.isTouchEvent(ea.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<Y&&Math.abs(this.scrollTop-a.container.scrollTop)<
+Y&&Math.abs(this.startX-ea.getGraphX())<Y&&Math.abs(this.startY-ea.getGraphY())<Y&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?G():K(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var P=a.view.validate,T=new mxPoint,J=!1,V=null;a.view.validate=function(){if(null!=a.container&&mxUtils.hasScrollbars(a.container)){if(null!=e.currentPage&&V!=e.currentPage){V=e.currentPage;J=!0;var H=a.getBoundingBoxFromGeometry(a.model.getCells(),!0,null,!0);null==
+H&&(H=new mxRectangle(a.view.translate.x*a.view.scale,a.view.translate.y*a.view.scale));H=a.getPageLayout(H,T,1);var ea=a.getDefaultTranslate(H);this.x0=H.x;this.y0=H.y;if(ea.x!=this.translate.x||ea.y!=this.translate.y)this.invalidate(),this.translate.x=ea.x,this.translate.y=ea.y}ea=a.getPagePadding();var ra=a.getPageSize();H=ea.x-(this.x0||0)*ra.width;ea=ea.y-(this.y0||0)*ra.height;if(this.translate.x!=H||this.translate.y!=ea)this.invalidate(),this.translate.x=H,this.translate.y=ea}P.apply(this,
+arguments)};if(!a.isViewer()){var Z=a.sizeDidChange;a.sizeDidChange=function(){var H=J;J=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var ea=this.getPageLayout(),ra=this.getDefaultTranslate(ea),qa=this.view.translate.x,Pa=this.view.translate.y;if(ra.x!=qa||ra.y!=Pa){this.view.x0=ea.x;this.view.y0=ea.y;this.autoTranslate=!0;this.view.setTranslate(ra.x,ra.y);this.autoTranslate=!1;H||(this.container.scrollLeft+=Math.round((ra.x-qa)*
+this.view.scale),this.container.scrollTop+=Math.round((ra.y-Pa)*this.view.scale));return}}Z.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ia=a.view.getBackgroundPane(),oa=a.view.getDrawPane();a.cumulativeZoomFactor=1;var sa=null,O=null,X=null,ba=null,da=null,ca=function(H){null!=sa&&window.clearTimeout(sa);0<=H&&window.setTimeout(function(){if(!a.isMouseDown||ba)sa=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&
+(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),oa.style.transformOrigin="",ia.style.transformOrigin="",mxClient.IS_SF?(oa.style.transform="scale(1)",ia.style.transform="scale(1)",window.setTimeout(function(){oa.style.transform="";ia.style.transform=""},0)):(oa.style.transform="",ia.style.transform=""),
+a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var ea=new mxPoint(a.container.scrollLeft,a.container.scrollTop),ra=mxUtils.getOffset(a.container),qa=a.view.scale,Pa=0,ma=0;null!=O&&(Pa=a.container.offsetWidth/2-O.x+ra.x,ma=a.container.offsetHeight/2-O.y+ra.y);a.zoom(a.cumulativeZoomFactor,null,a.isFastZoomEnabled()?20:null);a.view.scale!=qa&&(null!=X&&(Pa+=ea.x-X.x,ma+=ea.y-X.y),null!=b&&e.chromelessResize(!1,null,Pa*(a.cumulativeZoomFactor-1),ma*(a.cumulativeZoomFactor-
+1)),!mxUtils.hasScrollbars(a.container)||0==Pa&&0==ma||(a.container.scrollLeft-=Pa*(a.cumulativeZoomFactor-1),a.container.scrollTop-=ma*(a.cumulativeZoomFactor-1)));null!=da&&oa.setAttribute("filter",da);a.cumulativeZoomFactor=1;da=ba=O=X=sa=null}),null!=H?H:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay)},0)};a.lazyZoom=function(H,ea,ra,qa){qa=null!=qa?qa:this.zoomFactor;(ea=ea||!a.scrollbars)&&(O=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/
+2));H?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=qa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=qa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);
+this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==da&&""!=oa.getAttribute("filter")&&(da=oa.getAttribute("filter"),oa.removeAttribute("filter"));X=new mxPoint(a.container.scrollLeft,a.container.scrollTop);H=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);qa=ea||null==O?a.container.scrollLeft+a.container.clientWidth/2:O.x+a.container.scrollLeft-a.container.offsetLeft;
+var Pa=ea||null==O?a.container.scrollTop+a.container.clientHeight/2:O.y+a.container.scrollTop-a.container.offsetTop;oa.style.transformOrigin=qa+"px "+Pa+"px";oa.style.transform="scale("+H+")";ia.style.transformOrigin=qa+"px "+Pa+"px";ia.style.transform="scale("+H+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node?(qa=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(qa.style,"transform-origin",(ea||null==O?a.container.clientWidth/2+a.container.scrollLeft-qa.offsetLeft+
+"px":O.x+a.container.scrollLeft-qa.offsetLeft-a.container.offsetLeft+"px")+" "+(ea||null==O?a.container.clientHeight/2+a.container.scrollTop-qa.offsetTop+"px":O.y+a.container.scrollTop-qa.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(qa.style,"transform","scale("+H+")")):a.view.validateBackgroundStyles(H,qa,Pa);a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset();a.fireEvent(new mxEventObject("zoomPreview",
+"factor",H))}ca(a.isFastZoomEnabled()?ra:0)};mxEvent.addGestureListeners(a.container,function(H){null!=sa&&window.clearTimeout(sa)},null,function(H){1!=a.cumulativeZoomFactor&&ca(0)});mxEvent.addListener(a.container,"scroll",function(H){null==sa||a.isMouseDown||1==a.cumulativeZoomFactor||ca(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(H,ea,ra,qa,Pa){a.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&!ra&&a.isScrollWheelEvent(H))ra=
+a.view.getTranslate(),qa=40/a.view.scale,mxEvent.isShiftDown(H)?a.view.setTranslate(ra.x+(ea?-qa:qa),ra.y):a.view.setTranslate(ra.x,ra.y+(ea?qa:-qa));else if(ra||a.isZoomWheelEvent(H))for(var ma=mxEvent.getSource(H);null!=ma;){if(ma==a.container)return a.tooltipHandler.hideTooltip(),O=null!=qa&&null!=Pa?new mxPoint(qa,Pa):new mxPoint(mxEvent.getClientX(H),mxEvent.getClientY(H)),ba=ra,ra=a.zoomFactor,qa=null,H.ctrlKey&&null!=H.deltaY&&40>Math.abs(H.deltaY)&&Math.round(H.deltaY)!=H.deltaY?ra=1+Math.abs(H.deltaY)/
+20*(ra-1):null!=H.movementY&&"pointermove"==H.type&&(ra=1+Math.max(1,Math.abs(H.movementY))/20*(ra-1),qa=-1),a.lazyZoom(ea,null,qa,ra),mxEvent.consume(H),!1;ma=ma.parentNode}}),a.container);a.panningHandler.zoomGraph=function(H){a.cumulativeZoomFactor=H.scale;a.lazyZoom(0<H.scale,!0);mxEvent.consume(H)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(b){this.actions.get("print").funct();mxEvent.consume(b)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(a){return Graph.createOffscreenGraph(a)};EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};
EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2246,11 +2247,11 @@ EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=Grap
"transition","all 0.2s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,100);mxUtils.setPrefixedStyle(e.style,"transform","scaleX(1)");mxUtils.setPrefixedStyle(e.style,"transition","all 1s ease");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(e.style,"transform","scaleX(0)");mxUtils.setOpacity(e,0);window.setTimeout(mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e)}),1E3)}),Editor.updateStatusInterval/2)}),0)})(a[b])};
EditorUi.prototype.createStatusDiv=function(a){var b=document.createElement("div");b.style.textOverflow="ellipsis";b.style.display="inline-block";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.minWidth="0";b.setAttribute("title",a);b.innerHTML=Graph.sanitizeHtml(a);return b};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};
EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,f){function h(x){if(null!=g){var z=new mxPoint(mxEvent.getClientX(x),mxEvent.getClientY(x));f(Math.max(0,m+(b?z.x-g.x:g.y-z.y)-e));mxEvent.consume(x);m!=u()&&(p=!0,k=null)}}function d(x){h(x);g=m=null}var g=null,m=null,p=!0,k=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var u=mxUtils.bind(this,function(){var x=parseInt(b?a.style.left:a.style.bottom);b||(x=x+e-this.footerHeight);return x});mxEvent.addGestureListeners(a,function(x){g=new mxPoint(mxEvent.getClientX(x),
-mxEvent.getClientY(x));m=u();p=!1;mxEvent.consume(x)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(x){if(!p&&this.hsplitClickEnabled){var z=null!=k?k-e:0;k=u();f(z);mxEvent.consume(x)}}));mxEvent.addGestureListeners(document,null,h,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,d)})};
+EditorUi.prototype.addSplitHandler=function(a,b,e,f){function h(w){if(null!=g){var z=new mxPoint(mxEvent.getClientX(w),mxEvent.getClientY(w));f(Math.max(0,m+(b?z.x-g.x:g.y-z.y)-e));mxEvent.consume(w);m!=u()&&(p=!0,k=null)}}function d(w){h(w);g=m=null}var g=null,m=null,p=!0,k=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var u=mxUtils.bind(this,function(){var w=parseInt(b?a.style.left:a.style.bottom);b||(w=w+e-this.footerHeight);return w});mxEvent.addGestureListeners(a,function(w){g=new mxPoint(mxEvent.getClientX(w),
+mxEvent.getClientY(w));m=u();p=!1;mxEvent.consume(w)});mxEvent.addListener(a,"click",mxUtils.bind(this,function(w){if(!p&&this.hsplitClickEnabled){var z=null!=k?k-e:0;k=u();f(z);mxEvent.consume(w)}}));mxEvent.addGestureListeners(document,null,h,d);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,d)})};
EditorUi.prototype.prompt=function(a,b,e){a=new FilenameDialog(this,b,mxResources.get("apply"),function(f){e(parseFloat(f))},a);this.showDialog(a.container,300,80,!0,!0);a.init()};
EditorUi.prototype.handleError=function(a,b,e,f,h){a=null!=a&&null!=a.error?a.error:a;if(null!=a||null!=b){h=mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok");b=null!=b?b:mxResources.get("error");null!=a&&null!=a.message&&(h=mxUtils.htmlEntities(a.message));this.showError(b,h,d,e,null,null,null,null,null,null,null,null,f?e:null)}else null!=e&&e()};
-EditorUi.prototype.showError=function(a,b,e,f,h,d,g,m,p,k,u,x,z){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),f,h,d,g,x,m,p);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,k||340,u||100+20*b,!0,!1,z);a.init()};EditorUi.prototype.showDialog=function(a,b,e,f,h,d,g,m,p,k){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,f,h,d,g,m,p,k);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(a,b,e,f,h,d,g,m,p,k,u,w,z){a=new ErrorDialog(this,a,b,e||mxResources.get("ok"),f,h,d,g,w,m,p);b=Math.ceil(null!=b?b.length/50:1);this.showDialog(a.container,k||340,u||100+20*b,!0,!1,z);a.init()};EditorUi.prototype.showDialog=function(a,b,e,f,h,d,g,m,p,k){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,f,h,d,g,m,p,k);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(a,b,e){var f=null;if(null!=this.dialogs&&0<this.dialogs.length)for(var h=this.dialogs.length-1;0<=h;h--)if(!this.dialogs[h].closing){f=this.dialogs[h];break}null==f||null!=e&&e!=this.dialog.container.firstChild||(f.closing=!0,0==f.close(a,b)?delete f.closing:(delete f.closing,a=mxUtils.lastIndexOf(this.dialogs,f),0<=a&&this.dialogs.splice(a,1),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog",
"dialog",f)),null==this.dialog&&null!=this.editor.graph.container&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){null==this.editor||null!=this.dialogs&&0!=this.dialogs.length||(this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus()))}),0)))};
EditorUi.prototype.ctrlEnter=function(){var a=this.editor.graph;if(a.isEnabled())try{for(var b=a.getSelectionCells(),e=new mxDictionary,f=[],h=0;h<b.length;h++){var d=a.isTableCell(b[h])?a.model.getParent(b[h]):b[h];null==d||e.get(d)||(e.put(d,!0),f.push(d))}a.setSelectionCells(a.duplicateCells(f,!1))}catch(g){this.handleError(g)}};
@@ -2277,14 +2278,14 @@ EditorUi.prototype.showDataDialog=function(a){null!=a&&"undefined"!==typeof wind
EditorUi.prototype.showBackgroundImageDialog=function(a,b){a=null!=a?a:mxUtils.bind(this,function(f){f=new ChangePageSetup(this,null,f);f.ignoreColor=!0;this.editor.graph.model.execute(f)});var e=mxUtils.prompt(mxResources.get("backgroundImage"),null!=b?b.src:"");null!=e&&0<e.length?(b=new Image,b.onload=function(){a(new mxImage(e,b.width,b.height),!1)},b.onerror=function(){a(null,!0);mxUtils.alert(mxResources.get("fileNotFound"))},b.src=e):a(null)};
EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){b.update(!1)});return b};
EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76:"editLink",79:"connectionPoints",81:"editConnectionPoints",84:"editTooltip",86:"pasteSize",70:"copySize",66:"copyData",69:"pasteData"};EditorUi.prototype.ctrlAltShiftActions={70:"bringForward",66:"sendBackward"};EditorUi.prototype.ctrlAltActions={88:"copyAsImage"};
-EditorUi.prototype.createKeyHandler=function(a){function b(x,z,C){if(!f.isSelectionEmpty()&&f.isEnabled()){z=null!=z?z:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(C){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var G=f.getCellGeometry(E[D]);null!=G&&(G=G.clone(),37==x?G.width=Math.max(0,G.width-z):38==x?G.height=Math.max(0,G.height-z):39==x?G.width+=z:40==x&&(G.height+=z),f.getModel().setGeometry(E[D],
-G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var I=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==x||38==x?f.model.add(G,D,Math.max(0,z-1)):(39==x||40==x)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=
-E=0,37==x?E=-z:38==x?D=-z:39==x?E=z:40==x&&(D=z),L.currentDx+=E*I,L.currentDy+=D*I,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var T=L.roundLength(L.currentDx/I),K=L.roundLength(L.currentDy/I);L.moveCells(L.cells,T,K);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(x){return!(mxEvent.isShiftDown(x)&&9==x.keyCode)&&(!this.isControlDown(x)||mxEvent.isShiftDown(x)||
-90!=x.keyCode&&89!=x.keyCode&&188!=x.keyCode&&190!=x.keyCode&&85!=x.keyCode)&&(66!=x.keyCode&&73!=x.keyCode||!this.isControlDown(x)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=x.keyCode&&107!=x.keyCode||!this.isControlDown(x)&&!mxEvent.isShiftDown(x)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};h.isEnabledForEvent=function(x){return!mxEvent.isConsumed(x)&&this.isGraphEvent(x)&&this.isEnabled()&&(null==
-e.dialogs||0==e.dialogs.length)};h.isControlDown=function(x){return mxEvent.isControlDown(x)||mxClient.IS_MAC&&x.metaKey};var g=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=h.getFunction;mxKeyHandler.prototype.getFunction=function(x){if(f.isEnabled()){var z=null;mxEvent.isShiftDown(x)&&this.isControlDown(x)&&mxEvent.isAltDown(x)?z=e.actions.get(e.ctrlAltShiftActions[x.keyCode]):mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)?
-z=e.actions.get(e.altShiftActions[x.keyCode]):this.isControlDown(x)&&mxEvent.isAltDown(x)&&(z=e.actions.get(e.ctrlAltActions[x.keyCode]));if(null!=z)return z.funct;if(null!=m[x.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(x)&&mxEvent.isShiftDown(x)&&mxEvent.isAltDown(x)){if(f.model.isVertex(f.getSelectionCell()))return function(){var C=f.connectVertex(f.getSelectionCell(),m[x.keyCode],f.defaultEdgeLength,x,!0);null!=C&&0<C.length&&(1==C.length&&f.model.isEdge(C[0])?f.setSelectionCell(f.model.getTerminal(C[0],
-!1)):f.setSelectionCell(C[C.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(x)?function(){b(x.keyCode,mxEvent.isShiftDown(x)?f.gridSize:null,!0)}:function(){b(x.keyCode,mxEvent.isShiftDown(x)?f.gridSize:null)}}return p.apply(this,arguments)};h.bindAction=mxUtils.bind(this,function(x,z,C,E){var D=this.actions.get(C);null!=D&&(C=function(){D.isEnabled()&&D.funct.apply(this,arguments)},
-z?E?h.bindControlShiftKey(x,C):h.bindControlKey(x,C):E?h.bindShiftKey(x,C):h.bindKey(x,C))});var k=this,u=h.escape;h.escape=function(x){u.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){f.exitGroup()});h.bindControlShiftKey(35,function(){f.enterGroup()});h.bindShiftKey(36,function(){f.home()});h.bindKey(35,function(){f.refresh()});h.bindAction(80,!0,"print");h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(61,!0,"zoomIn");h.bindAction(187,!0,
+EditorUi.prototype.createKeyHandler=function(a){function b(w,z,C){if(!f.isSelectionEmpty()&&f.isEnabled()){z=null!=z?z:1;var E=f.getCompositeParents(f.getSelectionCells()),D=0<E.length?E[0]:null;if(null!=D)if(C){f.getModel().beginUpdate();try{for(D=0;D<E.length;D++)if(f.getModel().isVertex(E[D])&&f.isCellResizable(E[D])){var G=f.getCellGeometry(E[D]);null!=G&&(G=G.clone(),37==w?G.width=Math.max(0,G.width-z):38==w?G.height=Math.max(0,G.height-z):39==w?G.width+=z:40==w&&(G.height+=z),f.getModel().setGeometry(E[D],
+G))}}finally{f.getModel().endUpdate()}}else{G=f.model.getParent(D);var K=f.getView().scale;C=null;1==f.getSelectionCount()&&f.model.isVertex(D)&&null!=f.layoutManager&&!f.isCellLocked(D)&&(C=f.layoutManager.getLayout(G));if(null!=C&&C.constructor==mxStackLayout)z=G.getIndex(D),37==w||38==w?f.model.add(G,D,Math.max(0,z-1)):(39==w||40==w)&&f.model.add(G,D,Math.min(f.model.getChildCount(G),z+1));else{var L=f.graphHandler;null!=L&&(null==L.first&&L.start(D,0,0,f.getMovableCells(E)),null!=L.first&&(D=
+E=0,37==w?E=-z:38==w?D=-z:39==w?E=z:40==w&&(D=z),L.currentDx+=E*K,L.currentDy+=D*K,L.checkPreview(),L.updatePreview()),null!=g&&window.clearTimeout(g),g=window.setTimeout(function(){if(null!=L.first){var Q=L.roundLength(L.currentDx/K),N=L.roundLength(L.currentDy/K);L.moveCells(L.cells,Q,N);L.reset()}},400))}}}}var e=this,f=this.editor.graph,h=new mxKeyHandler(f),d=h.isEventIgnored;h.isEventIgnored=function(w){return!(mxEvent.isShiftDown(w)&&9==w.keyCode)&&(!this.isControlDown(w)||mxEvent.isShiftDown(w)||
+90!=w.keyCode&&89!=w.keyCode&&188!=w.keyCode&&190!=w.keyCode&&85!=w.keyCode&&83!=w.keyCode)&&(66!=w.keyCode&&73!=w.keyCode||!this.isControlDown(w)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=w.keyCode&&107!=w.keyCode||!this.isControlDown(w)&&!mxEvent.isShiftDown(w)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&d.apply(this,arguments)};h.isEnabledForEvent=function(w){return!mxEvent.isConsumed(w)&&this.isGraphEvent(w)&&this.isEnabled()&&
+(null==e.dialogs||0==e.dialogs.length)};h.isControlDown=function(w){return mxEvent.isControlDown(w)||mxClient.IS_MAC&&w.metaKey};var g=null,m={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},p=h.getFunction;mxKeyHandler.prototype.getFunction=function(w){if(f.isEnabled()){var z=null;mxEvent.isShiftDown(w)&&this.isControlDown(w)&&mxEvent.isAltDown(w)?z=e.actions.get(e.ctrlAltShiftActions[w.keyCode]):mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)?
+z=e.actions.get(e.altShiftActions[w.keyCode]):this.isControlDown(w)&&mxEvent.isAltDown(w)&&(z=e.actions.get(e.ctrlAltActions[w.keyCode]));if(null!=z)return z.funct;if(null!=m[w.keyCode]&&!f.isSelectionEmpty())if(!this.isControlDown(w)&&mxEvent.isShiftDown(w)&&mxEvent.isAltDown(w)){if(f.model.isVertex(f.getSelectionCell()))return function(){var C=f.connectVertex(f.getSelectionCell(),m[w.keyCode],f.defaultEdgeLength,w,!0);null!=C&&0<C.length&&(1==C.length&&f.model.isEdge(C[0])?f.setSelectionCell(f.model.getTerminal(C[0],
+!1)):f.setSelectionCell(C[C.length-1]),f.scrollCellToVisible(f.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(f.getSelectionCell())))}}else return this.isControlDown(w)?function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null,!0)}:function(){b(w.keyCode,mxEvent.isShiftDown(w)?f.gridSize:null)}}return p.apply(this,arguments)};h.bindAction=mxUtils.bind(this,function(w,z,C,E){var D=this.actions.get(C);null!=D&&(C=function(){D.isEnabled()&&D.funct.apply(this,arguments)},
+z?E?h.bindControlShiftKey(w,C):h.bindControlKey(w,C):E?h.bindShiftKey(w,C):h.bindKey(w,C))});var k=this,u=h.escape;h.escape=function(w){u.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){f.exitGroup()});h.bindControlShiftKey(35,function(){f.enterGroup()});h.bindShiftKey(36,function(){f.home()});h.bindKey(35,function(){f.refresh()});h.bindAction(80,!0,"print");h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");h.bindAction(61,!0,"zoomIn");h.bindAction(187,!0,
"zoomIn");h.bindAction(222,!0,"zoomIn");h.bindAction(173,!0,"zoomOut");h.bindAction(189,!0,"zoomOut");if(!this.editor.chromeless||this.editor.editable)h.bindAction(79,!0,"outline",!0),h.bindControlKey(36,function(){f.isEnabled()&&f.foldCells(!0)}),h.bindControlKey(35,function(){f.isEnabled()&&f.foldCells(!1)}),h.bindControlKey(13,function(){k.ctrlEnter()}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(8,!1,"deleteLabels",!0),h.bindAction(46,!1,"delete"),h.bindAction(46,!0,
"deleteAll"),h.bindAction(46,!1,"deleteLabels",!0),h.bindAction(36,!1,"resetView"),h.bindAction(72,!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,
!0,"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,"toBack",!0),h.bindAction(70,!0,"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(90,!0,"redo",!0),h.bindAction(89,!0,"redo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,
@@ -2314,9 +2315,9 @@ Sidebar.prototype.getTooltipOffset=function(a,b){if(mxUtils.isAncestorNode(this.
Sidebar.prototype.createMoreShapes=function(){var a=this.editorUi.createDiv("geSidebarFooter");a.style.position="absolute";a.style.overflow="hidden";a.style.display="inline-flex";a.style.alignItems="center";a.style.justifyContent="center";a.style.width="100%";a.style.marginTop="-1px";a.style.height=this.moreShapesHeight+"px";var b=document.createElement("button");b.className="geBtn gePrimaryBtn";b.style.display="inline-flex";b.style.alignItems="center";b.style.whiteSpace="nowrap";b.style.padding=
"8px";b.style.margin="0px";b.innerHTML="<span>+</span>";var e=b.getElementsByTagName("span")[0];e.style.fontSize="18px";e.style.marginRight="5px";mxUtils.write(b,mxResources.get("moreShapes"));mxEvent.addListener(b,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(f){f.preventDefault()}));mxEvent.addListener(b,"click",mxUtils.bind(this,function(f){this.editorUi.actions.get("shapes").funct();mxEvent.consume(f)}));a.appendChild(b);return a};
Sidebar.prototype.createTooltip=function(a,b,e,f,h,d,g,m,p,k,u){u=null!=u?u:!0;this.tooltipMouseDown=p;p=this.editorUi.editor.graph;if(null==this.tooltip){this.tooltip=document.createElement("div");this.tooltip.className="geSidebarTooltip";this.tooltip.style.userSelect="none";this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1;document.body.appendChild(this.tooltip);mxEvent.addMouseWheelListener(mxUtils.bind(this,function(z){this.hideTooltip()}),this.tooltip);this.graph2=new Graph(this.tooltip,
-null,null,this.editorUi.editor.graph.getStylesheet());this.graph2.shapeBackgroundColor=this.graph.shapeBackgroundColor;this.graph2.resetViewOnRootChange=!1;this.graph2.foldingEnabled=!1;this.graph2.gridEnabled=!1;this.graph2.autoScroll=!1;this.graph2.setTooltips(!1);this.graph2.setConnectable(!1);this.graph2.setPanning(!1);this.graph2.setEnabled(!1);if(this.graph2.dialect==mxConstants.DIALECT_SVG){var x=this.graph2.view.getDrawPane().ownerSVGElement;null!=x&&(x.style.overflow="visible")}else this.graph2.view.canvas.style.overflow=
-"visible";this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()});mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(z){null!=this.tooltipMouseDown&&this.tooltipMouseDown(z);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(z){this.hideTooltip()}));mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative");x=document.createElement("img");
-x.setAttribute("src",Dialog.prototype.closeImage);x.setAttribute("title",mxResources.get("close"));x.style.position="absolute";x.style.cursor="default";x.style.padding="8px";x.style.right="2px";x.style.top="2px";this.tooltip.appendChild(x);this.tooltipCloseImage=x;mxEvent.addListener(x,"click",mxUtils.bind(this,function(z){this.hideTooltip();mxEvent.consume(z)}))}this.tooltipCloseImage.style.display=k?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);
+null,null,this.editorUi.editor.graph.getStylesheet());this.graph2.shapeBackgroundColor=this.graph.shapeBackgroundColor;this.graph2.resetViewOnRootChange=!1;this.graph2.foldingEnabled=!1;this.graph2.gridEnabled=!1;this.graph2.autoScroll=!1;this.graph2.setTooltips(!1);this.graph2.setConnectable(!1);this.graph2.setPanning(!1);this.graph2.setEnabled(!1);if(this.graph2.dialect==mxConstants.DIALECT_SVG){var w=this.graph2.view.getDrawPane().ownerSVGElement;null!=w&&(w.style.overflow="visible")}else this.graph2.view.canvas.style.overflow=
+"visible";this.graph2.openLink=mxUtils.bind(this,function(){this.hideTooltip()});mxEvent.addGestureListeners(this.tooltip,mxUtils.bind(this,function(z){null!=this.tooltipMouseDown&&this.tooltipMouseDown(z);window.setTimeout(mxUtils.bind(this,function(){null!=this.tooltipCloseImage&&"none"!=this.tooltipCloseImage.style.display||this.hideTooltip()}),0)}),null,mxUtils.bind(this,function(z){this.hideTooltip()}));mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative");w=document.createElement("img");
+w.setAttribute("src",Dialog.prototype.closeImage);w.setAttribute("title",mxResources.get("close"));w.style.position="absolute";w.style.cursor="default";w.style.padding="8px";w.style.right="2px";w.style.top="2px";this.tooltip.appendChild(w);this.tooltipCloseImage=w;mxEvent.addListener(w,"click",mxUtils.bind(this,function(z){this.hideTooltip();mxEvent.consume(z)}))}this.tooltipCloseImage.style.display=k?"":"none";this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);
this.graph2.view.scale=!m&&(e>this.maxTooltipWidth||f>this.maxTooltipHeight)?Math.round(100*Math.min(this.maxTooltipWidth/e,this.maxTooltipHeight/f))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;null!=b&&(b=this.graph2.cloneCells(b),this.graph2.pasteCellStyles(p.includeDescendants(b),u?p.currentVertexStyle:p.defaultVertexStyle,u?p.currentEdgeStyle:p.defaultEdgeStyle,null,p.pasteEdgeStyle),this.graph2.addCells(b));
mxClient.NO_FO=d;u=this.graph2.getGraphBounds();m&&0<e&&0<f&&(u.width>e||u.height>f)?(e=Math.round(100*Math.min(e/u.width,f/u.height))/100,mxClient.NO_FO?(this.graph2.view.setScale(Math.round(100*Math.min(this.maxTooltipWidth/u.width,this.maxTooltipHeight/u.height))/100),u=this.graph2.getGraphBounds()):(this.graph2.view.getDrawPane().ownerSVGElement.style.transform="scale("+e+")",this.graph2.view.getDrawPane().ownerSVGElement.style.transformOrigin="0 0",u.width*=e,u.height*=e)):mxClient.NO_FO||(this.graph2.view.getDrawPane().ownerSVGElement.style.transform=
"");e=u.width+2*this.tooltipBorder+4;f=u.height+2*this.tooltipBorder;this.tooltip.style.overflow="visible";this.tooltip.style.width=e+"px";m=e;this.tooltipTitles&&null!=h&&0<h.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTopStyle="solid",this.tooltipTitle.style.borderTopWidth="1px",this.tooltipTitle.style.textAlign="center",this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",this.tooltipTitle.style.position=
@@ -2329,20 +2330,20 @@ Sidebar.prototype.addEntries=function(a){for(var b=0;b<a.length;b++)mxUtils.bind
mxUtils.bind(this,function(){var d=this.editorUi.stringToCells("<"==e.xml.charAt(0)?e.xml:Graph.decompress(e.xml));return this.createVertexTemplateFromCells(d,e.w,e.h,e.title||"",!0,!1,!0)}))})(a[b])};Sidebar.prototype.setCurrentSearchEntryLibrary=function(a,b){this.currentSearchEntryLibrary=null!=a?{id:a,lib:b}:null};
Sidebar.prototype.getKeyStyle=function(a){var b=[];if(null!=a){a=a.split(";");for(var e=0;e<a.length;e++){var f=a[e].split("=");1<f.length&&0>mxUtils.indexOf(this.ignoredStyles,f[0])&&b.push(f[0]+"="+f[1])}}return b.join(";")};Sidebar.prototype.addLibForStyle=function(a,b){""!=a&&(null==this.styleToLibs&&(this.styleToLibs={}),null==this.styleToLibs[a]&&(this.styleToLibs[a]=[]),this.styleToLibs[a].push(b))};
Sidebar.prototype.getLibsForStyle=function(a){return null!=this.styleToLibs?this.styleToLibs[a]:null};
-Sidebar.prototype.addEntry=function(a,b){if(null!=this.currentSearchEntryLibrary){var e=this,f=this.createVertexTemplateFromCells;this.createVertexTemplateFromCells=function(m,p,k,u,x){if(null!=m)for(p=0;p<m.length;p++)e.addLibForStyle(e.getKeyStyle(m[p].style),this.currentSearchEntryLibrary)};b();this.createVertexTemplateFromCells=f}if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g,
+Sidebar.prototype.addEntry=function(a,b){if(null!=this.currentSearchEntryLibrary){var e=this,f=this.createVertexTemplateFromCells;this.createVertexTemplateFromCells=function(m,p,k,u,w){if(null!=m)for(p=0;p<m.length;p++)e.addLibForStyle(e.getKeyStyle(m[p].style),this.currentSearchEntryLibrary)};b();this.createVertexTemplateFromCells=f}if(null!=this.taglist&&null!=a&&0<a.length){null!=this.currentSearchEntryLibrary&&(b.parentLibraries=[this.currentSearchEntryLibrary]);a=a.toLowerCase().replace(/[\/,\(\)]/g,
" ").split(" ");f=[];for(var h={},d=0;d<a.length;d++){null==h[a[d]]&&(h[a[d]]=!0,f.push(a[d]));var g=Editor.soundex(a[d].replace(/\.*\d*$/,""));g!=a[d]&&null==h[g]&&(h[g]=!0,f.push(g))}for(d=0;d<f.length;d++)this.addEntryForTag(f[d],b)}return b};Sidebar.prototype.addEntryForTag=function(a,b){if(null!=a&&1<a.length){var e=this.taglist[a];"object"!==typeof e&&(e={entries:[]},this.taglist[a]=e);e.entries.push(b)}};
Sidebar.prototype.isEntryIgnored=function(a,b){b=!b;if(null!=a.parentLibraries&&b)for(var e=0;e<a.parentLibraries.length;e++)if(this.isEntryVisible(a.parentLibraries[e].id)){b=!1;break}return b};
-Sidebar.prototype.searchEntries=function(a,b,e,f,h,d){if(null!=this.taglist&&null!=a){var g=a.toLowerCase().split(" ");a=new mxDictionary;h=(e+1)*b;for(var m=[],p=0,k=0;k<g.length;k++){var u=Editor.soundex(g[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[g[k]];var x=null!=m?m.entries.slice():[];m=this.taglist[u];x=null!=m?x.concat(m.entries):x;u=new mxDictionary;if(0<x.length){m=[];for(var z=0;z<x.length;z++){var C=x[z];if(0==p==(null==a.get(C))&&null==u.get(C)&&(u.put(C,C),!this.isEntryIgnored(C,
+Sidebar.prototype.searchEntries=function(a,b,e,f,h,d){if(null!=this.taglist&&null!=a){var g=a.toLowerCase().split(" ");a=new mxDictionary;h=(e+1)*b;for(var m=[],p=0,k=0;k<g.length;k++){var u=Editor.soundex(g[k].replace(/\.*\d*$/,""));if(0<u.length){m=this.taglist[g[k]];var w=null!=m?m.entries.slice():[];m=this.taglist[u];w=null!=m?w.concat(m.entries):w;u=new mxDictionary;if(0<w.length){m=[];for(var z=0;z<w.length;z++){var C=w[z];if(0==p==(null==a.get(C))&&null==u.get(C)&&(u.put(C,C),!this.isEntryIgnored(C,
d)&&(m.push(C),k==g.length-1&&m.length==h))){f(m.slice(e*b,h),h,!0,g);return}}}else m=[];a=u;p++}}d=m.length;f(m.slice(e*b,(e+1)*b),d,!1,g)}else f([],null,null,g)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var b=[],e={},f=0;f<a.length;f++)null==e[a[f]]&&(e[a[f]]="1",b.push(a[f]));return b.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,b){a=a.clone();null!=b&&(a.value=b);return a};Sidebar.prototype.showPopupMenuForEntry=function(a,b,e){};
Sidebar.prototype.addSearchPalette=function(a){function b(){g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));p.style.display="none";k=d.value="";D()}var e=document.createElement("div");e.style.visibility="hidden";this.appendChild(e);var f=document.createElement("div");f.className="geSidebar geSearchSidebar";a||(f.style.display="none");var h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.textOverflow="clip";h.style.paddingBottom="8px";h.style.cursor=
"default";var d=document.createElement("input");d.setAttribute("placeholder",mxResources.get("searchShapes"));d.setAttribute("type","text");h.appendChild(d);var g=document.createElement("img");g.setAttribute("src",Editor.magnifyImage);g.setAttribute("title",mxResources.get("search"));g.className="geAdaptiveAsset";g.style.position="relative";g.style.cursor="pointer";g.style.opacity="0.5";g.style.height="16px";g.style.left="-20px";g.style.top="4px";g.style.background="url('"+this.editorUi.editor.transparentImage+
-"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,x=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var I=f.firstChild;null!=
-I;){var L=I.nextSibling;I!=h&&I!=m&&I.parentNode.removeChild(I);I=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},x=!1,z=0),!u&&!x)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")+
-"...";u=!0;var I={};this.currentSearch=I;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,T,K,U){if(this.currentSearch==I){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,T,K,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(T=0;T<L.length;T++)mxUtils.bind(this,function(Y){try{var Q=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(Q.style.opacity=this.closedLibraryOpacity);null==C[Q.innerHTML]?(C[Q.innerHTML]=
-null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(Q)):null!=Y.parentLibraries&&(C[Q.innerHTML]=C[Q.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(Q,null,null,mxUtils.bind(this,function(P){var M=C[Q.innerHTML];mxEvent.isPopupTrigger(P)&&this.showPopupMenuForEntry(Q,M,P)}));mxEvent.disableContextMenu(Q)}catch(P){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(P.stack)):console.error(P))}})(L[T]);K?(p.removeAttribute("disabled"),
-p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",x=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",x=!1,d.focus()});this.searchShapes=function(I){d.value=I;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(I){13==I.keyCode?(G(),mxEvent.consume(I)):27==I.keyCode&&b()}));
-a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==d.value?(g.setAttribute("src",Editor.magnifyImage),g.setAttribute("title",mxResources.get("search"))):(g.setAttribute("src",Editor.crossImage),g.setAttribute("title",mxResources.get("reset")));""==d.value?(x=!0,p.style.display="none"):d.value!=k?(p.style.display="none",x=!1):u||(p.style.display=x?"none":"")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,
-"mousedown",function(I){I.stopPropagation&&I.stopPropagation();I.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(I){I.stopPropagation&&I.stopPropagation();I.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};
+"')";h.appendChild(g);f.appendChild(h);var m=document.createElement("center"),p=mxUtils.button(mxResources.get("moreResults"),function(){G()});p.style.display="none";p.style.lineHeight="normal";p.style.fontSize="12px";p.style.padding="6px 12px 6px 12px";p.style.marginTop="4px";p.style.marginBottom="8px";m.style.paddingTop="4px";m.style.paddingBottom="4px";m.appendChild(p);f.appendChild(m);var k="",u=!1,w=!1,z=0,C={},E=12,D=mxUtils.bind(this,function(){u=!1;this.currentSearch=null;for(var K=f.firstChild;null!=
+K;){var L=K.nextSibling;K!=h&&K!=m&&K.parentNode.removeChild(K);K=L}});mxEvent.addListener(g,"click",function(){g.getAttribute("src")!=Editor.magnifyImage&&b();d.focus()});var G=mxUtils.bind(this,function(){E=4*Math.max(1,Math.floor(this.container.clientWidth/(this.thumbWidth+10)));this.hideTooltip();if(""!=d.value){if(null!=m.parentNode&&(k!=d.value&&(D(),k=d.value,C={},w=!1,z=0),!u&&!w)){p.setAttribute("disabled","true");p.style.display="";p.style.cursor="wait";p.innerHTML=mxResources.get("loading")+
+"...";u=!0;var K={};this.currentSearch=K;try{this.searchEntries(k,E,z,mxUtils.bind(this,function(L,Q,N,U){if(this.currentSearch==K){L=null!=L?L:[];u=!1;z++;this.insertSearchHint(f,k,E,z,L,Q,N,U);0==L.length&&1==z&&(k="");null!=m.parentNode&&m.parentNode.removeChild(m);for(Q=0;Q<L.length;Q++)mxUtils.bind(this,function(Y){try{var P=Y();null!=this.closedLibraryOpacity&&this.searchClosedLibraries&&this.isEntryIgnored(Y,!1)&&(P.style.opacity=this.closedLibraryOpacity);null==C[P.innerHTML]?(C[P.innerHTML]=
+null!=Y.parentLibraries?Y.parentLibraries.slice():[],f.appendChild(P)):null!=Y.parentLibraries&&(C[P.innerHTML]=C[P.innerHTML].concat(Y.parentLibraries));mxEvent.addGestureListeners(P,null,null,mxUtils.bind(this,function(T){var J=C[P.innerHTML];mxEvent.isPopupTrigger(T)&&this.showPopupMenuForEntry(P,J,T)}));mxEvent.disableContextMenu(P)}catch(T){"1"==urlParams.test&&(null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(T.stack)):console.error(T))}})(L[Q]);N?(p.removeAttribute("disabled"),
+p.innerHTML=mxResources.get("moreResults")):(p.innerHTML=mxResources.get("reset"),p.style.display="none",w=!0);p.style.cursor="";f.appendChild(m)}}),mxUtils.bind(this,function(){p.style.cursor=""}),this.searchClosedLibraries)}catch(L){this.editorUi.handleError(L)}}}else D(),k=d.value="",C={},p.style.display="none",w=!1,d.focus()});this.searchShapes=function(K){d.value=K;G()};mxEvent.addListener(d,"keydown",mxUtils.bind(this,function(K){13==K.keyCode?(G(),mxEvent.consume(K)):27==K.keyCode&&b()}));
+a=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){""==d.value?(g.setAttribute("src",Editor.magnifyImage),g.setAttribute("title",mxResources.get("search"))):(g.setAttribute("src",Editor.crossImage),g.setAttribute("title",mxResources.get("reset")));""==d.value?(w=!0,p.style.display="none"):d.value!=k?(p.style.display="none",w=!1):u||(p.style.display=w?"none":"")}),0)});mxEvent.addListener(d,"keyup",a);mxEvent.addListener(d,"paste",a);mxEvent.addListener(d,"cut",a);mxEvent.addListener(d,
+"mousedown",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});mxEvent.addListener(d,"selectstart",function(K){K.stopPropagation&&K.stopPropagation();K.cancelBubble=!0});a=document.createElement("div");a.appendChild(f);this.appendChild(a);this.palettes.search=[e,a]};
Sidebar.prototype.insertSearchHint=function(a,b,e,f,h,d,g,m){0==h.length&&1==f&&(e=document.createElement("div"),e.className="geTitle",e.style.cssText="background-color:transparent;border-color:transparent;padding:6px 0px 0px 0px !important;margin:4px 8px 4px 8px;text-align:center;cursor:default !important;font-size:11px;font-weight:normal;",mxUtils.write(e,mxResources.get("noResultsFor",[b])),a.appendChild(e))};
Sidebar.prototype.addGeneralPalette=function(a){this.setCurrentSearchEntryLibrary("general","general");var b=this.editorUi.editor.graph,e=this,f=parseInt(this.initialDefaultVertexStyle.fontSize);f=isNaN(f)?"":"fontSize="+Math.min(16,f)+";";var h=b.appendFontSize("edgeLabel;resizable=0;html=1;",b.edgeFontSize),d=new mxCell("List Item",new mxGeometry(0,0,80,30),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;"+
f);d.vertex=!0;b=[this.createVertexTemplateEntry("rounded=0;whiteSpace=wrap;html=1;",120,60,"","Rectangle",null,null,"rect rectangle box"),this.createVertexTemplateEntry("rounded=1;whiteSpace=wrap;html=1;",120,60,"","Rounded Rectangle",null,null,"rounded rect rectangle box"),this.createVertexTemplateEntry(b.appendFontSize("text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",b.vertexFontSize),60,30,"Text","Text",null,null,"text textbox textarea label"),this.createVertexTemplateEntry("text;html=1;whiteSpace=wrap;overflow=hidden;rounded=0;",
@@ -2448,62 +2449,62 @@ d.geometry.setTerminalPoint(new mxPoint(0,0),!0);d.geometry.setTerminalPoint(new
0,"Use","Dependency",null,"uml dependency use"),this.createEdgeTemplateEntry("endArrow=block;endSize=16;endFill=0;html=1;",160,0,"Extends","Generalization",null,"uml generalization extend"),this.createEdgeTemplateEntry("endArrow=block;startArrow=block;endFill=1;startFill=1;html=1;",160,0,"","Association 2",null,"uml association"),this.createEdgeTemplateEntry("endArrow=open;startArrow=circlePlus;endFill=0;startFill=0;endSize=8;html=1;",160,0,"","Inner Class",null,"uml inner class"),this.createEdgeTemplateEntry("endArrow=open;startArrow=cross;endFill=0;startFill=0;endSize=8;startSize=10;html=1;",
160,0,"","Terminate",null,"uml terminate"),this.createEdgeTemplateEntry("endArrow=block;dashed=1;endFill=0;endSize=12;html=1;",160,0,"","Implementation",null,"uml realization implementation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=0;endSize=24;html=1;",160,0,"","Aggregation 2",null,"uml aggregation"),this.createEdgeTemplateEntry("endArrow=diamondThin;endFill=1;endSize=24;html=1;",160,0,"","Composition 2",null,"uml composition"),this.createEdgeTemplateEntry("endArrow=open;endFill=1;endSize=12;html=1;",
160,0,"","Association 3",null,"uml association")];this.addPaletteFunctions("uml",mxResources.get("uml"),a||!1,h);this.setCurrentSearchEntryLibrary()};Sidebar.prototype.createTitle=function(a){var b=document.createElement("a");b.setAttribute("title",mxResources.get("sidebarTooltip"));b.className="geTitle";var e=document.createElement("span");mxUtils.write(e,a);b.appendChild(e);return b};
-Sidebar.prototype.createThumb=function(a,b,e,f,h,d,g,m,p,k,u,x){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.shapeForegroundColor="light-dark(#000000, #c0c0c0)";this.graph.shapeBackgroundColor=null!=k?k:"light-dark(#f1f3f4, #1b1d1e)";this.graph.view.scaleAndTranslate(null!=x?x:1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();null==x&&(k=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(e-2*this.thumbBorder)/
+Sidebar.prototype.createThumb=function(a,b,e,f,h,d,g,m,p,k,u,w){this.graph.labelsVisible=null==d||d;d=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph.shapeForegroundColor="light-dark(#000000, #c0c0c0)";this.graph.shapeBackgroundColor=null!=k?k:"light-dark(#f1f3f4, #1b1d1e)";this.graph.view.scaleAndTranslate(null!=w?w:1,0,0);this.graph.addCells(a);a=this.graph.getGraphBounds();null==w&&(k=Math.floor(100*Math.min((b-2*this.thumbBorder)/a.width,(e-2*this.thumbBorder)/
a.height))/100,this.graph.view.scaleAndTranslate(k,(b-a.width*k)/2/k-a.x,(e-a.height*k)/2/k-a.y));this.graph.dialect!=mxConstants.DIALECT_SVG||mxClient.NO_FO||null==this.graph.view.getCanvas().ownerSVGElement?(k=this.graph.container.cloneNode(!1),k.innerHTML=this.graph.container.innerHTML):k=this.graph.view.getCanvas().ownerSVGElement.cloneNode(!0);this.graph.getModel().clear();this.graph.view.scaleAndTranslate(1,0,0);this.graph.shapeBackgroundColor="#f1f3f4";mxClient.NO_FO=d;k.style.position="relative";
-k.style.overflow=null!=x?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=h&&0!=g&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign=
+k.style.overflow=null!=w?"visible":"hidden";k.style.left=(null!=u?u:this.thumbBorder)+"px";k.style.top=k.style.left;k.style.width=b+"px";k.style.height=e+"px";k.style.visibility="";k.style.minWidth="";k.style.minHeight="";this.disablePointerEvents(k);f.appendChild(k);this.sidebarTitles&&null!=h&&0!=g&&(f.style.height=this.thumbHeight+0+this.sidebarTitleSize+8+"px",b=document.createElement("div"),b.style.color=Editor.isDarkMode()?"#A0A0A0":"#303030",b.style.fontSize=this.sidebarTitleSize+"px",b.style.textAlign=
"center",b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis",mxClient.IS_IE&&(b.style.height=this.sidebarTitleSize+12+"px"),b.style.paddingTop="4px",mxUtils.write(b,h),f.appendChild(b));return a};
Sidebar.prototype.createSection=function(a){return mxUtils.bind(this,function(){var b=document.createElement("div");b.setAttribute("title",a);b.style.textOverflow="ellipsis";b.style.whiteSpace="nowrap";b.style.textAlign="center";b.style.overflow="hidden";b.style.width="100%";b.style.padding="14px 0";mxUtils.write(b,a);return b})};
-Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(I){mxEvent.consume(I)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),
-this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),null!=x?(E.style.backgroundImage="url("+x+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):this.createThumb(D,k,u,E,b,e,f,h,d),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p,z),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
-null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(I){mxEvent.isMouseEvent(I)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};
-Sidebar.prototype.createDropHandler=function(a,b,e,f,h,d){e=null!=e?e:!0;return mxUtils.bind(this,function(g,m,p,k,u,x){for(x=x?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=x&&x!=this.container;)x=x.parentNode;if(null==x&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();x=null==p||mxEvent.isAltDown(m)?!1:g.isValidDropTarget(p,a,m);var z=null;null==p||x||(p=null);if(!g.isCellLocked(p||
-g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,I=g.cloneCells(a);g.splitEdge(p,I,null,k-f.width/2,u-f.height/2,D,G);z=I}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&
-g.insertEdgeBeforeCell(L,d)}if(null!=g.layoutManager){var T=g.layoutManager.getLayout(p);if(null!=T){C=g.view.scale;E=g.view.translate;D=(k+E.x)*C;G=(u+E.y)*C;for(var K=0;K<z.length;K++)T.moveCell(z[K],D,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||g.fireEvent(new mxEventObject("cellsInserted","cells",z));for(K=0;K<z.length;K++)g.model.isVertex(z[K])&&g.isAutoSizeCell(z[K])&&g.updateCellSize(z[K])}catch(U){this.editorUi.handleError(U)}finally{g.model.endUpdate()}null!=z&&0<z.length&&(g.scrollCellToVisible(z[0]),
+Sidebar.prototype.createItem=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){m=null!=m?m:!0;k=null!=k?k:this.thumbWidth;u=null!=u?u:this.thumbHeight;var E=document.createElement("a");E.className="geItem";E.style.overflow="hidden";var D=2*this.thumbBorder;E.style.width=k+D+"px";E.style.height=u+D+"px";E.style.padding=this.thumbPadding+"px";mxEvent.addListener(E,"click",function(K){mxEvent.consume(K)});var G=new mxRectangle(0,0,h,d);null!=a&&0<a.length?(D=a,a=this.graph.cloneCells(a),this.graph.pasteCellStyles(this.graph.includeDescendants(D),
+this.initialDefaultVertexStyle,this.initialDefaultEdgeStyle),null!=w?(E.style.backgroundImage="url("+w+")",E.style.backgroundRepeat="no-repeat",E.style.backgroundPosition="center",E.style.backgroundSize="24px 24px"):this.createThumb(D,k,u,E,b,e,f,h,d),1<a.length||a[0].vertex?(f=this.createDragSource(E,this.createDropHandler(a,!0,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p,z),f.isGuidesEnabled=mxUtils.bind(this,function(){return this.editorUi.editor.graph.graphHandler.guidesEnabled})):
+null!=a[0]&&a[0].edge&&(f=this.createDragSource(E,this.createDropHandler(a,!1,g,G,z,C),this.createDragPreview(h,d),a,G,z),this.addClickHandler(E,f,a,p)),!mxClient.IS_IOS&&m&&mxEvent.addGestureListeners(E,null,mxUtils.bind(this,function(K){mxEvent.isMouseEvent(K)&&this.showTooltip(E,a,G.width,G.height,b,e)}))):(E.style.backgroundImage="url("+Editor.svgBrokenImage.src+")",E.setAttribute("title",b));return E};
+Sidebar.prototype.createDropHandler=function(a,b,e,f,h,d){e=null!=e?e:!0;return mxUtils.bind(this,function(g,m,p,k,u,w){for(w=w?null:mxEvent.isTouchEvent(m)||mxEvent.isPenEvent(m)?document.elementFromPoint(mxEvent.getClientX(m),mxEvent.getClientY(m)):mxEvent.getSource(m);null!=w&&w!=this.container;)w=w.parentNode;if(null==w&&g.isEnabled()){a=g.getImportableCells(a);if(0<a.length){g.stopEditing();w=null==p||mxEvent.isAltDown(m)?!1:g.isValidDropTarget(p,a,m);var z=null;null==p||w||(p=null);if(!g.isCellLocked(p||
+g.getDefaultParent())){g.model.beginUpdate();try{k=Math.round(k);u=Math.round(u);if(b&&g.isSplitTarget(p,a,m)){var C=g.view.scale,E=g.view.translate,D=(k+E.x)*C,G=(u+E.y)*C,K=g.cloneCells(a);g.splitEdge(p,K,null,k-f.width/2,u-f.height/2,D,G);z=K}else if(0<a.length&&(z=g.importCells(a,k,u,p),g.model.isVertex(d)&&1==z.length&&g.model.isVertex(z[0]))){var L=g.insertEdge(g.model.getParent(d),null,"",d,z[0],g.createCurrentEdgeStyle());g.applyNewEdgeStyle(d,[L]);z.push(L);g.connectionHandler.insertBeforeSource&&
+g.insertEdgeBeforeCell(L,d)}if(null!=g.layoutManager){var Q=g.layoutManager.getLayout(p);if(null!=Q){C=g.view.scale;E=g.view.translate;D=(k+E.x)*C;G=(u+E.y)*C;for(var N=0;N<z.length;N++)Q.moveCell(z[N],D,G)}}!e||null!=m&&mxEvent.isShiftDown(m)||g.fireEvent(new mxEventObject("cellsInserted","cells",z));for(N=0;N<z.length;N++)g.model.isVertex(z[N])&&g.isAutoSizeCell(z[N])&&g.updateCellSize(z[N])}catch(U){this.editorUi.handleError(U)}finally{g.model.endUpdate()}null!=z&&0<z.length&&(g.scrollCellToVisible(z[0]),
g.setSelectionCells(z));(h||g.editAfterInsert&&null!=m&&mxEvent.isMouseEvent(m)&&null!=z&&1==z.length)&&window.setTimeout(function(){g.startEditing(z[0])},0)}}mxEvent.consume(m)}})};Sidebar.prototype.createDragPreview=function(a,b){var e=document.createElement("div");e.className="geDragPreview";e.style.width=a+"px";e.style.height=b+"px";return e};
-Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var x=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var I=k.origin;D=I.x;
-G=I.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=x&&!x.relative&&E),T=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(M,V,aa){return!m.isContainer(M.cell)});if(null!=T&&T!=C)k=m.view.getState(T),null!=k&&(I=k.origin,C=T,L=!0,m.model.isEdge(a)||(p.x-=I.x-D,p.y-=I.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-
-(L?G:0),L?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=g&&null!=d&&(m.model.remove(b[g]),m.updateShapes(b[g],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var K=m.getCellGeometry(b[f]),U=null!=K?K.getTerminalPoint(!0):null;K.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var Y=m.getCellGeometry(b[e]),Q=null!=Y?Y.getTerminalPoint(!0):null;null!=Q&&Q.x==U.x&&Q.y==U.y&&m.model.setTerminal(b[e],
-a,!0)}if(null!=K.getTerminalPoint(!1))K.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var P=m.view.getState(C);I=P.cell!=m.view.currentRoot?P.origin:new mxPoint(0,0);m.cellsMoved(b,I.x,I.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,
-null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(M){this.editorUi.handleError(M)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};
+Sidebar.prototype.dropAndConnect=function(a,b,e,f,h,d,g){var m=this.editorUi.editor.graph,p=m.model.isEdge(a)||null!=d?d:g;p=this.getDropAndConnectGeometry(a,b[p],e,b);var k=[];if(null!=p){var u=null;m.model.beginUpdate();try{var w=m.getCellGeometry(a),z=m.getCellGeometry(b[f]),C=m.model.getParent(a),E=!0;if(null!=m.layoutManager){var D=m.layoutManager.getLayout(C);null!=D&&D.constructor==mxStackLayout&&(E=!1)}k=m.model.isEdge(a)?null:m.view.getState(C);var G=D=0;if(null!=k){var K=k.origin;D=K.x;
+G=K.y}var L=!m.isTableRow(a)&&!m.isTableCell(a)&&(m.model.isEdge(a)||null!=w&&!w.relative&&E),Q=m.getCellAt((p.x+D+m.view.translate.x)*m.view.scale,(p.y+G+m.view.translate.y)*m.view.scale,null,null,null,function(J,V,Z){return!m.isContainer(J.cell)});if(null!=Q&&Q!=C)k=m.view.getState(Q),null!=k&&(K=k.origin,C=Q,L=!0,m.model.isEdge(a)||(p.x-=K.x-D,p.y-=K.y-G));else if(!E||m.isTableRow(a)||m.isTableCell(a))p.x+=D,p.y+=G;D=z.x;G=z.y;m.model.isEdge(b[f])&&(G=D=0);k=b=m.importCells(b,p.x-(L?D:0),p.y-(L?
+G:0),L?C:null);if(m.model.isEdge(a))m.model.setTerminal(a,b[f],e==mxConstants.DIRECTION_NORTH),null!=g&&null!=d&&(m.model.remove(b[g]),m.updateShapes(b[g],[a]));else if(m.model.isEdge(b[f])&&null==d){m.model.setTerminal(b[f],a,!0);var N=m.getCellGeometry(b[f]),U=null!=N?N.getTerminalPoint(!0):null;N.points=null;if(null!=U)for(e=0;e<b.length;e++)if(m.model.isEdge(b[e])&&e!=f){var Y=m.getCellGeometry(b[e]),P=null!=Y?Y.getTerminalPoint(!0):null;null!=P&&P.x==U.x&&P.y==U.y&&m.model.setTerminal(b[e],a,
+!0)}if(null!=N.getTerminalPoint(!1))N.setTerminalPoint(p.getTerminalPoint(!1),!1);else if(L&&m.model.isVertex(C)){var T=m.view.getState(C);K=T.cell!=m.view.currentRoot?T.origin:new mxPoint(0,0);m.cellsMoved(b,K.x,K.y,null,null,!0)}}else null!=d&&(z=m.getCellGeometry(b[d]),D=p.x-Math.round(z.x),G=p.y-Math.round(z.y),p.x=Math.round(z.x),p.y=Math.round(z.y),m.model.setGeometry(b[f],p),m.cellsMoved(b,D,G,null,null,!0),k=b.slice(),u=1==k.length?k[0]:null,null!=g?m.model.setTerminal(b[g],a,!0):b.push(m.insertEdge(null,
+null,"",a,b[f],m.createCurrentEdgeStyle())));null!=h&&mxEvent.isShiftDown(h)||m.fireEvent(new mxEventObject("cellsInserted","cells",b))}catch(J){this.editorUi.handleError(J)}finally{m.model.endUpdate()}m.editAfterInsert&&null!=h&&mxEvent.isMouseEvent(h)&&null!=u&&window.setTimeout(function(){m.startEditing(u)},0)}null!=g&&1<k.length&&k.splice(g,1);return k};
Sidebar.prototype.getDropAndConnectGeometry=function(a,b,e,f){var h=this.editorUi.editor.graph,d=h.view,g=1<f.length,m=h.view.getState(a),p=h.getCellGeometry(a);f=h.getCellGeometry(b);null!=m&&null!=p&&null!=f&&(f=f.clone(),h.model.isEdge(a)?(p=m.absolutePoints,b=p[0],h=p[p.length-1],e==mxConstants.DIRECTION_NORTH?(f.x=b.x/d.scale-d.translate.x-f.width/2,f.y=b.y/d.scale-d.translate.y-f.height/2):(f.x=h.x/d.scale-d.translate.x-f.width/2,f.y=h.y/d.scale-d.translate.y-f.height/2)):(p.relative&&(p=p.clone(),
p.x=(m.x-d.translate.x)/d.scale,p.y=(m.y-d.translate.y)/d.scale),d=h.defaultEdgeLength,h.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=f.getTerminalPoint(!1)?(b=f.getTerminalPoint(!0),h=f.getTerminalPoint(!1),d=h.x-b.x,b=h.y-b.y,d=Math.sqrt(d*d+b*b),f.x=p.getCenterX(),f.y=p.getCenterY(),f.width=1,f.height=1,e==mxConstants.DIRECTION_NORTH?(f.height=d,f.y=p.y-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1)):e==mxConstants.DIRECTION_EAST?(f.width=d,f.x=p.x+p.width,f.setTerminalPoint(new mxPoint(f.x+
f.width,f.y),!1)):e==mxConstants.DIRECTION_SOUTH?(f.height=d,f.y=p.y+p.height,f.setTerminalPoint(new mxPoint(f.x,f.y+f.height),!1)):e==mxConstants.DIRECTION_WEST&&(f.width=d,f.x=p.x-d,f.setTerminalPoint(new mxPoint(f.x,f.y),!1))):(!g&&45<f.width&&45<f.height&&45<p.width&&45<p.height&&(f.width*=p.height/f.height,f.height=p.height),f.x=p.x+p.width/2-f.width/2,f.y=p.y+p.height/2-f.height/2,e==mxConstants.DIRECTION_NORTH?f.y=f.y-p.height/2-f.height/2-d:e==mxConstants.DIRECTION_EAST?f.x=f.x+p.width/2+
f.width/2+d:e==mxConstants.DIRECTION_SOUTH?f.y=f.y+p.height/2+f.height/2+d:e==mxConstants.DIRECTION_WEST&&(f.x=f.x-p.width/2-f.width/2-d),h.model.isEdge(b)&&null!=f.getTerminalPoint(!0)&&null!=b.getTerminal(!1)&&(p=h.getCellGeometry(b.getTerminal(!1)),null!=p&&(e==mxConstants.DIRECTION_NORTH?(f.x-=p.getCenterX(),f.y-=p.getCenterY()+p.height/2):e==mxConstants.DIRECTION_EAST?(f.x-=p.getCenterX()-p.width/2,f.y-=p.getCenterY()):e==mxConstants.DIRECTION_SOUTH?(f.x-=p.getCenterX(),f.y-=p.getCenterY()-p.height/
2):e==mxConstants.DIRECTION_WEST&&(f.x-=p.getCenterX()+p.width/2,f.y-=p.getCenterY()))))));return f};Sidebar.prototype.isDropStyleEnabled=function(a,b){var e=!0;null!=b&&1==a.length&&(a=this.graph.getCellStyle(a[b]),null!=a&&(e=mxUtils.getValue(a,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(a,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE));return e};
Sidebar.prototype.isDropStyleTargetIgnored=function(a){return this.graph.isSwimlane(a.cell)||this.graph.isTableCell(a.cell)||this.graph.isTableRow(a.cell)||this.graph.isTable(a.cell)};Sidebar.prototype.disablePointerEvents=function(a){mxUtils.visitNodes(a,mxUtils.bind(this,function(b){b.nodeType==mxConstants.NODETYPE_ELEMENT&&(b.style.pointerEvents="none",b.removeAttribute("pointer-events"))}))};
-Sidebar.prototype.createDragSource=function(a,b,e,f,h,d){function g(la,Ba){var Ca=mxUtils.createImage(la.src);Ca.style.width=la.width+"px";Ca.style.height=la.height+"px";null!=Ba&&Ca.setAttribute("title",Ba);mxUtils.setOpacity(Ca,la==this.refreshTarget?30:20);Ca.style.position="absolute";Ca.style.cursor="crosshair";return Ca}function m(la,Ba,Ca,Fa){null!=Fa.parentNode&&(mxUtils.contains(Ca,la,Ba)?(mxUtils.setOpacity(Fa,100),O=Fa):mxUtils.setOpacity(Fa,Fa==V?30:20));return Ca}var p=this.editorUi,k=
-p.editor.graph,u=null,x=null,z=this;d=0;for(var C=this.livePreview,E=0;E<f.length&&C;E++)d+=k.model.getDescendants(f[E]).length,C=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==x&&k.model.isVertex(f[E])?x=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==x||null==u);E++);var D=this.isDropStyleEnabled(f,x),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(la,Ba,Ca,Fa,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
-K&&O==V){var Ha=la.isCellSelected(K.cell)?la.getSelectionCells():[K.cell];la.updateShapes(la.model.isEdge(K.cell)?f[0]:f[x],Ha,!0);la.setSelectionCells(Ha)}else null!=f&&null!=O&&null!=L&&O!=V?(Ha=la.model.isEdge(L.cell)||null==u?x:u,la.setSelectionCells(this.dropAndConnect(L.cell,f,qa,Ha,Ba,x,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(la.view.getState(la.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
-G.createPreviewElement=mxUtils.bind(this,function(la){var Ba=document.createElement("a");Ba.className="geItem";Ba.style.overflow="visible";la=la.view.scale;Ba.style.width=la*Math.max(1,h.width)+"px";Ba.style.height=la*Math.max(1,h.height)+"px";mxUtils.setOpacity(Ba,50);var Ca=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Ca),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(Ca,la*Math.max(1,h.width),la*Math.max(1,h.height),Ba,null,null,null,null,null,k.shapeBackgroundColor,
-0,la);return Ba}));var I=G.mouseDown;G.mouseDown=function(la){mxEvent.isPopupTrigger(la)||mxEvent.isMultiTouchEvent(la)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),I.apply(this,arguments))};var L=null,T=null,K=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),Q=g(this.triangleRight,mxResources.get("connect")),P=g(this.triangleDown,mxResources.get("connect")),M=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),aa=null,ia=g(this.roundDrop),
-na=g(this.roundDrop),qa=mxConstants.DIRECTION_NORTH,O=null,Z=G.createPreviewElement;G.createPreviewElement=function(la){var Ba=Z.apply(this,arguments);mxClient.IS_SVG&&(Ba.style.pointerEvents="none");this.previewElementWidth=Ba.style.width;this.previewElementHeight=Ba.style.height;return Ba};var ca=G.dragEnter;G.dragEnter=function(la,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ca.apply(this,arguments)};var W=G.dragExit;G.dragExit=function(la,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");
-W.apply(this,arguments)};G.dragOver=function(la,Ba){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=O&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Ca=la.view;if(null!=K&&O==V)this.previewElement.style.display="none";else if(null!=L&&null!=O){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Fa=la.model.isEdge(L.cell)||null!=x?x:u,Ia=z.getDropAndConnectGeometry(L.cell,f[Fa],qa,f),Ha=la.model.isEdge(L.cell)?
-null:la.getCellGeometry(L.cell),Ja=la.getCellGeometry(f[Fa]),ta=la.model.getParent(L.cell),La=Ca.translate.x*Ca.scale,Xa=Ca.translate.y*Ca.scale;null!=Ha&&!Ha.relative&&la.model.isVertex(ta)&&ta!=Ca.currentRoot&&(Xa=Ca.getState(ta),La=Xa.x,Xa=Xa.y);Ha=Ja.x;Ja=Ja.y;la.model.isEdge(f[Fa])&&(Ja=Ha=0);this.previewElement.style.left=(Ia.x-Ha)*Ca.scale+La+"px";this.previewElement.style.top=(Ia.y-Ja)*Ca.scale+Xa+"px";1==f.length&&(this.previewElement.style.width=Ia.width*Ca.scale+"px",this.previewElement.style.height=
-Ia.height*Ca.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&la.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-h.width*Ca.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
-h.height*Ca.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ja=(new Date).getTime(),H=0,ea=null,oa=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(la,Ba,Ca,Fa){var Ia=mxEvent.isAltDown(Fa)||
-null==f?null:la.getCellAt(Ba,Ca,null,null,null,function(Xa,Ya,cb){return la.isContainer(Xa.cell)&&"0"!=mxUtils.getValue(Xa.style,"dropTarget","1")});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var Ha=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(Ha)&&this.graph.isCellConnectable(Ha)&&(Ia=Ha)}la.isCellLocked(Ia)&&(Ia=null);var Ja=la.view.getState(Ia);Ha=O=null;ea!=Ja?(ja=(new Date).getTime(),H=0,ea=Ja,null!=this.updateThread&&window.clearTimeout(this.updateThread),
-null!=Ja&&(this.updateThread=window.setTimeout(function(){null==O&&(ea=Ja,G.getDropTarget(la,Ba,Ca,Fa))},this.dropTargetDelay+10))):H=(new Date).getTime()-ja;if(D&&2500>H&&null!=Ja&&!mxEvent.isShiftDown(Fa)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(oa,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ja.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ja.style,
-mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(oa,mxConstants.STYLE_SHAPE)||1500<H||la.model.isEdge(Ja.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ja)&&(la.model.isVertex(Ja.cell)&&null!=x||la.model.isEdge(Ja.cell)&&la.model.isEdge(f[0]))){if(la.isCellEditable(Ja.cell)){K=Ja;var ta=la.model.isEdge(Ja.cell)?la.view.getPoint(Ja):new mxPoint(Ja.getCenterX(),Ja.getCenterY());ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height);V.style.left=Math.floor(ta.x)+"px";V.style.top=Math.floor(ta.y)+"px";null==aa&&(la.container.appendChild(V),aa=V.parentNode);m(Ba,Ca,ta,V)}}else null==K||!mxUtils.contains(K,Ba,Ca)||1500<H&&!mxEvent.isShiftDown(Fa)?(K=null,null!=aa&&(V.parentNode.removeChild(V),aa=null)):null!=K&&null!=aa&&(ta=la.model.isEdge(K.cell)?la.view.getPoint(K):new mxPoint(K.getCenterX(),K.getCenterY()),ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
-2,this.refreshTarget.width,this.refreshTarget.height),m(Ba,Ca,ta,V));if(U&&null!=L&&!mxEvent.isAltDown(Fa)&&null==O){Ha=mxRectangle.fromRectangle(L);if(la.model.isEdge(L.cell)){var La=L.absolutePoints;null!=ia.parentNode&&(ta=La[0],Ha.add(m(Ba,Ca,new mxRectangle(ta.x-this.roundDrop.width/2,ta.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ia)));null!=na.parentNode&&(La=La[La.length-1],Ha.add(m(Ba,Ca,new mxRectangle(La.x-this.roundDrop.width/2,La.y-this.roundDrop.height/2,this.roundDrop.width,
-this.roundDrop.height),na)))}else ta=mxRectangle.fromRectangle(L),null!=L.shape&&null!=L.shape.boundingBox&&(ta=mxRectangle.fromRectangle(L.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(L.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&
-"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Ha.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleUp.width/2,ta.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Y)),Ha.add(m(Ba,Ca,new mxRectangle(ta.x+ta.width,L.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),Q)),Ha.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleDown.width/2,ta.y+ta.height,this.triangleDown.width,
-this.triangleDown.height),P)),Ha.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),M));null!=Ha&&Ha.grow(10)}qa=mxConstants.DIRECTION_NORTH;O==Q?qa=mxConstants.DIRECTION_EAST:O==P||O==na?qa=mxConstants.DIRECTION_SOUTH:O==M&&(qa=mxConstants.DIRECTION_WEST);null!=K&&O==V&&(Ja=K);ta=(null==x||la.isCellConnectable(f[x]))&&(la.model.isEdge(Ia)&&null!=x||la.model.isVertex(Ia)&&la.isCellConnectable(Ia));if(null!=
-L&&5E3<=H||L!=Ja&&(null==Ha||!mxUtils.contains(Ha,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||la.model.isEdge(Ia)?Ja:null,null!=L&&ta){Ha=[ia,na,Y,Q,P,M];for(ta=0;ta<Ha.length;ta++)null!=Ha[ta].parentNode&&Ha[ta].parentNode.removeChild(Ha[ta]);la.model.isEdge(Ia)?(La=Ja.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",na.style.left=Math.floor(La.x-this.roundDrop.width/
-2)+"px",na.style.top=Math.floor(La.y-this.roundDrop.height/2)+"px",null==la.model.getTerminal(Ia,!0)&&la.container.appendChild(ia),null==la.model.getTerminal(Ia,!1)&&la.container.appendChild(na))):(ta=mxRectangle.fromRectangle(Ja),null!=Ja.shape&&null!=Ja.shape.boundingBox&&(ta=mxRectangle.fromRectangle(Ja.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(Ja.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=
-La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Y.style.left=Math.floor(Ja.getCenterX()-this.triangleUp.width/2)+"px",Y.style.top=Math.floor(ta.y-this.triangleUp.height)+"px",Q.style.left=Math.floor(ta.x+ta.width)+"px",Q.style.top=Math.floor(Ja.getCenterY()-
-this.triangleRight.height/2)+"px",P.style.left=Y.style.left,P.style.top=Math.floor(ta.y+ta.height)+"px",M.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",M.style.top=Q.style.top,"eastwest"!=Ja.style.portConstraint&&(la.container.appendChild(Y),la.container.appendChild(P)),la.container.appendChild(Q),la.container.appendChild(M));null!=Ja&&(T=la.selectionCellsHandler.getHandler(Ja.cell),null!=T&&null!=T.setHandlesVisible&&T.setHandlesVisible(!1));U=!0}else for(Ha=[ia,na,Y,Q,P,M],ta=0;ta<Ha.length;ta++)null!=
-Ha[ta].parentNode&&Ha[ta].parentNode.removeChild(Ha[ta]);U||null==T||T.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Fa)&&!mxEvent.isShiftDown(Fa)||null!=K&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&la.isSplitTarget(Ia,f,Fa)||(Ia=la.getDropTarget(f,Fa,Ia,!0));return Ia});var sa=G.startDrag;G.startDrag=function(la){z.activeDragSource=this;sa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var la=[ia,na,V,Y,Q,P,M],
-Ba=0;Ba<la.length;Ba++)null!=la[Ba].parentNode&&la[Ba].parentNode.removeChild(la[Ba]);null!=L&&null!=T&&T.reset();O=aa=K=L=T=z.activeDragSource=null};return G};
+Sidebar.prototype.createDragSource=function(a,b,e,f,h,d){function g(ma,Ba){var Ca=mxUtils.createImage(ma.src);Ca.style.width=ma.width+"px";Ca.style.height=ma.height+"px";null!=Ba&&Ca.setAttribute("title",Ba);mxUtils.setOpacity(Ca,ma==this.refreshTarget?30:20);Ca.style.position="absolute";Ca.style.cursor="crosshair";return Ca}function m(ma,Ba,Ca,Ja){null!=Ja.parentNode&&(mxUtils.contains(Ca,ma,Ba)?(mxUtils.setOpacity(Ja,100),O=Ja):mxUtils.setOpacity(Ja,Ja==V?30:20));return Ca}var p=this.editorUi,k=
+p.editor.graph,u=null,w=null,z=this;d=0;for(var C=this.livePreview,E=0;E<f.length&&C;E++)d+=k.model.getDescendants(f[E]).length,C=d<k.graphHandler.maxLivePreview;for(E=0;E<f.length&&(null==w&&k.model.isVertex(f[E])?w=E:null==u&&k.model.isEdge(f[E])&&null==k.model.getTerminal(f[E],!0)&&(u=E),null==w||null==u);E++);var D=this.isDropStyleEnabled(f,w),G=mxUtils.makeDraggable(a,k,mxUtils.bind(this,function(ma,Ba,Ca,Ja,Ia){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=f&&null!=
+N&&O==V){var Da=ma.isCellSelected(N.cell)?ma.getSelectionCells():[N.cell];ma.updateShapes(ma.model.isEdge(N.cell)?f[0]:f[w],Da,!0);ma.setSelectionCells(Da)}else null!=f&&null!=O&&null!=L&&O!=V?(Da=ma.model.isEdge(L.cell)||null==u?w:u,ma.setSelectionCells(this.dropAndConnect(L.cell,f,sa,Da,Ba,w,u))):b.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(ma.view.getState(ma.getSelectionCell()))}),e,0,0,k.autoscroll,!0,!0);C&&(G.createDragElement=mxUtils.bind(this,function(){return G.createPreviewElement(this.graph)}),
+G.createPreviewElement=mxUtils.bind(this,function(ma){var Ba=document.createElement("a");Ba.className="geItem";Ba.style.overflow="visible";ma=ma.view.scale;Ba.style.width=ma*Math.max(1,h.width)+"px";Ba.style.height=ma*Math.max(1,h.height)+"px";mxUtils.setOpacity(Ba,50);var Ca=k.cloneCells(f);this.graph.pasteCellStyles(k.includeDescendants(Ca),k.currentVertexStyle,k.currentEdgeStyle,null,k.pasteEdgeStyle);z.createThumb(Ca,ma*Math.max(1,h.width),ma*Math.max(1,h.height),Ba,null,null,null,null,null,k.shapeBackgroundColor,
+0,ma);return Ba}));var K=G.mouseDown;G.mouseDown=function(ma){mxEvent.isPopupTrigger(ma)||mxEvent.isMultiTouchEvent(ma)||k.isCellLocked(k.getDefaultParent())||(k.stopEditing(),K.apply(this,arguments))};var L=null,Q=null,N=null,U=!1,Y=g(this.triangleUp,mxResources.get("connect")),P=g(this.triangleRight,mxResources.get("connect")),T=g(this.triangleDown,mxResources.get("connect")),J=g(this.triangleLeft,mxResources.get("connect")),V=g(this.refreshTarget,mxResources.get("replace")),Z=null,ia=g(this.roundDrop),
+oa=g(this.roundDrop),sa=mxConstants.DIRECTION_NORTH,O=null,X=G.createPreviewElement;G.createPreviewElement=function(ma){var Ba=X.apply(this,arguments);mxClient.IS_SVG&&(Ba.style.pointerEvents="none");this.previewElementWidth=Ba.style.width;this.previewElementHeight=Ba.style.height;return Ba};var ba=G.dragEnter;G.dragEnter=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("none");ba.apply(this,arguments)};var da=G.dragExit;G.dragExit=function(ma,Ba){null!=p.hoverIcons&&p.hoverIcons.setDisplay("");
+da.apply(this,arguments)};G.dragOver=function(ma,Ba){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=O&&this.currentGuide.hide();if(null!=this.previewElement){p.hideShapePicker();var Ca=ma.view;if(null!=N&&O==V)this.previewElement.style.display="none";else if(null!=L&&null!=O){null!=G.currentHighlight&&null!=G.currentHighlight.state&&G.currentHighlight.hide();var Ja=ma.model.isEdge(L.cell)||null!=w?w:u,Ia=z.getDropAndConnectGeometry(L.cell,f[Ja],sa,f),Da=ma.model.isEdge(L.cell)?
+null:ma.getCellGeometry(L.cell),Ga=ma.getCellGeometry(f[Ja]),ta=ma.model.getParent(L.cell),La=Ca.translate.x*Ca.scale,Xa=Ca.translate.y*Ca.scale;null!=Da&&!Da.relative&&ma.model.isVertex(ta)&&ta!=Ca.currentRoot&&(Xa=Ca.getState(ta),La=Xa.x,Xa=Xa.y);Da=Ga.x;Ga=Ga.y;ma.model.isEdge(f[Ja])&&(Ga=Da=0);this.previewElement.style.left=(Ia.x-Da)*Ca.scale+La+"px";this.previewElement.style.top=(Ia.y-Ga)*Ca.scale+Xa+"px";1==f.length&&(this.previewElement.style.width=Ia.width*Ca.scale+"px",this.previewElement.style.height=
+Ia.height*Ca.scale+"px",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="none",this.previewElement.className="geDragPreview",mxUtils.setOpacity(this.previewElement,100)));this.previewElement.style.display=""}else null!=G.currentHighlight&&null!=G.currentHighlight.state&&ma.model.isEdge(G.currentHighlight.state.cell)?(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-h.width*Ca.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-
+h.height*Ca.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="",null!=this.previewElement.firstChild&&(this.previewElement.firstChild.style.display="",mxUtils.setOpacity(this.previewElement,50),this.previewElement.className=""))}};var ca=(new Date).getTime(),H=0,ea=null,ra=this.editorUi.editor.graph.getCellStyle(f[0]);G.getDropTarget=mxUtils.bind(this,function(ma,Ba,Ca,Ja){var Ia=mxEvent.isAltDown(Ja)||
+null==f?null:ma.getCellAt(Ba,Ca,null,null,null,function(Xa,Ya,cb){return ma.isContainer(Xa.cell)&&"0"!=mxUtils.getValue(Xa.style,"dropTarget","1")});if(null!=Ia&&!this.graph.isCellConnectable(Ia)&&!this.graph.model.isEdge(Ia)){var Da=this.graph.getModel().getParent(Ia);this.graph.getModel().isVertex(Da)&&this.graph.isCellConnectable(Da)&&(Ia=Da)}ma.isCellLocked(Ia)&&(Ia=null);var Ga=ma.view.getState(Ia);Da=O=null;ea!=Ga?(ca=(new Date).getTime(),H=0,ea=Ga,null!=this.updateThread&&window.clearTimeout(this.updateThread),
+null!=Ga&&(this.updateThread=window.setTimeout(function(){null==O&&(ea=Ga,G.getDropTarget(ma,Ba,Ca,Ja))},this.dropTargetDelay+10))):H=(new Date).getTime()-ca;if(D&&2500>H&&null!=Ga&&!mxEvent.isShiftDown(Ja)&&(mxUtils.getValue(Ga.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)&&(mxUtils.getValue(Ga.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ga.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE)!=mxConstants.NONE||mxUtils.getValue(Ga.style,
+mxConstants.STYLE_GRADIENTCOLOR,mxConstants.NONE)!=mxConstants.NONE)||"image"==mxUtils.getValue(ra,mxConstants.STYLE_SHAPE)||1500<H||ma.model.isEdge(Ga.cell))&&H>this.dropTargetDelay&&!this.isDropStyleTargetIgnored(Ga)&&(ma.model.isVertex(Ga.cell)&&null!=w||ma.model.isEdge(Ga.cell)&&ma.model.isEdge(f[0]))){if(ma.isCellEditable(Ga.cell)){N=Ga;var ta=ma.model.isEdge(Ga.cell)?ma.view.getPoint(Ga):new mxPoint(Ga.getCenterX(),Ga.getCenterY());ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height);V.style.left=Math.floor(ta.x)+"px";V.style.top=Math.floor(ta.y)+"px";null==Z&&(ma.container.appendChild(V),Z=V.parentNode);m(Ba,Ca,ta,V)}}else null==N||!mxUtils.contains(N,Ba,Ca)||1500<H&&!mxEvent.isShiftDown(Ja)?(N=null,null!=Z&&(V.parentNode.removeChild(V),Z=null)):null!=N&&null!=Z&&(ta=ma.model.isEdge(N.cell)?ma.view.getPoint(N):new mxPoint(N.getCenterX(),N.getCenterY()),ta=new mxRectangle(ta.x-this.refreshTarget.width/2,ta.y-this.refreshTarget.height/
+2,this.refreshTarget.width,this.refreshTarget.height),m(Ba,Ca,ta,V));if(U&&null!=L&&!mxEvent.isAltDown(Ja)&&null==O){Da=mxRectangle.fromRectangle(L);if(ma.model.isEdge(L.cell)){var La=L.absolutePoints;null!=ia.parentNode&&(ta=La[0],Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.roundDrop.width/2,ta.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),ia)));null!=oa.parentNode&&(La=La[La.length-1],Da.add(m(Ba,Ca,new mxRectangle(La.x-this.roundDrop.width/2,La.y-this.roundDrop.height/2,this.roundDrop.width,
+this.roundDrop.height),oa)))}else ta=mxRectangle.fromRectangle(L),null!=L.shape&&null!=L.shape.boundingBox&&(ta=mxRectangle.fromRectangle(L.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(L.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&
+"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleUp.width/2,ta.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),Y)),Da.add(m(Ba,Ca,new mxRectangle(ta.x+ta.width,L.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),P)),Da.add(m(Ba,Ca,new mxRectangle(L.getCenterX()-this.triangleDown.width/2,ta.y+ta.height,this.triangleDown.width,
+this.triangleDown.height),T)),Da.add(m(Ba,Ca,new mxRectangle(ta.x-this.triangleLeft.width,L.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),J));null!=Da&&Da.grow(10)}sa=mxConstants.DIRECTION_NORTH;O==P?sa=mxConstants.DIRECTION_EAST:O==T||O==oa?sa=mxConstants.DIRECTION_SOUTH:O==J&&(sa=mxConstants.DIRECTION_WEST);null!=N&&O==V&&(Ga=N);ta=(null==w||ma.isCellConnectable(f[w]))&&(ma.model.isEdge(Ia)&&null!=w||ma.model.isVertex(Ia)&&ma.isCellConnectable(Ia));if(null!=
+L&&5E3<=H||L!=Ga&&(null==Da||!mxUtils.contains(Da,Ba,Ca)||500<H&&null==O&&ta))if(U=!1,L=5E3>H&&H>this.dropTargetDelay||ma.model.isEdge(Ia)?Ga:null,null!=L&&ta){Da=[ia,oa,Y,P,T,J];for(ta=0;ta<Da.length;ta++)null!=Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);ma.model.isEdge(Ia)?(La=Ga.absolutePoints,null!=La&&(ta=La[0],La=La[La.length-1],ia.style.left=Math.floor(ta.x-this.roundDrop.width/2)+"px",ia.style.top=Math.floor(ta.y-this.roundDrop.height/2)+"px",oa.style.left=Math.floor(La.x-this.roundDrop.width/
+2)+"px",oa.style.top=Math.floor(La.y-this.roundDrop.height/2)+"px",null==ma.model.getTerminal(Ia,!0)&&ma.container.appendChild(ia),null==ma.model.getTerminal(Ia,!1)&&ma.container.appendChild(oa))):(ta=mxRectangle.fromRectangle(Ga),null!=Ga.shape&&null!=Ga.shape.boundingBox&&(ta=mxRectangle.fromRectangle(Ga.shape.boundingBox)),ta.grow(this.graph.tolerance),ta.grow(HoverIcons.prototype.arrowSpacing),La=this.graph.selectionCellsHandler.getHandler(Ga.cell),null!=La&&(ta.x-=La.horizontalOffset/2,ta.y-=
+La.verticalOffset/2,ta.width+=La.horizontalOffset,ta.height+=La.verticalOffset,null!=La.rotationShape&&null!=La.rotationShape.node&&"hidden"!=La.rotationShape.node.style.visibility&&"none"!=La.rotationShape.node.style.display&&null!=La.rotationShape.boundingBox&&ta.add(La.rotationShape.boundingBox)),Y.style.left=Math.floor(Ga.getCenterX()-this.triangleUp.width/2)+"px",Y.style.top=Math.floor(ta.y-this.triangleUp.height)+"px",P.style.left=Math.floor(ta.x+ta.width)+"px",P.style.top=Math.floor(Ga.getCenterY()-
+this.triangleRight.height/2)+"px",T.style.left=Y.style.left,T.style.top=Math.floor(ta.y+ta.height)+"px",J.style.left=Math.floor(ta.x-this.triangleLeft.width)+"px",J.style.top=P.style.top,"eastwest"!=Ga.style.portConstraint&&(ma.container.appendChild(Y),ma.container.appendChild(T)),ma.container.appendChild(P),ma.container.appendChild(J));null!=Ga&&(Q=ma.selectionCellsHandler.getHandler(Ga.cell),null!=Q&&null!=Q.setHandlesVisible&&Q.setHandlesVisible(!1));U=!0}else for(Da=[ia,oa,Y,P,T,J],ta=0;ta<Da.length;ta++)null!=
+Da[ta].parentNode&&Da[ta].parentNode.removeChild(Da[ta]);U||null==Q||Q.setHandlesVisible(!0);Ia=mxEvent.isAltDown(Ja)&&!mxEvent.isShiftDown(Ja)||null!=N&&O==V?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);null==Ia||null==O&&ma.isSplitTarget(Ia,f,Ja)||(Ia=ma.getDropTarget(f,Ja,Ia,!0));return Ia});var qa=G.startDrag;G.startDrag=function(ma){z.activeDragSource=this;qa.apply(this,arguments)};var Pa=G.stopDrag;G.stopDrag=function(){Pa.apply(this,arguments);for(var ma=[ia,oa,V,Y,P,T,J],
+Ba=0;Ba<ma.length;Ba++)null!=ma[Ba].parentNode&&ma[Ba].parentNode.removeChild(ma[Ba]);null!=L&&null!=Q&&Q.reset();O=Z=N=L=Q=z.activeDragSource=null};return G};
Sidebar.prototype.itemClicked=function(a,b,e,f){f=this.editorUi.editor.graph;f.container.focus();if(mxEvent.isAltDown(e)&&1==f.getSelectionCount()&&f.model.isVertex(f.getSelectionCell())){b=null;for(var h=0;h<a.length&&null==b;h++)f.model.isVertex(a[h])&&(b=h);null!=b&&(f.setSelectionCells(this.dropAndConnect(f.getSelectionCell(),a,mxEvent.isMetaDown(e)||mxEvent.isControlDown(e)?mxEvent.isShiftDown(e)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(e)?mxConstants.DIRECTION_EAST:
mxConstants.DIRECTION_SOUTH,b,e)),f.scrollCellToVisible(f.getSelectionCell()))}else mxEvent.isShiftDown(e)&&!f.isSelectionEmpty()?(e=f.getEditableCells(f.getSelectionCells()),f.updateShapes(a[0],e,!0),f.scrollCellToVisible(e)):(a=mxEvent.isAltDown(e)?f.getFreeInsertPoint():f.getCenterInsertPoint(f.getBoundingBoxFromGeometry(a,!0)),b.drop(f,e,null,a.x,a.y,!0))};
-Sidebar.prototype.addClickHandler=function(a,b,e,f){var h=b.getGraphForEvent,d=b.mouseDown,g=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,x=this,z=null;b.getGraphForEvent=function(C){return k?h.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));z=a.style.opacity;k=!1;""==z&&(z="1");null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(C){(k=
-null!=u&&(Math.abs(u.x-mxEvent.getClientX(C))>p||Math.abs(u.y-mxEvent.getClientY(C))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100*z));g.apply(this,arguments)};b.mouseUp=function(C){try{mxEvent.isPopupTrigger(C)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(C),mxEvent.isConsumed(C)||x.itemClicked(e,b,C,a)),m.apply(b,arguments),mxUtils.setOpacity(a,100*z),u=null,
-x.currentElt=a}catch(E){b.reset(),x.editorUi.handleError(E)}}};Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,h,d,g,m){null!=m&&null!=h&&(m+=" "+h);m=null!=m&&0<m.length?m:null!=h?h.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,h,d,g)}))};
-Sidebar.prototype.createVertexTemplate=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,h,d,g,m,p,k,u,x,z,C)};
-Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,h,d,g,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),x=new mxGraphModel;u.decode(k.documentElement,x);p=this.graph.cloneCells(x.root.getChildAt(0).children)}catch(z){f=mxResources.get("error")+": "+z.message}return this.createVertexTemplateFromCells(p,b,e,f,h,d,g,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C){return this.createItem(a,f,h,d,b,e,g,m,p,k,u,x,z,C)};
+Sidebar.prototype.addClickHandler=function(a,b,e,f){var h=b.getGraphForEvent,d=b.mouseDown,g=b.mouseMove,m=b.mouseUp,p=this.editorUi.editor.graph.tolerance,k=!1,u=null,w=this,z=null;b.getGraphForEvent=function(C){return k?h.apply(this,arguments):null};b.mouseDown=function(C){d.apply(this,arguments);u=new mxPoint(mxEvent.getClientX(C),mxEvent.getClientY(C));z=a.style.opacity;k=!1;""==z&&(z="1");null!=this.dragElement&&(this.dragElement.style.display="none",mxUtils.setOpacity(a,50))};b.mouseMove=function(C){(k=
+null!=u&&(Math.abs(u.x-mxEvent.getClientX(C))>p||Math.abs(u.y-mxEvent.getClientY(C))>p))&&null!=this.dragElement&&"none"==this.dragElement.style.display&&(this.dragElement.style.display="",mxUtils.setOpacity(a,100*z));g.apply(this,arguments)};b.mouseUp=function(C){try{mxEvent.isPopupTrigger(C)||null!=this.currentGraph||null==this.dragElement||"none"!=this.dragElement.style.display||(null!=f&&f(C),mxEvent.isConsumed(C)||w.itemClicked(e,b,C,a)),m.apply(b,arguments),mxUtils.setOpacity(a,100*z),u=null,
+w.currentElt=a}catch(E){b.reset(),w.editorUi.handleError(E)}}};Sidebar.prototype.createVertexTemplateEntry=function(a,b,e,f,h,d,g,m){null!=m&&null!=h&&(m+=" "+h);m=null!=m&&0<m.length?m:null!=h?h.toLowerCase():"";return this.addEntry(m,mxUtils.bind(this,function(){return this.createVertexTemplate(a,b,e,f,h,d,g)}))};
+Sidebar.prototype.createVertexTemplate=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){a=[new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a)];a[0].vertex=!0;return this.createVertexTemplateFromCells(a,b,e,h,d,g,m,p,k,u,w,z,C)};
+Sidebar.prototype.createVertexTemplateFromData=function(a,b,e,f,h,d,g,m){var p=null;try{var k=mxUtils.parseXml(Graph.decompress(a)),u=new mxCodec(k),w=new mxGraphModel;u.decode(k.documentElement,w);p=this.graph.cloneCells(w.root.getChildAt(0).children)}catch(z){f=mxResources.get("error")+": "+z.message}return this.createVertexTemplateFromCells(p,b,e,f,h,d,g,m)};Sidebar.prototype.createVertexTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C){return this.createItem(a,f,h,d,b,e,g,m,p,k,u,w,z,C)};
Sidebar.prototype.createEdgeTemplateEntry=function(a,b,e,f,h,d,g,m,p){g=null!=g&&0<g.length?g:h.toLowerCase();return this.addEntry(g,mxUtils.bind(this,function(){return this.createEdgeTemplate(a,b,e,f,h,d,m,p)}))};
-Sidebar.prototype.createEdgeTemplate=function(a,b,e,f,h,d,g,m){a=new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a);a.geometry.setTerminalPoint(new mxPoint(0,e),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,e,h,d,g,m)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,x){return this.createItem(a,f,h,null!=m?m:!0,b,e,d,g,p,k,u,x)};
+Sidebar.prototype.createEdgeTemplate=function(a,b,e,f,h,d,g,m){a=new mxCell(null!=f?f:"",new mxGeometry(0,0,b,e),a);a.geometry.setTerminalPoint(new mxPoint(0,e),!0);a.geometry.setTerminalPoint(new mxPoint(b,0),!1);a.geometry.relative=!0;a.edge=!0;return this.createEdgeTemplateFromCells([a],b,e,h,d,g,m)};Sidebar.prototype.createEdgeTemplateFromCells=function(a,b,e,f,h,d,g,m,p,k,u,w){return this.createItem(a,f,h,null!=m?m:!0,b,e,d,g,p,k,u,w)};
Sidebar.prototype.addPaletteFunctions=function(a,b,e,f){this.addPalette(a,b,e,mxUtils.bind(this,function(h){for(var d=0;d<f.length;d++)h.appendChild(f[d](h))}))};
Sidebar.prototype.addPalette=function(a,b,e,f){b=this.createTitle(b);this.appendChild(b);var h=document.createElement("div");h.className="geSidebar";mxClient.IS_POINTER&&(h.style.touchAction="none");e&&this.expandLibraries?(f(h),f=null):h.style.display="none";this.addFoldingHandler(b,h,f);e=document.createElement("div");e.appendChild(h);this.appendChild(e);null!=a&&(this.palettes[a]=[b,e]);return h};
Sidebar.prototype.addFoldingHandler=function(a,b,e){var f=!1;a.style.backgroundImage="none"==b.style.display?"url('"+Editor.arrowRightImage+"')":"url('"+Editor.arrowDownImage+"')";a.style.backgroundRepeat="no-repeat";a.style.backgroundPosition="0px 50%";a.style.backgroundSize="20px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(h){if(a.contains(mxEvent.getSource(h))){if("none"==b.style.display){if(f)this.setContentVisible(b,!0);else if(f=!0,null!=e){a.style.cursor="wait";for(var d=[],g=
@@ -2511,10 +2512,10 @@ Sidebar.prototype.addFoldingHandler=function(a,b,e){var f=!1;a.style.backgroundI
"')",this.setContentVisible(b,!1);mxEvent.consume(h)}}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(h){h.preventDefault()}))};
Sidebar.prototype.setContentVisible=function(a,b){mxUtils.setPrefixedStyle(a.style,"transition","all 0.2s linear");mxUtils.setPrefixedStyle(a.style,"transform-origin","top left");b?(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),a.style.display="block",window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform","scaleY(1)");window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",
null)}),200)}),0)):(mxUtils.setPrefixedStyle(a.style,"transform","scaleY(0)"),window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(a.style,"transform",null);mxUtils.setPrefixedStyle(a.style,"transition",null);a.style.display="none"}),200))};Sidebar.prototype.removePalette=function(a){var b=this.palettes[a];if(null!=b){this.palettes[a]=null;for(a=0;a<b.length;a++)this.container.removeChild(b[a]);return!0}return!1};
-Sidebar.prototype.addImagePalette=function(a,b,e,f,h,d,g){for(var m=[],p=0;p<h.length;p++)mxUtils.bind(this,function(k,u,x){if(null==x&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){x=k.lastIndexOf("/");var z=k.lastIndexOf(".");x=k.substring(0<=x?x+1:0,0<=z?z:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(x)))})(h[p],null!=d?d[p]:null,null!=g?g[h[p]]:null);this.addPaletteFunctions(a,
+Sidebar.prototype.addImagePalette=function(a,b,e,f,h,d,g){for(var m=[],p=0;p<h.length;p++)mxUtils.bind(this,function(k,u,w){if(null==w&&(null==e||"img/lib/clip_art/"!=e.substring(0,17))){w=k.lastIndexOf("/");var z=k.lastIndexOf(".");w=k.substring(0<=w?w+1:0,0<=z?z:k.length).replace(/[-_]/g," ")}m.push(this.createVertexTemplateEntry("image;html=1;image="+e+k+f,this.defaultImageWidth,this.defaultImageHeight,"",u,null!=u,null,this.filterTags(w)))})(h[p],null!=d?d[p]:null,null!=g?g[h[p]]:null);this.addPaletteFunctions(a,
b,!1,m)};Sidebar.prototype.getTagsForStencil=function(a,b,e){a=a.split(".");for(var f=1;f<a.length;f++)a[f]=a[f].replace(/_/g," ");a.push(b.replace(/_/g," "));null!=e&&a.push(e);return a.slice(1,a.length)};
-Sidebar.prototype.addStencilPalette=function(a,b,e,f,h,d,g,m,p,k){g=null!=g?g:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(x,z,C,E,D){if(null==h||0>mxUtils.indexOf(h,z)){C=this.getTagsForStencil(x,z);var G=null!=m?m[z]:null;null!=G&&C.push(G);u.push(this.createVertexTemplateEntry("shape="+x+z.toLowerCase()+f,Math.round(E*g),Math.round(D*g),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
-!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(x){null==f&&(f="");null!=d&&d.call(this,x);if(null!=p)for(var z=0;z<p.length;z++)p[z](x);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,I){(null==h||0>mxUtils.indexOf(h,E))&&x.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(I*g),"",E.replace(/_/g," "),!0))}),!0)}))};
+Sidebar.prototype.addStencilPalette=function(a,b,e,f,h,d,g,m,p,k){g=null!=g?g:1;if(this.addStencilsToIndex){var u=[];if(null!=p)for(k=0;k<p.length;k++)u.push(p[k]);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(w,z,C,E,D){if(null==h||0>mxUtils.indexOf(h,z)){C=this.getTagsForStencil(w,z);var G=null!=m?m[z]:null;null!=G&&C.push(G);u.push(this.createVertexTemplateEntry("shape="+w+z.toLowerCase()+f,Math.round(E*g),Math.round(D*g),"",z.replace(/_/g," "),null,null,this.filterTags(C.join(" "))))}}),
+!0,!0);this.addPaletteFunctions(a,b,!1,u)}else this.addPalette(a,b,!1,mxUtils.bind(this,function(w){null==f&&(f="");null!=d&&d.call(this,w);if(null!=p)for(var z=0;z<p.length;z++)p[z](w);mxStencilRegistry.loadStencilSet(e,mxUtils.bind(this,function(C,E,D,G,K){(null==h||0>mxUtils.indexOf(h,E))&&w.appendChild(this.createVertexTemplate("shape="+C+E.toLowerCase()+f,Math.round(G*g),Math.round(K*g),"",E.replace(/_/g," "),!0))}),!0)}))};
Sidebar.prototype.destroy=function(){null!=this.graph&&(null!=this.graph.container&&null!=this.graph.container.parentNode&&this.graph.container.parentNode.removeChild(this.graph.container),this.graph.destroy(),this.graph=null);null!=this.escapeListener&&(this.editorUi.editor.graph.removeListener(this.escapeListener),this.escapeListener=null);null!=this.pointerUpHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerup":"mouseup",this.pointerUpHandler),this.pointerUpHandler=null);null!=
this.pointerDownHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerdown":"mousedown",this.pointerDownHandler),this.pointerDownHandler=null);null!=this.pointerMoveHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointermove":"mousemove",this.pointerMoveHandler),this.pointerMoveHandler=null);null!=this.pointerOutHandler&&(mxEvent.removeListener(document,mxClient.IS_POINTER?"pointerout":"mouseout",this.pointerOutHandler),this.pointerOutHandler=null)};(function(){var a=[["nbsp","160"],["shy","173"]],b=mxUtils.parseXml;mxUtils.parseXml=function(f){for(var h=0;h<a.length;h++)f=f.replace(new RegExp("&"+a[h][0]+";","g"),"&#"+a[h][1]+";");return b(f)};var e=mxUtils.getSizeForString;mxUtils.getSizeForString=function(f,h,d,g){return e(Graph.sanitizeHtml(f),h,d,g)}})();
Date.prototype.toISOString||function(){function a(b){b=String(b);1===b.length&&(b="0"+b);return b}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
@@ -2527,39 +2528,39 @@ mxImageShape.prototype.getImageDataUri=function(){var a=String(this.image);if("d
(function(){var a=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(b,e,f,h,d){return"default"==h&&null!=d?"fillcolor"==f.nodeName?d.shapeBackgroundColor:d.shapeForegroundColor:a.apply(this,arguments)}})();(function(){var a=mxResources.get;mxResources.get=function(b,e,f){null==f&&(f=b);return a.apply(this,[b,e,f])}})();
(function(){var a=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(b,e,f,h,d,g,m,p){var k=a.apply(this,arguments);if(null!=e){var u=k.getElementsByTagName("img");0<u.length&&(u[0].className="geToolbarButton geAdaptiveAsset",u[0].style.margin="4px",u[0].style.width="18px")}return k}})();
Graph=function(a,b,e,f,h,d){mxGraph.call(this,a,b,e,f);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=d?d:!1;a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(O){O=this.getCurrentCellStyle(O);
-return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var g=null,m=null,p=null,k=null,u=!1,x=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){O=Z.getProperty("event");var ca=O.getState();Z=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=ca&&(x=this.isCellSelected(ca.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent()))){var W=this.selectionCellsHandler.getHandler(ca.cell);
-if(null==W||null==W.getHandleForEvent(O)){var ja=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),H=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;W=H+2;ja.grow(H);if(this.isTableCell(ca.cell)&&this.isCellMovable(ca.cell)&&!this.isCellSelected(ca.cell)&&!(mxUtils.contains(ca,O.getGraphX()-W,O.getGraphY()-W)&&mxUtils.contains(ca,O.getGraphX()-W,O.getGraphY()+W)&&mxUtils.contains(ca,O.getGraphX()+W,O.getGraphY()+W)&&mxUtils.contains(ca,
-O.getGraphX()+W,O.getGraphY()-W))){var ea=this.model.getParent(ca.cell);W=this.model.getParent(ea);if(!this.isCellSelected(W)){H*=Z;var oa=2*H;if(this.model.getChildAt(W,0)!=ea&&mxUtils.intersects(ja,new mxRectangle(ca.x,ca.y-H,ca.width,oa))||this.model.getChildAt(ea,0)!=ca.cell&&mxUtils.intersects(ja,new mxRectangle(ca.x-H,ca.y,oa,ca.height))||mxUtils.intersects(ja,new mxRectangle(ca.x,ca.y+ca.height-H,ca.width,oa))||mxUtils.intersects(ja,new mxRectangle(ca.x+ca.width-H,ca.y,oa,ca.height)))ea=this.selectionCellsHandler.isHandled(W),
-this.selectCellForEvent(W,O.getEvent()),W=this.selectionCellsHandler.getHandler(W),null!=W&&(H=W.getHandleForEvent(O),null!=H&&(W.start(O.getGraphX(),O.getGraphY(),H),W.blockDelayedSelection=!ea,O.consume()))}}for(;!O.isConsumed()&&null!=ca&&(this.isTableCell(ca.cell)||this.isTableRow(ca.cell)||this.isTable(ca.cell));)this.isSwimlane(ca.cell)&&this.isCellMovable(ca.cell)&&(W=this.getActualStartSize(ca.cell),(0<W.x||0<W.width)&&mxUtils.intersects(ja,new mxRectangle(ca.x+(W.x-W.width-1)*Z+(0==W.x?ca.width:
-0),ca.y,1,ca.height))||(0<W.y||0<W.height)&&mxUtils.intersects(ja,new mxRectangle(ca.x,ca.y+(W.y-W.height-1)*Z+(0==W.y?ca.height:0),ca.width,1)))&&(this.selectCellForEvent(ca.cell,O.getEvent()),W=this.selectionCellsHandler.getHandler(ca.cell),null!=W&&null!=W.customHandles&&(H=mxEvent.CUSTOM_HANDLE-W.customHandles.length+1,W.start(O.getGraphX(),O.getGraphY(),H),O.consume())),ca=this.view.getState(this.model.getParent(ca.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(O,
-Z){if("mouseDown"==Z.getProperty("eventName")&&this.isEnabled()){O=Z.getProperty("event");var ca=O.getState();mxEvent.isAltDown(O.getEvent())||mxEvent.isControlDown(Z)||mxEvent.isShiftDown(Z)||x||null==ca||!this.model.isEdge(ca.cell)||(g=new mxPoint(O.getGraphX(),O.getGraphY()),u=this.isCellSelected(ca.cell),p=ca,m=O,null!=ca.text&&null!=ca.text.boundingBox&&mxUtils.contains(ca.text.boundingBox,O.getGraphX(),O.getGraphY())?k=mxEvent.LABEL_HANDLE:(Z=this.selectionCellsHandler.getHandler(ca.cell),null!=
-Z&&null!=Z.bends&&0<Z.bends.length&&(k=Z.getHandleForEvent(O))))}}));this.addMouseListener({mouseDown:function(O,Z){},mouseMove:mxUtils.bind(this,function(O,Z){O=this.selectionCellsHandler.handlers.map;for(var ca in O)if(null!=O[ca].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(Z.getEvent())){var W=this.tolerance;if(null!=g&&null!=p&&null!=m){if(ca=p,null!=k||Math.abs(g.x-Z.getGraphX())>W||Math.abs(g.y-Z.getGraphY())>W){var ja=null;mxEvent.isShiftDown(Z.getEvent())||
-(ja=this.selectionCellsHandler.getHandler(ca.cell));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){ja.redrawHandles();var H=null!=k?k:ja.getHandleForEvent(m),ea=this.view.getEdgeStyle(ca),oa=ea==mxEdgeStyle.EntityRelation;W=ca.absolutePoints;u||(H=k);H!=mxEvent.LABEL_HANDLE&&null!=W&&(H=k,null==H&&(O=new mxRectangle(g.x,g.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,W[0].x,W[0].y)?H=0:mxUtils.contains(O,W[W.length-1].x,W[W.length-1].y)?H=ja.bends.length-1:null!=W&&(null==
-ea&&null==H||ea==mxEdgeStyle.SegmentConnector||ea==mxEdgeStyle.OrthConnector)&&(null!=ea&&(2==W.length||3==W.length&&(0==Math.round(W[0].x-W[1].x)&&0==Math.round(W[1].x-W[2].x)||0==Math.round(W[0].y-W[1].y)&&0==Math.round(W[1].y-W[2].y)))?H=2:(H=mxUtils.findNearestSegment(ca,g.x,g.y),H=null==ea?mxEvent.VIRTUAL_HANDLE-H:H+1))),null==H&&(H=mxEvent.VIRTUAL_HANDLE));O=H==mxEvent.LABEL_HANDLE||0==H||H==ja.bends.length-1;if(!oa&&(null!=ca.visibleSourceState||null!=ca.visibleTargetState)||O)ja.start(Z.getGraphX(),
-Z.getGraphX(),H),Z.consume(),this.graphHandler.reset()}null!=ja&&(this.selectionCellsHandler.isHandlerActive(ja)?this.isCellSelected(ca.cell)||(this.selectionCellsHandler.handlers.put(ca.cell,ja),this.selectCellForEvent(ca.cell,Z.getEvent())):this.isCellSelected(ca.cell)||ja.destroy());u=!1;g=m=p=k=null}}else if(ca=Z.getState(),null!=ca&&this.isCellEditable(ca.cell)){O=this.model.getParent(ca.cell);ja=null;if(this.model.isEdge(ca.cell)&&!this.isCellSelected(ca.cell)&&!mxEvent.isAltDown(Z.getEvent())&&
-!mxEvent.isShiftDown(Z.getEvent())&&!this.isAncestorSelected(ca.cell)&&(this.isSwimlane(O)||this.model.isLayer(O)||this.getCurrentRoot()==O)){if(O=new mxRectangle(Z.getGraphX(),Z.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),W=ca.absolutePoints,null!=W)null!=ca.text&&null!=ca.text.boundingBox&&mxUtils.contains(ca.text.boundingBox,Z.getGraphX(),Z.getGraphY())?ja="move":mxUtils.contains(O,W[0].x,W[0].y)||mxUtils.contains(O,W[W.length-1].x,W[W.length-1].y)?ja="pointer":(ea=this.view.getEdgeStyle(ca),
-ea==mxEdgeStyle.EntityRelation||null==ca.visibleSourceState&&null==ca.visibleTargetState||(ja="crosshair",ea!=mxEdgeStyle.SegmentConnector&&ea!=mxEdgeStyle.OrthConnector))||(Z=mxUtils.findNearestSegment(ca,Z.getGraphX(),Z.getGraphY()),Z<W.length-1&&0<=Z&&(ja=0==Math.round(W[Z].x-W[Z+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(Z.getEvent())){W=mxShape.prototype.svgStrokeTolerance/2;O=new mxRectangle(Z.getGraphX(),Z.getGraphY());O.grow(W);if(this.isTableCell(ca.cell)&&this.isCellMovable(ca.cell)&&
-(Z=this.model.getParent(ca.cell),W=this.model.getParent(Z),!this.isCellSelected(W)))if(mxUtils.intersects(O,new mxRectangle(ca.x,ca.y-2,ca.width,4))&&this.model.getChildAt(W,0)!=Z||mxUtils.intersects(O,new mxRectangle(ca.x,ca.y+ca.height-2,ca.width,4)))ja="row-resize";else if(mxUtils.intersects(O,new mxRectangle(ca.x-2,ca.y,4,ca.height))&&this.model.getChildAt(Z,0)!=ca.cell||mxUtils.intersects(O,new mxRectangle(ca.x+ca.width-2,ca.y,4,ca.height)))ja="col-resize";for(Z=ca;null==ja&&null!=Z&&(this.isTableCell(Z.cell)||
-this.isTableRow(Z.cell)||this.isTable(Z.cell));)this.isSwimlane(Z.cell)&&this.isCellMovable(Z.cell)&&(W=this.getActualStartSize(Z.cell),H=this.view.scale,(0<W.x||0<W.width)&&mxUtils.intersects(O,new mxRectangle(Z.x+(W.x-W.width-1)*H+(0==W.x?Z.width*H:0),Z.y,1,Z.height))?ja="col-resize":(0<W.y||0<W.height)&&mxUtils.intersects(O,new mxRectangle(Z.x,Z.y+(W.y-W.height-1)*H+(0==W.y?Z.height:0),Z.width,1))&&(ja="row-resize")),Z=this.view.getState(this.model.getParent(Z.cell))}null!=ja&&ca.setCursor(ja)}}}),
-mouseUp:mxUtils.bind(this,function(O,Z){k=g=m=p=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(O){var Z=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&("0"==mxUtils.getValue(O.style,"html","0")?Z=mxUtils.htmlEntities(Z,!1):(O.lastLabelValue!=Z&&(O.lastLabelValue=Z,O.lastSanitizedLabelValue=Graph.sanitizeHtml(Z),z.innerHTML=O.lastSanitizedLabelValue,Graph.addLightDarkColors(z,
-null,"simple"==O.view.graph.getAdaptiveColors())&&(O.lastSanitizedLabelValue=z.innerHTML)),Z=O.lastSanitizedLabelValue));return Z};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);
-this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(O,Z){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=C.apply(this,arguments);if(this.graph.pageVisible){var Z=[],ca=this.graph.pageFormat,W=this.graph.pageScale,ja=ca.width*W;ca=ca.height*W;W=this.graph.view.translate;for(var H=this.graph.view.scale,ea=this.graph.getPageLayout(),oa=0;oa<ea.width;oa++)Z.push(new mxRectangle(((ea.x+
-oa)*ja+W.x)*H,(ea.y*ca+W.y)*H,ja*H,ca*H));for(oa=1;oa<ea.height;oa++)Z.push(new mxRectangle((ea.x*ja+W.x)*H,((ea.y+oa)*ca+W.y)*H,ja*H,ca*H));O=Z.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,Z){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(O){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,
-arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var Z=E.apply(this,arguments),ca=new mxDictionary,W=[],ja=0;ja<Z.length;ja++){var H=this.graph.isTableCell(O)&&this.graph.isTableCell(Z[ja])&&this.graph.isCellSelected(Z[ja])?this.graph.model.getParent(Z[ja]):this.graph.isTableRow(O)&&this.graph.isTableRow(Z[ja])&&this.graph.isCellSelected(Z[ja])?Z[ja]:this.graph.getCompositeParent(Z[ja]);null==H||ca.get(H)||(ca.put(H,!0),W.push(H))}return W};var D=this.graphHandler.start;
-this.graphHandler.start=function(O,Z,ca,W){var ja=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?ja=!0:O=this.graph.model.getParent(O));ja||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,Z){Z=this.graph.getCompositeParent(Z);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,Z,ca,W,ja,H){var ea=
-mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=W&&this.graph.applyNewEdgeStyle(W,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var I=(new Date).getTime(),L=0,T=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;T.apply(this,arguments);O!=this.currentState?(I=(new Date).getTime(),L=0):L=(new Date).getTime()-I};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
-function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var Y=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return Y.apply(this,arguments)||
-mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var Q=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(Q=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=Q)}));this.popupMenuHandler.autoExpand=
-!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};var P=this.click;this.click=function(O){var Z=null==O.state&&null!=O.sourceState&&this.isCellLocked(this.getLayerForCell(O.sourceState.cell));if(this.isEnabled()&&!Z||O.isConsumed())return P.apply(this,arguments);var ca=Z?O.sourceState.cell:O.getCell();if(null!=ca){var W=this.getClickableLinkForCell(ca);null!=W?this.isCustomLink(W)?this.customLinkClicked(W,ca):this.openLink(W):Z&&this.clearSelection()}};
-this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var M=this.tooltipHandler.show;this.tooltipHandler.show=function(){M.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),Z=0;Z<O.length;Z++)null!=O[Z].getAttribute("href")&&null==O[Z].getAttribute("target")&&O[Z].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var Z=null==O.state&&null!=O.sourceState&&
-this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(Z?O.sourceState.cell:O.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return V.apply(this,arguments)};this.selectRegion=function(O,Z){var ca=mxEvent.isAltDown(Z)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,ca,null,!0);if(this.isToggleEvent(Z))for(ca=0;ca<
-O.length;ca++)this.selectCellForEvent(O[ca],Z);else this.selectCellsForEvent(O,Z);return O};var aa=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,Z,ca){return this.graph.isCellSelected(O)?!1:aa.apply(this,arguments)};var ia=this.updateMouseEvent;this.updateMouseEvent=function(O){O=ia.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),
-O.getGraphY(),null,null,null,mxUtils.bind(this,function(Z,ca,W){return O.state==Z||this.isCellLocked(this.getLayerForCell(Z.cell))&&null==this.getLinkForCell(Z.cell)}))):O.state=null);return O};var na=this.isCellSelectable;this.isCellSelectable=function(O){return na.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var qa=null;
-this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,Z){"mouseDown"==Z.getProperty("eventName")&&(O=Z.getProperty("event").getState(),qa=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,Z){if(!mxEvent.isMultiTouchEvent(Z)){O=Z.getProperty("event");var ca=Z.getProperty("cell");null==ca?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),
-G.start(O.x,O.y)):null!=qa?this.addSelectionCells(qa):1<this.getSelectionCount()&&this.isCellSelected(ca)&&this.removeSelectionCell(ca);qa=null;Z.consume()}}));this.connectionHandler.selectCells=function(O,Z){this.graph.setSelectionCell(Z||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,Z){var ca=O.view.graph;return Z&&(ca.isCellSelected(O.cell)||ca.isTableRow(O.cell)&&ca.selectionCellsHandler.isHandled(ca.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
-Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
-Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";
+return null!=O?"1"==O.html||"wrap"==O[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var g=null,m=null,p=null,k=null,u=!1,w=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,X){if("mouseDown"==X.getProperty("eventName")&&this.isEnabled()){O=X.getProperty("event");var ba=O.getState();X=this.view.scale;if(!mxEvent.isAltDown(O.getEvent())&&null!=ba&&(w=this.isCellSelected(ba.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(O.getEvent()))){var da=this.selectionCellsHandler.getHandler(ba.cell);
+if(null==da||null==da.getHandleForEvent(O)){var ca=new mxRectangle(O.getGraphX()-1,O.getGraphY()-1),H=mxEvent.isTouchEvent(O.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;da=H+2;ca.grow(H);if(this.isTableCell(ba.cell)&&this.isCellMovable(ba.cell)&&!this.isCellSelected(ba.cell)&&!(mxUtils.contains(ba,O.getGraphX()-da,O.getGraphY()-da)&&mxUtils.contains(ba,O.getGraphX()-da,O.getGraphY()+da)&&mxUtils.contains(ba,O.getGraphX()+da,O.getGraphY()+da)&&mxUtils.contains(ba,
+O.getGraphX()+da,O.getGraphY()-da))){var ea=this.model.getParent(ba.cell);da=this.model.getParent(ea);if(!this.isCellSelected(da)){H*=X;var ra=2*H;if(this.model.getChildAt(da,0)!=ea&&mxUtils.intersects(ca,new mxRectangle(ba.x,ba.y-H,ba.width,ra))||this.model.getChildAt(ea,0)!=ba.cell&&mxUtils.intersects(ca,new mxRectangle(ba.x-H,ba.y,ra,ba.height))||mxUtils.intersects(ca,new mxRectangle(ba.x,ba.y+ba.height-H,ba.width,ra))||mxUtils.intersects(ca,new mxRectangle(ba.x+ba.width-H,ba.y,ra,ba.height)))ea=
+this.selectionCellsHandler.isHandled(da),this.selectCellForEvent(da,O.getEvent()),da=this.selectionCellsHandler.getHandler(da),null!=da&&(H=da.getHandleForEvent(O),null!=H&&(da.start(O.getGraphX(),O.getGraphY(),H),da.blockDelayedSelection=!ea,O.consume()))}}for(;!O.isConsumed()&&null!=ba&&(this.isTableCell(ba.cell)||this.isTableRow(ba.cell)||this.isTable(ba.cell));)this.isSwimlane(ba.cell)&&this.isCellMovable(ba.cell)&&(da=this.getActualStartSize(ba.cell),(0<da.x||0<da.width)&&mxUtils.intersects(ca,
+new mxRectangle(ba.x+(da.x-da.width-1)*X+(0==da.x?ba.width:0),ba.y,1,ba.height))||(0<da.y||0<da.height)&&mxUtils.intersects(ca,new mxRectangle(ba.x,ba.y+(da.y-da.height-1)*X+(0==da.y?ba.height:0),ba.width,1)))&&(this.selectCellForEvent(ba.cell,O.getEvent()),da=this.selectionCellsHandler.getHandler(ba.cell),null!=da&&null!=da.customHandles&&(H=mxEvent.CUSTOM_HANDLE-da.customHandles.length+1,da.start(O.getGraphX(),O.getGraphY(),H),O.consume())),ba=this.view.getState(this.model.getParent(ba.cell))}}}}));
+this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(O,X){if("mouseDown"==X.getProperty("eventName")&&this.isEnabled()){O=X.getProperty("event");var ba=O.getState();mxEvent.isAltDown(O.getEvent())||mxEvent.isControlDown(X)||mxEvent.isShiftDown(X)||w||null==ba||!this.model.isEdge(ba.cell)||(g=new mxPoint(O.getGraphX(),O.getGraphY()),u=this.isCellSelected(ba.cell),p=ba,m=O,null!=ba.text&&null!=ba.text.boundingBox&&mxUtils.contains(ba.text.boundingBox,O.getGraphX(),O.getGraphY())?
+k=mxEvent.LABEL_HANDLE:(X=this.selectionCellsHandler.getHandler(ba.cell),null!=X&&null!=X.bends&&0<X.bends.length&&(k=X.getHandleForEvent(O))))}}));this.addMouseListener({mouseDown:function(O,X){},mouseMove:mxUtils.bind(this,function(O,X){O=this.selectionCellsHandler.handlers.map;for(var ba in O)if(null!=O[ba].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(X.getEvent())){var da=this.tolerance;if(null!=g&&null!=p&&null!=m){if(ba=p,null!=k||Math.abs(g.x-X.getGraphX())>
+da||Math.abs(g.y-X.getGraphY())>da){var ca=null;mxEvent.isShiftDown(X.getEvent())||(ca=this.selectionCellsHandler.getHandler(ba.cell));if(null!=ca&&null!=ca.bends&&0<ca.bends.length){ca.redrawHandles();var H=null!=k?k:ca.getHandleForEvent(m),ea=this.view.getEdgeStyle(ba),ra=ea==mxEdgeStyle.EntityRelation;da=ba.absolutePoints;u||(H=k);H!=mxEvent.LABEL_HANDLE&&null!=da&&(H=k,null==H&&(O=new mxRectangle(g.x,g.y),O.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(O,da[0].x,da[0].y)?
+H=0:mxUtils.contains(O,da[da.length-1].x,da[da.length-1].y)?H=ca.bends.length-1:null!=da&&(null==ea&&null==H||ea==mxEdgeStyle.SegmentConnector||ea==mxEdgeStyle.OrthConnector)&&(null!=ea&&(2==da.length||3==da.length&&(0==Math.round(da[0].x-da[1].x)&&0==Math.round(da[1].x-da[2].x)||0==Math.round(da[0].y-da[1].y)&&0==Math.round(da[1].y-da[2].y)))?H=2:(H=mxUtils.findNearestSegment(ba,g.x,g.y),H=null==ea?mxEvent.VIRTUAL_HANDLE-H:H+1))),null==H&&(H=mxEvent.VIRTUAL_HANDLE));O=H==mxEvent.LABEL_HANDLE||0==
+H||H==ca.bends.length-1;if(!ra&&(null!=ba.visibleSourceState||null!=ba.visibleTargetState)||O)ca.start(X.getGraphX(),X.getGraphX(),H),X.consume(),this.graphHandler.reset()}null!=ca&&(this.selectionCellsHandler.isHandlerActive(ca)?this.isCellSelected(ba.cell)||(this.selectionCellsHandler.handlers.put(ba.cell,ca),this.selectCellForEvent(ba.cell,X.getEvent())):this.isCellSelected(ba.cell)||ca.destroy());u=!1;g=m=p=k=null}}else if(ba=X.getState(),null!=ba&&this.isCellEditable(ba.cell)){O=this.model.getParent(ba.cell);
+ca=null;if(this.model.isEdge(ba.cell)&&!this.isCellSelected(ba.cell)&&!mxEvent.isAltDown(X.getEvent())&&!mxEvent.isShiftDown(X.getEvent())&&!this.isAncestorSelected(ba.cell)&&(this.isSwimlane(O)||this.model.isLayer(O)||this.getCurrentRoot()==O)){if(O=new mxRectangle(X.getGraphX(),X.getGraphY()),O.grow(mxEdgeHandler.prototype.handleImage.width/2),da=ba.absolutePoints,null!=da)null!=ba.text&&null!=ba.text.boundingBox&&mxUtils.contains(ba.text.boundingBox,X.getGraphX(),X.getGraphY())?ca="move":mxUtils.contains(O,
+da[0].x,da[0].y)||mxUtils.contains(O,da[da.length-1].x,da[da.length-1].y)?ca="pointer":(ea=this.view.getEdgeStyle(ba),ea==mxEdgeStyle.EntityRelation||null==ba.visibleSourceState&&null==ba.visibleTargetState||(ca="crosshair",ea!=mxEdgeStyle.SegmentConnector&&ea!=mxEdgeStyle.OrthConnector))||(X=mxUtils.findNearestSegment(ba,X.getGraphX(),X.getGraphY()),X<da.length-1&&0<=X&&(ca=0==Math.round(da[X].x-da[X+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(X.getEvent())){da=mxShape.prototype.svgStrokeTolerance/
+2;O=new mxRectangle(X.getGraphX(),X.getGraphY());O.grow(da);if(this.isTableCell(ba.cell)&&this.isCellMovable(ba.cell)&&(X=this.model.getParent(ba.cell),da=this.model.getParent(X),!this.isCellSelected(da)))if(mxUtils.intersects(O,new mxRectangle(ba.x,ba.y-2,ba.width,4))&&this.model.getChildAt(da,0)!=X||mxUtils.intersects(O,new mxRectangle(ba.x,ba.y+ba.height-2,ba.width,4)))ca="row-resize";else if(mxUtils.intersects(O,new mxRectangle(ba.x-2,ba.y,4,ba.height))&&this.model.getChildAt(X,0)!=ba.cell||mxUtils.intersects(O,
+new mxRectangle(ba.x+ba.width-2,ba.y,4,ba.height)))ca="col-resize";for(X=ba;null==ca&&null!=X&&(this.isTableCell(X.cell)||this.isTableRow(X.cell)||this.isTable(X.cell));)this.isSwimlane(X.cell)&&this.isCellMovable(X.cell)&&(da=this.getActualStartSize(X.cell),H=this.view.scale,(0<da.x||0<da.width)&&mxUtils.intersects(O,new mxRectangle(X.x+(da.x-da.width-1)*H+(0==da.x?X.width*H:0),X.y,1,X.height))?ca="col-resize":(0<da.y||0<da.height)&&mxUtils.intersects(O,new mxRectangle(X.x,X.y+(da.y-da.height-1)*
+H+(0==da.y?X.height:0),X.width,1))&&(ca="row-resize")),X=this.view.getState(this.model.getParent(X.cell))}null!=ca&&ba.setCursor(ca)}}}),mouseUp:mxUtils.bind(this,function(O,X){k=g=m=p=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var z=document.createElement("div");this.cellRenderer.getLabelValue=function(O){var X=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);O.view.graph.isHtmlLabel(O.cell)&&("0"==mxUtils.getValue(O.style,"html","0")?X=mxUtils.htmlEntities(X,!1):(O.lastLabelValue!=
+X&&(O.lastLabelValue=X,O.lastSanitizedLabelValue=Graph.sanitizeHtml(X),z.innerHTML=O.lastSanitizedLabelValue,Graph.addLightDarkColors(z,null,"simple"==O.view.graph.getAdaptiveColors())&&(O.lastSanitizedLabelValue=z.innerHTML)),X=O.lastSanitizedLabelValue));return X};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=
+!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(O,X){return!1};this.alternateEdgeStyle="vertical";null==f&&this.loadStylesheet();var C=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var O=C.apply(this,arguments);if(this.graph.pageVisible){var X=[],ba=this.graph.pageFormat,da=this.graph.pageScale,ca=ba.width*da;ba=ba.height*
+da;da=this.graph.view.translate;for(var H=this.graph.view.scale,ea=this.graph.getPageLayout(),ra=0;ra<ea.width;ra++)X.push(new mxRectangle(((ea.x+ra)*ca+da.x)*H,(ea.y*ba+da.y)*H,ca*H,ba*H));for(ra=1;ra<ea.height;ra++)X.push(new mxRectangle((ea.x*ca+da.x)*H,((ea.y+ra)*ba+da.y)*H,ca*H,ba*H));O=X.concat(O)}return O};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(O,X){return null==O.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
+function(O){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var E=this.graphHandler.getCells;this.graphHandler.getCells=function(O){for(var X=E.apply(this,arguments),ba=new mxDictionary,da=[],ca=0;ca<X.length;ca++){var H=this.graph.isTableCell(O)&&this.graph.isTableCell(X[ca])&&this.graph.isCellSelected(X[ca])?this.graph.model.getParent(X[ca]):this.graph.isTableRow(O)&&this.graph.isTableRow(X[ca])&&
+this.graph.isCellSelected(X[ca])?X[ca]:this.graph.getCompositeParent(X[ca]);null==H||ba.get(H)||(ba.put(H,!0),da.push(H))}return da};var D=this.graphHandler.start;this.graphHandler.start=function(O,X,ba,da){var ca=!1;this.graph.isTableCell(O)&&(this.graph.isCellSelected(O)?ca=!0:O=this.graph.model.getParent(O));ca||this.graph.isTableRow(O)&&this.graph.isCellSelected(O)||(O=this.graph.getCompositeParent(O));D.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(O,X){X=this.graph.getCompositeParent(X);
+return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(O,X,ba,da,ca,H){var ea=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=da&&this.graph.applyNewEdgeStyle(da,[ea]);return ea};var G=new mxRubberband(this);this.getRubberband=function(){return G};var K=(new Date).getTime(),L=0,Q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var O=this.currentState;Q.apply(this,arguments);O!=this.currentState?
+(K=(new Date).getTime(),L=0):L=(new Date).getTime()-K};var N=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(O){return mxEvent.isShiftDown(O.getEvent())&&mxEvent.isAltDown(O.getEvent())?!1:null!=this.currentState&&O.getState()==this.currentState&&2E3<L||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&N.apply(this,arguments)};var U=this.isToggleEvent;this.isToggleEvent=function(O){return U.apply(this,
+arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O)};var Y=G.isForceRubberbandEvent;G.isForceRubberbandEvent=function(O){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(O.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==O.getState()&&mxEvent.isTouchEvent(O.getEvent())};var P=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(P=this.container.style.cursor,this.container.style.cursor=
+"move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=P)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(O){return mxEvent.isMouseEvent(O.getEvent())};var T=this.click;this.click=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(this.getLayerForCell(O.sourceState.cell));if(this.isEnabled()&&!X||O.isConsumed())return T.apply(this,arguments);var ba=X?O.sourceState.cell:
+O.getCell();if(null!=ba){var da=this.getClickableLinkForCell(ba);null!=da?this.isCustomLink(da)?this.customLinkClicked(da,ba):this.openLink(da):X&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};var J=this.tooltipHandler.show;this.tooltipHandler.show=function(){J.apply(this,arguments);if(null!=this.div)for(var O=this.div.getElementsByTagName("a"),X=0;X<O.length;X++)null!=O[X].getAttribute("href")&&null==O[X].getAttribute("target")&&O[X].setAttribute("target",
+"_blank")};this.tooltipHandler.getStateForEvent=function(O){return O.sourceState};this.getCursorForMouseEvent=function(O){var X=null==O.state&&null!=O.sourceState&&this.isCellLocked(O.sourceState.cell);return this.getCursorForCell(X?O.sourceState.cell:O.getCell())};var V=this.getCursorForCell;this.getCursorForCell=function(O){if(!this.isEnabled()||this.isCellLocked(O)){if(null!=this.getClickableLinkForCell(O))return"pointer";if(this.isCellLocked(O))return"default"}return V.apply(this,arguments)};
+this.selectRegion=function(O,X){var ba=mxEvent.isAltDown(X)?O:null;O=this.getCells(O.x,O.y,O.width,O.height,null,null,ba,null,!0);if(this.isToggleEvent(X))for(ba=0;ba<O.length;ba++)this.selectCellForEvent(O[ba],X);else this.selectCellsForEvent(O,X);return O};var Z=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(O,X,ba){return this.graph.isCellSelected(O)?!1:Z.apply(this,arguments)};var ia=this.updateMouseEvent;this.updateMouseEvent=function(O){O=
+ia.apply(this,arguments);null!=O.state&&this.isCellLocked(this.getLayerForCell(O.getCell()))&&(null==this.getLinkForCell(O.getCell())?O.state=this.view.getState(this.getCellAt(O.getGraphX(),O.getGraphY(),null,null,null,mxUtils.bind(this,function(X,ba,da){return O.state==X||this.isCellLocked(this.getLayerForCell(X.cell))&&null==this.getLinkForCell(X.cell)}))):O.state=null);return O};var oa=this.isCellSelectable;this.isCellSelectable=function(O){return oa.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(O))};
+this.isCellLocked=function(O){for(;null!=O;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(O),"locked","0"))return!0;O=this.model.getParent(O)}return!1};var sa=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(O,X){"mouseDown"==X.getProperty("eventName")&&(O=X.getProperty("event").getState(),sa=null==O||this.isSelectionEmpty()||this.isCellSelected(O.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(O,X){if(!mxEvent.isMultiTouchEvent(X)){O=
+X.getProperty("event");var ba=X.getProperty("cell");null==ba?(O=mxUtils.convertPoint(this.container,mxEvent.getClientX(O),mxEvent.getClientY(O)),G.start(O.x,O.y)):null!=sa?this.addSelectionCells(sa):1<this.getSelectionCount()&&this.isCellSelected(ba)&&this.removeSelectionCell(ba);sa=null;X.consume()}}));this.connectionHandler.selectCells=function(O,X){this.graph.setSelectionCell(X||O)};this.connectionHandler.constraintHandler.isStateIgnored=function(O,X){var ba=O.view.graph;return X&&(ba.isCellSelected(O.cell)||
+ba.isTableRow(O.cell)&&ba.selectionCellsHandler.isHandled(ba.model.getParent(O.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var O=this.connectionHandler.constraintHandler;null!=O.currentFocus&&O.isStateIgnored(O.currentFocus,!0)&&(O.currentFocus=null,O.constraints=null,O.destroyIcons());O.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch()}this.currentTranslate=new mxPoint(0,0)};
+Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
+Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.selectParentLayer=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.drawio.com/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than draw.io --\x3e";
Graph.colorStyles=[mxConstants.STYLE_FONTCOLOR,mxConstants.STYLE_FILLCOLOR,mxConstants.STYLE_GRADIENTCOLOR,mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_IMAGE_BORDER,mxConstants.STYLE_IMAGE_BACKGROUND,mxConstants.STYLE_LABEL_BORDERCOLOR,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR];Graph.textStyles="fontFamily fontSource fontSize fontColor fontStyle textOpacity labelBorderColor labelBackgroundColor autosize resizable".split(" ");Graph.edgeStyles="edgeStyle elbow jumpStyle jumpSize startArrow startFill startSize endArrow endFill endSize flowAnimation flowAnimationDirection flowAnimationTimingFunction flowAnimationDuration sourcePerimeterSpacing targetPerimeterSpacing curved".split(" ");
Graph.cellStyleGroups=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["fillColor","gradientColor","gradientDirection"]];
Graph.cellStyles=mxUtils.addItems(mxUtils.addItems(mxUtils.addItems("rounded shadow glass dashed dashPattern comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents opacity strokeColor strokeWidth align verticalAlign spacingLeft spacingRight spacingTop spacingBottom spacing arcSize comicStyle swimlaneFillColor shadowOffsetX shadowOffsetY shadowBlur shadowColor shadowOpacity".split(" "),Graph.textStyles),
@@ -2572,8 +2573,8 @@ Graph.createSvgNode=function(a,b,e,f,h){var d=mxUtils.createXmlDocument(),g=null
e+"px");g.setAttribute("height",f+"px");g.setAttribute("viewBox",a+" "+b+" "+e+" "+f);d.appendChild(g);return g};
Graph.htmlToPng=function(a,b,e,f,h,d){h=null!=h?h:"";d=null!=d?d:Editor.htmlRasterScale;var g=document.createElement("canvas");g.width=b*d;g.height=e*d;var m=document.createElement("img");m.onload=mxUtils.bind(this,function(){try{var k=g.getContext("2d");k.scale(d,d);k.drawImage(m,0,0);f(g.toDataURL())}catch(u){f(null)}});var p=mxUtils.createXmlDocument();p=null!=p.createElementNS?p.createElementNS(mxConstants.NS_SVG,"svg"):p.createElement("svg");a=(new mxSvgCanvas2D(p)).convertHtml(a);m.onerror=
function(k){f(null)};m.src="data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="'+b+'" height="'+e+'">'+(""!=h?'<defs xmlns="http://www.w3.org/2000/svg"><style type="text/css">'+h+"</style></defs>":"")+'<foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">'+a+"</div></foreignObject></svg>")};
-Graph.addLightDarkColors=function(a,b,e,f){function h(z,C,E){return null!=f?f(z,C,E):mxUtils.isValidColor(E)?(null==g&&null!=b&&(g={}),null!=g&&(g[C]=z.style.getPropertyValue(C)),E=mxUtils.getLightDarkColor(E,null,null,e),z.style.setProperty(C,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),g=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){g=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),x=d[p].style.getPropertyValue(u);m=h(d[p],u,x)||m}"FONT"==d[p].nodeName&&
-""==d[p].style.getPropertyValue("color")&&(x=d[p].getAttribute("color"),m=h(d[p],"color",x)||m);null!=b&&null!=g&&d[p].setAttribute(b,JSON.stringify(g))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var h=a[f].getAttribute(b);if(null!=h){a[f].removeAttribute(b);var d=JSON.parse(h),g;for(g in d){var m=d[g];""==m?(a[f].style[g]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[g]=m;e=!0}}}catch(p){}return e};
+Graph.addLightDarkColors=function(a,b,e,f){function h(z,C,E){return null!=f?f(z,C,E):mxUtils.isValidColor(E)?(null==g&&null!=b&&(g={}),null!=g&&(g[C]=z.style.getPropertyValue(C)),E=mxUtils.getLightDarkColor(E,null,null,e),z.style.setProperty(C,E.cssText),!0):!1}for(var d=a.getElementsByTagName("*"),g=null,m=!1,p=0;p<d.length;p++)if(d[p]!=a&&null!=d[p].style){g=null;for(var k=0;k<d[p].style.length;k++){var u=d[p].style.item(k),w=d[p].style.getPropertyValue(u);m=h(d[p],u,w)||m}"FONT"==d[p].nodeName&&
+""==d[p].style.getPropertyValue("color")&&(w=d[p].getAttribute("color"),m=h(d[p],"color",w)||m);null!=b&&null!=g&&d[p].setAttribute(b,JSON.stringify(g))}return m};Graph.removeLightDarkColors=function(a,b){a=a.getElementsByTagName("*");for(var e=!1,f=0;f<a.length;f++)try{var h=a[f].getAttribute(b);if(null!=h){a[f].removeAttribute(b);var d=JSON.parse(h),g;for(g in d){var m=d[g];""==m?(a[f].style[g]=null,""==a[f].getAttribute("style")&&a[f].removeAttribute("style")):a[f].style[g]=m;e=!0}}}catch(p){}return e};
Graph.getGivenColor=function(a,b){var e=null;if(a.nodeType==mxConstants.NODETYPE_ELEMENT){try{var f=a.getAttribute(Graph.backupStyleAttribute);if(null!=f){var h=JSON.parse(f);null!=h&&null!=h[b]&&("color"==b&&"FONT"==a.nodeName&&""==h[b]&&null!=a.getAttribute("color")?e=a.getAttribute("color"):""!=h[b]&&(e=h[b]))}}catch(d){}null==e&&""!=a.style[b]&&(e=a.style[b])}return e};
Graph.setTextColor=function(a,b,e){for(var f=e?Graph.newColorPlaceholder:Graph.newBackgroundPlaceholder,h=e?"color":"background-color",d=a.getElementsByTagName("*"),g=[],m=0;m<d.length;m++)g.push({node:d[m],value:d[m].style[h]});document.execCommand(e?"forecolor":"backcolor",!1,f);a=a.getElementsByTagName("*");for(m=0;m<a.length;m++){if(m<g.length&&g[m].node==a[m]&&g[m].value!=a[m].style[h]&&""==a[m].style[h])try{if(d=a[m].getAttribute(Graph.backupStyleAttribute),null!=d){var p=JSON.parse(d);p[h]=
"";a[m].setAttribute(Graph.backupStyleAttribute,JSON.stringify(p))}}catch(k){}if(e&&a[m].getAttribute("color")==f||a[m].style[h]==f){e&&a[m].getAttribute("color")==f&&a[m].removeAttribute("color");a[m].style[h]=b!=mxConstants.NONE?mxUtils.getLightDarkColor(b).cssText:null;try{d=a[m].getAttribute(Graph.backupStyleAttribute),p=null!=d?JSON.parse(d):{},p[h]=b!=mxConstants.NONE?b:"",a[m].setAttribute(Graph.backupStyleAttribute,JSON.stringify(p))}catch(k){}if(e&&mxClient.IS_FF){b=a[m];e=b.firstChild;if(null!=
@@ -2583,24 +2584,24 @@ Graph.arrayBufferToString=function(a){var b="";a=new Uint8Array(a);for(var e=a.b
Graph.arrayBufferIndexOfString=function(a,b,e){var f=b.charCodeAt(0),h=1,d=-1;for(e=e||0;e<a.byteLength;e++)if(a[e]==f){d=e;break}for(e=d+1;-1<d&&e<a.byteLength&&e<d+b.length-1;e++){if(a[e]!=b.charCodeAt(h))return Graph.arrayBufferIndexOfString(a,b,d+1);h++}return h==b.length-1?d:-1};Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=b?pako.deflate(encodeURIComponent(a)):pako.deflateRaw(encodeURIComponent(a));return btoa(Graph.arrayBufferToString(new Uint8Array(a)))};
Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=Graph.stringToArrayBuffer(atob(a));b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
Graph.fadeNodes=function(a,b,e,f,h){h=null!=h?h:1E3;Graph.setTransitionForNodes(a,null);Graph.setOpacityForNodes(a,b);window.setTimeout(function(){Graph.setTransitionForNodes(a,"all "+h+"ms ease-in-out");Graph.setOpacityForNodes(a,e);window.setTimeout(function(){Graph.setTransitionForNodes(a,null);null!=f&&f()},h)},0)};
-Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,x){if(u.getModel().isVertex(x)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=x.referenceCell||x;u.getModel().beginUpdate();try{for(var E=x.referenceCell||x,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),I=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&
-!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&I.push(G[L]);I=G=I;if(null!=x.startIndex||0<pageSize&&G.length>pageSize){var T=x.startIndex||0;I=G.slice(Math.max(0,T),Math.min(G.length,T+pageSize))}I=f.getOpposites(I,D).concat(I);var K=u.cloneCells(I);for(L=0;L<I.length;L++)if(K[L].sourceCellId=I[L].id,u.model.isEdge(K[L]))for(K[L].geometry.x=0,K[L].geometry.y=0,K[L].geometry.points=null,K[L].setStyle(K[L].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[L].setTerminal(E,null==K[L].getTerminal(!0)),D=0;D<K[L].getChildCount();D++){var U=K[L].getChildAt(D);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<x.startIndex){var Y=u.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((x.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Y.referenceCell=E;Y.startIndex=Math.max(0,(x.startIndex||0)-pageSize);K.splice(0,0,Y)}if(G.length>(x.startIndex||0)+pageSize){var Q=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((x.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Q.referenceCell=
-E;Q.startIndex=(x.startIndex||0)+pageSize;K.splice(0,0,Q)}for(var P in u.getModel().cells){var M=u.getModel().getCell(P);M!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,M)&&u.getModel().isVertex(M)&&u.removeCells([M])}u.addCells(K);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));x=[];for(P in u.getModel().cells)M=u.getModel().getCell(P),M!=u.rootCell&&u.getModel().isVertex(M)&&u.getModel().getParent(M)==u.getDefaultParent()&&
-(x.push(M),V=u.getModel().getGeometry(M),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var aa=x.length,ia=2*Math.PI/aa,na=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<aa;z++)V=u.getModel().getGeometry(x[z]),null!=V&&(V=V.clone(),V.x+=na*Math.sin(z*ia),V.y+=na*Math.cos(z*ia),u.getModel().setGeometry(x[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=
+Graph.exploreFromCell=function(a,b,e){pageSize=null!=e&&null!=e.pageSize?e.pageSize:8;minSize=null!=e&&null!=e.minSize?e.minSize:180;(function(f,h){function d(u,w){if(u.getModel().isVertex(w)){var z=u.container.scrollWidth/2,C=u.container.scrollHeight/2;u.rootCell=w.referenceCell||w;u.getModel().beginUpdate();try{for(var E=w.referenceCell||w,D=f.model.getCell(E.sourceCellId),G=f.getEdges(D,null,!0,!0,!1,!0),K=[],L=0;L<G.length;L++)null!=G[L].getTerminal(!0)&&null!=G[L].getTerminal(!1)&&f.isCellVisible(G[L])&&
+!f.isEdgeIgnored(G[L])&&f.isCellVisible(G[L].getTerminal(!0))&&f.isCellVisible(G[L].getTerminal(!1))&&f.isCellVisible(f.getLayerForCell(G[L]))&&K.push(G[L]);K=G=K;if(null!=w.startIndex||0<pageSize&&G.length>pageSize){var Q=w.startIndex||0;K=G.slice(Math.max(0,Q),Math.min(G.length,Q+pageSize))}K=f.getOpposites(K,D).concat(K);var N=u.cloneCells(K);for(L=0;L<K.length;L++)if(N[L].sourceCellId=K[L].id,u.model.isEdge(N[L]))for(N[L].geometry.x=0,N[L].geometry.y=0,N[L].geometry.points=null,N[L].setStyle(N[L].getStyle()+
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),N[L].setTerminal(E,null==N[L].getTerminal(!0)),D=0;D<N[L].getChildCount();D++){var U=N[L].getChildAt(D);null!=U.geometry&&U.geometry.relative&&(U.setStyle(U.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),U.geometry.offset=new mxPoint(0,0),U.geometry.y=0,U.geometry.x=.5>U.geometry.x?-.8:.5<U.geometry.x?.8:0)}if(0<w.startIndex){var Y=u.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((w.startIndex||0)/pageSize)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");Y.referenceCell=E;Y.startIndex=Math.max(0,(w.startIndex||0)-pageSize);N.splice(0,0,Y)}if(G.length>(w.startIndex||0)+pageSize){var P=u.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((w.startIndex||0)/pageSize)+2)+"/"+Math.ceil(G.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");P.referenceCell=
+E;P.startIndex=(w.startIndex||0)+pageSize;N.splice(0,0,P)}for(var T in u.getModel().cells){var J=u.getModel().getCell(T);J!=u.rootCell&&!u.getModel().isAncestor(u.rootCell,J)&&u.getModel().isVertex(J)&&u.removeCells([J])}u.addCells(N);var V=u.getModel().getGeometry(u.rootCell);null!=V&&(V=V.clone(),V.x=z-V.width/2,V.y=C-V.height/3,u.getModel().setGeometry(u.rootCell,V));w=[];for(T in u.getModel().cells)J=u.getModel().getCell(T),J!=u.rootCell&&u.getModel().isVertex(J)&&u.getModel().getParent(J)==u.getDefaultParent()&&
+(w.push(J),V=u.getModel().getGeometry(J),null!=V&&(V.x=z-V.width/2,V.y=C-V.height/2));var Z=w.length,ia=2*Math.PI/Z,oa=Math.max(minSize,Math.min(u.container.scrollWidth/2.5-80,u.container.scrollHeight/2.5-80));for(z=0;z<Z;z++)V=u.getModel().getGeometry(w[z]),null!=V&&(V=V.clone(),V.x+=oa*Math.sin(z*ia),V.y+=oa*Math.cos(z*ia),u.getModel().setGeometry(w[z],V))}finally{u.getModel().endUpdate()}}}var g=document.createElement("div");g.style.position="absolute";g.style.display="block";g.style.background=
Editor.isDarkMode()?Editor.darkColor:"#ffffff";g.style.width="100%";g.style.height="100%";g.style.left="0px";g.style.top="0px";g.style.zIndex=2;var m=document.createElement("img");m.setAttribute("src",Editor.closeBlackImage);m.style.position="absolute";m.style.cursor="pointer";m.style.right="10px";m.style.top="10px";g.appendChild(m);var p=document.createElement("div");p.style.position="absolute";p.style.cursor="pointer";p.style.right="38px";p.style.top="14px";p.style.textAlign="right";p.style.verticalAlign=
-"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var x=new Graph(u);x.keepEdgesInBackground=!0;x.isCellResizable=function(){return!1};x.isCellRotatable=function(){return!1};x.getCursorForCell=function(I){return this.model.isVertex(I)?"pointer":null};x.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,
-"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);x.setEnabled(!1);var C=x.click;x.click=function(I){var L=I.getCell(),T=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&x.rootCell!=L&&0<x.getEdges(T).length?d(x,L):C.apply(this,arguments)};z=x.container.scrollWidth/2;var E=x.container.scrollHeight/3;x.model.beginUpdate();var D=x.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;
-D.geometry.y=E-D.geometry.height/2;x.model.endUpdate();var G=!1;x.getModel().addListener(mxEvent.CHANGE,function(I,L){G||(I=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,x.labelsVisible=!1,G=!0,mxEffects.animateChanges(x,I,function(){var T=new mxParallelEdgeLayout(x);T.spacing=60;var K=T.layout;T.layout=function(U){T.spacing=Math.min(60,Math.max(30,60-5*U.length));K.apply(this,arguments)};T.execute(x.getDefaultParent());mxText.prototype.enableBoundingBox=!0;x.labelsVisible=!0;
-x.tooltipHandler.hide();x.refresh();G=!1}))});d(x,D)}else mxUtils.error("Browser is not supported!",200,!1)})(g)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
+"top";mxUtils.write(p,mxResources.get("close"));g.appendChild(p);document.body.appendChild(g);var k=function(u){27==u.keyCode&&m.click()};mxEvent.addListener(document,"keydown",k);(function(u){if(mxClient.isBrowserSupported()){var w=new Graph(u);w.keepEdgesInBackground=!0;w.isCellResizable=function(){return!1};w.isCellRotatable=function(){return!1};w.getCursorForCell=function(K){return this.model.isVertex(K)?"pointer":null};w.getFoldingImage=function(){return null};var z=function(){mxEvent.removeListener(document,
+"keydown",k);u.parentNode.removeChild(u);f.scrollCellToVisible(h)};mxEvent.addListener(m,"click",z);mxEvent.addListener(p,"click",z);w.setEnabled(!1);var C=w.click;w.click=function(K){var L=K.getCell(),Q=null!=L?null!=L.referenceCell?L.referenceCell:L:null;null!=L&&w.rootCell!=L&&0<w.getEdges(Q).length?d(w,L):C.apply(this,arguments)};z=w.container.scrollWidth/2;var E=w.container.scrollHeight/3;w.model.beginUpdate();var D=w.importCells([h])[0];D.sourceCellId=h.id;D.geometry.x=z-D.geometry.width/2;
+D.geometry.y=E-D.geometry.height/2;w.model.endUpdate();var G=!1;w.getModel().addListener(mxEvent.CHANGE,function(K,L){G||(K=L.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,w.labelsVisible=!1,G=!0,mxEffects.animateChanges(w,K,function(){var Q=new mxParallelEdgeLayout(w);Q.spacing=60;var N=Q.layout;Q.layout=function(U){Q.spacing=Math.min(60,Math.max(30,60-5*U.length));N.apply(this,arguments)};Q.execute(w.getDefaultParent());mxText.prototype.enableBoundingBox=!0;w.labelsVisible=!0;
+w.tooltipHandler.hide();w.refresh();G=!1}))});d(w,D)}else mxUtils.error("Browser is not supported!",200,!1)})(g)})(a,b)};Graph.removeKeys=function(a,b){for(var e in a)b(e)&&delete a[e]};Graph.setTransitionForNodes=function(a,b){for(var e=0;e<a.length;e++)mxUtils.setPrefixedStyle(a[e].style,"transition",b)};Graph.setOpacityForNodes=function(a,b){for(var e=0;e<a.length;e++)a[e].style.opacity=b};
Graph.removePasteFormatting=function(a,b){for(;null!=a;){null!=a.firstChild&&Graph.removePasteFormatting(a.firstChild,!0);var e=a.nextSibling;if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=a.style){"#000000"==a.style.color&&(a.style.color="");if("SPAN"==a.nodeName&&"Apple-tab-span"==a.className){var f=Graph.createTabNode(4);a.parentNode.replaceChild(f,a);a=f}if("P"==a.nodeName&&"p1"==a.className){for(;null!=a.firstChild;)a.parentNode.insertBefore(a.firstChild,a);null!=e&&"P"==e.nodeName&&"p1"==
e.className&&a.parentNode.insertBefore(a.ownerDocument.createElement("br"),a);a.parentNode.removeChild(a)}!b&&null!=a.innerHTML&&0<=a.innerHTML.indexOf("\t")&&(f=Graph.createTabNode(4),a.innerHTML=a.innerHTML.replace(/\t/g,f.outerHTML))}a=e}};Graph.createTabNode=function(a){var b="\t";if(null!=a)for(b="";0<a;)b+=" ",a--;a=document.createElement("span");a.style.whiteSpace="pre";a.appendChild(document.createTextNode(b));return a};Graph.sanitizeHtml=function(a,b){return Graph.domPurify(a,!1)};
Graph.sanitizeLink=function(a){if(null==a)return null;var b=document.createElement("a");b.setAttribute("href",a);Graph.sanitizeNode(b);return b.getAttribute("href")};Graph.sanitizeNode=function(a){return Graph.domPurify(a,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(a){"use"==a.nodeName&&(null!=a.getAttribute("xlink:href")&&!a.getAttribute("xlink:href").startsWith("#")||null!=a.getAttribute("href")&&!a.getAttribute("href").startsWith("#"))&&a.remove()});
Graph.domPurify=function(a,b){window.DOM_PURIFY_CONFIG.IN_PLACE=b;return DOMPurify.sanitize(a,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(a,b){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=a&&"data:image/svg+xml;base64,"==a.substring(0,26))try{var e=document.createElement("div");e.style.position="absolute";e.style.visibility="hidden";var f=decodeURIComponent(escape(atob(a.substring(26)))),h=f.indexOf("<svg");if(0<=h){e.innerHTML=Graph.sanitizeHtml(f.substring(h));var d=e.getElementsByTagName("svg");if(0<d.length){if(b||null!=d[0].getAttribute("preserveAspectRatio")){document.body.appendChild(e);try{f=b=
1;var g=d[0].getAttribute("width"),m=d[0].getAttribute("height");g=null!=g&&"%"!=g.charAt(g.length-1)?parseFloat(g):NaN;m=null!=m&&"%"!=m.charAt(m.length-1)?parseFloat(m):NaN;var p=d[0].getAttribute("viewBox");h=null;if(null!=p&&!isNaN(g)&&!isNaN(m)){var k=p.split(" ");4<=p.length&&(b=parseFloat(k[2])/g,f=parseFloat(k[3])/m,h=new mxRectangle(parseFloat(k[0]),parseFloat(k[1]),parseFloat(k[2]),parseFloat(k[3])))}var u=d[0].getBBox();0<u.width&&0<u.height&&(null==h||u.width*u.height<h.width*h.height*
-.7)&&(e.getElementsByTagName("svg")[0].setAttribute("viewBox",u.x+" "+u.y+" "+u.width+" "+u.height),e.getElementsByTagName("svg")[0].setAttribute("width",u.width/b),e.getElementsByTagName("svg")[0].setAttribute("height",u.height/f))}catch(x){}finally{document.body.removeChild(e)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(x){}return a};
+.7)&&(e.getElementsByTagName("svg")[0].setAttribute("viewBox",u.x+" "+u.y+" "+u.width+" "+u.height),e.getElementsByTagName("svg")[0].setAttribute("width",u.width/b),e.getElementsByTagName("svg")[0].setAttribute("height",u.height/f))}catch(w){}finally{document.body.removeChild(e)}}a=Editor.createSvgDataUri(mxUtils.getXml(d[0]))}}}catch(w){}return a};
Graph.createRemoveIcon=function(a,b){var e=document.createElement("img");e.setAttribute("src",Dialog.prototype.clearImage);e.setAttribute("title",a);e.setAttribute("width","13");e.setAttribute("height","10");e.style.marginLeft="4px";e.style.marginBottom="-1px";e.style.cursor="pointer";mxEvent.addListener(e,"click",b);return e};Graph.isPageLink=function(a){return null!=a&&"data:page/id,"==a.substring(0,13)};
Graph.rewritePageLinks=function(a,b){function e(h,d){var g=h.getAttribute(d);if(null!=g){Graph.isPageLink(g)&&(g="#"+g.substring(g.indexOf(":")+1));var m=d;b&&"xlink:href"==d&&(h.removeAttribute(d),m="href");h.setAttribute(m,g)}}a=a.getElementsByTagName("a");if(null!=a)for(var f=0;f<a.length;f++)e(a[f],"href"),e(a[f],"xlink:href")};Graph.isLink=function(a){return null!=a&&a.match(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g)};
mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;
@@ -2608,8 +2609,8 @@ Graph.prototype.diagramBackgroundColor="#f0f0f0";Graph.prototype.enableDiagramBa
Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;Graph.prototype.defaultEdgeLength=80;Graph.prototype.immediateHandling=!0;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};
Graph.prototype.baseUrl=null!=urlParams.base?mxUtils.removeJavascriptProtocol(decodeURIComponent(urlParams.base)):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
Graph.prototype.vertexFontSize=null;Graph.prototype.edgeFontSize=null;Graph.prototype.adaptiveColors="auto";
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(e,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var h=e.view.graph.tolerance,d=!0,g=null,m=mxUtils.bind(this,function(u){d=!0;g=new mxPoint(mxEvent.getClientX(u),mxEvent.getClientY(u))}),p=mxUtils.bind(this,function(u){d=d&&null!=g&&Math.abs(g.x-mxEvent.getClientX(u))<h&&Math.abs(g.y-mxEvent.getClientY(u))<h}),k=mxUtils.bind(this,function(u){if(d)for(var x=mxEvent.getSource(u);null!=
-x&&x!=f.node;){if("a"==x.nodeName.toLowerCase()){e.view.graph.labelLinkClicked(e,x,u);break}x=x.parentNode}});mxEvent.addGestureListeners(f.node,m,p,k);mxEvent.addListener(f.node,"click",function(u){mxEvent.consume(u)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(e){var f=mxEvent.getSource(e);"A"==f.nodeName&&(f=f.getAttribute("href"),null!=
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(e,f){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var h=e.view.graph.tolerance,d=!0,g=null,m=mxUtils.bind(this,function(u){d=!0;g=new mxPoint(mxEvent.getClientX(u),mxEvent.getClientY(u))}),p=mxUtils.bind(this,function(u){d=d&&null!=g&&Math.abs(g.x-mxEvent.getClientX(u))<h&&Math.abs(g.y-mxEvent.getClientY(u))<h}),k=mxUtils.bind(this,function(u){if(d)for(var w=mxEvent.getSource(u);null!=
+w&&w!=f.node;){if("a"==w.nodeName.toLowerCase()){e.view.graph.labelLinkClicked(e,w,u);break}w=w.parentNode}});mxEvent.addGestureListeners(f.node,m,p,k);mxEvent.addListener(f.node,"click",function(u){mxEvent.consume(u)})};if(null!=this.tooltipHandler){var b=this.tooltipHandler.init;this.tooltipHandler.init=function(){b.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(e){var f=mxEvent.getSource(e);"A"==f.nodeName&&(f=f.getAttribute("href"),null!=
f&&this.graph.isCustomLink(f)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&this.graph.customLinkClicked(f)&&mxEvent.consume(e))}))}}this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.pasteEdgeStyle=!1;Graph.prototype.isFillState=function(g){return!this.isSpecialColor(g.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(g.style,"lineShape",null)&&(this.model.isVertex(g.cell)||"arrow"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)||"wire"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(g.style,
mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)||"mxgraph.arrows2.wedgeArrow"==mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isGradientState=function(g){return this.isFillState(g)&&"wire"!=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.isStrokeState=function(g){return!0};Graph.prototype.getTextColor=function(g,m){for(var p=g==this.cellEditor.textarea&&m?"default":Graph.getGivenColor(g,m?"color":
@@ -2617,15 +2618,15 @@ mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(g.style,mxConstants
return"label"==g||"rectangle"==g||"internalStorage"==g||"ext"==g||"umlLifeline"==g||"swimlane"==g||"process"==g};Graph.prototype.isRoundedState=function(g){return null!=g.shape?g.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(g){var m=mxUtils.getValue(g.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,!1)&&("connector"==m||"filledEdge"==m||"wire"==
m)};Graph.prototype.isAutoSizeState=function(g){return"1"==mxUtils.getValue(g.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(g){return null!=mxUtils.getValue(g.style,mxConstants.STYLE_IMAGE,null)};Graph.prototype.isShadowState=function(g){return!0};Graph.prototype.getVerticesAndEdges=function(g,m){g=null!=g?g:!0;m=null!=m?m:!0;var p=this.model;return p.filterDescendants(function(k){return g&&p.isVertex(k)||m&&p.isEdge(k)},p.getRoot())};Graph.prototype.applyNewEdgeStyle=
function(g,m,p){g=this.getCellStyle(g).newEdgeStyle;if(null!=g){this.model.beginUpdate();try{var k=JSON.parse(g),u;for(u in k)this.setCellStyles(u,k[u],m),"edgeStyle"==u&&"elbowEdgeStyle"==k[u]&&null!=p&&this.setCellStyles("elbow",p==mxConstants.DIRECTION_SOUTH||p==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",m)}finally{this.model.endUpdate()}}};Graph.prototype.getCommonStyle=function(g){for(var m={},p=0;p<g.length;p++){var k=this.view.getState(g[p]);null!=k&&this.mergeStyle(k.style,m,0==p)}return m};
-Graph.prototype.mergeStyle=function(g,m,p){if(null!=g){var k={},u;for(u in g){var x=g[u];null!=x&&(k[u]=!0,null==m[u]&&p?m[u]=x:m[u]!=x&&delete m[u])}for(u in m)k[u]||delete m[u]}};Graph.prototype.getStartEditingCell=function(g,m){m=this.getCellStyle(g);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g)&&(g=this.model.getChildAt(g,0),m=this.getCellStyle(g),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,
+Graph.prototype.mergeStyle=function(g,m,p){if(null!=g){var k={},u;for(u in g){var w=g[u];null!=w&&(k[u]=!0,null==m[u]&&p?m[u]=w:m[u]!=w&&delete m[u])}for(u in m)k[u]||delete m[u]}};Graph.prototype.getStartEditingCell=function(g,m){m=this.getCellStyle(g);m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,0));this.isTable(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g)&&(g=this.model.getChildAt(g,0),m=this.getCellStyle(g),m=parseInt(mxUtils.getValue(m,mxConstants.STYLE_STARTSIZE,
0)));if(this.isTableRow(g)&&(!this.isSwimlane(g)||0==m)&&""==this.getLabel(g)&&0<this.model.getChildCount(g))for(m=0;m<this.model.getChildCount(g);m++){var p=this.model.getChildAt(g,m);if(this.isCellEditable(p)){g=p;break}}return g};Graph.prototype.copyStyle=function(g){return this.getCellStyle(g,!1)};Graph.prototype.pasteStyle=function(g,m,p,k){null!=g&&(k||(p=null!=p?p:Graph.cellStyles,Graph.removeKeys(g,function(u){return 0>mxUtils.indexOf(p,u)})),this.updateCellStyles(g,m))};Graph.prototype.copyCellStyles=
-function(g,m,p,k,u,x,z){var C=!1,E=!1;if(0<g.length)for(var D=0;D<g.length&&(C=this.getModel().isVertex(g[D])||C,!(E=this.getModel().isEdge(g[D])||E)||!C);D++);else E=C=!0;C=C&&!x;E=E&&!z;for(D=0;D<m.length;D++)if(g=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(C||g)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||g)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=
-function(g){for(var m=[],p=0;p<g.length;p++)m=m.concat(this.model.getDescendants(g[p]));return m};Graph.prototype.pasteCellStyles=function(g,m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var x=0;x<g.length;x++){var z=g[x],C=this.model.getStyle(z),E=!1;null!=z.style&&(pairs=z.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var G=
-null!=C?C.split(";"):[],I=0;I<G.length;I++){var L=G[I],T=L.indexOf("=");if(0<=T){var K=L.substring(0,T),U=mxUtils.indexOf(D,K);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,K))for(var Q=0;Q<Y.length;Q++){var P=mxUtils.indexOf(D,Y[Q]);0<=P&&D.splice(P,1)}}}}var M=this.model.isEdge(z);E=M?p:m;for(I=0;I<D.length;I++){K=D[I];var V=E[K];null!=V&&("edgeStyle"!=K||u)&&(M||!M&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(C=mxUtils.setStyle(C,
-K,V),"fontFamily"==K&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),M&&"rounded"==K&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],
-!1),u=k[mxConstants.STYLE_PERIMETER],x=!1;for(C in g){var z=g[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){x=!0;var C="participant"}this.setCellStyles(C,z,[m[p]])}}x&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=
-function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(g,m,p,k,u,x){this.useCssTransforms&&(g=g/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(g,m,p,k,u,x){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var z=
-this.model.getChildCount(p)-1;0<=z;z--){var C=this.model.getChildAt(p,z),E=this.getScaledCellAt(g,m,C,k,u,x);if(null!=E)return E;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(E=this.view.getState(C),null!=E&&(null==x||!x(E,g,m))&&this.intersects(E,g,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(g){return!this.isSwimlane(g.cell)&&0<this.model.getChildCount(g.cell)&&!this.isCellCollapsed(g.cell)&&"1"==mxUtils.getValue(g.style,"recursiveResize",
+function(g,m,p,k,u,w,z){var C=!1,E=!1;if(0<g.length)for(var D=0;D<g.length&&(C=this.getModel().isVertex(g[D])||C,!(E=this.getModel().isEdge(g[D])||E)||!C);D++);else E=C=!0;C=C&&!w;E=E&&!z;for(D=0;D<m.length;D++)if(g=0<=mxUtils.indexOf(Graph.textStyles,m[D]),"strokeColor"!=m[D]||null!=p[D]&&"none"!=p[D])if(0<=mxUtils.indexOf(Graph.cellStyles,m[D])||"shape"==m[D])if("shape"!=m[D]&&(C||g)&&(null==p[D]?delete k[m[D]]:k[m[D]]=p[D]),E||g)null==p[D]?delete u[m[D]]:u[m[D]]=p[D]};Graph.prototype.includeDescendants=
+function(g){for(var m=[],p=0;p<g.length;p++)m=m.concat(this.model.getDescendants(g[p]));return m};Graph.prototype.pasteCellStyles=function(g,m,p,k,u){m=null!=m?m:this.currentVertexStyle;p=null!=p?p:this.currentEdgeStyle;u=null!=u?u:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var w=0;w<g.length;w++){var z=g[w],C=this.model.getStyle(z),E=!1;null!=z.style&&(pairs=z.style.split(";"),E=E||0<=mxUtils.indexOf(pairs,"text"));if(E)var D=Graph.textStyles;else if(D=Graph.cellStyles.slice(),!k)for(var G=
+null!=C?C.split(";"):[],K=0;K<G.length;K++){var L=G[K],Q=L.indexOf("=");if(0<=Q){var N=L.substring(0,Q),U=mxUtils.indexOf(D,N);0<=U&&D.splice(U,1);for(E=0;E<Graph.cellStyleGroups.length;E++){var Y=Graph.cellStyleGroups[E];if(0<=mxUtils.indexOf(Y,N))for(var P=0;P<Y.length;P++){var T=mxUtils.indexOf(D,Y[P]);0<=T&&D.splice(T,1)}}}}var J=this.model.isEdge(z);E=J?p:m;for(K=0;K<D.length;K++){N=D[K];var V=E[N];null!=V&&("edgeStyle"!=N||u)&&(J||!J&&0>mxUtils.indexOf(Graph.edgeStyles,N))&&(C=mxUtils.setStyle(C,
+N,V),"fontFamily"==N&&null==E.fontSource&&(C=mxUtils.setStyle(C,"fontSource",null)),J&&"rounded"==N&&"1"==V&&null==E.curved&&(C=mxUtils.setStyle(C,"curved",null)))}Editor.simpleLabels&&(C=mxUtils.setStyle(mxUtils.setStyle(C,"html",null),"whiteSpace",null));this.model.setStyle(z,C)}}finally{this.model.endUpdate()}return g};Graph.prototype.updateCellStyles=function(g,m){this.model.beginUpdate();try{for(var p=0;p<m.length;p++)if(this.model.isVertex(m[p])||this.model.isEdge(m[p])){var k=this.getCellStyle(m[p],
+!1),u=k[mxConstants.STYLE_PERIMETER],w=!1;for(C in g){var z=g[C];if(k[C]!=z){if(C==mxConstants.STYLE_SHAPE&&"umlLifeline"==k[C]&&"umlLifeline"!=z){w=!0;var C="participant"}this.setCellStyles(C,z,[m[p]])}}w&&this.setCellStyles(mxConstants.STYLE_PERIMETER,u,[m[p]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=
+function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(g,m,p,k,u,w){this.useCssTransforms&&(g=g/this.currentScale-this.currentTranslate.x,m=m/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(g,m,p,k,u,w){k=null!=k?k:!0;u=null!=u?u:!0;null==p&&(p=this.getCurrentRoot(),null==p&&(p=this.getModel().getRoot()));if(null!=p)for(var z=
+this.model.getChildCount(p)-1;0<=z;z--){var C=this.model.getChildAt(p,z),E=this.getScaledCellAt(g,m,C,k,u,w);if(null!=E)return E;if(this.isCellVisible(C)&&(u&&this.model.isEdge(C)||k&&this.model.isVertex(C))&&(E=this.view.getState(C),null!=E&&(null==w||!w(E,g,m))&&this.intersects(E,g,m)))return C}return null};Graph.prototype.isRecursiveVertexResize=function(g){return!this.isSwimlane(g.cell)&&0<this.model.getChildCount(g.cell)&&!this.isCellCollapsed(g.cell)&&"1"==mxUtils.getValue(g.style,"recursiveResize",
"1")&&null==mxUtils.getValue(g.style,"childLayout",null)};Graph.prototype.getAbsoluteParent=function(g){for(var m=this.getCellGeometry(g);null!=m&&m.relative;)g=this.getModel().getParent(g),m=this.getCellGeometry(g);return g};Graph.prototype.isPart=function(g){return"1"==mxUtils.getValue(this.getCurrentCellStyle(g),"part","0")||this.isTableCell(g)||this.isTableRow(g)};Graph.prototype.getCompositeParents=function(g){for(var m=new mxDictionary,p=[],k=0;k<g.length;k++){var u=this.getCompositeParent(g[k]);
this.isTableCell(u)&&(u=this.graph.model.getParent(u));this.isTableRow(u)&&(u=this.graph.model.getParent(u));null==u||m.get(u)||(m.put(u,!0),p.push(u))}return p};Graph.prototype.getReferenceTerminal=function(g){if(null!=g){var m=this.getCellGeometry(g);null!=m&&m.relative&&(g=this.model.getParent(g))}null!=g&&this.model.isEdge(g)&&(g=this.model.getParent(g));null!=g&&(g=this.getCompositeParent(g));return g};Graph.prototype.getCompositeParent=function(g){for(;this.isPart(g);){var m=this.model.getParent(g);
if(!this.model.isVertex(m))break;g=m}return g};Graph.prototype.filterSelectionCells=function(g){var m=this.getSelectionCells();if(null!=g){for(var p=[],k=0;k<m.length;k++)g(m[k])||p.push(m[k]);m=p}return m};var a=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(g){if(this.useCssTransforms){var m=this.currentScale,p=this.currentTranslate;g=new mxRectangle((g.x+2*p.x)*m-p.x,(g.y+2*p.y)*m-p.y,g.width*m,g.height*m)}a.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=
@@ -2633,8 +2634,8 @@ function(g){g=this.strokeWidth;this.graph.useCssTransforms&&(g/=this.graph.curre
mxGraphView.prototype.validate=function(g){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);b.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var e=mxGraph.prototype.getCellsForGroup;
Graph.prototype.getCellsForGroup=function(g){g=e.apply(this,arguments);for(var m=[],p=0;p<g.length;p++)this.isTableRow(g[p])||this.isTableCell(g[p])||m.push(g[p]);return m};var f=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(g){g=f.apply(this,arguments);for(var m=[],p=0;p<g.length;p++)this.isTable(g[p])||this.isTableRow(g[p])||this.isTableCell(g[p])||m.push(g[p]);return m};Graph.prototype.updateCssTransform=function(){var g=this.view.getDrawPane();if(null!=g)if(g=
g.parentNode,this.useCssTransforms){var m=g.getAttribute("transform");g.setAttribute("transformOrigin","0 0");var p=Math.round(100*this.currentScale)/100;g.setAttribute("transform","scale("+p+","+p+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");m!=g.getAttribute("transform")&&this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",g.getAttribute("transform"))}else g.removeAttribute("transformOrigin"),g.removeAttribute("transform")};
-var h=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph.useCssTransforms,m=this.scale,p=this.translate;g&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);h.apply(this,arguments);g&&(this.scale=m,this.translate=p)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.useCssTransforms,u=this.view.scale,x=this.view.translate;k&&(this.view.scale=1,this.view.translate=
-new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);k&&(this.view.scale=u,this.view.translate=x,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+var h=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var g=this.graph.useCssTransforms,m=this.scale,p=this.translate;g&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);h.apply(this,arguments);g&&(this.scale=m,this.translate=p)};var d=mxGraph.prototype.updatePageBreaks;mxGraph.prototype.updatePageBreaks=function(g,m,p){var k=this.useCssTransforms,u=this.view.scale,w=this.view.translate;k&&(this.view.scale=1,this.view.translate=
+new mxPoint(0,0),this.useCssTransforms=!1);d.apply(this,arguments);k&&(this.view.scale=u,this.view.translate=w,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(a,b,e){var f=b.getAttribute("href");f!=Graph.sanitizeLink(f)&&Graph.sanitizeNode(b);if(null!=f&&!this.isCustomLink(f)&&(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))){if(!this.isEnabled()||this.isCellLocked(a.cell))a=this.isBlankLink(f)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(f),a);mxEvent.consume(e)}};
Graph.prototype.openLink=function(a,b,e){var f=window;try{if(a=Graph.sanitizeLink(a),null!=a)if("_self"==b&&window!=window.top)window.location.href=a;else if(a.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==a.charAt(this.baseUrl.length)&&"_top"==b&&window==window.top){var h=a.split("#")[1];window.location.hash=="#"+h&&(window.location.hash="");window.location.hash=h}else f=window.open(a,null!=b?b:"_blank",e?null:"noopener,noreferrer"),null==f||e||(f.opener=null)}catch(d){}return f};
Graph.prototype.getLinkTitle=function(a){return a.substring(a.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(a){return"data:"==a.substring(0,5)};Graph.prototype.customLinkClicked=function(a,b){return!1};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2663,10 +2664,10 @@ Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!m
Graph.prototype.isLabelMovable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(a){this.defaultParent=a;this.fireEvent(new mxEventObject("defaultParentChanged"))};
Graph.prototype.getClickableLinkForCell=function(a){do{var b=this.getLinkForCell(a);if(null!=b)return b;a=this.model.getParent(a)}while(null!=a);return null};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(I,L){I=String(I);for(L=L||2;I.length<L;)I="0"+I;return I};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),x=a[m+"FullYear"](),z=a[m+"Hours"](),C=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),G={d:p,dd:g(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:g(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
-12],yy:String(x).slice(2),yyyy:x,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(I){return I in G?G[I]:I.slice(1,
-I.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var f=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,d=/[^-+\dA-Z]/g,g=function(K,L){K=String(K);for(L=L||2;K.length<L;)K="0"+K;return K};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(f.masks[b]||b||f.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var m=e?"getUTC":"get",p=a[m+"Date"](),k=a[m+"Day"](),u=a[m+"Month"](),w=a[m+"FullYear"](),z=a[m+"Hours"](),C=a[m+"Minutes"](),E=a[m+"Seconds"]();m=a[m+"Milliseconds"]();var D=e?0:a.getTimezoneOffset(),G={d:p,dd:g(p),ddd:f.i18n.dayNames[k],dddd:f.i18n.dayNames[k+7],m:u+1,mm:g(u+1),mmm:f.i18n.monthNames[u],mmmm:f.i18n.monthNames[u+
+12],yy:String(w).slice(2),yyyy:w,h:z%12||12,hh:g(z%12||12),H:z,HH:g(z),M:C,MM:g(C),s:E,ss:g(E),l:g(m,3),L:g(99<m?Math.round(m/10):m),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(d,""),o:(0<D?"-":"+")+g(100*Math.floor(Math.abs(D)/60)+Math.abs(D)%60,4),S:["th","st","nd","rd"][3<p%10?0:(10!=p%100-p%10)*p%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(K){return K in G?G[K]:K.slice(1,
+K.length-1)})};Graph.prototype.getLayerForCell=function(a){for(;null!=a&&!this.model.isLayer(a);)a=this.model.getParent(a);return a};Graph.prototype.getLayerForCells=function(a){var b=null;if(0<a.length){b=this.getLayerForCell(a[0]);for(var e=1;e<a.length;e++)if(!this.model.isAncestor(b,a[e])){b=null;break}}return b};
Graph.prototype.createLayersDialog=function(a,b){var e=document.createElement("div");e.style.position="absolute";for(var f=this.getModel(),h=f.getChildCount(f.root),d=0;d<h;d++)mxUtils.bind(this,function(g){function m(){f.isVisible(g)?(u.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(k,75)):(u.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(k,25))}var p=this.convertValueToString(g)||mxResources.get("background")||"Background",k=document.createElement("div");k.style.overflow=
"hidden";k.style.textOverflow="ellipsis";k.style.padding="2px";k.style.whiteSpace="nowrap";k.style.cursor="pointer";k.setAttribute("title",mxResources.get(f.isVisible(g)?"hideIt":"show",[p]));var u=document.createElement("img");u.setAttribute("draggable","false");u.setAttribute("align","absmiddle");u.setAttribute("border","0");u.style.position="relative";u.style.width="16px";u.style.padding="0px 6px 0 4px";b&&(u.style.filter="invert(100%)",u.style.top="-2px");k.appendChild(u);mxUtils.write(k,p);e.appendChild(k);
mxEvent.addListener(k,"click",function(){f.setVisible(g,!f.isVisible(g));m();null!=a&&a(g)});m()})(f.getChildAt(f.root,d));return e};
@@ -2683,12 +2684,12 @@ this.model.isEdge(a)&&this.model.isEdge(b[d]))if(e){var g=this.model.getStyle(b[
Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),this.scrollCellToVisible(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset())):this.setSelectionCells(a)};Graph.prototype.isCloneConnectSource=function(a){var b=null;null!=this.layoutManager&&(b=this.layoutManager.getLayout(this.model.getParent(a)));return this.isTableRow(a)||this.isTableCell(a)||null!=b&&b.constructor==mxStackLayout};
Graph.prototype.insertEdgeBeforeCell=function(a,b){for(var e=b;null!=e.parent&&null!=e.geometry&&e.geometry.relative&&e.parent!=a.parent;)e=this.model.getParent(e);null!=e&&null!=e.parent&&e.parent==a.parent&&(b=e.parent.getIndex(e),this.model.add(e.parent,a,b))};
Graph.prototype.connectVertex=function(a,b,e,f,h,d,g,m){d=d?d:!1;if(a.geometry.relative&&this.model.isEdge(a.parent))return[];for(;a.geometry.relative&&this.model.isVertex(a.parent);)a=a.parent;var p=this.isCloneConnectSource(a),k=p?a:this.getCompositeParent(a),u=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(k.geometry.x,k.geometry.y);b==mxConstants.DIRECTION_NORTH?(u.x+=k.geometry.width/2,u.y-=e):b==
-mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var x=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=x&&this.model.isVertex(x.cell)&&(k=x.x,z=x.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?
-this.getCells(0,0,0,0,null,null,d,null,!0):null;x=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==x||null==G||mxUtils.intersects(x,G)||(E=d[D])}}var I=
-!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;I&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],T=E;E=C;h=mxUtils.bind(this,function(K){if(null==g||null!=K||null==E&&p){this.model.beginUpdate();try{if(null==T&&I){var U=this.getAbsoluteParent(null!=K?K:a);U=p?a:this.getCompositeParent(U);T=null!=K?K:this.duplicateCells([U],
-!1)[0];null!=K&&this.addCells([T],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(T);null!=Y&&(null!=K&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([T],C,null,null,null,!0),E=null):I&&!p&&this.addCells([T],this.getDefaultParent(),null,null,null,!0)}var Q=mxEvent.isControlDown(f)&&
-mxEvent.isShiftDown(f)&&I||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,T,this.createCurrentEdgeStyle());null!=Q&&(L.push(Q),this.applyNewEdgeStyle(a,[Q],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(Q,a));if(null==E&&null!=T&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var P=a.parent.getIndex(a);this.model.add(a.parent,T,P)}null==E&&null!=T&&L.push(T);null==T&&null!=Q&&Q.geometry.setTerminalPoint(u,!1);null!=Q&&this.fireEvent(new mxEventObject("cellsInserted",
-"cells",[Q]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=T||!I||null==E&&p)return h(T);g(k+u.x*e,z+u.y*e,h)};
+mxConstants.DIRECTION_SOUTH?(u.x+=k.geometry.width/2,u.y+=k.geometry.height+e):(u.x=b==mxConstants.DIRECTION_WEST?u.x-e:u.x+(k.geometry.width+e),u.y+=k.geometry.height/2);var w=this.view.getState(this.model.getParent(a));e=this.view.scale;var z=this.view.translate;k=z.x*e;z=z.y*e;null!=w&&this.model.isVertex(w.cell)&&(k=w.x,z=w.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(u.x+=a.parent.geometry.x,u.y+=a.parent.geometry.y);d=d?null:(new mxRectangle(k+u.x*e,z+u.y*e)).grow(40*e);d=null!=d?
+this.getCells(0,0,0,0,null,null,d,null,!0):null;w=this.view.getState(a);var C=null,E=null;if(null!=d){d=d.reverse();for(var D=0;D<d.length;D++)if(!this.isCellLocked(d[D])&&!this.model.isEdge(d[D])&&d[D]!=a)if(!this.model.isAncestor(a,d[D])&&this.isContainer(d[D])&&(null==C||d[D]==this.model.getParent(a)))C=d[D];else if(null==E&&this.isCellConnectable(d[D])&&!this.model.isAncestor(d[D],a)&&!this.isSwimlane(d[D])){var G=this.view.getState(d[D]);null==w||null==G||mxUtils.intersects(w,G)||(E=d[D])}}var K=
+!mxEvent.isShiftDown(f)||mxEvent.isControlDown(f)||h;K&&("1"!=urlParams.sketch||h)&&(b==mxConstants.DIRECTION_NORTH?u.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=a.geometry.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-a.geometry.width/2:u.x+a.geometry.width/2);var L=[],Q=E;E=C;h=mxUtils.bind(this,function(N){if(null==g||null!=N||null==E&&p){this.model.beginUpdate();try{if(null==Q&&K){var U=this.getAbsoluteParent(null!=N?N:a);U=p?a:this.getCompositeParent(U);Q=null!=N?N:this.duplicateCells([U],
+!1)[0];null!=N&&this.addCells([Q],this.model.getParent(a),null,null,null,!0);var Y=this.getCellGeometry(Q);null!=Y&&(null!=N&&"1"==urlParams.sketch&&(b==mxConstants.DIRECTION_NORTH?u.y-=Y.height/2:b==mxConstants.DIRECTION_SOUTH?u.y+=Y.height/2:u.x=b==mxConstants.DIRECTION_WEST?u.x-Y.width/2:u.x+Y.width/2),Y.x=u.x-Y.width/2,Y.y=u.y-Y.height/2);null!=C?(this.addCells([Q],C,null,null,null,!0),E=null):K&&!p&&this.addCells([Q],this.getDefaultParent(),null,null,null,!0)}var P=mxEvent.isControlDown(f)&&
+mxEvent.isShiftDown(f)&&K||null==E&&p?null:this.insertEdge(this.model.getParent(a),null,"",a,Q,this.createCurrentEdgeStyle());null!=P&&(L.push(P),this.applyNewEdgeStyle(a,[P],b),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(P,a));if(null==E&&null!=Q&&null!=a.parent&&p&&b==mxConstants.DIRECTION_WEST){var T=a.parent.getIndex(a);this.model.add(a.parent,Q,T)}null==E&&null!=Q&&L.push(Q);null==Q&&null!=P&&P.geometry.setTerminalPoint(u,!1);null!=P&&this.fireEvent(new mxEventObject("cellsInserted",
+"cells",[P]))}finally{this.model.endUpdate()}}if(null!=m)m(L);else return L});if(null==g||null!=Q||!K||null==E&&p)return h(Q);g(k+u.x*e,z+u.y*e,h)};
Graph.prototype.getIndexableText=function(a){a=null!=a?a:this.model.getDescendants(this.model.root);for(var b=document.createElement("div"),e=[],f,h=0;h<a.length;h++)if(f=a[h],this.model.isVertex(f)||this.model.isEdge(f))this.isHtmlLabel(f)?(b.innerHTML=Graph.sanitizeHtml(this.getLabel(f)),f=mxUtils.extractTextWithWhitespace([b])):f=this.getLabel(f),f=mxUtils.trim(f.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<f.length&&e.push(f);return e.join(" ")};
Graph.prototype.convertValueToString=function(a){var b=this.model.getValue(a);if(null!=b&&"object"==typeof b){var e=null;if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){b=a.getAttribute("placeholder");for(var f=a;null==e&&null!=f;)null!=f.value&&"object"==typeof f.value&&(e=f.hasAttribute(b)?null!=f.getAttribute(b)?f.getAttribute(b):"":null),f=this.model.getParent(f)}else e=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(e=b.getAttribute("label_"+Graph.diagramLanguage)),
null==e&&(e=b.getAttribute("label")||"");return e||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a,b){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),b||(a=mxUtils.removeJavascriptProtocol(a)),a):null};
@@ -2700,7 +2701,7 @@ Graph.prototype.getDefaultColor=function(a,b,e){b="default"+b.charAt(0).toUpperC
Graph.prototype.setAdaptiveColors=function(a){this.adaptiveColors="default"==a?null:a;"1"==urlParams.embedInline?null!=this.container&&(this.container.style.colorScheme="none"==this.getAdaptiveColors()?"light":""):(a=this.view.getDrawPane().ownerSVGElement,null!=a&&(a.style.colorScheme="none"==this.getAdaptiveColors()?"light":""))};Graph.prototype.getAdaptiveColors=function(){return null!=this.adaptiveColors?this.adaptiveColors:Graph.defaultAdaptiveColors};
Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var f=this.layoutManager.getLayout(this.model.getParent(a));null!=f&&f.constructor==mxStackLayout&&(f.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a,b){return mxEvent.isShiftDown(a)||"1"==mxUtils.getValue(b.style,"moveCells","0")};
Graph.prototype.foldCells=function(a,b,e,f,h){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var d=0;d<e.length;d++){var g=this.view.getState(e[d]),m=this.getCellGeometry(e[d]);if(null!=g&&null!=m){var p=0,k=0;if(m.alternateBounds)p=m.width-m.alternateBounds.width,k=m.height-m.alternateBounds.height;else{var u=this.useCssTransforms?1:this.view.scale;
-p=Math.round(m.width-g.width/u);k=Math.round(m.height-g.height/u)}if(0!=k||0!=p){var x=this.model.getParent(e[d]),z=this.layoutManager.getLayout(x);null==z?null!=h&&this.isMoveCellsEvent(h,g)&&this.moveSiblings(g,x,p,k):null!=h&&mxEvent.isAltDown(h)||z.constructor!=mxStackLayout||z.resizeLast||this.resizeParentStacks(x,z,p,k)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+p=Math.round(m.width-g.width/u);k=Math.round(m.height-g.height/u)}if(0!=k||0!=p){var w=this.model.getParent(e[d]),z=this.layoutManager.getLayout(w);null==z?null!=h&&this.isMoveCellsEvent(h,g)&&this.moveSiblings(g,w,p,k):null!=h&&mxEvent.isAltDown(h)||z.constructor!=mxStackLayout||z.resizeLast||this.resizeParentStacks(w,z,p,k)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
Graph.prototype.moveSiblings=function(a,b,e,f){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<h.length;b++)if(h[b]!=a.cell){var d=this.view.getState(h[b]),g=this.getCellGeometry(h[b]);null!=d&&null!=g&&(g=g.clone(),g.translate(Math.round(e*Math.max(0,Math.min(1,(d.x-a.x)/a.width))),Math.round(f*Math.max(0,Math.min(1,(d.y-a.y)/a.height)))),this.model.setGeometry(h[b],g))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(a,b,e,f){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var h=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==h&&!b.resizeLast;){var d=this.getCellGeometry(a),g=this.view.getState(a);null!=g&&null!=d&&(d=d.clone(),b.horizontal?d.width+=e+Math.min(0,g.width/this.view.scale-d.width):d.height+=f+Math.min(0,g.height/this.view.scale-d.height),this.model.setGeometry(a,
d));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.getCurrentCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.getCurrentCellStyle(a);return!this.isCellLocked(this.getLayerForCell(a))&&(null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments))};
@@ -2761,37 +2762,37 @@ Graph.prototype.setTableValues=function(a,b,e){for(var f=this.model.getChildCell
Graph.prototype.createCrossFunctionalSwimlane=function(a,b,e,f,h,d,g,m,p){e=null!=e?e:120;f=null!=f?f:120;g=null!=g?g:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;strokeColor=inherit;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";m=null!=m?m:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;strokeColor=inherit;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
p=null!=p?p:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;strokeColor=inherit;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";h=this.createVertex(null,null,null!=h?h:"",0,0,b*e,a*f,null!=d?d:"shape=table;childLayout=tableLayout;"+(null==h?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");d=mxUtils.getValue(this.getCellStyle(h),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);h.geometry.width+=d;h.geometry.height+=
d;g=this.createVertex(null,null,"",0,d,b*e+d,f,g);h.insert(this.createParent(g,this.createVertex(null,null,"",d,0,e,f,m),b,e,0));return 1<a?(g.geometry.y=f+d,this.createParent(h,this.createParent(g,this.createVertex(null,null,"",d,0,e,f,p),b,e,0),a-1,0,f)):h};
-Graph.prototype.visitTableCells=function(a,b){var e=null,f=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var h=0;h<f.length;h++){for(var d=this.getActualStartSize(f[h],!0),g=this.model.getChildCells(f[h],!0),m=this.getCellStyle(f[h],!0),p=null,k=[],u=0;u<g.length;u++){var x=this.getCellGeometry(g[u]),z={cell:g[u],rospan:1,colspan:1,row:h,col:u,geo:x};x=null!=x.alternateBounds?x.alternateBounds:x;z.point=new mxPoint(x.width+(null!=p?p.point.x:a.x+d.x),x.height+(null!=e&&null!=
+Graph.prototype.visitTableCells=function(a,b){var e=null,f=this.model.getChildCells(a,!0);a=this.getActualStartSize(a,!0);for(var h=0;h<f.length;h++){for(var d=this.getActualStartSize(f[h],!0),g=this.model.getChildCells(f[h],!0),m=this.getCellStyle(f[h],!0),p=null,k=[],u=0;u<g.length;u++){var w=this.getCellGeometry(g[u]),z={cell:g[u],rospan:1,colspan:1,row:h,col:u,geo:w};w=null!=w.alternateBounds?w.alternateBounds:w;z.point=new mxPoint(w.width+(null!=p?p.point.x:a.x+d.x),w.height+(null!=e&&null!=
e[0]?e[0].point.y:a.y+d.y));z.actual=z;null!=e&&null!=e[u]&&1<e[u].rowspan?(z.rowspan=e[u].rowspan-1,z.colspan=e[u].colspan,z.actual=e[u].actual):null!=p&&1<p.colspan?(z.rowspan=p.rowspan,z.colspan=p.colspan-1,z.actual=p.actual):(p=this.getCurrentCellStyle(g[u],!0),null!=p&&(z.rowspan=parseInt(p.rowspan||1),z.colspan=parseInt(p.colspan||1)));p=1==mxUtils.getValue(m,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(m,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;b(z,g.length,
f.length,a.x+(p?d.x:0),a.y+(p?d.y:0));k.push(z);p=z}e=k}};Graph.prototype.getTableLines=function(a,b,e){var f=[],h=[];(b||e)&&this.visitTableCells(a,mxUtils.bind(this,function(d,g,m,p,k){b&&d.row<m-1&&(null==f[d.row]&&(f[d.row]=[new mxPoint(p,d.point.y)]),1<d.rowspan&&f[d.row].push(null),f[d.row].push(d.point));e&&d.col<g-1&&(null==h[d.col]&&(h[d.col]=[new mxPoint(d.point.x,k)]),1<d.colspan&&h[d.col].push(null),h[d.col].push(d.point))}));return f.concat(h)};
Graph.prototype.isTableCell=function(a){return this.model.isVertex(a)&&this.isTableRow(this.model.getParent(a))};Graph.prototype.isTableRow=function(a){return this.model.isVertex(a)&&this.isTable(this.model.getParent(a))};Graph.prototype.isTable=function(a){a=this.getCellStyle(a);return null!=a&&"tableLayout"==a.childLayout};Graph.prototype.isStack=function(a){a=this.getCellStyle(a);return null!=a&&"stackLayout"==a.childLayout};
Graph.prototype.isStackChild=function(a){return this.model.isVertex(a)&&this.isStack(this.model.getParent(a))};
Graph.prototype.setTableRowHeight=function(a,b,e){e=null!=e?e:!0;var f=this.getModel();f.beginUpdate();try{var h=this.getCellGeometry(a);if(null!=h){h=h.clone();h.height+=b;f.setGeometry(a,h);var d=f.getParent(a),g=f.getChildCells(d,!0);if(!e){var m=mxUtils.indexOf(g,a);if(m<g.length-1){var p=g[m+1],k=this.getCellGeometry(p);null!=k&&(k=k.clone(),k.y+=b,k.height-=b,f.setGeometry(p,k))}}var u=this.getCellGeometry(d);null!=u&&(e||(e=a==g[g.length-1]),e&&(u=u.clone(),u.height+=b,f.setGeometry(d,u)))}}finally{f.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var f=this.getModel(),h=f.getParent(a),d=f.getParent(h),g=f.getChildCells(h,!0);a=mxUtils.indexOf(g,a);var m=a==g.length-1;f.beginUpdate();try{for(var p=f.getChildCells(d,!0),k=0;k<p.length;k++){h=p[k];g=f.getChildCells(h,!0);var u=g[a],x=this.getCellGeometry(u);null!=x&&(x=x.clone(),x.width+=b,null!=x.alternateBounds&&(x.alternateBounds.width+=b),f.setGeometry(u,x));a<g.length-1&&(u=g[a+1],x=this.getCellGeometry(u),null!=x&&(x=x.clone(),
-x.x+=b,e||(x.width-=b,null!=x.alternateBounds&&(x.alternateBounds.width-=b)),f.setGeometry(u,x)))}if(m||e){var z=this.getCellGeometry(d);null!=z&&(z=z.clone(),z.width+=b,f.setGeometry(d,z))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{f.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableColumnWidth=function(a,b,e){e=null!=e?e:!1;var f=this.getModel(),h=f.getParent(a),d=f.getParent(h),g=f.getChildCells(h,!0);a=mxUtils.indexOf(g,a);var m=a==g.length-1;f.beginUpdate();try{for(var p=f.getChildCells(d,!0),k=0;k<p.length;k++){h=p[k];g=f.getChildCells(h,!0);var u=g[a],w=this.getCellGeometry(u);null!=w&&(w=w.clone(),w.width+=b,null!=w.alternateBounds&&(w.alternateBounds.width+=b),f.setGeometry(u,w));a<g.length-1&&(u=g[a+1],w=this.getCellGeometry(u),null!=w&&(w=w.clone(),
+w.x+=b,e||(w.width-=b,null!=w.alternateBounds&&(w.alternateBounds.width-=b)),f.setGeometry(u,w)))}if(m||e){var z=this.getCellGeometry(d);null!=z&&(z=z.clone(),z.width+=b,f.setGeometry(d,z))}null!=this.layoutManager&&this.layoutManager.executeLayout(d)}finally{f.endUpdate()}};function TableLayout(a){mxGraphLayout.call(this,a)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};TableLayout.prototype.getSize=function(a,b){for(var e=0,f=0;f<a.length;f++)if(!this.isVertexIgnored(a[f])){var h=this.graph.getCellGeometry(a[f]);null!=h&&(e+=b?h.width:h.height)}return e};
TableLayout.prototype.getRowLayout=function(a,b){var e=this.graph.model.getChildCells(a,!0),f=this.graph.getActualStartSize(a,!0);a=this.getSize(e,!0);b=b-f.x-f.width;var h=[];f=f.x;for(var d=0;d<e.length;d++){var g=this.graph.getCellGeometry(e[d]);null!=g&&(f+=(null!=g.alternateBounds?g.alternateBounds.width:g.width)*b/a,h.push(Math.round(f)))}return h};
TableLayout.prototype.layoutRow=function(a,b,e,f){var h=this.graph.getModel(),d=h.getChildCells(a,!0);a=this.graph.getActualStartSize(a,!0);var g=a.x,m=0;null!=b&&(b=b.slice(),b.splice(0,0,a.x));for(var p=0;p<d.length;p++){var k=this.graph.getCellGeometry(d[p]);null!=k&&(k=k.clone(),k.y=a.y,k.height=e-a.y-a.height,null!=b?(k.x=b[p],k.width=b[p+1]-k.x,p==d.length-1&&p<b.length-2&&(k.width=f-k.x-a.x-a.width)):(k.x=g,g+=k.width,p==d.length-1?k.width=f-a.x-a.width-m:m+=k.width),k.alternateBounds=new mxRectangle(0,
0,k.width,k.height),h.setGeometry(d[p],k))}return m};
-TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),h="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var g=this.graph.getModel(),m=0;g.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=g.getChildCells(a,!0),x=0;x<u.length;x++)g.setVisible(u[x],!0);var z=this.getSize(u,!1);if(0<p&&0<k&&0<
-u.length&&0<z){if(h){var C=this.graph.getCellGeometry(u[u.length-1]);null!=C&&(C=C.clone(),C.height=p-z+C.height,g.setGeometry(u[u.length-1],C))}var E=d?null:this.getRowLayout(u[0],k),D=[],G=b.y;for(x=0;x<u.length;x++)C=this.graph.getCellGeometry(u[x]),null!=C&&(C=C.clone(),C.x=b.x,C.width=k,C.y=Math.round(G),G=h||f?G+C.height:G+C.height/z*p,C.height=Math.round(G)-C.y,g.setGeometry(u[x],C)),m=Math.max(m,this.layoutRow(u[x],E,C.height,k,D));f&&p<z&&(e=e.clone(),e.height=G+b.height,g.setGeometry(a,
-e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(I){g.setVisible(I.cell,I.actual.cell==I.cell);if(I.actual.cell!=I.cell){if(I.actual.row==I.row){var L=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo;I.actual.geo.width+=L.width}I.actual.col==I.col&&(L=null!=I.geo.alternateBounds?I.geo.alternateBounds:I.geo,I.actual.geo.height+=L.height)}}))}else for(x=0;x<u.length;x++)g.setVisible(u[x],
+TableLayout.prototype.execute=function(a){if(null!=a){var b=this.graph.getActualStartSize(a,!0),e=this.graph.getCellGeometry(a),f=this.graph.getCellStyle(a),h="1"==mxUtils.getValue(f,"resizeLastRow","0"),d="1"==mxUtils.getValue(f,"resizeLast","0");f="1"==mxUtils.getValue(f,"fixedRows","0");var g=this.graph.getModel(),m=0;g.beginUpdate();try{for(var p=e.height-b.y-b.height,k=e.width-b.x-b.width,u=g.getChildCells(a,!0),w=0;w<u.length;w++)g.setVisible(u[w],!0);var z=this.getSize(u,!1);if(0<p&&0<k&&0<
+u.length&&0<z){if(h){var C=this.graph.getCellGeometry(u[u.length-1]);null!=C&&(C=C.clone(),C.height=p-z+C.height,g.setGeometry(u[u.length-1],C))}var E=d?null:this.getRowLayout(u[0],k),D=[],G=b.y;for(w=0;w<u.length;w++)C=this.graph.getCellGeometry(u[w]),null!=C&&(C=C.clone(),C.x=b.x,C.width=k,C.y=Math.round(G),G=h||f?G+C.height:G+C.height/z*p,C.height=Math.round(G)-C.y,g.setGeometry(u[w],C)),m=Math.max(m,this.layoutRow(u[w],E,C.height,k,D));f&&p<z&&(e=e.clone(),e.height=G+b.height,g.setGeometry(a,
+e));d&&k<m+Graph.minTableColumnWidth&&(e=e.clone(),e.width=m+b.width+b.x+Graph.minTableColumnWidth,g.setGeometry(a,e));this.graph.visitTableCells(a,mxUtils.bind(this,function(K){g.setVisible(K.cell,K.actual.cell==K.cell);if(K.actual.cell!=K.cell){if(K.actual.row==K.row){var L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo;K.actual.geo.width+=L.width}K.actual.col==K.col&&(L=null!=K.geo.alternateBounds?K.geo.alternateBounds:K.geo,K.actual.geo.height+=L.height)}}))}else for(w=0;w<u.length;w++)g.setVisible(u[w],
!1)}finally{g.endUpdate()}}};
-(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(x,z){z=null!=z?z:!0;var C=this.getState(x);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&!C.invalid&&this.updateLineJumps(C)&&this.graph.cellRenderer.redraw(C,!1,this.isRendering());C=b.apply(this,
-arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var x=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
-x)for(var z=0;z<x.length;z++)if("hidden"!=x[z].getAttribute("visibility"))return x[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(x){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;
-mxShape.prototype.createSvgCanvas=function(x){x=f.apply(this,arguments);null!=this.state&&(x.adaptiveColors=this.state.view.graph.getAdaptiveColors());return x};var h=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(x,z){return h.apply(this,arguments)||null!=x.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,x.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(x){d.apply(this,arguments);
-this.graph.model.isEdge(x.cell)&&1!=x.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(x)};mxGraphView.prototype.updateLineJumps=function(x){var z=x.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=x.routedPoints,E=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(x.style,"jumpStyle","none")){var D=function(na,qa,O){var Z=new mxPoint(qa,O);Z.type=na;E.push(Z);Z=null!=x.routedPoints?x.routedPoints[E.length-1]:null;return null==Z||Z.type!=na||Z.x!=qa||Z.y!=O},G=.5*this.scale;
-C=!1;E=[];for(var I=0;I<z.length-1;I++){for(var L=z[I+1],T=z[I],K=[],U=z[I+2];I<z.length-2&&mxUtils.ptSegDistSq(T.x,T.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,I++,U=z[I+2];C=D(0,T.x,T.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var Q=this.validEdges[Y],P=Q.absolutePoints;if(null!=P&&mxUtils.intersects(x,Q)&&"1"!=Q.style.noJump){var M=null;for(Q=0;Q<P.length-1;Q++){var V=P[Q+1],aa=P[Q];for(U=P[Q+2];Q<P.length-2&&mxUtils.ptSegDistSq(aa.x,aa.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,
-Q++,U=P[Q+2];var ia=mxUtils.intersection(T.x,T.y,L.x,L.y,aa.x,aa.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-T.x)>G||Math.abs(ia.y-T.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==M||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,M.x,M.y)>G||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,aa.x,aa.y)>G)&&(null==U||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(T.x,T.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-T.x;M=ia.y-T.y;ia={distSq:U*U+M*M,x:ia.x,y:ia.y};for(U=0;U<K.length;U++)if(K[U].distSq>ia.distSq){K.splice(U,
-0,ia);ia=null;break}null==ia||0!=K.length&&K[K.length-1].x===ia.x&&K[K.length-1].y===ia.y||K.push(ia)}M=aa}}}for(Q=0;Q<K.length;Q++)C=D(1,K[Q].x,K[Q].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}x.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(x,z,C){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)g.apply(this,
-arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),I=!0,L=null,T=null,K=[],U=null;x.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var Q=this.state.routedPoints[Y],P=new mxPoint(Q.x/this.scale,Q.y/this.scale);0==Y?P=z[0]:Y==this.state.routedPoints.length-1&&(P=z[z.length-1]);var M=!1;if(null!=
-L&&1==Q.type){var V=this.state.routedPoints[Y+1];Q=V.x/this.scale-P.x;V=V.y/this.scale-P.y;Q=Q*Q+V*V;null==U&&(U=new mxPoint(P.x-L.x,P.y-L.y),T=Math.sqrt(U.x*U.x+U.y*U.y),0<T?(U.x=U.x*D/T,U.y=U.y*D/T):U=null);Q>D*D&&0<T&&(Q=L.x-P.x,V=L.y-P.y,Q=Q*Q+V*V,Q>D*D&&(M=new mxPoint(P.x-U.x,P.y-U.y),Q=new mxPoint(P.x+U.x,P.y+U.y),K.push(M),this.addPoints(x,K,C,E,!1,null,I),K=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,I=!1,"sharp"==G?(x.lineTo(M.x-U.y*K,M.y+U.x*K),x.lineTo(Q.x-U.y*K,Q.y+
-U.x*K),x.lineTo(Q.x,Q.y)):"line"==G?(x.moveTo(M.x+U.y*K,M.y-U.x*K),x.lineTo(M.x-U.y*K,M.y+U.x*K),x.moveTo(Q.x-U.y*K,Q.y+U.x*K),x.lineTo(Q.x+U.y*K,Q.y-U.x*K),x.moveTo(Q.x,Q.y)):"arc"==G?(K*=1.3,x.curveTo(M.x-U.y*K,M.y+U.x*K,Q.x-U.y*K,Q.y+U.x*K,Q.x,Q.y)):(x.moveTo(Q.x,Q.y),I=!0),K=[Q],M=!0))}else U=null;M||(K.push(P),L=P)}this.addPoints(x,K,C,E,!1,null,I);x.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(x,z,C,E){return null!=z&&"centerPerimeter"==
-z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(x,z,C,E){if(null==z||null==x||"1"!=z.style.snapToPoint&&"1"!=x.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(x,z,E);var D=this.getNextPoint(x,C,E),G=this.graph.isOrthogonal(x),I=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),
-z.getCenterY());if(0!=I){var T=Math.cos(-I),K=Math.sin(-I);D=mxUtils.getRotatedPoint(D,T,K,L)}T=parseFloat(x.style[mxConstants.STYLE_PERIMETER_SPACING]||0);T+=parseFloat(x.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==I&&G,T);0!=I&&(T=Math.cos(I),K=Math.sin(I),D=mxUtils.getRotatedPoint(D,T,K,L));x.setAbsoluteTerminalPoint(this.snapToAnchorPoint(x,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(x,z,
-C,E,D){if(null!=z&&null!=x){x=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=x)for(var G=0;G<x.length;G++){var I=this.graph.getConnectionPoint(z,x[G]);if(null!=I){var L=(I.x-D.x)*(I.x-D.x)+(I.y-D.y)*(I.y-D.y);if(null==E||L<E)C=I,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(x,z,C){var E=k.apply(this,arguments);"1"==x.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,
-E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(x){if(null!=x.style&&"undefined"!==typeof pako){var z=mxUtils.getValue(x.style,mxConstants.STYLE_SHAPE,null);if(null!=z&&"string"===typeof z&&"stencil("==z.substring(0,8))try{var C=z.substring(8,z.length-1),E=mxUtils.parseXml(Graph.decompress(C));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();
+(function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(w,z){z=null!=z?z:!0;var C=this.getState(w);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&!C.invalid&&this.updateLineJumps(C)&&this.graph.cellRenderer.redraw(C,!1,this.isRendering());C=b.apply(this,
+arguments);null!=C&&z&&this.graph.model.isEdge(C.cell)&&null!=C.style&&1!=C.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(C);return C};mxShape.prototype.isFlowAnimationEnabled=function(){return null!=this.state&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")};mxShape.prototype.getFlowAnimationPath=function(){var w=null!=this.node?this.node.getElementsByTagName("path"):null;if(null!=
+w)for(var z=0;z<w.length;z++)if("hidden"!=w[z].getAttribute("visibility"))return w[z];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var e=mxShape.prototype.paint;mxShape.prototype.paint=function(w){e.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var f=mxShape.prototype.createSvgCanvas;
+mxShape.prototype.createSvgCanvas=function(w){w=f.apply(this,arguments);null!=this.state&&(w.adaptiveColors=this.state.view.graph.getAdaptiveColors());return w};var h=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(w,z){return h.apply(this,arguments)||null!=w.routedPoints&&null!=z.routedPoints&&!mxUtils.equalPoints(z.routedPoints,w.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(w){d.apply(this,arguments);
+this.graph.model.isEdge(w.cell)&&1!=w.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(w)};mxGraphView.prototype.updateLineJumps=function(w){var z=w.absolutePoints;if(Graph.lineJumpsEnabled){var C=null!=w.routedPoints,E=null;if(null!=z&&null!=this.validEdges&&"none"!==mxUtils.getValue(w.style,"jumpStyle","none")){var D=function(oa,sa,O){var X=new mxPoint(sa,O);X.type=oa;E.push(X);X=null!=w.routedPoints?w.routedPoints[E.length-1]:null;return null==X||X.type!=oa||X.x!=sa||X.y!=O},G=.5*this.scale;
+C=!1;E=[];for(var K=0;K<z.length-1;K++){for(var L=z[K+1],Q=z[K],N=[],U=z[K+2];K<z.length-2&&mxUtils.ptSegDistSq(Q.x,Q.y,U.x,U.y,L.x,L.y)<1*this.scale*this.scale;)L=U,K++,U=z[K+2];C=D(0,Q.x,Q.y)||C;for(var Y=0;Y<this.validEdges.length;Y++){var P=this.validEdges[Y],T=P.absolutePoints;if(null!=T&&mxUtils.intersects(w,P)&&"1"!=P.style.noJump){var J=null;for(P=0;P<T.length-1;P++){var V=T[P+1],Z=T[P];for(U=T[P+2];P<T.length-2&&mxUtils.ptSegDistSq(Z.x,Z.y,U.x,U.y,V.x,V.y)<1*this.scale*this.scale;)V=U,P++,
+U=T[P+2];var ia=mxUtils.intersection(Q.x,Q.y,L.x,L.y,Z.x,Z.y,V.x,V.y);if(null!=ia&&(Math.abs(ia.x-Q.x)>G||Math.abs(ia.y-Q.y)>G)&&(Math.abs(ia.x-L.x)>G||Math.abs(ia.y-L.y)>G)&&(null==J||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,J.x,J.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,Z.x,Z.y)>G)&&(null==U||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,U.x,U.y)>G||mxUtils.ptLineDist(Q.x,Q.y,L.x,L.y,V.x,V.y)>G)){U=ia.x-Q.x;J=ia.y-Q.y;ia={distSq:U*U+J*J,x:ia.x,y:ia.y};for(U=0;U<N.length;U++)if(N[U].distSq>ia.distSq){N.splice(U,
+0,ia);ia=null;break}null==ia||0!=N.length&&N[N.length-1].x===ia.x&&N[N.length-1].y===ia.y||N.push(ia)}J=Z}}}for(P=0;P<N.length;P++)C=D(1,N[P].x,N[P].y)||C}ia=z[z.length-1];C=D(0,ia.x,ia.y)||C}w.routedPoints=E;return C}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(w,z,C){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)g.apply(this,
+arguments);else{var E=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,D=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,G=mxUtils.getValue(this.style,"jumpStyle","none"),K=!0,L=null,Q=null,N=[],U=null;w.begin();for(var Y=0;Y<this.state.routedPoints.length;Y++){var P=this.state.routedPoints[Y],T=new mxPoint(P.x/this.scale,P.y/this.scale);0==Y?T=z[0]:Y==this.state.routedPoints.length-1&&(T=z[z.length-1]);var J=!1;if(null!=
+L&&1==P.type){var V=this.state.routedPoints[Y+1];P=V.x/this.scale-T.x;V=V.y/this.scale-T.y;P=P*P+V*V;null==U&&(U=new mxPoint(T.x-L.x,T.y-L.y),Q=Math.sqrt(U.x*U.x+U.y*U.y),0<Q?(U.x=U.x*D/Q,U.y=U.y*D/Q):U=null);P>D*D&&0<Q&&(P=L.x-T.x,V=L.y-T.y,P=P*P+V*V,P>D*D&&(J=new mxPoint(T.x-U.x,T.y-U.y),P=new mxPoint(T.x+U.x,T.y+U.y),N.push(J),this.addPoints(w,N,C,E,!1,null,K),N=0>Math.round(U.x)||0==Math.round(U.x)&&0>=Math.round(U.y)?1:-1,K=!1,"sharp"==G?(w.lineTo(J.x-U.y*N,J.y+U.x*N),w.lineTo(P.x-U.y*N,P.y+
+U.x*N),w.lineTo(P.x,P.y)):"line"==G?(w.moveTo(J.x+U.y*N,J.y-U.x*N),w.lineTo(J.x-U.y*N,J.y+U.x*N),w.moveTo(P.x-U.y*N,P.y+U.x*N),w.lineTo(P.x+U.y*N,P.y-U.x*N),w.moveTo(P.x,P.y)):"arc"==G?(N*=1.3,w.curveTo(J.x-U.y*N,J.y+U.x*N,P.x-U.y*N,P.y+U.x*N,P.x,P.y)):(w.moveTo(P.x,P.y),K=!0),N=[P],J=!0))}else U=null;J||(N.push(T),L=T)}this.addPoints(w,N,C,E,!1,null,K);w.stroke()}};var m=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(w,z,C,E){return null!=z&&"centerPerimeter"==
+z.style[mxConstants.STYLE_PERIMETER]?new mxPoint(z.getCenterX(),z.getCenterY()):m.apply(this,arguments)};var p=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(w,z,C,E){if(null==z||null==w||"1"!=z.style.snapToPoint&&"1"!=w.style.snapToPoint)p.apply(this,arguments);else{z=this.getTerminalPort(w,z,E);var D=this.getNextPoint(w,C,E),G=this.graph.isOrthogonal(w),K=mxUtils.toRadians(Number(z.style[mxConstants.STYLE_ROTATION]||"0")),L=new mxPoint(z.getCenterX(),
+z.getCenterY());if(0!=K){var Q=Math.cos(-K),N=Math.sin(-K);D=mxUtils.getRotatedPoint(D,Q,N,L)}Q=parseFloat(w.style[mxConstants.STYLE_PERIMETER_SPACING]||0);Q+=parseFloat(w.style[E?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);D=this.getPerimeterPoint(z,D,0==K&&G,Q);0!=K&&(Q=Math.cos(K),N=Math.sin(K),D=mxUtils.getRotatedPoint(D,Q,N,L));w.setAbsoluteTerminalPoint(this.snapToAnchorPoint(w,z,C,E,D),E)}};mxGraphView.prototype.snapToAnchorPoint=function(w,z,
+C,E,D){if(null!=z&&null!=w){w=this.graph.getAllConnectionConstraints(z);E=C=null;if(null!=w)for(var G=0;G<w.length;G++){var K=this.graph.getConnectionPoint(z,w[G]);if(null!=K){var L=(K.x-D.x)*(K.x-D.x)+(K.y-D.y)*(K.y-D.y);if(null==E||L<E)C=K,E=L}}null!=C&&(D=C)}return D};var k=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(w,z,C){var E=k.apply(this,arguments);"1"==w.getAttribute("placeholders")&&null!=C.state&&(E=C.state.view.graph.replacePlaceholders(C.state.cell,
+E));return E};var u=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(w){if(null!=w.style&&"undefined"!==typeof pako){var z=mxUtils.getValue(w.style,mxConstants.STYLE_SHAPE,null);if(null!=z&&"string"===typeof z&&"stencil("==z.substring(0,8))try{var C=z.substring(8,z.length-1),E=mxUtils.parseXml(Graph.decompress(C));return new mxShape(new mxStencil(E.documentElement))}catch(D){null!=window.console&&console.log("Error in shape: "+D)}}return u.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};mxStencilRegistry.isFileLoaded=function(a){return!mxClient.IS_FF&&mxStencilRegistry.filesLoaded[a]};mxStencilRegistry.setFileLoaded=function(a){mxStencilRegistry.filesLoaded[a]=!0};
mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var f=0;f<b.length;f++){var h=b[f];if(!mxStencilRegistry.isFileLoaded(h))if(mxStencilRegistry.setFileLoaded(h),".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,
null);else if(".js"==h.toLowerCase().substring(h.length-3,h.length))try{if(mxStencilRegistry.allowEval){var d=mxUtils.load(h);null!=d&&200<=d.getStatus()&&299>=d.getStatus()&&eval.call(window,d.getText())}}catch(g){null!=window.console&&console.log("error in getStencil:",a,e,b,h,g)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
@@ -2805,150 +2806,150 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
5;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#707070" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#707070" stroke-width="2" fill="none"/>').src;mxWindow.prototype.resizeImage=Graph.createSvgImage(10,10,'<path d="Z" stroke="#C0C0C0" stroke-width="1" fill="none"/>').src;
mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(q){return!mxEvent.isAltDown(q)||mxEvent.isShiftDown(q)};var e=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(q){return e.apply(this,arguments)||this.graph.isTableRow(q)||this.graph.isTableCell(q)};var f=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=
function(q){return f.apply(this,arguments)||this.graph.isEdgeIgnored(q)};var h=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(q){return this.graph.isCloneEvent(q)!=h.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var q=new mxEllipse(null,this.highlightColor,this.highlightColor,0);q.opacity=mxConstants.HIGHLIGHT_OPACITY;return q};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor=
-"crosshair";mxConnectionHandler.prototype.createEdgeState=function(q){q=this.graph.createCurrentEdgeStyle();q=this.graph.createEdge(null,null,null,null,null,q);q=new mxCellState(this.graph.view,q,this.graph.getCellStyle(q));for(var A in this.graph.currentEdgeStyle)q.style[A]=this.graph.currentEdgeStyle[A];if(null!=this.previous){var B=this.previous.style.newEdgeStyle;if(null!=B)try{var F=JSON.parse(B);for(A in F)q.style[A]=F[A]}catch(N){}}q.style=this.graph.postProcessCellStyle(q.cell,q.style);return q};
+"crosshair";mxConnectionHandler.prototype.createEdgeState=function(q){q=this.graph.createCurrentEdgeStyle();q=this.graph.createEdge(null,null,null,null,null,q);q=new mxCellState(this.graph.view,q,this.graph.getCellStyle(q));for(var A in this.graph.currentEdgeStyle)q.style[A]=this.graph.currentEdgeStyle[A];if(null!=this.previous){var B=this.previous.style.newEdgeStyle;if(null!=B)try{var F=JSON.parse(B);for(A in F)q.style[A]=F[A]}catch(M){}}q.style=this.graph.postProcessCellStyle(q.cell,q.style);return q};
var d=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var q=d.apply(this,arguments);q.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];return q};mxConnectionHandler.prototype.updatePreview=function(q){};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var q=g.apply(this,arguments),A=q.getCell;q.getCell=mxUtils.bind(this,function(B){var F=A.apply(this,arguments);this.error=null;return F});
return q};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){for(var q="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",A="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),B=0;B<A.length;B++)null!=
this.currentEdgeStyle[A[B]]&&(q+=A[B]+"="+this.currentEdgeStyle[A[B]]+";");null!=this.currentEdgeStyle.orthogonalLoop?q+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&(q+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?q+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(q+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+
";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(q+="elbow="+this.currentEdgeStyle.elbow+";");return q=null!=this.currentEdgeStyle.html?q+("html="+this.currentEdgeStyle.html+";"):q+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var q=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=
-q&&(new mxCodec(q.ownerDocument)).decode(q,this.getStylesheet())};Graph.prototype.createCellLookup=function(q,A){A=null!=A?A:{};for(var B=0;B<q.length;B++){var F=q[B];A[mxObjectIdentity.get(F)]=F.getId();for(var N=this.model.getChildCount(F),R=0;R<N;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(q,A,B){B=null!=B?B:{};for(var F in q){var N=A[F];null==B[N]&&(B[N]=q[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(q,A,
-B,F){A=null!=A?A:0;B=null!=B?B:0;var N=new mxCodec(q.ownerDocument),R=new mxGraphModel;N.decode(q,R);q=[];N={};var X={},fa=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),N));if(null!=fa){var da=this.createCellLookup([R.root]);fa=fa.slice();this.model.beginUpdate();try{if(1!=fa.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<fa.length;R++)ha=this.model.getChildren(this.moveCells([fa[R]],A,B,!1,this.model.getRoot())[0]),null!=ha&&(q=q.concat(ha));else{var ha=R.getChildren(fa[0]);
-null!=ha&&(q=this.moveCells(ha,A,B,!1,this.getDefaultParent()),X[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(N,da,X),this.updateCustomLinks(X,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(q,!0);null!=va&&this.moveCells(q,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,N=0;N<q.length;N++)F.put(q[N],
-!0);var R=new mxCodec,X=new mxGraphModel,fa=X.getChildAt(X.getRoot(),0);for(N=0;N<B.length;N++){X.add(fa,B[N]);var da=this.view.getState(q[N]);if(null!=da){var ha=this.getCellGeometry(B[N]);null!=ha&&ha.relative&&!this.model.isEdge(q[N])&&null==F.get(this.model.getParent(q[N]))&&(ha.offset=null,ha.relative=!1,ha.x=da.x/da.view.scale-da.view.translate.x,ha.y=da.y/da.view.scale-da.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(X)};Graph.prototype.isSwimlane=
+q&&(new mxCodec(q.ownerDocument)).decode(q,this.getStylesheet())};Graph.prototype.createCellLookup=function(q,A){A=null!=A?A:{};for(var B=0;B<q.length;B++){var F=q[B];A[mxObjectIdentity.get(F)]=F.getId();for(var M=this.model.getChildCount(F),R=0;R<M;R++)this.createCellLookup([this.model.getChildAt(F,R)],A)}return A};Graph.prototype.createCellMapping=function(q,A,B){B=null!=B?B:{};for(var F in q){var M=A[F];null==B[M]&&(B[M]=q[F].getId()||"")}return B};Graph.prototype.importGraphModel=function(q,A,
+B,F){A=null!=A?A:0;B=null!=B?B:0;var M=new mxCodec(q.ownerDocument),R=new mxGraphModel;M.decode(q,R);q=[];M={};var W={},ha=R.getChildren(this.cloneCell(R.root,this.isCloneInvalidEdges(),M));if(null!=ha){var fa=this.createCellLookup([R.root]);ha=ha.slice();this.model.beginUpdate();try{if(1!=ha.length||this.isCellLocked(this.getDefaultParent()))for(R=0;R<ha.length;R++)ja=this.model.getChildren(this.moveCells([ha[R]],A,B,!1,this.model.getRoot())[0]),null!=ja&&(q=q.concat(ja));else{var ja=R.getChildren(ha[0]);
+null!=ja&&(q=this.moveCells(ja,A,B,!1,this.getDefaultParent()),W[R.getChildAt(R.root,0).getId()]=this.getDefaultParent().getId())}if(null!=q&&(this.createCellMapping(M,fa,W),this.updateCustomLinks(W,q),F)){this.isGridEnabled()&&(A=this.snap(A),B=this.snap(B));var va=this.getBoundingBoxFromGeometry(q,!0);null!=va&&this.moveCells(q,A-va.x,B-va.y)}}finally{this.model.endUpdate()}}return q};Graph.prototype.encodeCells=function(q){for(var A={},B=this.cloneCells(q,null,A),F=new mxDictionary,M=0;M<q.length;M++)F.put(q[M],
+!0);var R=new mxCodec,W=new mxGraphModel,ha=W.getChildAt(W.getRoot(),0);for(M=0;M<B.length;M++){W.add(ha,B[M]);var fa=this.view.getState(q[M]);if(null!=fa){var ja=this.getCellGeometry(B[M]);null!=ja&&ja.relative&&!this.model.isEdge(q[M])&&null==F.get(this.model.getParent(q[M]))&&(ja.offset=null,ja.relative=!1,ja.x=fa.x/fa.view.scale-fa.view.translate.x,ja.y=fa.y/fa.view.scale-fa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(A,this.createCellLookup(q)),B);return R.encode(W)};Graph.prototype.isSwimlane=
function(q,A){var B=null;null==q||this.model.isEdge(q)||this.model.getParent(q)==this.model.getRoot()||(B=this.getCurrentCellStyle(q,A)[mxConstants.STYLE_SHAPE]);return B==mxConstants.SHAPE_SWIMLANE||"table"==B||"tableRow"==B};var m=Graph.prototype.isCellEditable;Graph.prototype.isCellEditable=function(q){return null!=q&&m.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellEditable(this.model.getParent(q)):!0:!1};var p=Graph.prototype.isCellMovable;Graph.prototype.isCellMovable=
-function(q){return null!=q&&p.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellMovable(this.model.getParent(q)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(q){var A=this.model.getParent(q);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(q,A,B,F,N,R,X,fa){null==fa&&(fa=this.model.getParent(q),
-this.isTable(fa)||this.isTableRow(fa))&&(fa=this.getCellAt(R,X,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[q,A,B,F,N,R,X,fa]);this.model.setValue(B,"");var da=this.getChildCells(B,!0);for(A=0;A<da.length;A++){var ha=this.getCellGeometry(da[A]);null!=ha&&ha.relative&&0<ha.x&&this.model.remove(da[A])}var va=this.getChildCells(q,!0);for(A=0;A<va.length;A++)ha=this.getCellGeometry(va[A]),null!=ha&&ha.relative&&0>=ha.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
-if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var x=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)x.apply(this,arguments);else{var F=this.getSelectionCell(),N=null,R=[],X=mxUtils.bind(this,
-function(fa){if(null!=this.view.getState(fa)&&(this.model.isVertex(fa)||this.model.isEdge(fa)))if(R.push(fa),fa==F)N=R.length-1;else if(q&&null==F&&0<R.length||null!=N&&q&&R.length>N||!q&&0<N)return;for(var da=0;da<this.model.getChildCount(fa);da++)X(this.model.getChildAt(fa,da))});X(this.model.root);0<R.length&&(N=null!=N?mxUtils.mod(N+(q?1:-1),R.length):0,this.setSelectionCell(R[N]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,
-A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);if(null!=B&&null!=F){var N=B.clone(),R=F.clone();this.model.beginUpdate();try{N.x=F.getCenterX()-B.width/2,N.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,N),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,N,R,X){X=null!=X?X:{};if(this.isTable(N)){for(var fa=[],da=0;da<q.length;da++)this.isTable(q[da])?
-fa=fa.concat(this.model.getChildCells(q[da],!0).reverse()):fa.push(q[da]);q=fa}this.model.beginUpdate();try{fa=[];for(da=0;da<q.length;da++)if(null!=N&&this.isTableRow(q[da])){var ha=this.model.getParent(q[da]),va=this.getCellGeometry(q[da]);this.isTable(ha)&&fa.push(ha);if(null!=ha&&null!=va&&this.isTable(ha)&&this.isTable(N)&&(F||ha!=N)){if(!F){var Ma=this.getCellGeometry(ha);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ha,Ma))}Ma=this.getCellGeometry(N);null!=Ma&&(Ma=Ma.clone(),
-Ma.height+=va.height,this.model.setGeometry(N,Ma));var Na=this.model.getChildCells(N,!0);if(0<Na.length){q[da]=F?this.cloneCell(q[da]):q[da];var ya=this.model.getChildCells(q[da],!0),Ga=this.model.getChildCells(Na[0],!0),wa=Ga.length-ya.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Va=this.cloneCell(ya[ya.length-1]);null!=Va&&(Va.value="",this.model.add(q[da],Va))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(ya[ya.length+ua-1]);ya=this.model.getChildCells(q[da],!0);for(ua=0;ua<Ga.length;ua++){var Qa=
-this.getCellGeometry(Ga[ua]),Ka=this.getCellGeometry(ya[ua]);null!=Qa&&null!=Ka&&(Ka=Ka.clone(),Ka.width=Qa.width,this.model.setGeometry(ya[ua],Ka))}}}}var Ua=z.apply(this,arguments);for(da=0;da<fa.length;da++)!F&&this.model.contains(fa[da])&&0==this.model.getChildCount(fa[da])&&this.model.remove(fa[da]);F&&this.updateCustomLinks(this.createCellMapping(X,this.createCellLookup(q)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,
-A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var N=this.model.getParent(q[F]),R=this.model.getParent(N);1==this.model.getChildCount(N)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var X=this.model.getChildCells(R,!0),fa=0,da=0;da<X.length;da++)0<=mxUtils.indexOf(q,
-X[da])&&fa++;fa==X.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
-function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var N=q.shape.scale;B=A.width/N;A=A.height/N;if(F==mxConstants.DIRECTION_NORTH||
+function(q){return null!=q&&p.apply(this,arguments)?this.isTableCell(q)||this.isTableRow(q)?this.isCellMovable(this.model.getParent(q)):!0:!1};var k=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(q){var A=this.model.getParent(q);if(null!=A){var B=this.getCurrentCellStyle(A);if(null!=B.expand)return"0"!=B.expand}return k.apply(this,arguments)&&(null==A||!this.isTable(A))};var u=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(q,A,B,F,M,R,W,ha){null==ha&&(ha=this.model.getParent(q),
+this.isTable(ha)||this.isTableRow(ha))&&(ha=this.getCellAt(R,W,null,!0,!1));B=null;this.model.beginUpdate();try{B=u.apply(this,[q,A,B,F,M,R,W,ha]);this.model.setValue(B,"");var fa=this.getChildCells(B,!0);for(A=0;A<fa.length;A++){var ja=this.getCellGeometry(fa[A]);null!=ja&&ja.relative&&0<ja.x&&this.model.remove(fa[A])}var va=this.getChildCells(q,!0);for(A=0;A<va.length;A++)ja=this.getCellGeometry(va[A]),null!=ja&&ja.relative&&0>=ja.x&&this.model.remove(va[A]);var Ma=this.model.getTerminal(B,!1);
+if(null!=Ma){var Na=this.getCurrentCellStyle(Ma);null!=Na&&"1"==Na.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[q]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[q]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[B]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[B]))}}finally{this.model.endUpdate()}return B};var w=Graph.prototype.selectCell;Graph.prototype.selectCell=function(q,A,B){if(A||B)w.apply(this,arguments);else{var F=this.getSelectionCell(),M=null,R=[],W=mxUtils.bind(this,
+function(ha){if(null!=this.view.getState(ha)&&(this.model.isVertex(ha)||this.model.isEdge(ha)))if(R.push(ha),ha==F)M=R.length-1;else if(q&&null==F&&0<R.length||null!=M&&q&&R.length>M||!q&&0<M)return;for(var fa=0;fa<this.model.getChildCount(ha);fa++)W(this.model.getChildAt(ha,fa))});W(this.model.root);0<R.length&&(M=null!=M?mxUtils.mod(M+(q?1:-1),R.length):0,this.setSelectionCell(R[M]))}};Graph.prototype.swapShapes=function(q,A){if(this.model.isVertex(q)&&this.model.isVertex(A)&&2==this.getMovableCells([q,
+A]).length){var B=this.getCellGeometry(q),F=this.getCellGeometry(A);if(null!=B&&null!=F){var M=B.clone(),R=F.clone();this.model.beginUpdate();try{M.x=F.getCenterX()-B.width/2,M.y=F.getCenterY()-B.height/2,R.x=B.getCenterX()-F.width/2,R.y=B.getCenterY()-F.height/2,this.model.setGeometry(q,M),this.model.setGeometry(A,R)}finally{this.model.endUpdate()}}}};var z=Graph.prototype.moveCells;Graph.prototype.moveCells=function(q,A,B,F,M,R,W){W=null!=W?W:{};if(this.isTable(M)){for(var ha=[],fa=0;fa<q.length;fa++)this.isTable(q[fa])?
+ha=ha.concat(this.model.getChildCells(q[fa],!0).reverse()):ha.push(q[fa]);q=ha}this.model.beginUpdate();try{ha=[];for(fa=0;fa<q.length;fa++)if(null!=M&&this.isTableRow(q[fa])){var ja=this.model.getParent(q[fa]),va=this.getCellGeometry(q[fa]);this.isTable(ja)&&ha.push(ja);if(null!=ja&&null!=va&&this.isTable(ja)&&this.isTable(M)&&(F||ja!=M)){if(!F){var Ma=this.getCellGeometry(ja);null!=Ma&&(Ma=Ma.clone(),Ma.height-=va.height,this.model.setGeometry(ja,Ma))}Ma=this.getCellGeometry(M);null!=Ma&&(Ma=Ma.clone(),
+Ma.height+=va.height,this.model.setGeometry(M,Ma));var Na=this.model.getChildCells(M,!0);if(0<Na.length){q[fa]=F?this.cloneCell(q[fa]):q[fa];var ya=this.model.getChildCells(q[fa],!0),Ha=this.model.getChildCells(Na[0],!0),wa=Ha.length-ya.length;if(0<wa)for(var ua=0;ua<wa;ua++){var Va=this.cloneCell(ya[ya.length-1]);null!=Va&&(Va.value="",this.model.add(q[fa],Va))}else if(0>wa)for(ua=0;ua>wa;ua--)this.model.remove(ya[ya.length+ua-1]);ya=this.model.getChildCells(q[fa],!0);for(ua=0;ua<Ha.length;ua++){var Qa=
+this.getCellGeometry(Ha[ua]),Ka=this.getCellGeometry(ya[ua]);null!=Qa&&null!=Ka&&(Ka=Ka.clone(),Ka.width=Qa.width,this.model.setGeometry(ya[ua],Ka))}}}}var Ua=z.apply(this,arguments);for(fa=0;fa<ha.length;fa++)!F&&this.model.contains(ha[fa])&&0==this.model.getChildCount(ha[fa])&&this.model.remove(ha[fa]);F&&this.updateCustomLinks(this.createCellMapping(W,this.createCellLookup(q)),Ua)}finally{this.model.endUpdate()}return Ua};var C=Graph.prototype.removeCells;Graph.prototype.removeCells=function(q,
+A){var B=[];this.model.beginUpdate();try{for(var F=0;F<q.length;F++)if(this.isTableCell(q[F])){var M=this.model.getParent(q[F]),R=this.model.getParent(M);1==this.model.getChildCount(M)&&1==this.model.getChildCount(R)?0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R)&&B.push(R):this.labelChanged(q[F],"")}else{if(this.isTableRow(q[F])&&(R=this.model.getParent(q[F]),0>mxUtils.indexOf(q,R)&&0>mxUtils.indexOf(B,R))){for(var W=this.model.getChildCells(R,!0),ha=0,fa=0;fa<W.length;fa++)0<=mxUtils.indexOf(q,
+W[fa])&&ha++;ha==W.length&&B.push(R)}B.push(q[F])}B=C.apply(this,[B,A])}finally{this.model.endUpdate()}return B};Graph.prototype.updateCustomLinks=function(q,A,B){B=null!=B?B:new Graph;for(var F=0;F<A.length;F++)null!=A[F]&&B.updateCustomLinksForCell(q,A[F],B)};Graph.prototype.updateCustomLinksForCell=function(q,A){this.doUpdateCustomLinksForCell(q,A);for(var B=this.model.getChildCount(A),F=0;F<B;F++)this.updateCustomLinksForCell(q,this.model.getChildAt(A,F))};Graph.prototype.doUpdateCustomLinksForCell=
+function(q,A){};Graph.prototype.getAllConnectionConstraints=function(q,A){if(null!=q){A=mxUtils.getValue(q.style,"points",null);if(null!=A){q=[];try{var B=JSON.parse(A);for(A=0;A<B.length;A++){var F=B[A];q.push(new mxConnectionConstraint(new mxPoint(F[0],F[1]),2<F.length?"0"!=F[2]:!0,null,3<F.length?F[3]:0,4<F.length?F[4]:0))}}catch(R){}return q}if(null!=q.shape&&null!=q.shape.bounds){F=q.shape.direction;A=q.shape.bounds;var M=q.shape.scale;B=A.width/M;A=A.height/M;if(F==mxConstants.DIRECTION_NORTH||
F==mxConstants.DIRECTION_SOUTH)F=B,B=A,A=F;A=q.shape.getConstraints(q.style,B,A);if(null!=A)return A;if(null!=q.shape.stencil&&null!=q.shape.stencil.constraints)return q.shape.stencil.constraints;if(null!=q.shape.constraints)return q.shape.constraints}}return null};Graph.prototype.flipEdge=function(q){if(null!=q){var A=this.getCurrentCellStyle(q);A=mxUtils.getValue(A,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;
-this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=this.model.getChildCount(q),B=0,F=0;F<A;F++){var N=this.model.getChildAt(q,F);this.model.isVertex(N)&&(N=this.getCellGeometry(N),null==N||N.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),N=!0,R=!0,X=0;X<A.length&&R;X++)N=N&&this.isTable(A[X]),R=R&&this.isTableRow(A[X]);return!this.isCellLocked(q)&&(this.isTargetShape(q,
-A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||N))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
+this.setCellStyles(mxConstants.STYLE_ELBOW,A,[q])}};Graph.prototype.isValidRoot=function(q){for(var A=this.model.getChildCount(q),B=0,F=0;F<A;F++){var M=this.model.getChildAt(q,F);this.model.isVertex(M)&&(M=this.getCellGeometry(M),null==M||M.relative||B++)}return 0<B||this.isContainer(q)};Graph.prototype.isValidDropTarget=function(q,A,B){for(var F=this.getCurrentCellStyle(q),M=!0,R=!0,W=0;W<A.length&&R;W++)M=M&&this.isTable(A[W]),R=R&&this.isTableRow(A[W]);return!this.isCellLocked(q)&&(this.isTargetShape(q,
+A,B)||("1"!=mxUtils.getValue(F,"part","0")||this.isContainer(q))&&"0"!=mxUtils.getValue(F,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(q))&&!this.isTableRow(q)&&(!this.isTable(q)||R||M))};Graph.prototype.createGroupCell=function(){var q=mxGraph.prototype.createGroupCell.apply(this,arguments);q.setStyle("group");return q};Graph.prototype.isExtendParentsOnAdd=function(q){var A=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(A&&null!=
q&&null!=this.layoutManager){var B=this.model.getParent(q);null!=B&&(B=this.layoutManager.getLayout(B),null!=B&&B.constructor==mxStackLayout&&(A=!1))}return A};Graph.prototype.getPreferredSizeForCell=function(q,A,B){B=null!=B?B:this.gridEnabled;var F=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=F&&(F.width+=10,F.height+=4,B&&(F.width=this.snap(F.width),F.height=this.snap(F.height)));return F};Graph.prototype.turnShapes=function(q,A){var B=this.getModel(),F=[];B.beginUpdate();
-try{for(var N=0;N<q.length;N++){var R=q[N];if(B.isEdge(R)){var X=B.getTerminal(R,!0),fa=B.getTerminal(R,!1);B.setTerminal(R,fa,!0);B.setTerminal(R,X,!1);var da=B.getGeometry(R);if(null!=da){da=da.clone();null!=da.points&&da.points.reverse();var ha=da.getTerminalPoint(!0),va=da.getTerminalPoint(!1);da.setTerminalPoint(ha,!1);da.setTerminalPoint(va,!0);B.setGeometry(R,da);var Ma=this.view.getState(R),Na=this.view.getState(X),ya=this.view.getState(fa);if(null!=Ma){var Ga=null!=Na?this.getConnectionConstraint(Ma,
-Na,!0):null,wa=null!=ya?this.getConnectionConstraint(Ma,ya,!1):null;this.setConnectionConstraint(R,X,!0,wa);this.setConnectionConstraint(R,fa,!1,Ga);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(da=this.getCellGeometry(R),null!=
-da)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){da=da.clone();da.x+=da.width/2-da.height/2;da.y+=da.height/2-da.width/2;var Va=da.width;da.width=da.height;da.height=Va;B.setGeometry(R,da)}var Qa=this.view.getState(R);if(null!=Qa){var Ka=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
+try{for(var M=0;M<q.length;M++){var R=q[M];if(B.isEdge(R)){var W=B.getTerminal(R,!0),ha=B.getTerminal(R,!1);B.setTerminal(R,ha,!0);B.setTerminal(R,W,!1);var fa=B.getGeometry(R);if(null!=fa){fa=fa.clone();null!=fa.points&&fa.points.reverse();var ja=fa.getTerminalPoint(!0),va=fa.getTerminalPoint(!1);fa.setTerminalPoint(ja,!1);fa.setTerminalPoint(va,!0);B.setGeometry(R,fa);var Ma=this.view.getState(R),Na=this.view.getState(W),ya=this.view.getState(ha);if(null!=Ma){var Ha=null!=Na?this.getConnectionConstraint(Ma,
+Na,!0):null,wa=null!=ya?this.getConnectionConstraint(Ma,ya,!1):null;this.setConnectionConstraint(R,W,!0,wa);this.setConnectionConstraint(R,ha,!1,Ha);var ua=mxUtils.getValue(Ma.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Ma.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[R]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[R])}F.push(R)}}else if(B.isVertex(R)&&(fa=this.getCellGeometry(R),null!=
+fa)){if(!(this.isTable(R)||this.isTableRow(R)||this.isTableCell(R)||this.isSwimlane(R))){fa=fa.clone();fa.x+=fa.width/2-fa.height/2;fa.y+=fa.height/2-fa.width/2;var Va=fa.width;fa.width=fa.height;fa.height=Va;B.setGeometry(R,fa)}var Qa=this.view.getState(R);if(null!=Qa){var Ka=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ua=mxUtils.getValue(Qa.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,
Ka[mxUtils.mod(mxUtils.indexOf(Ka,Ua)+(A?-1:1),Ka.length)],[R])}F.push(R)}}}finally{B.endUpdate()}return F};Graph.prototype.stencilHasPlaceholders=function(q){if(null!=q&&null!=q.fgNode)for(q=q.fgNode.firstChild;null!=q;){if("text"==q.nodeName&&"1"==q.getAttribute("placeholders"))return!0;q=q.nextSibling}return!1};var E=Graph.prototype.processChange;Graph.prototype.processChange=function(q){if(q instanceof mxGeometryChange&&(this.isTableCell(q.cell)||this.isTableRow(q.cell))&&(null==q.previous&&null!=
q.geometry||null!=q.previous&&!q.previous.equals(q.geometry))){var A=q.cell;this.isTableCell(A)&&(A=this.model.getParent(A));this.isTableRow(A)&&(A=this.model.getParent(A));var B=this.view.getState(A);null!=B&&null!=B.shape&&(this.view.invalidate(A),B.shape.bounds=null)}E.apply(this,arguments);q instanceof mxValueChange&&null!=q.cell&&null!=q.cell.value&&"object"==typeof q.cell.value&&this.invalidateDescendantsWithPlaceholders(q.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(q){q=
this.model.getDescendants(q);if(0<q.length)for(var A=0;A<q.length;A++){var B=this.view.getState(q[A]);null!=B&&null!=B.shape&&null!=B.shape.stencil&&this.stencilHasPlaceholders(B.shape.stencil)?this.removeStateForCell(q[A]):this.isReplacePlaceholders(q[A])&&this.view.invalidate(q[A],!1,!1)}};Graph.prototype.replaceElement=function(q,A){A=q.ownerDocument.createElement(null!=A?A:"span");for(var B=Array.prototype.slice.call(q.attributes);attr=B.pop();)A.setAttribute(attr.nodeName,attr.nodeValue);A.innerHTML=
-q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),N=0;N<q.length;N++){var R=this.getCurrentCellStyle(q[N]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[N]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var X=F.getElementsByTagName(null!=
-B?B:"*"),fa=0;fa<X.length;fa++)A(X[fa]);F.innerHTML!=R&&this.cellLabelChanged(q[N],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),N=q;null!=N;){if(N==this.model.getRoot()||null!=N.value&&"object"==typeof N.value&&N.hasAttribute(F)){this.setAttributeForCell(N,F,A);break}N=this.model.getParent(N)}var R=
-q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var N=this.model.getParent(q[B]);null==N||A.get(N)||(A.put(N,!0),
-F.push(N))}for(B=0;B<F.length;B++)if(N=this.view.getState(F[B]),null!=N&&(this.model.isEdge(N.cell)||this.model.isVertex(N.cell))&&this.isCellDeletable(N.cell)&&this.isTransparentState(N)){for(var R=!0,X=0;X<this.model.getChildCount(N.cell)&&R;X++)A.get(this.model.getChildAt(N.cell,X))||(R=!1);R&&q.push(N.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&
+q.innerHTML;q.parentNode.replaceChild(A,q)};Graph.prototype.processElements=function(q,A){if(null!=q){q=q.getElementsByTagName("*");for(var B=0;B<q.length;B++)null!=q[B]&&A(q[B])}};Graph.prototype.updateLabelElements=function(q,A,B){q=null!=q?q:this.getSelectionCells();for(var F=document.createElement("div"),M=0;M<q.length;M++){var R=this.getCurrentCellStyle(q[M]);if(null!=R&&"1"==R.html&&(R=this.convertValueToString(q[M]),null!=R&&0<R.length)){F.innerHTML=Graph.sanitizeHtml(R);for(var W=F.getElementsByTagName(null!=
+B?B:"*"),ha=0;ha<W.length;ha++)A(W[ha]);F.innerHTML!=R&&this.cellLabelChanged(q[M],F.innerHTML)}}};Graph.prototype.cellLabelChanged=function(q,A,B){A=Graph.zapGremlins(A);this.model.beginUpdate();try{if(null!=q.value&&"object"==typeof q.value){if(this.isReplacePlaceholders(q)&&null!=q.getAttribute("placeholder"))for(var F=q.getAttribute("placeholder"),M=q;null!=M;){if(M==this.model.getRoot()||null!=M.value&&"object"==typeof M.value&&M.hasAttribute(F)){this.setAttributeForCell(M,F,A);break}M=this.model.getParent(M)}var R=
+q.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&R.hasAttribute("label_"+Graph.diagramLanguage)?R.setAttribute("label_"+Graph.diagramLanguage,A):R.setAttribute("label",A);A=R}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(q){if(null!=q){for(var A=new mxDictionary,B=0;B<q.length;B++)A.put(q[B],!0);var F=[];for(B=0;B<q.length;B++){var M=this.model.getParent(q[B]);null==M||A.get(M)||(A.put(M,!0),
+F.push(M))}for(B=0;B<F.length;B++)if(M=this.view.getState(F[B]),null!=M&&(this.model.isEdge(M.cell)||this.model.isVertex(M.cell))&&this.isCellDeletable(M.cell)&&this.isTransparentState(M)){for(var R=!0,W=0;W<this.model.getChildCount(M.cell)&&R;W++)A.get(this.model.getChildAt(M.cell,W))||(R=!1);R&&q.push(M.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(q){for(var A=[],B=0;B<q.length;B++)this.isCellDeletable(q[B])&&this.isTransparentState(this.view.getState(q[B]))&&
A.push(q[B]);q=A;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(q,A){this.setAttributeForCell(q,"link",A)};Graph.prototype.setTooltipForCell=function(q,A){var B="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(q.value)&&q.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(B="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(q,B,A)};Graph.prototype.getAttributeForCell=function(q,A,B){q=null!=q.value&&
"object"===typeof q.value?q.value.getAttribute(A):null;return null!=q?q:B};Graph.prototype.setAttributeForCell=function(q,A,B){if(null!=q.value&&"object"==typeof q.value)var F=q.value.cloneNode(!0);else F=mxUtils.createXmlDocument().createElement("UserObject"),F.setAttribute("label",q.value||"");null!=B?F.setAttribute(A,B):F.removeAttribute(A);this.model.setValue(q,F)};Graph.prototype.isTargetShape=function(q,A,B){q=mxUtils.getValue(this.getCurrentCellStyle(q),mxConstants.STYLE_SHAPE,"");for(B=0;B<
-A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var N=0;N<q.length;N++){var R=this.model.getParent(q[N]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=D.apply(this,arguments);var X=!0;for(N=0;N<q.length&&X;N++)X=X&&this.isTableRow(q[N]);X&&(this.isTableCell(R)&&(R=
+A.length;B++){var F=mxUtils.getValue(this.getCurrentCellStyle(A[B]),"targetShapes","").split(",");if(0<=mxUtils.indexOf(F,q))return!0}return!1};var D=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(q,A,B,F){if(mxEvent.isAltDown(A))return null;for(var M=0;M<q.length;M++){var R=this.model.getParent(q[M]);if(this.model.isEdge(R)&&0>mxUtils.indexOf(q,R))return null}R=D.apply(this,arguments);var W=!0;for(M=0;M<q.length&&W;M++)W=W&&this.isTableRow(q[M]);W&&(this.isTableCell(R)&&(R=
this.model.getParent(R)),this.isTableRow(R)&&(R=this.model.getParent(R)),this.isTable(R)||(R=null));return R};Graph.prototype.click=function(q){mxGraph.prototype.click.call(this,q);this.firstClickState=q.getState();this.firstClickSource=q.getSource()};Graph.prototype.dblClick=function(q,A){this.isEnabled()&&(A=this.insertTextForEvent(q,A),mxGraph.prototype.dblClick.call(this,q,A))};Graph.prototype.insertTextForEvent=function(q,A){var B=mxUtils.convertPoint(this.container,mxEvent.getClientX(q),mxEvent.getClientY(q));
-if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,N=mxEvent.getSource(q);this.firstClickState!=F||this.firstClickSource!=N||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&N==this.view.getCanvas().ownerSVGElement)||
-(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),N=this.getPageSize();A=Math.max(A,F.x*N.width);B=Math.max(B,F.y*N.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=
+if(null!=q&&!this.model.isVertex(A)){var F=this.model.isEdge(A)?this.view.getState(A):null,M=mxEvent.getSource(q);this.firstClickState!=F||this.firstClickSource!=M||null!=F&&null!=F.text&&null!=F.text.node&&null!=F.text.boundingBox&&(mxUtils.contains(F.text.boundingBox,B.x,B.y)||mxUtils.isAncestorNode(F.text.node,mxEvent.getSource(q)))||(null!=F||this.isCellLocked(this.getDefaultParent()))&&(null==F||this.isCellLocked(F.cell))||!(null!=F||mxClient.IS_SVG&&M==this.view.getCanvas().ownerSVGElement)||
+(null==F&&(F=this.view.getState(this.getCellAt(B.x,B.y))),A=this.addText(B.x,B.y,F))}return A};Graph.prototype.getInsertPoint=function(){var q=this.getGridSize(),A=this.container.scrollLeft/this.view.scale-this.view.translate.x,B=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var F=this.getPageLayout(),M=this.getPageSize();A=Math.max(A,F.x*M.width);B=Math.max(B,F.y*M.height)}return new mxPoint(this.snap(A+q),this.snap(B+q))};Graph.prototype.getFreeInsertPoint=
function(){var q=this.view,A=this.getGraphBounds(),B=this.getInsertPoint(),F=this.snap(Math.round(Math.max(B.x,A.x/q.scale-q.translate.x+(0==A.width?2*this.gridSize:0))));q=this.snap(Math.round(Math.max(B.y,(A.y+A.height)/q.scale-q.translate.y+2*this.gridSize)));return new mxPoint(F,q)};Graph.prototype.getCenterInsertPoint=function(q){q=null!=q?q:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-
this.view.translate.x-q.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-q.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-q.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-q.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.appendFontSize=function(q,A){q=null!=q?q:"";null!=
-A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var N=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*N.x)/1E4;F.geometry.y=Math.round(N.y);
-F.geometry.offset=new mxPoint(0,0);N=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-N.x)/R),Math.round((A-N.y)/R))}else N=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-N.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-N.y-(null!=B?B.origin.y:0),F.style+=
-"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var da=this.container.getElementsByTagName("a");if(null!=da)for(var ha=0;ha<da.length;ha++){var va=this.getAbsoluteUrl(da[ha].getAttribute("href"));null!=va&&(da[ha].setAttribute("rel",this.linkRelation),
-da[ha].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(da[ha],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var N=this.container.style.cursor,R=this.getTolerance(),X=this,fa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(X,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(da){var ha=da.sourceState;if(null==ha||null==X.getLinkForCell(ha.cell))da=X.getCellAt(da.getGraphX(),
-da.getGraphY(),null,null,null,function(va,Ma,Na){return null==X.getLinkForCell(va.cell)}),ha=null==ha||X.model.isAncestor(da,ha.cell)?X.view.getState(da):null;ha!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ha,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(da,ha){this.startX=ha.getGraphX();this.startY=ha.getGraphY();this.scrollLeft=X.container.scrollLeft;this.scrollTop=X.container.scrollTop;null==this.currentLink&&"auto"==X.container.style.overflow&&
-(X.container.style.cursor="move");this.updateCurrentState(ha)},mouseMove:function(da,ha){if(X.isMouseDown)null!=this.currentLink&&(da=Math.abs(this.startX-ha.getGraphX()),ha=Math.abs(this.startY-ha.getGraphY()),(da>R||ha>R)&&this.clear());else{for(da=ha.getSource();null!=da&&"a"!=da.nodeName.toLowerCase();)da=da.parentNode;null!=da?this.clear():(null!=X.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&X.tooltipHandler.reset(ha,!0,this.currentState),(null==this.currentState||ha.getState()!=
-this.currentState&&null!=ha.sourceState||!X.intersects(this.currentState,ha.getGraphX(),ha.getGraphY()))&&this.updateCurrentState(ha))}},mouseUp:function(da,ha){var va=ha.getSource();for(da=ha.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-X.container.scrollLeft)<R&&Math.abs(this.scrollTop-X.container.scrollTop)<R&&(null==ha.sourceState||!ha.isSource(ha.sourceState.control))&&((mxEvent.isLeftMouseButton(da)||mxEvent.isMiddleMouseButton(da))&&
-!mxEvent.isPopupTrigger(da)||mxEvent.isTouchEvent(da))&&(null!=this.currentLink?(va=X.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(da,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(da)||(da=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(da)?"_blank":va?X.linkTarget:"_top",X.openLink(this.currentLink,da),ha.consume())):null!=B&&!ha.isConsumed()&&Math.abs(this.scrollLeft-X.container.scrollLeft)<
-R&&Math.abs(this.scrollTop-X.container.scrollTop)<R&&Math.abs(this.startX-ha.getGraphX())<R&&Math.abs(this.startY-ha.getGraphY())<R&&B(ha.getEvent()));this.clear()},activate:function(da){this.currentLink=X.getAbsoluteUrl(X.getLinkForCell(da.cell));null!=this.currentLink&&(this.currentTarget=X.getLinkTargetForCell(da.cell),X.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(da))},clear:function(){null!=X.container&&(X.container.style.cursor=N);this.currentLink=this.currentState=
-this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=X.tooltipHandler&&X.tooltipHandler.hide()}};X.click=function(da){};X.addMouseListener(fa);mxEvent.addListener(document,"mouseleave",function(da){fa.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),N=this.gridSize,R=[];F.beginUpdate();
-try{var X={},fa=this.createCellLookup(q),da=this.cloneCells(q,!1,X,!0);for(B=0;B<q.length;B++){var ha=F.getParent(q[B]);if(null!=ha){var va=this.moveCells([da[B]],N,N,!1)[0];R.push(va);if(A)F.add(ha,da[B]);else{var Ma=ha.getIndex(q[B]);F.add(ha,da[B],Ma+1)}if(this.isTable(ha)){var Na=this.getCellGeometry(da[B]),ya=this.getCellGeometry(ha);null!=Na&&null!=ya&&(ya=ya.clone(),ya.height+=Na.height,F.setGeometry(ha,ya))}}else R.push(da[B])}this.updateCustomLinks(this.createCellMapping(X,fa),da,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
-"cells",da))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),N=[],R=0;R<F.length;R++)N.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==N.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=N[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=
+A&&(0<q.length&&";"!=q.charAt(q.length-1)&&(q+=";"),q+="fontSize="+A+";");return q};Graph.prototype.addText=function(q,A,B){var F=new mxCell;F.value="Text";F.geometry=new mxGeometry(0,0,0,0);F.vertex=!0;if(null!=B&&this.model.isEdge(B.cell)){F.style="edgeLabel;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.edgeFontSize);F.geometry.relative=!0;F.connectable=!1;var M=this.view.getRelativePoint(B,q,A);F.geometry.x=Math.round(1E4*M.x)/1E4;F.geometry.y=Math.round(M.y);
+F.geometry.offset=new mxPoint(0,0);M=this.view.getPoint(B,F.geometry);var R=this.view.scale;F.geometry.offset=new mxPoint(Math.round((q-M.x)/R),Math.round((A-M.y)/R))}else M=this.view.translate,F.style="text;"+this.appendFontSize("html=1;align=center;verticalAlign=middle;resizable=0;points=[];",this.vertexFontSize),F.geometry.width=40,F.geometry.height=20,F.geometry.x=Math.round(q/this.view.scale)-M.x-(null!=B?B.origin.x:0),F.geometry.y=Math.round(A/this.view.scale)-M.y-(null!=B?B.origin.y:0),F.style+=
+"autosize=1;";this.getModel().beginUpdate();try{this.addCells([F],null!=B?B.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[F])),this.autoSizeCell(F)}finally{this.getModel().endUpdate()}return F};Graph.prototype.addClickHandler=function(q,A,B){var F=mxUtils.bind(this,function(){var fa=this.container.getElementsByTagName("a");if(null!=fa)for(var ja=0;ja<fa.length;ja++){var va=this.getAbsoluteUrl(fa[ja].getAttribute("href"));null!=va&&(fa[ja].setAttribute("rel",this.linkRelation),
+fa[ja].setAttribute("href",va),null!=A&&mxEvent.addGestureListeners(fa[ja],null,null,A))}});this.model.addListener(mxEvent.CHANGE,F);F();var M=this.container.style.cursor,R=this.getTolerance(),W=this,ha={currentState:null,currentLink:null,currentTarget:null,highlight:null!=q&&""!=q&&q!=mxConstants.NONE?new mxCellHighlight(W,q,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(fa){var ja=fa.sourceState;if(null==ja||null==W.getLinkForCell(ja.cell))fa=W.getCellAt(fa.getGraphX(),
+fa.getGraphY(),null,null,null,function(va,Ma,Na){return null==W.getLinkForCell(va.cell)}),ja=null==ja||W.model.isAncestor(fa,ja.cell)?W.view.getState(fa):null;ja!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ja,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(fa,ja){this.startX=ja.getGraphX();this.startY=ja.getGraphY();this.scrollLeft=W.container.scrollLeft;this.scrollTop=W.container.scrollTop;null==this.currentLink&&"auto"==W.container.style.overflow&&
+(W.container.style.cursor="move");this.updateCurrentState(ja)},mouseMove:function(fa,ja){if(W.isMouseDown)null!=this.currentLink&&(fa=Math.abs(this.startX-ja.getGraphX()),ja=Math.abs(this.startY-ja.getGraphY()),(fa>R||ja>R)&&this.clear());else{for(fa=ja.getSource();null!=fa&&"a"!=fa.nodeName.toLowerCase();)fa=fa.parentNode;null!=fa?this.clear():(null!=W.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&W.tooltipHandler.reset(ja,!0,this.currentState),(null==this.currentState||ja.getState()!=
+this.currentState&&null!=ja.sourceState||!W.intersects(this.currentState,ja.getGraphX(),ja.getGraphY()))&&this.updateCurrentState(ja))}},mouseUp:function(fa,ja){var va=ja.getSource();for(fa=ja.getEvent();null!=va&&"a"!=va.nodeName.toLowerCase();)va=va.parentNode;null==va&&Math.abs(this.scrollLeft-W.container.scrollLeft)<R&&Math.abs(this.scrollTop-W.container.scrollTop)<R&&(null==ja.sourceState||!ja.isSource(ja.sourceState.control))&&((mxEvent.isLeftMouseButton(fa)||mxEvent.isMiddleMouseButton(fa))&&
+!mxEvent.isPopupTrigger(fa)||mxEvent.isTouchEvent(fa))&&(null!=this.currentLink?(va=W.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&va||null==A||A(fa,this.currentLink,null!=this.currentState?this.currentState.cell:null),mxEvent.isConsumed(fa)||(fa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(fa)?"_blank":va?W.linkTarget:"_top",W.openLink(this.currentLink,fa),ja.consume())):null!=B&&!ja.isConsumed()&&Math.abs(this.scrollLeft-W.container.scrollLeft)<
+R&&Math.abs(this.scrollTop-W.container.scrollTop)<R&&Math.abs(this.startX-ja.getGraphX())<R&&Math.abs(this.startY-ja.getGraphY())<R&&B(ja.getEvent()));this.clear()},activate:function(fa){this.currentLink=W.getAbsoluteUrl(W.getLinkForCell(fa.cell));null!=this.currentLink&&(this.currentTarget=W.getLinkTargetForCell(fa.cell),W.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(fa))},clear:function(){null!=W.container&&(W.container.style.cursor=M);this.currentLink=this.currentState=
+this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=W.tooltipHandler&&W.tooltipHandler.hide()}};W.click=function(fa){};W.addMouseListener(ha);mxEvent.addListener(document,"mouseleave",function(fa){ha.clear()})};Graph.prototype.duplicateCells=function(q,A){q=null!=q?q:this.getSelectionCells();A=null!=A?A:!0;for(var B=0;B<q.length;B++)this.isTableCell(q[B])&&(q[B]=this.model.getParent(q[B]));q=this.model.getTopmostCells(q);var F=this.getModel(),M=this.gridSize,R=[];F.beginUpdate();
+try{var W={},ha=this.createCellLookup(q),fa=this.cloneCells(q,!1,W,!0);for(B=0;B<q.length;B++){var ja=F.getParent(q[B]);if(null!=ja){var va=this.moveCells([fa[B]],M,M,!1)[0];R.push(va);if(A)F.add(ja,fa[B]);else{var Ma=ja.getIndex(q[B]);F.add(ja,fa[B],Ma+1)}if(this.isTable(ja)){var Na=this.getCellGeometry(fa[B]),ya=this.getCellGeometry(ja);null!=Na&&null!=ya&&(ya=ya.clone(),ya.height+=Na.height,F.setGeometry(ja,ya))}}else R.push(fa[B])}this.updateCustomLinks(this.createCellMapping(W,ha),fa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,
+"cells",fa))}finally{F.endUpdate()}return R};Graph.prototype.insertImage=function(q,A,B){if(null!=q&&null!=this.cellEditor.textarea){for(var F=this.cellEditor.textarea.getElementsByTagName("img"),M=[],R=0;R<F.length;R++)M.push(F[R]);document.execCommand("insertimage",!1,q);q=this.cellEditor.textarea.getElementsByTagName("img");if(q.length==M.length+1)for(R=q.length-1;0<=R;R--)if(0==R||q[R]!=M[R-1]){q[R].setAttribute("width",A);q[R].setAttribute("height",B);break}}};Graph.prototype.insertLink=function(q){if(null!=
this.cellEditor.textarea)if(0==q.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var A=this.cellEditor.textarea.getElementsByTagName("a"),B=[],F=0;F<A.length;F++)B.push(A[F]);document.execCommand("createlink",!1,mxUtils.trim(q));A=this.cellEditor.textarea.getElementsByTagName("a");if(A.length==B.length+1)for(F=A.length-1;0<=F;F--)if(A[F]!=B[F-1]){for(A=A[F].getElementsByTagName("a");0<A.length;){for(B=A[0].parentNode;null!=A[0].firstChild;)B.insertBefore(A[0].firstChild,A[0]);
-B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],N=
-null,R=null,X=0,fa=0;fa<A.length;fa++)if(this.getModel().isVertex(A[fa])){var da=this.view.getState(A[fa]);if(null!=da){var ha=q?da.getCenterX():da.getCenterY();N=null!=N?Math.max(N,ha):ha;R=null!=R?Math.min(R,ha):ha;B&&(X+=q?da.width:da.height);F.push(da)}}if(2<F.length){F.sort(function(Ga,wa){return q?Ga.x-wa.x:Ga.y-wa.y});B&&(X-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);da=this.view.translate;ha=this.view.scale;R=R/ha-(q?da.x:da.y);N=N/ha-(q?da.x:da.y);this.getModel().beginUpdate();
-try{var va=(N-R-X)/(F.length-1),Ma=R+(B?q?F[0].width/2:F[0].height/2:0);for(fa=1;fa<F.length-1;fa++){var Na=this.view.getState(this.model.getParent(F[fa].cell)),ya=this.getCellGeometry(F[fa].cell);Ma+=va;null!=ya&&null!=Na&&(ya=ya.clone(),q?ya.x=Math.round(Ma-(B?0:ya.width/2))-Na.origin.x:ya.y=Math.round(Ma-(B?0:ya.height/2))-Na.origin.y,this.getModel().setGeometry(F[fa].cell,ya));B&&(Ma+=q?F[fa].width:F[fa].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&
-mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=function(q){q=new mxImageExport;q.addCellData=function(B,F,N){F.setAttribute("data-cell-id",B.id);if(N)if(mxUtils.isNode(B.value))for(N=0;N<B.value.attributes.length;N++){var R=B.value.attributes[N];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;
-q.visitStatesRecursive=function(B,F,N){if(null!=B){var R=F.root,X=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=X.createElementNS?X.createElementNS(mxConstants.NS_SVG,"g"):X.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
-return q};Graph.prototype.parseBackgroundImage=function(q){var A=null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,N,R,X,fa,da,ha,va,Ma,Na,ya,Ga,wa){var ua=null;if(null!=ya)for(ua=new mxDictionary,va=0;va<ya.length;va++)ua.put(ya[va],!0);ya=this.useCssTransforms;var Va=this.enableFlowAnimation;this.enableFlowAnimation=!1;ya&&(this.useCssTransforms=!1,this.view.revalidate(),
-this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;N=null!=N?N:!0;R=null!=R?R:!0;X=null!=X?X:!0;ha=null!=ha?ha:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.backgroundImage,Ua=this.view.translate,Wa=this.view.scale;"diagram"==Na&&null!=Ka&&null!=Ka.width&&null!=Ka.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+Ka.x)*Wa,(Ua.y+Ka.y)*Wa,Ka.width*Wa,Ka.height*
-Wa)));if(null==Qa)throw Error(mxResources.get("drawingEmpty"));F=A/Wa;var mb=Math.max(1,Math.ceil(Qa.width*F)+2*B)+(ha&&0==B?5:0),ub=Math.max(1,Math.ceil(Qa.height*F)+2*B)+(ha&&0==B?5:0);ha=N?-.5:0;var vb=mxUtils.getLightDarkColor(q),jb=Graph.createSvgNode(ha,ha,mb,ub,vb),nb=jb.ownerDocument;if(null!=q){var db=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"rect");db.setAttribute("fill",vb.light);db.style.fill=vb.cssText;db.setAttribute("width","100%");db.setAttribute("height","100%");db.setAttribute("x",
-"0");db.setAttribute("y","0");jb.appendChild(db)}var qb=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"g");jb.appendChild(qb);var bb=this.createSvgCanvas(qb);bb.foOffset=N?-.5:0;bb.textOffset=N?-.5:0;bb.imageOffset=N?-.5:0;bb.translate(Math.floor(B/A-Qa.x/Wa),Math.floor(B/A-Qa.y/Wa));bb.idPrefix="drawio-svg-"+Editor.guid();var wb=document.createElement("div"),rb=bb.getAlternateText;bb.getAlternateText=function(Sa,sb,$a,kb,ob,Za,xb,c,l,t,n,r,v){if(null!=Za&&0<this.state.fontSize)try{mxUtils.isNode(Za)?
-Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var w=Math.ceil(2*kb/this.state.fontSize),J=[],y=0,ba=0;(0==w||y<w)&&ba<Za.length;){var S=Za.charCodeAt(ba);if(10==S||13==S){if(0<y)break}else J.push(Za.charAt(ba)),255>S&&y++;ba++}J.length<Za.length&&1<Za.length-J.length&&(Za=mxUtils.trim(J.join(""))+"...");return Za}catch(Ea){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=Ka&&null!=Ka.width&&null!=Ka.height&&(q=Wa/A,ha=new mxRectangle((Ka.x+
-Ua.x)*q,(Ka.y+Ua.y)*q,Ka.width*q,Ka.height*q),mxUtils.intersects(Qa,ha)&&bb.image(Ka.x+Ua.x,Ka.y+Ua.y,Ka.width,Ka.height,Ka.src,!0));bb.scale(F);bb.textEnabled=X;fa=null!=fa?fa:this.createSvgImageExport();var tb=fa.getLinkForCellState;fa.getLinkForCellState=function(Sa,sb){var $a=Sa.view.graph.getAbsoluteUrl(tb.apply(this,arguments));return null==$a||Sa.view.graph.isCustomLink($a)?null:$a};fa.getLinkTargetForCellState=function(Sa,sb){return Sa.view.graph.getLinkTargetForCell(Sa.cell)};var yb=fa.drawCellState,
-lb=null,hb=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});fa.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(R&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
+B.removeChild(A[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(q))};Graph.prototype.isCellResizable=function(q){var A=mxGraph.prototype.isCellResizable.apply(this,arguments),B=this.getCurrentCellStyle(q);return!this.isTableCell(q)&&!this.isTableRow(q)&&(A||"0"!=mxUtils.getValue(B,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==B[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(q,A,B){null==A&&(A=this.getSelectionCells());if(null!=A&&1<A.length){for(var F=[],M=
+null,R=null,W=0,ha=0;ha<A.length;ha++)if(this.getModel().isVertex(A[ha])){var fa=this.view.getState(A[ha]);if(null!=fa){var ja=q?fa.getCenterX():fa.getCenterY();M=null!=M?Math.max(M,ja):ja;R=null!=R?Math.min(R,ja):ja;B&&(W+=q?fa.width:fa.height);F.push(fa)}}if(2<F.length){F.sort(function(Ha,wa){return q?Ha.x-wa.x:Ha.y-wa.y});B&&(W-=q?F[0].width/2+F[F.length-1].width/2:F[0].height/2+F[F.length-1].height/2);fa=this.view.translate;ja=this.view.scale;R=R/ja-(q?fa.x:fa.y);M=M/ja-(q?fa.x:fa.y);this.getModel().beginUpdate();
+try{var va=(M-R-W)/(F.length-1),Ma=R+(B?q?F[0].width/2:F[0].height/2:0);for(ha=1;ha<F.length-1;ha++){var Na=this.view.getState(this.model.getParent(F[ha].cell)),ya=this.getCellGeometry(F[ha].cell);Ma+=va;null!=ya&&null!=Na&&(ya=ya.clone(),q?ya.x=Math.round(Ma-(B?0:ya.width/2))-Na.origin.x:ya.y=Math.round(Ma-(B?0:ya.height/2))-Na.origin.y,this.getModel().setGeometry(F[ha].cell,ya));B&&(Ma+=q?F[ha].width:F[ha].height)}}finally{this.getModel().endUpdate()}}}return A};Graph.prototype.isCloneEvent=function(q){return mxClient.IS_MAC&&
+mxEvent.isMetaDown(q)||mxEvent.isControlDown(q)};Graph.prototype.createSvgImageExport=function(q){q=new mxImageExport;q.addCellData=function(B,F,M){F.setAttribute("data-cell-id",B.id);if(M)if(mxUtils.isNode(B.value))for(M=0;M<B.value.attributes.length;M++){var R=B.value.attributes[M];F.setAttribute("data-cell-"+R.name,R.value)}else if("object"===typeof B.value)for(R in B.value)F.setAttribute("data-cell-"+R,B.value[R]);else null!=B.value&&F.setAttribute("data-cell-value",B.value);return F};var A=q.visitStatesRecursive;
+q.visitStatesRecursive=function(B,F,M){if(null!=B){var R=F.root,W=F.root.ownerDocument;F.root=this.addCellData(B.cell,null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"g"):W.createElement("g"),Editor.addSvgMetadata);R.appendChild(F.root);A.apply(this,arguments);F.root=R}};q.getLinkForCellState=mxUtils.bind(this,function(B,F){return this.getLinkForCell(B.cell)});q.getTitleForCellState=mxUtils.bind(this,function(B,F){return Editor.convertHtmlToText(this.convertValueToTooltip(B.cell))});
+return q};Graph.prototype.parseBackgroundImage=function(q){var A=null;null!=q&&0<q.length&&(q=JSON.parse(q),A=new mxImage(q.src,q.width,q.height));return A};Graph.prototype.getBackgroundImageObject=function(q){return q};Graph.prototype.getSvg=function(q,A,B,F,M,R,W,ha,fa,ja,va,Ma,Na,ya,Ha,wa){var ua=null;if(null!=ya)for(ua=new mxDictionary,va=0;va<ya.length;va++)ua.put(ya[va],!0);ya=this.useCssTransforms;var Va=this.enableFlowAnimation;this.enableFlowAnimation=!1;ya&&(this.useCssTransforms=!1,this.view.revalidate(),
+this.sizeDidChange());try{A=null!=A?A:1;B=null!=B?B:0;M=null!=M?M:!0;R=null!=R?R:!0;W=null!=W?W:!0;ja=null!=ja?ja:!1;var Qa="page"==Na?this.view.getBackgroundPageBounds():R&&null==ua||F||"diagram"==Na?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ka=this.backgroundImage,Ua=this.view.translate,Wa=this.view.scale;"diagram"==Na&&null!=Ka&&null!=Ka.width&&null!=Ka.height&&(Qa=mxRectangle.fromRectangle(Qa),Qa.add(new mxRectangle((Ua.x+Ka.x)*Wa,(Ua.y+Ka.y)*Wa,Ka.width*Wa,Ka.height*
+Wa)));if(null==Qa)throw Error(mxResources.get("drawingEmpty"));F=A/Wa;var mb=Math.max(1,Math.ceil(Qa.width*F)+2*B)+(ja&&0==B?5:0),ub=Math.max(1,Math.ceil(Qa.height*F)+2*B)+(ja&&0==B?5:0);ja=M?-.5:0;var vb=mxUtils.getLightDarkColor(q),jb=Graph.createSvgNode(ja,ja,mb,ub,vb),nb=jb.ownerDocument;if(null!=q){var db=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"rect");db.setAttribute("fill",vb.light);db.style.fill=vb.cssText;db.setAttribute("width","100%");db.setAttribute("height","100%");db.setAttribute("x",
+"0");db.setAttribute("y","0");jb.appendChild(db)}var qb=mxUtils.createElementNs(nb,mxConstants.NS_SVG,"g");jb.appendChild(qb);var bb=this.createSvgCanvas(qb);bb.foOffset=M?-.5:0;bb.textOffset=M?-.5:0;bb.imageOffset=M?-.5:0;bb.translate(Math.floor(B/A-Qa.x/Wa),Math.floor(B/A-Qa.y/Wa));bb.idPrefix="drawio-svg-"+Editor.guid();var wb=document.createElement("div"),rb=bb.getAlternateText;bb.getAlternateText=function(Sa,sb,$a,kb,ob,Za,xb,c,l,t,n,r,v){if(null!=Za&&0<this.state.fontSize)try{mxUtils.isNode(Za)?
+Za=Za.innerText:(wb.innerHTML=Za,Za=mxUtils.extractTextWithWhitespace(wb.childNodes));for(var x=Math.ceil(2*kb/this.state.fontSize),I=[],y=0,aa=0;(0==x||y<x)&&aa<Za.length;){var S=Za.charCodeAt(aa);if(10==S||13==S){if(0<y)break}else I.push(Za.charAt(aa)),255>S&&y++;aa++}I.length<Za.length&&1<Za.length-I.length&&(Za=mxUtils.trim(I.join(""))+"...");return Za}catch(Fa){return rb.apply(this,arguments)}else return rb.apply(this,arguments)};null!=Ka&&null!=Ka.width&&null!=Ka.height&&(q=Wa/A,ja=new mxRectangle((Ka.x+
+Ua.x)*q,(Ka.y+Ua.y)*q,Ka.width*q,Ka.height*q),mxUtils.intersects(Qa,ja)&&bb.image(Ka.x+Ua.x,Ka.y+Ua.y,Ka.width,Ka.height,Ka.src,!0));bb.scale(F);bb.textEnabled=W;ha=null!=ha?ha:this.createSvgImageExport();var tb=ha.getLinkForCellState;ha.getLinkForCellState=function(Sa,sb){var $a=Sa.view.graph.getAbsoluteUrl(tb.apply(this,arguments));return null==$a||Sa.view.graph.isCustomLink($a)?null:$a};ha.getLinkTargetForCellState=function(Sa,sb){return Sa.view.graph.getLinkTargetForCell(Sa.cell)};var yb=ha.drawCellState,
+lb=null,hb=mxUtils.bind(this,function(){if(null==lb){lb="ge-flow-animation-"+Editor.guid();var Sa=null!=nb.createElementNS?nb.createElementNS(mxConstants.NS_SVG,"style"):nb.createElement("style");Sa.innerHTML=this.createFlowAnimationCss(lb);nb.getElementsByTagName("defs")[0].appendChild(Sa)}return lb});ha.drawCellState=function(Sa,sb){for(var $a=Sa.view.graph,kb=null!=ua?ua.get(Sa.cell):$a.isCellSelected(Sa.cell),ob=$a.model.getParent(Sa.cell);!(R&&null==ua||kb)&&null!=ob;)kb=null!=ua?ua.get(ob):
$a.isCellSelected(ob),ob=$a.model.getParent(ob);if(null!=Sa.shape)try{var Za=Sa.shape.isFlowAnimationEnabled,xb=Sa.shape.addFlowAnimationToShape;Sa.shape.isFlowAnimationEnabled=function(){return Va&&$a.model.isEdge(Sa.cell)&&"1"==mxUtils.getValue(Sa.style,"flowAnimation","0")};Sa.shape.addFlowAnimationToShape=function(){$a.addFlowAnimationToNode(this.getFlowAnimationPath(),Sa.style,A,hb())};if(R&&null==ua||kb)$a.view.redrawEnumerationState(Sa),yb.apply(this,arguments),this.doDrawShape(Sa.secondLabel,
-sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;fa.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,da,!0);return jb}finally{this.enableFlowAnimation=Va,ya&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&
-0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),F=q.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var N=q.createElement("a");N.setAttribute("transform","translate(0,-5)");null==N.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(N.setAttribute("xlink:href",Graph.foreignObjectWarningLink),N.setAttribute("target","_blank")):(N.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
-N.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=q.createElement("text");q.setAttribute("text-anchor","middle");q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);N.appendChild(q);B.appendChild(N);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));
-null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var N=q[F].getAttribute("href");null==N&&(N=q[F].getAttribute("xlink:href"));null!=N&&(null!=A&&/^https?:\/\//.test(N)?q[F].setAttribute("target",A):B&&this.isCustomLink(N)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);
+sb)}finally{Sa.shape.isFlowAnimationEnabled=Za,Sa.shape.addFlowAnimationToShape=xb}};var Ta=null!=this.view.currentRoot?this.view.currentRoot:this.model.root;ha.drawState(this.getView().getState(Ta),bb);this.addForeignObjectWarning(bb,jb);wa?this.disableSvgLinks(jb):this.updateSvgLinks(jb,fa,!0);return jb}finally{this.enableFlowAnimation=Va,ya&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(q,A){if("0"!=urlParams["svg-warning"]&&
+0<A.getElementsByTagName("foreignObject").length){var B=q.createElement("switch"),F=q.createElement("g");F.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var M=q.createElement("a");M.setAttribute("transform","translate(0,-5)");null==M.setAttributeNS||A.ownerDocument!=document&&null==document.documentMode?(M.setAttribute("xlink:href",Graph.foreignObjectWarningLink),M.setAttribute("target","_blank")):(M.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),
+M.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));q=q.createElement("text");q.setAttribute("text-anchor","middle");q.setAttribute("font-size","10px");q.setAttribute("x","50%");q.setAttribute("y","100%");mxUtils.write(q,Graph.foreignObjectWarningText);B.appendChild(F);M.appendChild(q);B.appendChild(M);A.appendChild(B)}};Graph.prototype.disableSvgLinks=function(q,A){q=q.getElementsByTagName("a");for(var B=0;B<q.length;B++){var F=q[B].getAttribute("href");null==F&&(F=q[B].getAttribute("xlink:href"));
+null!=F&&(q[B].style.pointerEvents="none",q[B].setAttribute("href",""));A&&A(q[B])}};Graph.prototype.updateSvgLinks=function(q,A,B){q=q.getElementsByTagName("a");for(var F=0;F<q.length;F++)if(null==q[F].getAttribute("target")){var M=q[F].getAttribute("href");null==M&&(M=q[F].getAttribute("xlink:href"));null!=M&&(null!=A&&/^https?:\/\//.test(M)?q[F].setAttribute("target",A):B&&this.isCustomLink(M)&&q[F].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(q){q=new mxSvgCanvas2D(q);
q.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;q.adaptiveColors=this.getAdaptiveColors();q.pointerEvents=!0;return q};Graph.prototype.getSelectedElement=function(){var q=null;if(window.getSelection){var A=window.getSelection();A.getRangeAt&&A.rangeCount&&(q=A.getRangeAt(0).commonAncestorContainer)}else document.selection&&(q=document.selection.createRange().parentElement());return q};Graph.prototype.getSelectedEditingElement=function(){var q=null;if(null!=this.cellEditor.textarea)for(q=this.getSelectedElement();null!=
q&&q.nodeType!=mxConstants.NODETYPE_ELEMENT;)q=q.parentNode;return q};Graph.prototype.getParentByName=function(q,A,B){for(;null!=q&&q.nodeName!=A;){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.getParentByNames=function(q,A,B){for(;null!=q&&!(0<=mxUtils.indexOf(A,q.nodeName));){if(q==B)return null;q=q.parentNode}return q};Graph.prototype.selectNode=function(q){var A=null;if(window.getSelection){if(A=window.getSelection(),A.getRangeAt&&A.rangeCount){var B=document.createRange();B.selectNode(q);
-A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(q=A.createRange(),q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var N=0;N<F.points.length;N++)A?F.points[N].x=B+(B-F.points[N].x):F.points[N].y=B+(B-F.points[N].y);N=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};N(F.getTerminalPoint(!0));N(F.getTerminalPoint(!1));
-this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=function(q,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(q),N=0;N<F;N++){var R=this.model.getChildAt(q,N);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var X=this.getCellGeometry(R);null!=X&&(X=X.clone(),A?X.x=B+(B-X.x-X.width):X.y=B+(B-X.y-X.height),this.model.setGeometry(R,X))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);
-for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var N=this.view.getState(q[F]);null!=N&&this.flipEdgePoints(q[F],A,(A?N.getCenterX():N.getCenterY())/this.view.scale-(A?N.origin.x:N.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
-function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();try{for(var F=0;F<q.length;F++){var N=this.model.getParent(q[F]);if(this.isTable(N)){var R=this.getCellGeometry(q[F]),X=this.getCellGeometry(N);null!=R&&null!=X&&(X=X.clone(),X.height-=R.height,this.model.setGeometry(N,X))}}var fa=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=fa)for(B=[],F=0;F<fa.length;F++)this.model.contains(fa[F])&&(this.model.isVertex(fa[F])||
-this.model.isEdge(fa[F]))&&B.push(fa[F])}return B};Graph.prototype.insertTableColumn=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,N=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);N=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(N=B.getChildCells(q,!0).length-1);var X=B.getChildCells(F,!0),fa=Graph.minTableColumnWidth;for(q=0;q<X.length;q++){var da=B.getChildCells(X[q],!0)[N],ha=B.cloneCell(da,!1);
-null==ha&&(ha=this.createVertex());var va=this.getCellGeometry(ha);ha.value=null;ha.style=mxUtils.setStyle(mxUtils.setStyle(ha.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);fa=va.width;var Ma=this.getCellGeometry(X[q]);null!=Ma&&(va.height=Ma.height)}B.add(X[q],ha,N+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=fa,B.setGeometry(F,Na))}finally{B.endUpdate()}};
-Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(q).childLayout?q:A.getParent(q);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==q&&(q=F[F.length-1]),A.remove(q))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(q).childLayout){F=q;var N=B.getChildCells(F,!0);q=N[A?0:N.length-1]}else F=B.getParent(q);
-var R=F.getIndex(q);q=B.cloneCell(q,!1);q.value=null;B.add(F,q,R+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,N=q;if(this.isTableCell(q))N=B.getParent(q),F=B.getParent(N);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);N=R[A?0:R.length-1]}var X=B.getChildCells(N,!0),fa=F.getIndex(N);N=B.cloneCell(N,!1);N.value=null;var da=this.getCellGeometry(N);if(null!=da){for(R=0;R<X.length;R++){q=B.cloneCell(X[R],
-!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),"colspan",null);var ha=this.getCellGeometry(q);null!=ha&&(null!=ha.alternateBounds&&(ha.width=ha.alternateBounds.width,ha.height=ha.alternateBounds.height,ha.alternateBounds=null),ha.height=da.height);N.insert(q)}B.add(F,N,fa+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=da.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();
-A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&(B=A.getParent(F));var N=A.getChildCells(B,!0);if(0==N.length)A.remove(B);else{this.isTableRow(F)||(F=N[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var X=R.length-1;this.isTableCell(q)&&(X=mxUtils.indexOf(R,q));for(F=q=0;F<N.length;F++){var fa=A.getChildCells(N[F],!0)[X];A.remove(fa);var da=this.getCellGeometry(fa);null!=da&&(q=Math.max(q,da.width))}var ha=this.getCellGeometry(B);null!=
-ha&&(ha=ha.clone(),ha.width-=q,A.setGeometry(B,ha))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(q=F=A.getParent(q));this.isTableRow(q)&&(B=A.getParent(F));var N=A.getChildCells(B,!0);if(1>=N.length)A.remove(B);else{this.isTableRow(F)||(F=N[N.length-1]);A.remove(F);q=0;var R=this.getCellGeometry(F);null!=R&&(q=R.height);var X=this.getCellGeometry(B);null!=X&&(X=X.clone(),X.height-=q,A.setGeometry(B,
-X))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(q,A){for(var B=q.tBodies[0],F=B.rows[0].cells,N=q=0;N<F.length;N++){var R=F[N].getAttribute("colspan");q+=null!=R?parseInt(R):1}A=B.insertRow(A);for(N=0;N<q;N++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(q,A){q.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(q,A){var B=q.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var N=document.createElement("th");B.rows[F].appendChild(N);
-mxUtils.br(N)}q=q.tBodies[0];for(B=0;B<q.rows.length;B++)F=q.rows[B].insertCell(A),mxUtils.br(F);return q.rows[0].cells[0<=A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=A){q=q.tBodies[0].rows;for(var B=0;B<q.length;B++)q[B].cells.length>A&&q[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(q){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=
-q;q=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=q.appendChild(F);A.insertNode(q)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(q)};Graph.prototype.createLinkForHint=function(q,A,B){function F(R,X){R.length>X&&(R=R.substring(0,Math.round(X/2))+"..."+R.substring(R.length-Math.round(X/4)));return R}q=null!=q?q:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(q)?this.getLinkTitle(q):q;var N=document.createElement("a");N.setAttribute("rel",
-this.linkRelation);N.setAttribute("href",this.getAbsoluteUrl(q));N.setAttribute("title",F(this.isCustomLink(q)?this.getLinkTitle(q):q,80));null!=this.linkTarget&&N.setAttribute("target",this.linkTarget);mxUtils.write(N,F(A,40));this.isCustomLink(q)&&mxEvent.addListener(N,"click",mxUtils.bind(this,function(R){this.customLinkClicked(q,B);mxEvent.consume(R)}));return N};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
-this.addListener(mxEvent.START_EDITING,function(R,X){this.popupMenuHandler.hideMenu()});var q=this.updateMouseEvent;this.updateMouseEvent=function(R){R=q.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var X=this.getCellAt(R.graphX,R.graphY);null!=X&&this.isSwimlane(X)&&this.hitsSwimlaneContent(X,R.graphX,R.graphY)||(R.state=this.view.getState(X),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&
-this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,N=this.fireMouseEvent;this.fireMouseEvent=function(R,X,fa){R==mxEvent.MOUSE_DOWN&&(X=this.updateMouseEvent(X),A=this.isCellSelected(X.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());N.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,X){if(null!=this.freehand&&!this.freehand.isDrawing()){var fa=mxEvent.isMouseEvent(X.getEvent());this.popupMenuHandler.popupTrigger=
-!this.isEditing()&&this.isEnabled()&&(null==X.getState()||!X.isSource(X.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!fa&&(B&&null==X.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(X.getCell())));fa=!A||fa?null:mxUtils.bind(this,function(da){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ha=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(X.getX()+ha.x+1,X.getY()+ha.y+1,da,X.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
-[R,X,fa])}})};mxCellEditor.prototype.isContentEditing=function(){var q=this.graph.view.getState(this.editingCell);return null!=q&&1==q.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var q="";window.getSelection?q=window.getSelection():document.getSelection?q=document.getSelection():document.selection&&(q=document.selection.createRange().text);
+A.removeAllRanges();A.addRange(B)}}else(A=document.selection)&&"Control"!=A.type&&(q=A.createRange(),q.collapse(!0),B=A.createRange(),B.setEndPoint("StartToStart",q),B.select())};Graph.prototype.flipEdgePoints=function(q,A,B){var F=this.getCellGeometry(q);if(null!=F){F=F.clone();if(null!=F.points)for(var M=0;M<F.points.length;M++)A?F.points[M].x=B+(B-F.points[M].x):F.points[M].y=B+(B-F.points[M].y);M=function(R){null!=R&&(A?R.x=B+(B-R.x):R.y=B+(B-R.y))};M(F.getTerminalPoint(!0));M(F.getTerminalPoint(!1));
+this.model.setGeometry(q,F)}};Graph.prototype.flipChildren=function(q,A,B){this.model.beginUpdate();try{for(var F=this.model.getChildCount(q),M=0;M<F;M++){var R=this.model.getChildAt(q,M);if(this.model.isEdge(R))this.flipEdgePoints(R,A,B);else{var W=this.getCellGeometry(R);null!=W&&(W=W.clone(),A?W.x=B+(B-W.x-W.width):W.y=B+(B-W.y-W.height),this.model.setGeometry(R,W))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(q,A){this.model.beginUpdate();try{q=this.model.getTopmostCells(q);
+for(var B=[],F=0;F<q.length;F++)if(this.model.isEdge(q[F])){var M=this.view.getState(q[F]);null!=M&&this.flipEdgePoints(q[F],A,(A?M.getCenterX():M.getCenterY())/this.view.scale-(A?M.origin.x:M.origin.y)-(A?this.view.translate.x:this.view.translate.y))}else{var R=this.getCellGeometry(q[F]);null!=R&&this.flipChildren(q[F],A,A?R.getCenterX()-R.x:R.getCenterY()-R.y);B.push(q[F])}this.toggleCellStyles(A?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,B)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=
+function(q,A){var B=null;if(null!=q&&0<q.length){this.model.beginUpdate();try{for(var F=0;F<q.length;F++){var M=this.model.getParent(q[F]);if(this.isTable(M)){var R=this.getCellGeometry(q[F]),W=this.getCellGeometry(M);null!=R&&null!=W&&(W=W.clone(),W.height-=R.height,this.model.setGeometry(M,W))}}var ha=this.selectParentAfterDelete?this.model.getParents(q):null;this.removeCells(q,A)}finally{this.model.endUpdate()}if(null!=ha)for(B=[],F=0;F<ha.length;F++)this.model.contains(ha[F])&&(this.model.isVertex(ha[F])||
+this.model.isEdge(ha[F]))&&B.push(ha[F])}return B};Graph.prototype.insertTableColumn=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,M=0;if(this.isTableCell(q)){var R=B.getParent(q);F=B.getParent(R);M=mxUtils.indexOf(B.getChildCells(R,!0),q)}else this.isTableRow(q)?F=B.getParent(q):q=B.getChildCells(F,!0)[0],A||(M=B.getChildCells(q,!0).length-1);var W=B.getChildCells(F,!0),ha=Graph.minTableColumnWidth;for(q=0;q<W.length;q++){var fa=B.getChildCells(W[q],!0)[M],ja=B.cloneCell(fa,!1);
+null==ja&&(ja=this.createVertex());var va=this.getCellGeometry(ja);ja.value=null;ja.style=mxUtils.setStyle(mxUtils.setStyle(ja.style,"rowspan",null),"colspan",null);if(null!=va){null!=va.alternateBounds&&(va.width=va.alternateBounds.width,va.height=va.alternateBounds.height,va.alternateBounds=null);ha=va.width;var Ma=this.getCellGeometry(W[q]);null!=Ma&&(va.height=Ma.height)}B.add(W[q],ja,M+(A?0:1))}var Na=this.getCellGeometry(F);null!=Na&&(Na=Na.clone(),Na.width+=ha,B.setGeometry(F,Na))}finally{B.endUpdate()}};
+Graph.prototype.deleteLane=function(q){var A=this.getModel();A.beginUpdate();try{var B=null;B="stackLayout"==this.getCurrentCellStyle(q).childLayout?q:A.getParent(q);var F=A.getChildCells(B,!0);0==F.length?A.remove(B):(B==q&&(q=F[F.length-1]),A.remove(q))}finally{A.endUpdate()}};Graph.prototype.insertLane=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=null;if("stackLayout"==this.getCurrentCellStyle(q).childLayout){F=q;var M=B.getChildCells(F,!0);q=M[A?0:M.length-1]}else F=B.getParent(q);
+var R=F.getIndex(q);q=B.cloneCell(q,!1);q.value=null;B.add(F,q,R+(A?0:1))}finally{B.endUpdate()}};Graph.prototype.insertTableRow=function(q,A){var B=this.getModel();B.beginUpdate();try{var F=q,M=q;if(this.isTableCell(q))M=B.getParent(q),F=B.getParent(M);else if(this.isTableRow(q))F=B.getParent(q);else{var R=B.getChildCells(F,!0);M=R[A?0:R.length-1]}var W=B.getChildCells(M,!0),ha=F.getIndex(M);M=B.cloneCell(M,!1);M.value=null;var fa=this.getCellGeometry(M);if(null!=fa){for(R=0;R<W.length;R++){q=B.cloneCell(W[R],
+!1);q.value=null;q.style=mxUtils.setStyle(mxUtils.setStyle(q.style,"rowspan",null),"colspan",null);var ja=this.getCellGeometry(q);null!=ja&&(null!=ja.alternateBounds&&(ja.width=ja.alternateBounds.width,ja.height=ja.alternateBounds.height,ja.alternateBounds=null),ja.height=fa.height);M.insert(q)}B.add(F,M,ha+(A?0:1));var va=this.getCellGeometry(F);null!=va&&(va=va.clone(),va.height+=fa.height,B.setGeometry(F,va))}}finally{B.endUpdate()}};Graph.prototype.deleteTableColumn=function(q){var A=this.getModel();
+A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(F=A.getParent(q));this.isTableRow(F)&&(B=A.getParent(F));var M=A.getChildCells(B,!0);if(0==M.length)A.remove(B);else{this.isTableRow(F)||(F=M[0]);var R=A.getChildCells(F,!0);if(1>=R.length)A.remove(B);else{var W=R.length-1;this.isTableCell(q)&&(W=mxUtils.indexOf(R,q));for(F=q=0;F<M.length;F++){var ha=A.getChildCells(M[F],!0)[W];A.remove(ha);var fa=this.getCellGeometry(ha);null!=fa&&(q=Math.max(q,fa.width))}var ja=this.getCellGeometry(B);null!=
+ja&&(ja=ja.clone(),ja.width-=q,A.setGeometry(B,ja))}}}finally{A.endUpdate()}};Graph.prototype.deleteTableRow=function(q){var A=this.getModel();A.beginUpdate();try{var B=q,F=q;this.isTableCell(q)&&(q=F=A.getParent(q));this.isTableRow(q)&&(B=A.getParent(F));var M=A.getChildCells(B,!0);if(1>=M.length)A.remove(B);else{this.isTableRow(F)||(F=M[M.length-1]);A.remove(F);q=0;var R=this.getCellGeometry(F);null!=R&&(q=R.height);var W=this.getCellGeometry(B);null!=W&&(W=W.clone(),W.height-=q,A.setGeometry(B,
+W))}}finally{A.endUpdate()}};Graph.prototype.insertRow=function(q,A){for(var B=q.tBodies[0],F=B.rows[0].cells,M=q=0;M<F.length;M++){var R=F[M].getAttribute("colspan");q+=null!=R?parseInt(R):1}A=B.insertRow(A);for(M=0;M<q;M++)mxUtils.br(A.insertCell(-1));return A.cells[0]};Graph.prototype.deleteRow=function(q,A){q.tBodies[0].deleteRow(A)};Graph.prototype.insertColumn=function(q,A){var B=q.tHead;if(null!=B)for(var F=0;F<B.rows.length;F++){var M=document.createElement("th");B.rows[F].appendChild(M);
+mxUtils.br(M)}q=q.tBodies[0];for(B=0;B<q.rows.length;B++)F=q.rows[B].insertCell(A),mxUtils.br(F);return q.rows[0].cells[0<=A?A:q.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(q,A){if(0<=A){q=q.tBodies[0].rows;for(var B=0;B<q.length;B++)q[B].cells.length>A&&q[B].deleteCell(A)}};Graph.prototype.pasteHtmlAtCaret=function(q){if(window.getSelection){var A=window.getSelection();if(A.getRangeAt&&A.rangeCount){A=A.getRangeAt(0);A.deleteContents();var B=document.createElement("div");B.innerHTML=
+q;q=document.createDocumentFragment();for(var F;F=B.firstChild;)lastNode=q.appendChild(F);A.insertNode(q)}}else(A=document.selection)&&"Control"!=A.type&&A.createRange().pasteHTML(q)};Graph.prototype.createLinkForHint=function(q,A,B){function F(R,W){R.length>W&&(R=R.substring(0,Math.round(W/2))+"..."+R.substring(R.length-Math.round(W/4)));return R}q=null!=q?q:"javascript:void(0);";if(null==A||0==A.length)A=this.isCustomLink(q)?this.getLinkTitle(q):q;var M=document.createElement("a");M.setAttribute("rel",
+this.linkRelation);M.setAttribute("href",this.getAbsoluteUrl(q));M.setAttribute("title",F(this.isCustomLink(q)?this.getLinkTitle(q):q,80));null!=this.linkTarget&&M.setAttribute("target",this.linkTarget);mxUtils.write(M,F(A,40));this.isCustomLink(q)&&mxEvent.addListener(M,"click",mxUtils.bind(this,function(R){this.customLinkClicked(q,B);mxEvent.consume(R)}));return M};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};
+this.addListener(mxEvent.START_EDITING,function(R,W){this.popupMenuHandler.hideMenu()});var q=this.updateMouseEvent;this.updateMouseEvent=function(R){R=q.apply(this,arguments);if(mxEvent.isTouchEvent(R.getEvent())&&null==R.getState()){var W=this.getCellAt(R.graphX,R.graphY);null!=W&&this.isSwimlane(W)&&this.hitsSwimlaneContent(W,R.graphX,R.graphY)||(R.state=this.view.getState(W),null!=R.state&&null!=R.state.shape&&(this.container.style.cursor=R.state.shape.node.style.cursor))}null==R.getState()&&
+this.isEnabled()&&(this.container.style.cursor="default");return R};var A=!1,B=!1,F=!1,M=this.fireMouseEvent;this.fireMouseEvent=function(R,W,ha){R==mxEvent.MOUSE_DOWN&&(W=this.updateMouseEvent(W),A=this.isCellSelected(W.getCell()),B=this.isSelectionEmpty(),F=this.popupMenuHandler.isMenuShowing());M.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(R,W){if(null!=this.freehand&&!this.freehand.isDrawing()){var ha=mxEvent.isMouseEvent(W.getEvent());this.popupMenuHandler.popupTrigger=
+!this.isEditing()&&this.isEnabled()&&(null==W.getState()||!W.isSource(W.getState().control))&&(this.popupMenuHandler.popupTrigger||!F&&!ha&&(B&&null==W.getCell()&&this.isSelectionEmpty()||A&&this.isCellSelected(W.getCell())));ha=!A||ha?null:mxUtils.bind(this,function(fa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ja=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(W.getX()+ja.x+1,W.getY()+ja.y+1,fa,W.getEvent())}}),300)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,
+[R,W,ha])}})};mxCellEditor.prototype.isContentEditing=function(){var q=this.graph.view.getState(this.editingCell);return null!=q&&1==q.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var q="";window.getSelection?q=window.getSelection():document.getSelection?q=document.getSelection():document.selection&&(q=document.selection.createRange().text);
return""!=q};mxCellEditor.prototype.insertTab=function(q){var A=this.textarea.ownerDocument.defaultView.getSelection(),B=A.getRangeAt(0);q=Graph.createTabNode(q);B.insertNode(q);B.setStartAfter(q);B.setEndAfter(q);A.removeAllRanges();A.addRange(B)};mxCellEditor.prototype.alignText=function(q,A){var B=this.graph.getView().getState(this.editingCell);if(null!=B){B=mxUtils.getValue(B.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);var F=null!=B&&"vertical-"==B.substring(0,9),
-N=null!=A&&mxEvent.isShiftDown(A);if(N||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(X){N||F||window.getSelection().containsNode(X,!0)?(X.removeAttribute("align"),X.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=
+M=null!=A&&mxEvent.isShiftDown(A);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var R=!0;this.graph.processElements(this.textarea,function(W){M||F||window.getSelection().containsNode(W,!0)?(W.removeAttribute("align"),W.style.textAlign=null):R=!1});(R||F)&&this.graph.cellEditor.setAlign(q)}F||document.execCommand("justify"+q.toLowerCase(),!1,null)}};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var q=window.getSelection();if(q.getRangeAt&&q.rangeCount){for(var A=
[],B=0,F=q.rangeCount;B<F;++B)A.push(q.getRangeAt(B));return A}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(q){try{if(q)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var A=0,B=q.length;A<B;++A)sel.addRange(q[A])}else document.selection&&q.select&&q.select()}catch(F){}};var G=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
-function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;
+function(q){null!=q.text&&(q.text.replaceLinefeeds="0"!=mxUtils.getValue(q.style,"nl2Br","1"));G.apply(this,arguments)};var K=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(q,A){this.isKeepFocusEvent(q)||!mxEvent.isAltDown(q.getEvent())?K.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(q){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var L=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(q,A){q=this.graph.getStartEditingCell(q,A);L.apply(this,arguments);var B=this.graph.view.getState(q);this.textarea.className=null!=B&&1==B.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.textarea.style.colorScheme="none"==this.graph.getAdaptiveColors()?"light":"";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(q)};mxCellEditor.prototype.toggleViewMode=function(){var q=this.graph.view.getState(this.editingCell);
-if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);fa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<fa.length&&"\n"==fa.charAt(fa.length-1)&&(fa=fa.substring(0,fa.length-1));fa=Graph.sanitizeHtml(A?fa.replace(/\n/g,"<br/>"):fa,!0);this.textarea.className="mxCellEditor geContentEditable";da=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),N=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,X=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&X.push("underline");
-(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&X.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(da*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(da)+"px";this.textarea.style.textDecoration=X.join(" ");this.textarea.style.fontWeight=N?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
-F;this.textarea.style.padding="0px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,
-Graph.backupStyleAttribute);var fa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(fa=mxUtils.replaceTrailingNewlines(fa,"<div><br></div>"));fa=Graph.sanitizeHtml(A?fa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):fa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var da=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(da*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(da)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=fa&&(this.textarea.innerHTML=fa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
-B;this.resize()}};var T=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(q,A){if(null!=this.textarea)if(q=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=q){var B=q.view.scale;this.bounds=mxRectangle.fromRectangle(q);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=q.text?q.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
+if(null!=q){var A=null!=q&&"0"!=mxUtils.getValue(q.style,"nl2Br","1"),B=this.saveSelection();if(this.codeViewMode){Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);ha=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ha.length&&"\n"==ha.charAt(ha.length-1)&&(ha=ha.substring(0,ha.length-1));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"<br/>"):ha,!0);this.textarea.className="mxCellEditor geContentEditable";fa=mxUtils.getValue(q.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
+A=mxUtils.getValue(q.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var F=mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),M=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,R=(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,W=[];(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&W.push("underline");
+(mxUtils.getValue(q.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&W.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(fa)+"px";this.textarea.style.textDecoration=W.join(" ");this.textarea.style.fontWeight=M?"bold":"normal";this.textarea.style.fontStyle=R?"italic":"";this.textarea.style.fontFamily=A;this.textarea.style.textAlign=
+F;this.textarea.style.padding="0px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors());this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");Graph.removeLightDarkColors(this.textarea,
+Graph.backupStyleAttribute);var ha=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ha=mxUtils.replaceTrailingNewlines(ha,"<div><br></div>"));ha=Graph.sanitizeHtml(A?ha.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ha,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var fa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(fa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
+Math.round(fa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ha&&(this.textarea.innerHTML=ha);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=
+B;this.resize()}};var Q=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(q,A){if(null!=this.textarea)if(q=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=q){var B=q.view.scale;this.bounds=mxRectangle.fromRectangle(q);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var F=null!=q.text?q.text.margin:null;null==F&&(F=mxUtils.getAlignmentAsPoint(mxUtils.getValue(q.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),
mxUtils.getValue(q.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=F.x*this.bounds.width;this.bounds.y+=F.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/B)+(this.textarea.offsetHeight-this.textarea.clientHeight)+
"px",this.bounds.height=parseInt(this.textarea.style.height)*B);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/B)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*B);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+B+","+B+")")}else this.textarea.style.height=
-"",this.textarea.style.overflow="",T.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(q,A){if("0"==mxUtils.getValue(q.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var B=this.graph.getEditingValue(q.cell,A);"1"==mxUtils.getValue(q.style,"nl2Br","1")&&(B=B.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(B,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=
+"",this.textarea.style.overflow="",Q.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(q,A){if("0"==mxUtils.getValue(q.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var B=this.graph.getEditingValue(q.cell,A);"1"==mxUtils.getValue(q.style,"nl2Br","1")&&(B=B.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(B,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=
function(q,A){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(q.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(q){if("0"==mxUtils.getValue(q.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);
-var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(q.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<A.length&&("<br/>"==A.substring(A.length-5)||"<br>"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("<br"))+"<div><br/></div>")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(q){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};
+var A=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(q.style,"nl2Br","1")?(A=A.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<A.length&&("<br/>"==A.substring(A.length-5)||"<br>"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("<br"))+"<div><br/></div>")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var N=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(q){this.codeViewMode&&this.toggleViewMode();N.apply(this,arguments);this.focusContainer()};
mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(q){}};var U=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(q,A){this.graph.getModel().beginUpdate();try{U.apply(this,arguments),""==A&&this.graph.isCellDeletable(q.cell)&&0==this.graph.model.getChildCount(q.cell)&&this.graph.isTransparentState(q)&&this.graph.removeCells([q.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(q){q=
mxUtils.getValue(q.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);q==mxConstants.NONE&&(q=null);return q};mxCellEditor.prototype.getBorderColor=function(q){q=mxUtils.getValue(q.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);q==mxConstants.NONE&&(q=null);return q};mxCellEditor.prototype.getMinimumSize=function(q){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==q.text?30:q.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=
function(q,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(q){return q?b(q,this.unit):q};mxGraphHandler.prototype.updateHint=function(q){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;q=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+
this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(q,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var Y=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=
-function(q,A){Y.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==B.childLayout){var F=this.graph.model.getParent(q),N=null!=F?this.graph.getCellGeometry(F):null;if(null!=N&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var X=this.graph.getActualStartSize(F);N=N.clone();B?N.height=A.height+X.y+X.height+2*R:N.width=A.width+X.x+X.width+2*R;
-this.graph.model.setGeometry(F,N)}}};var Q=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(fa){B.get(fa)||(B.put(fa,!0),N.push(fa))}for(var A=Q.apply(this,arguments),B=new mxDictionary,F=this.graph.model,N=[],R=0;R<A.length;R++){var X=A[R];this.graph.isTableCell(X)?q(F.getParent(F.getParent(X))):this.graph.isTableRow(X)&&q(F.getParent(X));q(X)}return N};var P=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
-function(q){return P.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var M=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return M.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
-function(q){var A=V.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var aa=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=aa.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
+function(q,A){Y.apply(this,arguments);var B=this.graph.getCellStyle(q);if(null==B.childLayout){var F=this.graph.model.getParent(q),M=null!=F?this.graph.getCellGeometry(F):null;if(null!=M&&(B=this.graph.getCellStyle(F),"stackLayout"==B.childLayout)){var R=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(F);M=M.clone();B?M.height=A.height+W.y+W.height+2*R:M.width=A.width+W.x+W.width+2*R;
+this.graph.model.setGeometry(F,M)}}};var P=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function q(ha){B.get(ha)||(B.put(ha,!0),M.push(ha))}for(var A=P.apply(this,arguments),B=new mxDictionary,F=this.graph.model,M=[],R=0;R<A.length;R++){var W=A[R];this.graph.isTableCell(W)?q(F.getParent(F.getParent(W))):this.graph.isTableRow(W)&&q(F.getParent(W));q(W)}return M};var T=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=
+function(q){return T.apply(this,arguments)&&!mxEvent.isControlDown(q.getEvent())&&!mxEvent.isShiftDown(q.getEvent())};var J=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=function(){return J.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var V=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=
+function(q){var A=V.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};var Z=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(q){var A=Z.apply(this,arguments);A.stroke="#C0C0C0";A.strokewidth=1;return A};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var q=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+
q.x/2,this.bounds.y+this.rotationHandleVSpacing-q.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(q,A){return this.graph.isRecursiveVertexResize(q)&&!mxEvent.isAltDown(A.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(q,A){return mxEvent.isControlDown(A.getEvent())||mxEvent.isMetaDown(A.getEvent())};var ia=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ia.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&
-!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var na=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return na.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
-var qa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(q){return q.tableHandle||qa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var q=0;this.graph.isTableRow(this.state.cell)?q=1:this.graph.isTableCell(this.state.cell)&&(q=2);return q};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
-function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var Z=null,ca=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==Z&&(Z=mxCellRenderer.defaultShapes.tableLine);var q=ca.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ga,wa,ua){for(var Va=[],Qa=0;Qa<Ga.length;Qa++){var Ka=Ga[Qa];Va.push(null==Ka?null:new mxPoint((da+Ka.x+wa)*R,(ha+Ka.y+ua)*
-R))}return Va},B=this,F=this.graph,N=F.model,R=F.view.scale,X=this.state,fa=this.selectionBorder,da=this.state.origin.x+F.view.translate.x,ha=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var va=F.view.getCellStates(N.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=N.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),ya=F.getTableLines(this.state.cell,!0,!1);for(N=0;N<va.length;N++)mxUtils.bind(this,function(Ga){var wa=va[Ga],ua=null;if(F.isCellMovable(wa.cell)){ua=
-Ga<va.length-1?va[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Va=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=ya[Ga]?new Z(ya[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=fa.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Qa=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=
-0==Qa?mxConstants.NONE:fa.stroke;if(this.shape.constructor==Z)this.shape.line=A(ya[Ga],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(X.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*R;this.shape.bounds.x=X.x+(Ga==va.length-1?0:Ua.x*R);this.shape.bounds.width=X.width-(Ga==va.length-1?0:Ua.width+Ua.x+R)}this.shape.redraw()}};var Ka=!1;ua.setPosition=function(Ua,Wa,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Wa.y-Ua.y-Ua.height);
-Ka=mxEvent.isShiftDown(mb.getEvent());null!=Va&&Ka&&(Qa=Math.min(Qa,Va.height-Graph.minTableRowHeight))};ua.execute=function(Ua){if(0!=Qa)F.setTableRowHeight(this.state.cell,Qa,!Ka);else if(!B.blockDelayedSelection){var Wa=F.getCellAt(Ua.getGraphX(),Ua.getGraphY())||X.cell;F.graphHandler.selectCellForEvent(Wa,Ua)}Qa=0};ua.reset=function(){Qa=0}}q.push(ua)})(N);for(N=0;N<Ma.length;N++)mxUtils.bind(this,function(Ga){var wa=F.view.getState(Ma[Ga]),ua=F.getCellGeometry(Ma[Ga]),Va=null!=ua.alternateBounds?
-ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ga],F.getCellStyle(Ma[Ga])),wa.x=X.x+ua.x*R,wa.y=X.y+ua.y*R,wa.width=Va.width*R,wa.height=Va.height*R,wa.updateCachedBounds());ua=Ga<Ma.length-1?Ma[Ga+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ga]?new Z(Na[Ga],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=fa.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
-null,ua);wa.tableHandle=!0;var Ka=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ka?mxConstants.NONE:fa.stroke;if(this.shape.constructor==Z)this.shape.line=A(Na[Ga],Ka,0),this.shape.updateBoundsFromLine();else{var Wa=F.getActualStartSize(X.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Va.width+Ka)*R;this.shape.bounds.y=X.y+(Ga==Ma.length-1?0:Wa.y*R);this.shape.bounds.height=
-X.height-(Ga==Ma.length-1?0:(Wa.height+Wa.y)*R)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Wa,mb,ub){Ka=Math.max(Graph.minTableColumnWidth-Va.width,mb.x-Wa.x-Va.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(Ka=Math.min(Ka,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Wa){if(0!=Ka)F.setTableColumnWidth(this.state.cell,Ka,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Wa.getGraphX(),Wa.getGraphY())||X.cell;F.graphHandler.selectCellForEvent(mb,Wa)}Ka=
-0};wa.positionChanged=function(){};wa.reset=function(){Ka=0};q.push(wa)})(N)}}return null!=q?q.reverse():null};var W=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){W.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
+!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var oa=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return oa.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};
+var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(q){return q.tableHandle||sa.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var q=0;this.graph.isTableRow(this.state.cell)?q=1:this.graph.isTableCell(this.state.cell)&&(q=2);return q};var O=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=
+function(){return O.apply(this,arguments).grow(-this.getSelectionBorderInset())};var X=null,ba=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==X&&(X=mxCellRenderer.defaultShapes.tableLine);var q=ba.apply(this,arguments);if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)){var A=function(Ha,wa,ua){for(var Va=[],Qa=0;Qa<Ha.length;Qa++){var Ka=Ha[Qa];Va.push(null==Ka?null:new mxPoint((fa+Ka.x+wa)*R,(ja+Ka.y+ua)*
+R))}return Va},B=this,F=this.graph,M=F.model,R=F.view.scale,W=this.state,ha=this.selectionBorder,fa=this.state.origin.x+F.view.translate.x,ja=this.state.origin.y+F.view.translate.y;null==q&&(q=[]);var va=F.view.getCellStates(M.getChildCells(this.state.cell,!0));if(0<va.length){var Ma=M.getChildCells(va[0].cell,!0),Na=F.getTableLines(this.state.cell,!1,!0),ya=F.getTableLines(this.state.cell,!0,!1);for(M=0;M<va.length;M++)mxUtils.bind(this,function(Ha){var wa=va[Ha],ua=null;if(F.isCellMovable(wa.cell)){ua=
+Ha<va.length-1?va[Ha+1]:null;ua=null!=ua?F.getCellGeometry(ua.cell):null;var Va=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=ya[Ha]?new X(ya[Ha],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;ua=new mxHandle(wa,"row-resize",null,ua);ua.tableHandle=!0;var Qa=0;ua.shape.node.parentNode.insertBefore(ua.shape.node,ua.shape.node.parentNode.firstChild);ua.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==Qa?mxConstants.NONE:ha.stroke;if(this.shape.constructor==X)this.shape.line=A(ya[Ha],0,Qa),this.shape.updateBoundsFromLine();else{var Ua=F.getActualStartSize(W.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Qa*R;this.shape.bounds.x=W.x+(Ha==va.length-1?0:Ua.x*R);this.shape.bounds.width=W.width-(Ha==va.length-1?0:Ua.width+Ua.x+R)}this.shape.redraw()}};var Ka=!1;ua.setPosition=function(Ua,Wa,mb){Qa=Math.max(Graph.minTableRowHeight-Ua.height,Wa.y-Ua.y-Ua.height);
+Ka=mxEvent.isShiftDown(mb.getEvent());null!=Va&&Ka&&(Qa=Math.min(Qa,Va.height-Graph.minTableRowHeight))};ua.execute=function(Ua){if(0!=Qa)F.setTableRowHeight(this.state.cell,Qa,!Ka);else if(!B.blockDelayedSelection){var Wa=F.getCellAt(Ua.getGraphX(),Ua.getGraphY())||W.cell;F.graphHandler.selectCellForEvent(Wa,Ua)}Qa=0};ua.reset=function(){Qa=0}}q.push(ua)})(M);for(M=0;M<Ma.length;M++)mxUtils.bind(this,function(Ha){var wa=F.view.getState(Ma[Ha]),ua=F.getCellGeometry(Ma[Ha]),Va=null!=ua.alternateBounds?
+ua.alternateBounds:ua;null==wa&&(wa=new mxCellState(F.view,Ma[Ha],F.getCellStyle(Ma[Ha])),wa.x=W.x+ua.x*R,wa.y=W.y+ua.y*R,wa.width=Va.width*R,wa.height=Va.height*R,wa.updateCachedBounds());ua=Ha<Ma.length-1?Ma[Ha+1]:null;ua=null!=ua?F.getCellGeometry(ua):null;var Qa=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Na[Ha]?new X(Na[Ha],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ha.isDashed;ua.svgStrokeTolerance++;wa=new mxHandle(wa,"col-resize",
+null,ua);wa.tableHandle=!0;var Ka=0;wa.shape.node.parentNode.insertBefore(wa.shape.node,wa.shape.node.parentNode.firstChild);wa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ka?mxConstants.NONE:ha.stroke;if(this.shape.constructor==X)this.shape.line=A(Na[Ha],Ka,0),this.shape.updateBoundsFromLine();else{var Wa=F.getActualStartSize(W.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Va.width+Ka)*R;this.shape.bounds.y=W.y+(Ha==Ma.length-1?0:Wa.y*R);this.shape.bounds.height=
+W.height-(Ha==Ma.length-1?0:(Wa.height+Wa.y)*R)}this.shape.redraw()}};var Ua=!1;wa.setPosition=function(Wa,mb,ub){Ka=Math.max(Graph.minTableColumnWidth-Va.width,mb.x-Wa.x-Va.width);Ua=mxEvent.isShiftDown(ub.getEvent());null==Qa||Ua||(Ka=Math.min(Ka,Qa.width-Graph.minTableColumnWidth))};wa.execute=function(Wa){if(0!=Ka)F.setTableColumnWidth(this.state.cell,Ka,Ua);else if(!B.blockDelayedSelection){var mb=F.getCellAt(Wa.getGraphX(),Wa.getGraphY())||W.cell;F.graphHandler.selectCellForEvent(mb,Wa)}Ka=
+0};wa.positionChanged=function(){};wa.reset=function(){Ka=0};q.push(wa)})(M)}}return null!=q?q.reverse():null};var da=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(q){da.apply(this,arguments);if(null!=this.moveHandles)for(var A=0;A<this.moveHandles.length;A++)null!=this.moveHandles[A]&&(this.moveHandles[A].node.style.visibility=q?"":"hidden");if(null!=this.cornerHandles)for(A=0;A<this.cornerHandles.length;A++)this.cornerHandles[A].node.style.visibility=
q?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var q=this.isMoveHandlesVisible();q&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():q||null==this.moveHandles||this.destroyMoveHandles();if(q&&null==this.moveHandles){for(q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].parentNode.removeChild(this.moveHandles[q]);
-this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var q=this.graph,A=q.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(N){if(null!=N&&A.isVertex(N.cell)&&q.isCellMovable(N.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=N;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());
-R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(X){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(X)&&this.graph.isCellSelected(N.cell)||this.graph.selectCellForEvent(N.cell,X);mxEvent.isPopupTrigger(X)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(X),mxEvent.getClientY(X),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(X),
-this.graph.isMouseDown=!0);mxEvent.consume(X)}),null,mxUtils.bind(this,function(X){mxEvent.isPopupTrigger(X)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(X),mxEvent.getClientY(X),N.cell,X),mxEvent.consume(X))}));B.push(R)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].destroy();
-this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var q=0;q<this.cornerHandles.length;q++)null!=this.cornerHandles[q]&&null!=this.cornerHandles[q].node&&null!=this.cornerHandles[q].node.parentNode&&this.cornerHandles[q].node.parentNode.removeChild(this.cornerHandles[q].node);this.cornerHandles=null}};var ja=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ja.apply(this,arguments);this.destroyMoveHandles();
+this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var q=this.graph,A=q.model,B=[],F=0;F<A.getChildCount(this.state.cell);F++)mxUtils.bind(this,function(M){if(null!=M&&A.isVertex(M.cell)&&q.isCellMovable(M.cell)){var R=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);R=new mxImageShape(R,this.rowHandleImage.src);R.rowState=M;R.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;R.init(this.graph.getView().getOverlayPane());
+R.node.style.cursor="move";mxEvent.addGestureListeners(R.node,mxUtils.bind(this,function(W){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(W)&&this.graph.isCellSelected(M.cell)||this.graph.selectCellForEvent(M.cell,W);mxEvent.isPopupTrigger(W)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(W),mxEvent.getClientY(W),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(W),
+this.graph.isMouseDown=!0);mxEvent.consume(W)}),null,mxUtils.bind(this,function(W){mxEvent.isPopupTrigger(W)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(W),mxEvent.getClientY(W),M.cell,W),mxEvent.consume(W))}));B.push(R)}else B.push(null)})(this.graph.view.getState(A.getChildAt(this.state.cell,F)));return B};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var q=0;q<this.moveHandles.length;q++)null!=this.moveHandles[q]&&this.moveHandles[q].destroy();
+this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=function(){if(null!=this.cornerHandles){for(var q=0;q<this.cornerHandles.length;q++)null!=this.cornerHandles[q]&&null!=this.cornerHandles[q].node&&null!=this.cornerHandles[q].node.parentNode&&this.cornerHandles[q].node.parentNode.removeChild(this.cornerHandles[q].node);this.cornerHandles=null}};var ca=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){ca.apply(this,arguments);this.destroyMoveHandles();
this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var q=0;4>q;q++){var A=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);A.dialect=mxConstants.DIALECT_SVG;A.init(this.graph.view.getOverlayPane());
this.cornerHandles.push(A)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();q=this.graph.getLinkForCell(this.state.cell);A=this.graph.getLinksForState(this.state);this.updateLinkHint(q,A)};var H=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var q=new mxPoint(0,0),A=this.tolerance,B=this.state.style.shape;null==mxCellRenderer.defaultShapes[B]&&mxStencilRegistry.getStencil(B);B=this.graph.isTable(this.state.cell)||
-this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var N=this.customHandles[F].shape.bounds,R=N.getCenterX(),X=N.getCenterY();if(Math.abs(this.state.x-R)<N.width/2||Math.abs(this.state.y-X)<N.height/2||Math.abs(this.state.x+this.state.width-R)<N.width/2||Math.abs(this.state.y+this.state.height-X)<N.height/2){B=
+this.graph.cellEditor.getEditingCell()==this.state.cell;if(!B&&null!=this.customHandles)for(var F=0;F<this.customHandles.length;F++)if(null!=this.customHandles[F]&&null!=this.customHandles[F].shape&&null!=this.customHandles[F].shape.bounds){var M=this.customHandles[F].shape.bounds,R=M.getCenterX(),W=M.getCenterY();if(Math.abs(this.state.x-R)<M.width/2||Math.abs(this.state.y-W)<M.height/2||Math.abs(this.state.x+this.state.width-R)<M.width/2||Math.abs(this.state.y+this.state.height-W)<M.height/2){B=
!0;break}}B&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(A/=2,this.graph.isTable(this.state.cell)&&(A+=7),q.x=this.sizers[0].bounds.width+A,q.y=this.sizers[0].bounds.height+A):q=H.apply(this,arguments);return q};mxVertexHandler.prototype.updateHint=function(q){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{q=this.state.view.scale;
var A=this.state.view.unit;this.hint.innerHTML=b(this.roundLength(this.bounds.width/q),A)+" x "+b(this.roundLength(this.bounds.height/q),A)}q=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==q&&(q=this.bounds);this.hint.style.left=q.x+Math.round((q.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=q.y+q.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=
-function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ea=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){ea.apply(this,arguments);var q=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(q,A)};var oa=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(q,A){oa.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&
-null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var sa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(q,A){sa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(q,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
-N=this.graph.view.scale,R=this.roundLength(A.x/N-F.x);F=this.roundLength(A.y/N-F.y);var X=this.graph.view.unit;this.hint.innerHTML=b(R,X)+", "+b(F,X);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(X==mxConstants.POINTS?Math.round(B.length/N):b(B.length/N,X))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
+function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ea=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){ea.apply(this,arguments);var q=this.graph.getLinkForCell(this.state.cell),A=this.graph.getLinksForState(this.state);this.updateLinkHint(q,A)};var ra=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(q,A){ra.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&
+null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var qa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(q,A){qa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(q,A,B){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var F=this.graph.view.translate,
+M=this.graph.view.scale,R=this.roundLength(A.x/M-F.x);F=this.roundLength(A.y/M-F.y);var W=this.graph.view.unit;this.hint.innerHTML=b(R,W)+", "+b(F,W);this.hint.style.visibility="visible";null!=B&&(B.view.updateEdgeBounds(B),this.hint.innerHTML+=" ("+(W==mxConstants.POINTS?Math.round(B.length/M):b(B.length/M,W))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(B=this.constraintHandler.currentConstraint.point,
this.hint.innerHTML="["+Math.round(100*B.x)+"%, "+Math.round(100*B.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(q.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(q.getGraphY(),A.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
@@ -2962,27 +2963,27 @@ HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prot
function(q){return!mxEvent.isShiftDown(q.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(q){return!mxEvent.isShiftDown(q.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(q){return mxEvent.isMouseEvent(q.getEvent())?
4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return null==q.getState()&&!mxEvent.isMouseEvent(A)||mxEvent.isPopupTrigger(A)&&(null==q.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))}}else mxPanningHandler.prototype.isPanningTrigger=function(q){var A=q.getEvent();return mxEvent.isLeftMouseButton(A)&&(this.useLeftButtonForPanning&&null==q.getState()||mxEvent.isControlDown(A)&&!mxEvent.isShiftDown(A))||this.usePopupTrigger&&mxEvent.isPopupTrigger(A)};
mxRubberband.prototype.isSpaceEvent=function(q){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(q.getEvent())||mxEvent.isMetaDown(q.getEvent()))&&mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(q,A){if(this.cancelled)this.cancelled=!1,A.consume();else{var B=
-null!=this.div&&"none"!=this.div.style.display,F=null,N=null,R=q=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,N=this.first.y,q=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-N)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(q=this.graph.snap(q),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(q)<this.graph.tolerance&&(q=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
-try{var X=this.graph.getCellsBeyond(F,N,this.graph.getDefaultParent(),!0,!0);for(B=0;B<X.length;B++)if(this.graph.isCellMovable(X[B])){var fa=this.graph.view.getState(X[B]),da=this.graph.getCellGeometry(X[B]);null!=fa&&null!=da&&(da=da.clone(),da.translate(q,R),this.graph.model.setGeometry(X[B],da))}}finally{this.graph.model.endUpdate()}}else X=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(X,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&
-null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);q=mxUtils.getOffset(this.graph.container);B.x-=q.x;B.y-=q.y;q=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-q,N=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(N)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(q,B),this.isSpaceEvent(A)?(q=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
+null!=this.div&&"none"!=this.div.style.display,F=null,M=null,R=q=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(F=this.first.x,M=this.first.y,q=(this.currentX-F)/this.graph.view.scale,R=(this.currentY-M)/this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(q=this.graph.snap(q),R=this.graph.snap(R),this.graph.isGridEnabled()||(Math.abs(q)<this.graph.tolerance&&(q=0),Math.abs(R)<this.graph.tolerance&&(R=0))));this.reset();if(B){if(this.isSpaceEvent(A)){this.graph.model.beginUpdate();
+try{var W=this.graph.getCellsBeyond(F,M,this.graph.getDefaultParent(),!0,!0);for(B=0;B<W.length;B++)if(this.graph.isCellMovable(W[B])){var ha=this.graph.view.getState(W[B]),fa=this.graph.getCellGeometry(W[B]);null!=ha&&null!=fa&&(fa=fa.clone(),fa.translate(q,R),this.graph.model.setGeometry(W[B],fa))}}finally{this.graph.model.endUpdate()}}else W=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(W,A.getEvent());A.consume()}}};mxRubberband.prototype.mouseMove=function(q,A){if(!A.isConsumed()&&
+null!=this.first){var B=mxUtils.getScrollOrigin(this.graph.container);q=mxUtils.getOffset(this.graph.container);B.x-=q.x;B.y-=q.y;q=A.getX()+B.x;B=A.getY()+B.y;var F=this.first.x-q,M=this.first.y-B,R=this.graph.tolerance;if(null!=this.div||Math.abs(F)>R||Math.abs(M)>R)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(q,B),this.isSpaceEvent(A)?(q=this.x+this.width,B=this.y+this.height,F=this.graph.view.scale,mxEvent.isAltDown(A.getEvent())||(this.width=this.graph.snap(this.width/
F)*F,this.height=this.graph.snap(this.height/F)*F,this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=q-this.width),this.y<this.first.y&&(this.y=B-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+
"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor=
-"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Pa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Pa.apply(this,arguments)};var la=(new Date).getTime(),Ba=0,Ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,
-A,B,F){Ca.apply(this,arguments);B!=this.currentTerminalState?(la=(new Date).getTime(),Ba=0):Ba=(new Date).getTime()-la;this.currentTerminalState=B};var Fa=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<Ba||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
-"outlineConnect","1"))&&Fa.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:
+"",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),A.consume()}};var Pa=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Pa.apply(this,arguments)};var ma=(new Date).getTime(),Ba=0,Ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(q,
+A,B,F){Ca.apply(this,arguments);B!=this.currentTerminalState?(ma=(new Date).getTime(),Ba=0):Ba=(new Date).getTime()-ma;this.currentTerminalState=B};var Ja=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(q){return mxEvent.isShiftDown(q.getEvent())&&mxEvent.isAltDown(q.getEvent())?!1:null!=this.currentTerminalState&&q.getState()==this.currentTerminalState&&2E3<Ba||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,
+"outlineConnect","1"))&&Ja.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=function(q,A,B){A=null!=q&&0==q;var F=this.state.getVisibleTerminalState(A);q=null!=q&&null!=this.state.absolutePoints&&(0==q||q>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==q)?this.graph.getConnectionConstraint(this.state,F,A):null;B=null!=(null!=q?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(A),q):null)?B?this.endFixedHandleImage:this.fixedHandleImage:
null!=q&&null!=F?B?this.endTerminalHandleImage:this.terminalHandleImage:B?this.endHandleImage:this.handleImage;if(null!=B)return B=new mxImageShape(new mxRectangle(0,0,B.width,B.height),B.src),B.preserveImageAspect=!1,B;B=mxConstants.HANDLE_SIZE;this.preferHtml&&--B;return new mxRectangleShape(new mxRectangle(0,0,B,B),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Ia=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(q,A,B,F){F=A==mxEvent.ROTATION_HANDLE?
-HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Ia.apply(this,arguments)};var Ha=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Ha.apply(this,
-arguments)};var Ja=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ja.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ta=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=
-q.text&&null!=q.text.boundingBox?(A=q.text.unrotatedBoundingBox||q.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ta.apply(this,arguments)};var La=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(q,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),N=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==N||!N.relative||null==this.state||
+HoverIcons.prototype.rotationHandle:A==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:F;return Ia.apply(this,arguments)};var Da=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(q){if(null!=q&&1==q.length){var A=this.graph.getModel(),B=A.getParent(q[0]),F=this.graph.getCellGeometry(q[0]);if(A.isEdge(B)&&null!=F&&F.relative&&(A=this.graph.view.getState(q[0]),null!=A&&2>A.width&&2>A.height&&null!=A.text&&null!=A.text.boundingBox))return mxRectangle.fromRectangle(A.text.boundingBox)}return Da.apply(this,
+arguments)};var Ga=mxGraphHandler.prototype.getGuideStates;mxGraphHandler.prototype.getGuideStates=function(){for(var q=Ga.apply(this,arguments),A=[],B=0;B<q.length;B++)"1"!=mxUtils.getValue(q[B].style,"part","0")&&A.push(q[B]);return A};var ta=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(q){var A=this.graph.getModel(),B=A.getParent(q.cell),F=this.graph.getCellGeometry(q.cell);return A.isEdge(B)&&null!=F&&F.relative&&2>q.width&&2>q.height&&null!=
+q.text&&null!=q.text.boundingBox?(A=q.text.unrotatedBoundingBox||q.text.boundingBox,new mxRectangle(Math.round(A.x),Math.round(A.y),Math.round(A.width),Math.round(A.height))):ta.apply(this,arguments)};var La=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(q,A){var B=this.graph.getModel(),F=B.getParent(this.state.cell),M=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(A)==mxEvent.ROTATION_HANDLE||!B.isEdge(F)||null==M||!M.relative||null==this.state||
2<=this.state.width||2<=this.state.height)&&La.apply(this,arguments)};mxVertexHandler.prototype.rotateClick=function(){var q=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),A=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&q==mxConstants.NONE&&A==mxConstants.NONE?(q=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,
q,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};var Xa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(q,A){Xa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ya=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=
function(q,A){Ya.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="");this.blockDelayedSelection=null};mxVertexHandler.prototype.updateLinkHint=function(q,A){try{if(null==q&&(null==A||0==A.length))null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),
this.linkHint=null);else if(null!=q||null!=A&&0<A.length){var B=document.createElement("img");B.className="geAdaptiveAsset";B.setAttribute("src",Editor.editImage);B.setAttribute("title",mxResources.get("editLink"));B.setAttribute("width","14");B.setAttribute("height","14");B.style.paddingLeft="8px";B.style.marginLeft="auto";B.style.marginBottom="-1px";B.style.cursor="pointer";var F=B.cloneNode(!0);F.setAttribute("src",Editor.trashImage);F.setAttribute("title",mxResources.get("removeIt",[mxResources.get("link")]));
-F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=q){var N=document.createElement("div");
-N.style.display="flex";N.style.alignItems="center";N.appendChild(this.graph.createLinkForHint(q,null,this.state.cell));this.linkHint.appendChild(N);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);N.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(fa){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(fa)}));var X=F.cloneNode(!0);N.appendChild(X);mxEvent.addListener(X,
-"click",mxUtils.bind(this,function(fa){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(fa)}))}}if(null!=A)for(N=0;N<A.length;N++)mxUtils.bind(this,function(fa,da){var ha=document.createElement("div");ha.style.display="flex";ha.style.alignItems="center";ha.style.marginTop=null!=q||0<da?"6px":"0px";ha.appendChild(this.graph.createLinkForHint(fa.getAttribute("href"),mxUtils.getTextContent(fa),this.state.cell));var va=B.cloneNode(!0);ha.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var ya=
-document.createElement("div");ya.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ga=ya.getElementsByTagName("a")[da];if(null!=Ga){if(null==Na||""==Na){for(Na=Ga.cloneNode(!0).firstChild;null!=Na;)Ga.parentNode.insertBefore(Na.cloneNode(!0),Ga),Na=Na.nextSibling;Ga.parentNode.removeChild(Ga)}else Ga.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,ya.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(fa.getAttribute("href")||
-"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ha.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ha)})(A[N],N)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(fa){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var cb=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=cb.apply(this,
+F.style.paddingLeft="4px";F.style.marginLeft="0";null==this.linkHint&&(this.linkHint=a(),mxUtils.setPrefixedStyle(this.linkHint.style,"transform","translate(-50%,0)"),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=q){var M=document.createElement("div");
+M.style.display="flex";M.style.alignItems="center";M.appendChild(this.graph.createLinkForHint(q,null,this.state.cell));this.linkHint.appendChild(M);if(this.graph.isEnabled()&&"function"===typeof this.graph.editLink&&!this.graph.isCellLocked(this.state.cell)){var R=B.cloneNode(!0);M.appendChild(R);mxEvent.addListener(R,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var W=F.cloneNode(!0);M.appendChild(W);mxEvent.addListener(W,
+"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}}if(null!=A)for(M=0;M<A.length;M++)mxUtils.bind(this,function(ha,fa){var ja=document.createElement("div");ja.style.display="flex";ja.style.alignItems="center";ja.style.marginTop=null!=q||0<fa?"6px":"0px";ja.appendChild(this.graph.createLinkForHint(ha.getAttribute("href"),mxUtils.getTextContent(ha),this.state.cell));var va=B.cloneNode(!0);ja.appendChild(va);var Ma=mxUtils.bind(this,function(Na){var ya=
+document.createElement("div");ya.innerHTML=Graph.sanitizeHtml(this.graph.getLabel(this.state.cell));var Ha=ya.getElementsByTagName("a")[fa];if(null!=Ha){if(null==Na||""==Na){for(Na=Ha.cloneNode(!0).firstChild;null!=Na;)Ha.parentNode.insertBefore(Na.cloneNode(!0),Ha),Na=Na.nextSibling;Ha.parentNode.removeChild(Ha)}else Ha.setAttribute("href",Na);this.graph.labelChanged(this.state.cell,ya.innerHTML)}});mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){this.graph.showLinkDialog(ha.getAttribute("href")||
+"",mxResources.get("ok"),Ma);mxEvent.consume(Na)}));va=F.cloneNode(!0);ja.appendChild(va);mxEvent.addListener(va,"click",mxUtils.bind(this,function(Na){Ma();mxEvent.consume(Na)}));this.linkHint.appendChild(ja)})(A[M],M)}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var cb=mxEdgeHandler.prototype.createConstraintHandler;mxEdgeHandler.prototype.createConstraintHandler=function(){var q=cb.apply(this,
arguments);q.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});return q};var fb=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){fb.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var pb=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var q=0;q<this.moveHandles.length;q++)null!=
this.moveHandles[q]&&(this.moveHandles[q].bounds.x=Math.round(this.moveHandles[q].rowState.x+this.moveHandles[q].rowState.width-this.moveHandles[q].bounds.width/2),this.moveHandles[q].bounds.y=Math.round(this.moveHandles[q].rowState.y+(this.moveHandles[q].rowState.height-this.moveHandles[q].bounds.height)/2),this.moveHandles[q].redraw());if(null!=this.cornerHandles){q=this.getSelectionBorderInset();var A=this.cornerHandles,B=A[0].bounds.height/2;A[0].bounds.x=this.state.x-A[0].bounds.width/2+q;A[0].bounds.y=
this.state.y-B+q;A[0].redraw();A[1].bounds.x=A[0].bounds.x+this.state.width-2*q;A[1].bounds.y=A[0].bounds.y;A[1].redraw();A[2].bounds.x=A[0].bounds.x;A[2].bounds.y=this.state.y+this.state.height-2*q;A[2].redraw();A[3].bounds.x=A[1].bounds.x;A[3].bounds.y=A[2].bounds.y;A[3].redraw();for(q=0;q<this.cornerHandles.length;q++)this.cornerHandles[q].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.setAttribute("title",
@@ -3019,45 +3020,45 @@ Format.processMenuIcon=function(a,b){var e=a.getElementsByTagName("img");0<e.len
Format.prototype.init=function(){var a=this.editorUi,b=a.editor,e=b.graph;this.update=mxUtils.bind(this,function(f,h){this.refresh()});e.getSelectionModel().addListener(mxEvent.CHANGE,this.update);e.getModel().addListener(mxEvent.CHANGE,this.update);e.addListener(mxEvent.EDITING_STARTED,this.update);e.addListener(mxEvent.EDITING_STOPPED,this.update);e.getView().addListener("unitChanged",this.update);b.addListener("autosaveChanged",this.update);e.addListener(mxEvent.ROOT,this.update);a.addListener("styleChanged",
this.update);a.addListener("lockedChanged",this.update);this.refresh()};Format.prototype.clear=function(){this.container.innerText="";if(null!=this.panels)for(var a=0;a<this.panels.length;a++)this.panels[a].destroy();this.panels=[]};Format.prototype.refresh=function(){null!=this.pendingRefresh&&(window.clearTimeout(this.pendingRefresh),this.pendingRefresh=null);this.pendingRefresh=window.setTimeout(mxUtils.bind(this,function(){this.immediateRefresh()}))};
Format.prototype.immediateRefresh=function(){if("0px"!=this.container.style.width){this.clear();var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.cursor="default";var f=document.createElement("div");f.className="geFormatSection";f.style.textAlign="center";f.style.fontWeight="bold";f.style.paddingTop="8px";f.style.fontSize="13px";f.style.borderWidth="0px 0px 1px 1px";f.style.borderStyle="solid";f.style.display="inline-block";
-f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var I=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,
-g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",I);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&I()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth=
-"0px";e.appendChild(f);h=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,h));this.container.appendChild(h);if(null!=Editor.styles){h.style.display="none";f.style.width=this.showCloseButton?"106px":"50%";f.style.cursor="pointer";f.style.backgroundColor=Format.inactiveTabBackgroundColor;var u=f.cloneNode(!1);u.style.borderLeftWidth="1px";u.style.borderRightWidth="1px";u.style.backgroundColor=Format.inactiveTabBackgroundColor;p(f,h,k++);var x=e.cloneNode(!1);x.style.display="none";mxUtils.write(u,
-mxResources.get("style"));e.appendChild(u);this.panels.push(new DiagramStylePanel(this,a,x));this.container.appendChild(x);p(u,x,k++)}this.showCloseButton&&(u=f.cloneNode(!1),u.style.borderLeftWidth="1px",u.style.borderRightWidth="1px",u.style.borderBottomWidth="1px",u.style.backgroundColor=Format.inactiveTabBackgroundColor,u.style.position="absolute",u.style.display="flex",u.style.right="0px",u.style.top="0px",u.style.width="25px",u.style.padding="0px",u.style.height="33px",u.style.alignItems="center",
+f.style.height="25px";f.style.overflow="hidden";f.style.width="100%";this.container.appendChild(e);mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(C){C.preventDefault()}));var h=a.getSelectionState(),d=h.containsLabel,g=null,m=null,p=mxUtils.bind(this,function(C,E,D,G){var K=mxUtils.bind(this,function(L){g!=C&&(d?this.labelIndex=D:b.isSelectionEmpty()?this.diagramIndex=D:this.currentIndex=D,null!=g&&(g.style.backgroundColor=Format.inactiveTabBackgroundColor,
+g.style.borderBottomWidth="1px"),g=C,g.style.backgroundColor="",g.style.borderBottomWidth="0px",m!=E&&(null!=m&&(m.style.display="none"),m=E,m.style.display=""))});mxEvent.addListener(C,"click",K);mxEvent.addListener(C,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(L){L.preventDefault()}));(G&&null==g||D==(d?this.labelIndex:b.isSelectionEmpty()?this.diagramIndex:this.currentIndex))&&K()}),k=0;if(b.isSelectionEmpty()){mxUtils.write(f,mxResources.get("diagram"));f.style.borderLeftWidth=
+"0px";e.appendChild(f);h=e.cloneNode(!1);this.panels.push(new DiagramFormatPanel(this,a,h));this.container.appendChild(h);if(null!=Editor.styles){h.style.display="none";f.style.width=this.showCloseButton?"106px":"50%";f.style.cursor="pointer";f.style.backgroundColor=Format.inactiveTabBackgroundColor;var u=f.cloneNode(!1);u.style.borderLeftWidth="1px";u.style.borderRightWidth="1px";u.style.backgroundColor=Format.inactiveTabBackgroundColor;p(f,h,k++);var w=e.cloneNode(!1);w.style.display="none";mxUtils.write(u,
+mxResources.get("style"));e.appendChild(u);this.panels.push(new DiagramStylePanel(this,a,w));this.container.appendChild(w);p(u,w,k++)}this.showCloseButton&&(u=f.cloneNode(!1),u.style.borderLeftWidth="1px",u.style.borderRightWidth="1px",u.style.borderBottomWidth="1px",u.style.backgroundColor=Format.inactiveTabBackgroundColor,u.style.position="absolute",u.style.display="flex",u.style.right="0px",u.style.top="0px",u.style.width="25px",u.style.padding="0px",u.style.height="33px",u.style.alignItems="center",
u.style.justifyContent="center",p=document.createElement("img"),p.className="geAdaptiveAsset",p.setAttribute("border","0"),p.setAttribute("src",Editor.crossImage),p.setAttribute("title",mxResources.get("hide")),p.style.width="16px",p.style.height="16px",p.style.opacity=.5,u.appendChild(p),mxEvent.addListener(p,"click",function(){a.actions.get("format").funct()}),e.appendChild(u))}else if(b.isEditing())mxUtils.write(f,mxResources.get("text")),e.appendChild(f),f.style.borderLeftStyle="none",this.panels.push(new TextFormatPanel(this,
-a,e));else{f.style.backgroundColor=Format.inactiveTabBackgroundColor;f.style.borderLeftWidth="1px";f.style.cursor="pointer";f.style.width=0==h.cells.length?"100%":d?"50%":"33.3%";u=f.cloneNode(!1);var z=u.cloneNode(!1);u.style.backgroundColor=Format.inactiveTabBackgroundColor;z.style.backgroundColor=Format.inactiveTabBackgroundColor;d?u.style.borderLeftWidth="0px":0<h.cells.length&&(f.style.borderLeftWidth="0px",mxUtils.write(f,mxResources.get("style")),e.appendChild(f),x=e.cloneNode(!1),x.style.display=
-"none",this.panels.push(new StyleFormatPanel(this,a,x)),this.container.appendChild(x),p(f,x,k++));mxUtils.write(u,mxResources.get("text"));e.appendChild(u);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new TextFormatPanel(this,a,f));this.container.appendChild(f);mxUtils.write(z,mxResources.get("arrange"));e.appendChild(z);e=e.cloneNode(!1);e.style.display="none";this.panels.push(new ArrangePanel(this,a,e));this.container.appendChild(e);0<h.cells.length?p(u,f,k+1):u.style.display="none";
+a,e));else{f.style.backgroundColor=Format.inactiveTabBackgroundColor;f.style.borderLeftWidth="1px";f.style.cursor="pointer";f.style.width=0==h.cells.length?"100%":d?"50%":"33.3%";u=f.cloneNode(!1);var z=u.cloneNode(!1);u.style.backgroundColor=Format.inactiveTabBackgroundColor;z.style.backgroundColor=Format.inactiveTabBackgroundColor;d?u.style.borderLeftWidth="0px":0<h.cells.length&&(f.style.borderLeftWidth="0px",mxUtils.write(f,mxResources.get("style")),e.appendChild(f),w=e.cloneNode(!1),w.style.display=
+"none",this.panels.push(new StyleFormatPanel(this,a,w)),this.container.appendChild(w),p(f,w,k++));mxUtils.write(u,mxResources.get("text"));e.appendChild(u);f=e.cloneNode(!1);f.style.display="none";this.panels.push(new TextFormatPanel(this,a,f));this.container.appendChild(f);mxUtils.write(z,mxResources.get("arrange"));e.appendChild(z);e=e.cloneNode(!1);e.style.display="none";this.panels.push(new ArrangePanel(this,a,e));this.container.appendChild(e);0<h.cells.length?p(u,f,k+1):u.style.display="none";
p(z,e,k++,!0)}}};BaseFormatPanel=function(a,b,e){this.format=a;this.editorUi=b;this.container=e;this.listeners=[]};BaseFormatPanel.prototype.buttonBackgroundColor="transparent";
-BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,h,d,g,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;h=null!=h?h:999;var x=null,z=!1,C=null,E=mxUtils.bind(this,function(D){var G=m?parseFloat(a.value):parseInt(a.value);p&&(G=this.fromUnit(G));if(G!=C){C=G;isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(h,Math.max(f,isNaN(G)?e:G));if(u.cellEditor.isContentEditing()&&g)z||(z=!0,null!=x&&(u.cellEditor.restoreSelection(x),
-x=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var I=k.getSelectionState().cells;u.setCellStyles(b,G,I);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(I,function(T){T.removeAttribute("size");T.style.fontSize="";""==T.getAttribute("style")&&T.removeAttribute("style")});for(var L=0;L<I.length;L++)0==u.model.getChildCount(I[L])&&u.autoSizeCell(I[L],!1);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[G],"cells",I))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(x=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};
+BaseFormatPanel.prototype.installInputHandler=function(a,b,e,f,h,d,g,m,p){d=null!=d?d:"";m=null!=m?m:!1;var k=this.editorUi,u=k.editor.graph;f=null!=f?f:1;h=null!=h?h:999;var w=null,z=!1,C=null,E=mxUtils.bind(this,function(D){var G=m?parseFloat(a.value):parseInt(a.value);p&&(G=this.fromUnit(G));if(G!=C){C=G;isNaN(G)||b!=mxConstants.STYLE_ROTATION||(G=mxUtils.mod(Math.round(100*G),36E3)/100);G=Math.min(h,Math.max(f,isNaN(G)?e:G));if(u.cellEditor.isContentEditing()&&g)z||(z=!0,null!=w&&(u.cellEditor.restoreSelection(w),
+w=null),g(G),a.value=(p?this.inUnit(G):G)+d,z=!1);else if(G!=mxUtils.getValue(k.getSelectionState().style,b,e)){u.isEditing()&&u.stopEditing(!0);u.getModel().beginUpdate();try{var K=k.getSelectionState().cells;u.setCellStyles(b,G,K);b==mxConstants.STYLE_FONTSIZE&&u.updateLabelElements(K,function(Q){Q.removeAttribute("size");Q.style.fontSize="";""==Q.getAttribute("style")&&Q.removeAttribute("style")});for(var L=0;L<K.length;L++)0==u.model.getChildCount(K[L])&&u.autoSizeCell(K[L],!1);k.fireEvent(new mxEventObject("styleChanged",
+"keys",[b],"values",[G],"cells",K))}finally{u.getModel().endUpdate()}}a.value=(p?this.inUnit(G):G)+d}mxEvent.consume(D)});g&&u.cellEditor.isContentEditing()&&mxEvent.addGestureListeners(a,mxUtils.bind(this,function(D){document.activeElement==u.cellEditor.textarea&&(w=u.cellEditor.saveSelection())}));mxEvent.addListener(a,"change",E);mxEvent.addListener(a,"blur",E);return E};
BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.className="geFormatSection";a.style.padding="12px 0px 8px 14px";return a};BaseFormatPanel.prototype.createTitle=function(a){var b=document.createElement("div");b.style.padding="0px 0px 6px 0px";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.width="200px";b.style.fontWeight="bold";mxUtils.write(b,a);return b};
BaseFormatPanel.prototype.addAction=function(a,b){var e=this.editorUi.actions.get(b);b=null;null!=e&&e.isEnabled()&&(b=mxUtils.button(e.label,mxUtils.bind(this,function(f){try{e.funct(f,f)}catch(h){this.editorUi.handleError(h)}})),b.setAttribute("title",e.label+(null!=e.shortcut?" ("+e.shortcut+")":"")),b.style.marginBottom="2px",b.style.width="210px",a.appendChild(b));return b};
BaseFormatPanel.prototype.addActions=function(a,b){for(var e=null,f=null,h=0,d=0;d<b.length;d++){var g=this.addAction(a,b[d]);null!=g&&(h++,0==mxUtils.mod(h,2)&&(f.style.marginRight="2px",f.style.width="104px",g.style.width="104px",e.parentNode.removeChild(e)),e=mxUtils.br(a),f=g)}return h};
BaseFormatPanel.prototype.createStepper=function(a,b,e,f,h,d,g){e=null!=e?e:1;f=null!=f?f:9;var m=10*e,p=document.createElement("div");p.className="geBtnStepper";p.style.position="absolute";var k=document.createElement("div");k.style.height=f+"px";k.style.backgroundImage="url("+Editor.arrowUpImage+")";k.style.width="10px";p.appendChild(k);var u=k.cloneNode(!1);u.style.height=f+"px";u.style.backgroundImage="url("+Editor.arrowDownImage+")";p.appendChild(u);mxEvent.addGestureListeners(u,function(z){mxEvent.consume(z)},
-null,function(z){""==a.value&&(a.value=d||"2");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});mxEvent.addGestureListeners(k,function(z){mxEvent.consume(z)},null,function(z){""==a.value&&(a.value=d||"0");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});if(h){var x=null;mxEvent.addGestureListeners(p,function(z){mxEvent.consume(z)},null,
-function(z){if(null!=x){try{x.select()}catch(C){}x=null;mxEvent.consume(z)}})}else mxEvent.addListener(p,"click",function(z){mxEvent.consume(z)});return p};
+null,function(z){""==a.value&&(a.value=d||"2");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C-(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});mxEvent.addGestureListeners(k,function(z){mxEvent.consume(z)},null,function(z){""==a.value&&(a.value=d||"0");var C=g?parseFloat(a.value):parseInt(a.value);isNaN(C)||(a.value=C+(mxEvent.isShiftDown(z)?m:e),null!=b&&b(z));mxEvent.consume(z)});if(h){var w=null;mxEvent.addGestureListeners(p,function(z){mxEvent.consume(z)},null,
+function(z){if(null!=w){try{w.select()}catch(C){}w=null;mxEvent.consume(z)}})}else mxEvent.addListener(p,"click",function(z){mxEvent.consume(z)});return p};
BaseFormatPanel.prototype.createOption=function(a,b,e,f,h){var d=document.createElement("div");d.style.display="flex";d.style.alignItems="center";d.style.padding="3px 0px 3px 0px";d.style.height="18px";var g=document.createElement("input");g.setAttribute("type","checkbox");g.style.margin="1px 6px 0px 0px";g.style.verticalAlign="top";d.appendChild(g);var m=document.createElement("div");m.setAttribute("title",a);m.style.display="inline-block";m.style.whiteSpace="nowrap";m.style.textOverflow="ellipsis";
-m.style.overflow="hidden";m.style.maxWidth="75%";m.style.userSelect="none";mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(x,z){p||(p=!0,x?(g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0):(g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1),k!=x&&(k=x,b()!=k&&e(k,z)),p=!1)};mxEvent.addListener(d,"click",function(x){if("disabled"!=g.getAttribute("disabled")){var z=mxEvent.getSource(x);if(z==d||z==m)g.checked=!g.checked;u(g.checked,x)}});u(k);null!=f&&
+m.style.overflow="hidden";m.style.maxWidth="75%";m.style.userSelect="none";mxUtils.write(m,a);d.appendChild(m);var p=!1,k=b(),u=function(w,z){p||(p=!0,w?(g.setAttribute("checked","checked"),g.defaultChecked=!0,g.checked=!0):(g.removeAttribute("checked"),g.defaultChecked=!1,g.checked=!1),k!=w&&(k=w,b()!=k&&e(k,z)),p=!1)};mxEvent.addListener(d,"click",function(w){if("disabled"!=g.getAttribute("disabled")){var z=mxEvent.getSource(w);if(z==d||z==m)g.checked=!g.checked;u(g.checked,w)}});u(k);null!=f&&
(f.install(u),this.listeners.push(f));null!=h&&h(d);return d};
-BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;h=null!=h?"null"==h?null:h:0;var x=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(x,b,e)!=h},function(z){m&&u.stopEditing();if(null!=g)g.funct();else{u.getModel().beginUpdate();try{var C=null!=p?p:k.getSelectionState().cells;z=z?f:h;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged",
-"keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(x,b,e)!=h)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
-BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,h,d,g,m,p,k){function u(Q,P){"default"!=Q||P||(Q=m);"default"!=Q&&p&&(Q=mxUtils.getLightDarkColor(Q),Q=k()?Q.dark:Q.light);return Q}var x=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.style.padding="3px 0px 3px 0px";C.style.whiteSpace="nowrap";C.style.overflow="hidden";C.style.width="200px";C.style.height="18px";var E=document.createElement("input");E.setAttribute("type","checkbox");
-E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),I=!1,L=null,T=null,K=document.createElement("input");K.setAttribute("type","color");K.style.position="relative";K.style.visibility="hidden";K.style.top="10px";K.style.width="0px";K.style.height="0px";K.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=
-Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(Q){K.value=u(G);K.click();mxEvent.consume(Q)}));var U=null,Y=function(Q,P){I||(I=!0,null!=d&&d(Q),P||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(Q)),G=b(),Q=mxUtils.getLightDarkColor("default"!=G?G:m),P=document.createElement("div"),P.style.width="21px",P.style.height="12px",
-P.style.margin="2px 18px 2px 3px",P.style.borderWidth="1px",P.style.borderStyle="solid",P.style.backgroundColor=Q.cssText,T.innerText="",T.appendChild(P),!p&&mxUtils.isLightDarkColor(G)&&Q.light!=Q.dark?P.style.background="linear-gradient(to right bottom, "+Q.cssText+" 50%, "+mxUtils.invertLightDarkColor(Q).cssText+" 50.3%)":p&&x&&(P.style.backgroundColor=k()?Q.dark:Q.light),null!=L?(P.style.width="21px",P.style.margin="2px 18px 2px 3px",P.appendChild(L)):(P.style.width="36px",P.style.margin="3px"),
-null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(Q="#"==G.charAt(0)?G.substring(1).toUpperCase():G,Q=ColorDialog.prototype.colorNames[Q],null!=Q?T.setAttribute("title",Q):"default"==G?T.setAttribute("title",mxResources.get("useBlackAndWhite")):T.setAttribute("title",G)),null==G||G==mxConstants.NONE||z.isSpecialColor(G)?(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1):(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0),T.style.display=E.checked||g?"":
-"none",I=!1)};C.appendChild(K);mxEvent.addListener(K,"change",function(){var Q=K.value;if(!p){var P=mxUtils.getLightDarkColor(G);k()?P.dark=Q:P.light=Q;Q="light-dark("+P.light+", "+P.dark+")"}Y(Q)});T=mxUtils.button("",mxUtils.bind(this,function(Q){var P=m;p&&k()&&mxUtils.isLightDarkColor(P)&&(P=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(M){Y(M)},"default"==f?"default":null,P,p);mxEvent.consume(Q)}));T.style.position="absolute";T.style.marginTop="-3px";T.style.left=
-"178px";T.style.height="22px";T.className="geColorBtn";T.style.display=E.checked||g?"":"none";C.appendChild(T);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&T.setAttribute("title",a);g||(mxEvent.addListener(C,"click",function(Q){Q=mxEvent.getSource(Q);if(Q==E||"INPUT"!=Q.nodeName)Q!=E&&(E.checked=!E.checked),E.checked||null==G||G==mxConstants.NONE||f==mxConstants.NONE||(f=u(G)),Y(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,
-mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(Q){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));Y(G,!0);null!=h&&h.install(function(){Y(G,!0)},this.listeners.push(h));return C};
+BaseFormatPanel.prototype.createCellOption=function(a,b,e,f,h,d,g,m,p){var k=this.editorUi,u=k.editor.graph;f=null!=f?"null"==f?null:f:1;h=null!=h?"null"==h?null:h:0;var w=null!=p?u.getCommonStyle(p):k.getSelectionState().style;return this.createOption(a,function(){return mxUtils.getValue(w,b,e)!=h},function(z){m&&u.stopEditing();if(null!=g)g.funct();else{u.getModel().beginUpdate();try{var C=null!=p?p:k.getSelectionState().cells;z=z?f:h;u.setCellStyles(b,z,C);null!=d&&d(C,z);k.fireEvent(new mxEventObject("styleChanged",
+"keys",[b],"values",[z],"cells",C))}finally{u.getModel().endUpdate()}}},{install:function(z){this.listener=function(){z(mxUtils.getValue(w,b,e)!=h)};u.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){u.getModel().removeListener(this.listener)}})};
+BaseFormatPanel.prototype.createColorOption=function(a,b,e,f,h,d,g,m,p,k){function u(P,T){"default"!=P||T||(P=m);"default"!=P&&p&&(P=mxUtils.getLightDarkColor(P),P=k()?P.dark:P.light);return P}var w=null!=k;k=null!=k?k:Editor.isDarkMode;var z=this.editorUi.editor.graph,C=document.createElement("div");C.style.padding="3px 0px 3px 0px";C.style.whiteSpace="nowrap";C.style.overflow="hidden";C.style.width="200px";C.style.height="18px";var E=document.createElement("input");E.setAttribute("type","checkbox");
+E.style.margin="1px 6px 0px 0px";E.style.verticalAlign="top";g||C.appendChild(E);var D=document.createElement("span");D.style.verticalAlign="top";mxUtils.write(D,a);C.appendChild(D);var G=b(),K=!1,L=null,Q=null,N=document.createElement("input");N.setAttribute("type","color");N.style.position="relative";N.style.visibility="hidden";N.style.top="10px";N.style.width="0px";N.style.height="0px";N.style.border="none";mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_TOUCH||(L=document.createElement("img"),L.src=
+Editor.colorDropperImage,L.className="geColorDropper geAdaptiveAsset",L.style.position="relative",L.style.right="-20px",L.style.top="-1px",L.style.width="auto",L.style.height="14px",mxEvent.addListener(L,"click",function(P){N.value=u(G);N.click();mxEvent.consume(P)}));var U=null,Y=function(P,T){K||(K=!0,null!=d&&d(P),T||(null!=U&&(z.cellEditor.restoreSelection(U),U=null),e(P)),G=b(),P=mxUtils.getLightDarkColor("default"!=G?G:m),T=document.createElement("div"),T.style.width="21px",T.style.height="12px",
+T.style.margin="2px 18px 2px 3px",T.style.borderWidth="1px",T.style.borderStyle="solid",T.style.backgroundColor=P.cssText,Q.innerText="",Q.appendChild(T),!p&&mxUtils.isLightDarkColor(G)&&P.light!=P.dark?T.style.background="linear-gradient(to right bottom, "+P.cssText+" 50%, "+mxUtils.invertLightDarkColor(P).cssText+" 50.3%)":p&&w&&(T.style.backgroundColor=k()?P.dark:P.light),null!=L?(T.style.width="21px",T.style.margin="2px 18px 2px 3px",T.appendChild(L)):(T.style.width="36px",T.style.margin="3px"),
+null!=G&&G!=mxConstants.NONE&&1<G.length&&"string"===typeof G&&(P="#"==G.charAt(0)?G.substring(1).toUpperCase():G,P=ColorDialog.prototype.colorNames[P],null!=P?Q.setAttribute("title",P):"default"==G?Q.setAttribute("title",mxResources.get("useBlackAndWhite")):Q.setAttribute("title",G)),null==G||G==mxConstants.NONE||z.isSpecialColor(G)?(E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1):(E.setAttribute("checked","checked"),E.defaultChecked=!0,E.checked=!0),Q.style.display=E.checked||g?"":
+"none",K=!1)};C.appendChild(N);mxEvent.addListener(N,"change",function(){var P=N.value;if(!p){var T=mxUtils.getLightDarkColor(G);k()?T.dark=P:T.light=P;P="light-dark("+T.light+", "+T.dark+")"}Y(P)});Q=mxUtils.button("",mxUtils.bind(this,function(P){var T=m;p&&k()&&mxUtils.isLightDarkColor(T)&&(T=mxUtils.getLightDarkColor(m).dark);this.editorUi.pickColor(u(G,!0),function(J){Y(J)},"default"==f?"default":null,T,p);mxEvent.consume(P)}));Q.style.position="absolute";Q.style.marginTop="-3px";Q.style.left=
+"178px";Q.style.height="22px";Q.className="geColorBtn";Q.style.display=E.checked||g?"":"none";C.appendChild(Q);a=null!=G&&"string"===typeof G&&"#"==G.charAt(0)?G.substring(1).toUpperCase():G;a=ColorDialog.prototype.colorNames[a];null!=a&&Q.setAttribute("title",a);g||(mxEvent.addListener(C,"click",function(P){P=mxEvent.getSource(P);if(P==E||"INPUT"!=P.nodeName)P!=E&&(E.checked=!E.checked),E.checked||null==G||G==mxConstants.NONE||f==mxConstants.NONE||(f=u(G)),Y(E.checked?f:mxConstants.NONE)}),mxEvent.addGestureListeners(E,
+mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})),mxEvent.addGestureListeners(C,mxUtils.bind(this,function(P){document.activeElement==z.cellEditor.textarea&&(U=z.cellEditor.saveSelection())})));Y(G,!0);null!=h&&h.install(function(){Y(G,!0)},this.listeners.push(h));return C};
BaseFormatPanel.prototype.createCellColorOption=function(a,b,e,f,h,d){var g=this.editorUi,m=g.editor.graph;return this.createColorOption(a,function(){var p=m.getCellStyle(m.getSelectionCell(),!1);return null!=p?p[b]:null},function(p){m.getModel().beginUpdate();try{var k=g.getSelectionState().cells;m.setCellStyles(b,p,k);null!=h&&h(p);g.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[p],"cells",k))}finally{m.getModel().endUpdate()}},e||mxConstants.NONE,{install:function(p){this.listener=
function(){var k=m.getCellStyle(m.getSelectionCell(),!1);null!=k&&p(k[b],!0)};m.getModel().addListener(mxEvent.CHANGE,this.listener)},destroy:function(){m.getModel().removeListener(this.listener)}},f,null,d)};
BaseFormatPanel.prototype.addArrow=function(a){a.className="geColorBtn";a.style.display="inline-flex";a.style.alignItems="top";a.style.boxSizing="border-box";a.style.width="64px";a.style.height="22px";a.style.borderWidth="1px";a.style.borderStyle="solid";a.style.margin="2px 2px 2px 3px";var b=document.createElement("div");b.className="geAdaptiveAsset";b.style.display="inline-block";b.style.backgroundImage="url("+Editor.thinExpandImage+")";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition=
"-2px 1px";b.style.backgroundSize="18px 18px";b.style.opacity="0.5";b.style.height="100%";b.style.width="14px";a.appendChild(b);a=a.getElementsByTagName("div")[0];null!=a&&(a.style.display="inline-block",a.style.backgroundPositionX="center",a.style.textAlign="center",a.style.height="100%",a.style.flexGrow="1",a.style.opacity="0.6");return a};
BaseFormatPanel.prototype.addUnitInput=function(a,b,e,f,h,d,g,m,p){g=null!=g?g:0;b=document.createElement("input");b.style.position="absolute";b.style.textAlign="right";b.style.marginTop="-2px";b.style.left=228-e-f+"px";b.style.width=f+"px";b.style.height="21px";b.style.borderWidth="1px";b.style.borderStyle="solid";b.style.boxSizing="border-box";a.appendChild(b);f=this.createStepper(b,h,d,null,m,null,p);f.style.marginTop=g-2+"px";f.style.left=228-e+"px";a.appendChild(f);return b};
-BaseFormatPanel.prototype.addGenericInput=function(a,b,e,f,h,d){var g=this.editorUi.editor.graph,m=function(){d(p.value)},p=this.addUnitInput(a,b,e,f,m),k=mxUtils.bind(this,function(u,x,z){if(z||p!=document.activeElement)p.value=h()+b});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(k(null,null,!0),g.container.focus(),mxEvent.consume(u))});g.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){g.getModel().removeListener(k)}});
+BaseFormatPanel.prototype.addGenericInput=function(a,b,e,f,h,d){var g=this.editorUi.editor.graph,m=function(){d(p.value)},p=this.addUnitInput(a,b,e,f,m),k=mxUtils.bind(this,function(u,w,z){if(z||p!=document.activeElement)p.value=h()+b});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==u.keyCode&&(k(null,null,!0),g.container.focus(),mxEvent.consume(u))});g.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){g.getModel().removeListener(k)}});
k();mxEvent.addListener(p,"blur",m);mxEvent.addListener(p,"change",m);return p};
-BaseFormatPanel.prototype.createRelativeOption=function(a,b,e,f,h){e=null!=e?e:52;var d=this.editorUi,g=d.editor.graph,m=this.createPanel();m.style.paddingTop="10px";m.style.paddingBottom="12px";mxUtils.write(m,a);m.style.fontWeight="bold";a=mxUtils.bind(this,function(u){if(null!=f)f(p);else{var x=parseInt(p.value);x=Math.min(100,Math.max(0,isNaN(x)?100:x));var z=g.view.getState(d.getSelectionState().cells[0]);null!=z&&x!=mxUtils.getValue(z.style,b,100)&&(100==x&&(x=null),z=d.getSelectionState().cells,
-g.setCellStyles(b,x,z),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[x],"cells",z)));p.value=(null!=x?x:"100")+" %"}mxEvent.consume(u)});var p=this.addUnitInput(m,"%",16,e,a,10,0,null!=f);if(null!=b){var k=mxUtils.bind(this,function(u,x,z){if(z||p!=document.activeElement)u=d.getSelectionState(),u=parseInt(mxUtils.getValue(u.style,b,100)),p.value=isNaN(u)?"":u+" %"});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==
+BaseFormatPanel.prototype.createRelativeOption=function(a,b,e,f,h){e=null!=e?e:52;var d=this.editorUi,g=d.editor.graph,m=this.createPanel();m.style.paddingTop="10px";m.style.paddingBottom="12px";mxUtils.write(m,a);m.style.fontWeight="bold";a=mxUtils.bind(this,function(u){if(null!=f)f(p);else{var w=parseInt(p.value);w=Math.min(100,Math.max(0,isNaN(w)?100:w));var z=g.view.getState(d.getSelectionState().cells[0]);null!=z&&w!=mxUtils.getValue(z.style,b,100)&&(100==w&&(w=null),z=d.getSelectionState().cells,
+g.setCellStyles(b,w,z),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[w],"cells",z)));p.value=(null!=w?w:"100")+" %"}mxEvent.consume(u)});var p=this.addUnitInput(m,"%",16,e,a,10,0,null!=f);if(null!=b){var k=mxUtils.bind(this,function(u,w,z){if(z||p!=document.activeElement)u=d.getSelectionState(),u=parseInt(mxUtils.getValue(u.style,b,100)),p.value=isNaN(u)?"":u+" %"});mxEvent.addListener(p,"keydown",function(u){13==u.keyCode?(g.container.focus(),mxEvent.consume(u)):27==
u.keyCode&&(k(null,null,!0),g.container.focus(),mxEvent.consume(u))});g.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){g.getModel().removeListener(k)}});k()}mxEvent.addListener(p,"blur",a);mxEvent.addListener(p,"change",a);null!=h&&h(p);return m};
BaseFormatPanel.prototype.addLabel=function(a,b,e,f){f=null!=f?f:61;var h=document.createElement("div");mxUtils.write(h,b);h.style.position="absolute";h.style.left=240-e-f+"px";h.style.width=f+"px";h.style.marginTop="6px";h.style.display="flex";h.style.justifyContent="center";a.appendChild(h);return h};
BaseFormatPanel.prototype.addKeyHandler=function(a,b){mxEvent.addListener(a,"keydown",mxUtils.bind(this,function(e){13==e.keyCode?(this.editorUi.editor.graph.container.focus(),mxEvent.consume(e)):27==e.keyCode&&(null!=b&&b(null,null,!0),this.editorUi.editor.graph.container.focus(),mxEvent.consume(e))}))};
@@ -3082,7 +3083,7 @@ ArrangePanel.prototype.addDistribute=function(a){var b=this.editorUi.editor.grap
f.checked)});e.setAttribute("title",mxResources.get("vertical"));e.style.width="104px";a.appendChild(e);mxUtils.br(a);e=document.createElement("div");e.style.margin="6px 0 0 0";e.style.display="flex";e.style.justifyContent="center";e.style.alignItems="center";var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("id","spacingCheckbox");f.style.margin="0 6px 0 0";e.appendChild(f);var h=document.createElement("label");h.style.verticalAlign="top";h.setAttribute("for",
"spacingCheckbox");h.style.userSelect="none";mxUtils.write(h,mxResources.get("spacing"));e.appendChild(h);a.appendChild(e);return a};
ArrangePanel.prototype.addAngle=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();a.style.paddingBottom="12px";var h=document.createElement("div");h.style.position="absolute";h.style.width="70px";h.style.marginTop="0px";h.style.fontWeight="bold";var d=null,g=null,m=null;!f.rotatable||f.table||f.row||f.cell?a.style.paddingTop="8px":(mxUtils.write(h,mxResources.get("angle")),a.appendChild(h),d=this.addUnitInput(a,"°",16,52,function(){g.apply(this,arguments)}),mxUtils.br(a),a.style.paddingTop=
-"10px");f.containsLabel||(h=mxResources.get("reverse"),0<f.vertices.length&&0<f.edges.length?h=mxResources.get("turn")+" / "+h:0<f.vertices.length&&(h=mxResources.get("turn")),m=mxUtils.button(h,function(k){b.actions.get("turn").funct(k)}),m.setAttribute("title",h+" ("+this.editorUi.actions.get("turn").shortcut+")"),m.style.width="210px",a.appendChild(m),null!=d&&(m.style.marginTop="8px"));if(null!=d){var p=mxUtils.bind(this,function(k,u,x){if(x||document.activeElement!=d)f=b.getSelectionState(),
+"10px");f.containsLabel||(h=mxResources.get("reverse"),0<f.vertices.length&&0<f.edges.length?h=mxResources.get("turn")+" / "+h:0<f.vertices.length&&(h=mxResources.get("turn")),m=mxUtils.button(h,function(k){b.actions.get("turn").funct(k)}),m.setAttribute("title",h+" ("+this.editorUi.actions.get("turn").shortcut+")"),m.style.width="210px",a.appendChild(m),null!=d&&(m.style.marginTop="8px"));if(null!=d){var p=mxUtils.bind(this,function(k,u,w){if(w||document.activeElement!=d)f=b.getSelectionState(),
k=parseFloat(mxUtils.getValue(f.style,mxConstants.STYLE_ROTATION,0)),d.value=isNaN(k)?"":k+"°"});g=this.installInputHandler(d,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(d,p);e.getModel().addListener(mxEvent.CHANGE,p);this.listeners.push({destroy:function(){e.getModel().removeListener(p)}});p()}return a};
BaseFormatPanel.prototype.getUnit=function(a){var b="";switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:b="pt";break;case mxConstants.INCHES:b='"';break;case mxConstants.MILLIMETERS:b="mm";break;case mxConstants.METERS:b="m"}return(a?a:"")+b};BaseFormatPanel.prototype.inUnit=function(a){return this.editorUi.editor.graph.view.formatUnitText(a)};
BaseFormatPanel.prototype.fromUnit=function(a){switch(this.editorUi.editor.graph.view.unit){case mxConstants.POINTS:return a;case mxConstants.INCHES:return a*mxConstants.PIXELS_PER_INCH;case mxConstants.MILLIMETERS:return a*mxConstants.PIXELS_PER_MM;case mxConstants.METERS:return a*mxConstants.PIXELS_PER_MM*1E3}};BaseFormatPanel.prototype.isFloatUnit=function(){return this.editorUi.editor.graph.view.unit!=mxConstants.POINTS};
@@ -3090,92 +3091,92 @@ BaseFormatPanel.prototype.getUnitStep=function(){switch(this.editorUi.editor.gra
ArrangePanel.prototype.addGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=f.getModel(),d=e.getSelectionState(),g=this.createPanel();g.style.paddingBottom="8px";var m=document.createElement("div");m.style.position="absolute";m.style.width="50px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("size"));g.appendChild(m);var p=this.addUnitInput(g,this.getUnit(),87,52,function(){C.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),
k=this.addUnitInput(g,this.getUnit(),16,52,function(){E.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),u=document.createElement("div");u.className="geAdaptiveAsset";u.style.backgroundImage="url("+Editor.autosizeImage+")";u.style.backgroundPosition="center center";u.style.backgroundRepeat="no-repeat";u.style.backgroundSize="18px 18px";u.style.width="21px";u.style.height="21px";u.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+
")");u.style.position="relative";u.style.cursor="pointer";u.style.marginTop="-3px";u.style.border="0px";u.style.left="42px";mxUtils.setOpacity(u,50);mxEvent.addListener(u,"mouseenter",function(){mxUtils.setOpacity(u,100)});mxEvent.addListener(u,"mouseleave",function(){mxUtils.setOpacity(u,50)});mxEvent.addListener(u,"click",function(){e.actions.get("autosize").funct()});g.appendChild(u);d.row?(p.style.visibility="hidden",p.nextSibling.style.visibility="hidden"):this.addLabel(g,mxResources.get("width"),
-87,64);this.addLabel(g,mxResources.get("height"),16,64);mxUtils.br(g);m=document.createElement("div");m.style.paddingTop="8px";m.style.paddingRight="20px";m.style.whiteSpace="nowrap";m.style.textAlign="right";var x=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");x.style.width="210px";m.appendChild(x);d.cell||d.row?u.style.visibility="hidden":g.appendChild(m);var z=x.getElementsByTagName("input")[0];this.addKeyHandler(p,Y);this.addKeyHandler(k,
-Y);var C=this.addGeometryHandler(p,function(M,V,aa){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(aa))return f.setTableColumnWidth(aa,V-M.width,!0),!0;0<M.width&&(z.checked&&(M.height=Math.round(M.height*V*100/M.width)/100),M.width=V)});var E=this.addGeometryHandler(k,function(M,V,aa){V=Math.max(1,b.fromUnit(V));f.isTableCell(aa)&&(aa=h.getParent(aa));if(f.isTableRow(aa))return f.setTableRowHeight(aa,V-M.height),!0;0<M.height&&(z.checked&&(M.width=Math.round(M.width*V*100/M.height)/100),M.height=V)});
-(d.resizable||d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),I=this.addUnitInput(D,this.getUnit(),16,52,function(){P.apply(this,arguments)},
-this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(D);x=!0;var L=null,T=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var K=f.getCellGeometry(d.vertices[0]);if(null!=K&&K.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*K.x)/10},function(M){M=parseFloat(M);if(!isNaN(M)){h.beginUpdate();
-try{K=K.clone(),K.x=parseFloat(M)/100,h.setGeometry(d.vertices[0],K)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){x=!1;var U=null;T=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(T,function(M,V){M.y=b.fromUnit(V)})}else T=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*K.y)/10},function(M){M=parseFloat(M);if(!isNaN(M)){h.beginUpdate();try{K=K.clone(),K.y=parseFloat(M)/100,h.setGeometry(d.vertices[0],
-K)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(x?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(x?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(M,V,aa){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(aa||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();
-if(aa||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){M=f.getCellGeometry(d.vertices[0]);D.style.display="";if(aa||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(aa||document.activeElement!=I)I.value=this.inUnit(d.y)+" "+this.getUnit();null!=M&&M.relative&&(null==L||!aa&&document.activeElement==L||(L.value=Math.round(1E3*M.x)/10+" %"),null==T||!aa&&document.activeElement==
-T||(h.isEdge(h.getParent(d.vertices[0]))?T.value=this.inUnit(M.y)+" "+this.getUnit():T.value=Math.round(1E3*M.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(I,Y);Y();var Q=this.addGeometryHandler(G,function(M,V){V=b.fromUnit(V);M.relative?(M.offset=null!=M.offset?M.offset:new mxPoint,M.offset.x=V):M.x=V});var P=this.addGeometryHandler(I,function(M,V){V=b.fromUnit(V);
-M.relative?(M.offset=null!=M.offset?M.offset:new mxPoint,M.offset.y=V):M.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(K=f.getCellGeometry(d.vertices[0]),null!=K&&K.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(M){h.beginUpdate();try{K=K.clone(),K.x=0,K.y=0,K.offset=new mxPoint,h.setGeometry(d.vertices[0],K)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left=
+87,64);this.addLabel(g,mxResources.get("height"),16,64);mxUtils.br(g);m=document.createElement("div");m.style.paddingTop="8px";m.style.paddingRight="20px";m.style.whiteSpace="nowrap";m.style.textAlign="right";var w=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");w.style.width="210px";m.appendChild(w);d.cell||d.row?u.style.visibility="hidden":g.appendChild(m);var z=w.getElementsByTagName("input")[0];this.addKeyHandler(p,Y);this.addKeyHandler(k,
+Y);var C=this.addGeometryHandler(p,function(J,V,Z){V=Math.max(1,b.fromUnit(V));if(f.isTableCell(Z))return f.setTableColumnWidth(Z,V-J.width,!0),!0;0<J.width&&(z.checked&&(J.height=Math.round(J.height*V*100/J.width)/100),J.width=V)});var E=this.addGeometryHandler(k,function(J,V,Z){V=Math.max(1,b.fromUnit(V));f.isTableCell(Z)&&(Z=h.getParent(Z));if(f.isTableRow(Z))return f.setTableRowHeight(Z,V-J.height),!0;0<J.height&&(z.checked&&(J.width=Math.round(J.width*V*100/J.height)/100),J.height=V)});(d.resizable||
+d.row||d.cell)&&a.appendChild(g);var D=this.createPanel();D.style.paddingBottom="30px";m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";m.style.fontWeight="bold";mxUtils.write(m,mxResources.get("position"));D.appendChild(m);var G=this.addUnitInput(D,this.getUnit(),87,52,function(){P.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),K=this.addUnitInput(D,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),
+null,null,this.isFloatUnit());mxUtils.br(D);w=!0;var L=null,Q=null;if(d.movable){if(0==d.edges.length&&1==d.vertices.length){var N=f.getCellGeometry(d.vertices[0]);if(null!=N&&N.relative){mxUtils.br(D);m=document.createElement("div");m.style.position="absolute";m.style.width="70px";m.style.marginTop="0px";mxUtils.write(m,mxResources.get("relative"));D.appendChild(m);L=this.addGenericInput(D," %",87,52,function(){return Math.round(1E3*N.x)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();
+try{N=N.clone(),N.x=parseFloat(J)/100,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}}});if(h.isEdge(h.getParent(d.vertices[0]))){w=!1;var U=null;Q=this.addUnitInput(D,this.getUnit(),16,52,function(){U.apply(this,arguments)});U=this.addGeometryHandler(Q,function(J,V){J.y=b.fromUnit(V)})}else Q=this.addGenericInput(D," %",16,52,function(){return Math.round(1E3*N.y)/10},function(J){J=parseFloat(J);if(!isNaN(J)){h.beginUpdate();try{N=N.clone(),N.y=parseFloat(J)/100,h.setGeometry(d.vertices[0],
+N)}finally{h.endUpdate()}}});mxUtils.br(D)}}a.appendChild(D)}this.addLabel(D,mxResources.get(w?"left":"line"),87,64).style.marginTop="8px";this.addLabel(D,mxResources.get(w?"top":"orthogonal"),16,64).style.marginTop="8px";var Y=mxUtils.bind(this,function(J,V,Z){d=e.getSelectionState();if(d.containsLabel||d.vertices.length!=f.getSelectionCount()||null==d.width||null==d.height)g.style.display="none";else{g.style.display="";if(Z||document.activeElement!=p)p.value=this.inUnit(d.width)+" "+this.getUnit();
+if(Z||document.activeElement!=k)k.value=this.inUnit(d.height)+" "+this.getUnit()}if(d.vertices.length==f.getSelectionCount()&&0<d.vertices.length&&null!=d.x&&null!=d.y){J=f.getCellGeometry(d.vertices[0]);D.style.display="";if(Z||document.activeElement!=G)G.value=this.inUnit(d.x)+" "+this.getUnit();if(Z||document.activeElement!=K)K.value=this.inUnit(d.y)+" "+this.getUnit();null!=J&&J.relative&&(null==L||!Z&&document.activeElement==L||(L.value=Math.round(1E3*J.x)/10+" %"),null==Q||!Z&&document.activeElement==
+Q||(h.isEdge(h.getParent(d.vertices[0]))?Q.value=this.inUnit(J.y)+" "+this.getUnit():Q.value=Math.round(1E3*J.y)/10+" %"))}else D.style.display="none"});this.listeners.push({destroy:function(){h.removeListener(Y)}});h.addListener(mxEvent.CHANGE,Y);this.addKeyHandler(G,Y);this.addKeyHandler(K,Y);Y();var P=this.addGeometryHandler(G,function(J,V){V=b.fromUnit(V);J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.x=V):J.x=V});var T=this.addGeometryHandler(K,function(J,V){V=b.fromUnit(V);
+J.relative?(J.offset=null!=J.offset?J.offset:new mxPoint,J.offset.y=V):J.y=V});d.movable&&(0==d.edges.length&&1==d.vertices.length&&h.isEdge(h.getParent(d.vertices[0]))&&(N=f.getCellGeometry(d.vertices[0]),null!=N&&N.relative&&(m=mxUtils.button(mxResources.get("center"),mxUtils.bind(this,function(J){h.beginUpdate();try{N=N.clone(),N.x=0,N.y=0,N.offset=new mxPoint,h.setGeometry(d.vertices[0],N)}finally{h.endUpdate()}})),m.setAttribute("title",mxResources.get("center")),m.style.width="134px",m.style.left=
"89px",m.style.position="absolute",mxUtils.br(D),mxUtils.br(D),D.appendChild(m))),a.appendChild(D))};
-ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+g.getUnit();else if(p!=d){h.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(h.getModel().isVertex(k[u])){var x=h.getCellGeometry(k[u]);if(null!=x&&(x=x.clone(),!b(x,p,k[u]))){var z=h.view.getState(k[u]);null!=z&&h.isRecursiveVertexResize(z)&&h.resizeChildCells(k[u],x);h.getModel().setGeometry(k[u],x);h.constrainChildCells(k[u])}}}finally{h.getModel().endUpdate()}d=
+ArrangePanel.prototype.addGeometryHandler=function(a,b){function e(m){if(""!=a.value){var p=parseFloat(a.value);if(isNaN(p))a.value=d+" "+g.getUnit();else if(p!=d){h.getModel().beginUpdate();try{for(var k=f.getSelectionState().cells,u=0;u<k.length;u++)if(h.getModel().isVertex(k[u])){var w=h.getCellGeometry(k[u]);if(null!=w&&(w=w.clone(),!b(w,p,k[u]))){var z=h.view.getState(k[u]);null!=z&&h.isRecursiveVertexResize(z)&&h.resizeChildCells(k[u],w);h.getModel().setGeometry(k[u],w);h.constrainChildCells(k[u])}}}finally{h.getModel().endUpdate()}d=
p;a.value=p+" "+g.getUnit()}}mxEvent.consume(m)}var f=this.editorUi,h=f.editor.graph,d=null,g=this;mxEvent.addListener(a,"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
ArrangePanel.prototype.addEdgeGeometryHandler=function(a,b){function e(g){if(""!=a.value){var m=parseFloat(a.value);if(isNaN(m))a.value=d+" pt";else if(m!=d){h.getModel().beginUpdate();try{for(var p=f.getSelectionState().cells,k=0;k<p.length;k++)if(h.getModel().isEdge(p[k])){var u=h.getCellGeometry(p[k]);null!=u&&(u=u.clone(),b(u,m),h.getModel().setGeometry(p[k],u))}}finally{h.getModel().endUpdate()}d=m;a.value=m+" pt"}}mxEvent.consume(g)}var f=this.editorUi,h=f.editor.graph,d=null;mxEvent.addListener(a,
"blur",e);mxEvent.addListener(a,"change",e);mxEvent.addListener(a,"focus",function(){d=a.value});return e};
-ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=e.getSelectionState(),d=this.createPanel(),g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("width"));d.appendChild(g);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(K){var U=parseInt(m.value);
-U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Y=e.getSelectionState().cells;f.setCellStyles("width",U,Y);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",Y))}m.value=U+" pt";mxEvent.consume(K)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";g=document.createElement("div");g.style.position=
-"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),x=this.addUnitInput(k,this.getUnit(),16,52,function(){I.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
-this.addKeyHandler(u,D);this.addKeyHandler(x,D);var z=this.createPanel();z.style.paddingBottom="30px";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("lineend"));z.appendChild(g);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){L.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(z,this.getUnit(),16,52,function(){T.apply(this,arguments)},this.getUnitStep(),null,
-null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(K,U,Y){h=e.getSelectionState();K=h.cells[0];if("link"==h.style.shape||"flexArrow"==h.style.shape){if(d.style.display="",Y||document.activeElement!=m)Y=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=Y+" pt"}else d.style.display=
-"none";1==h.cells.length&&f.model.isEdge(K)?(Y=f.model.getGeometry(K),null!=Y&&null!=Y.sourcePoint&&null==f.model.getTerminal(K,!0)?(u.value=this.inUnit(Y.sourcePoint.x)+" "+this.getUnit(),x.value=this.inUnit(Y.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=Y&&null!=Y.targetPoint&&null==f.model.getTerminal(K,!1)?(C.value=this.inUnit(Y.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(Y.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
-"none")});var G=this.addEdgeGeometryHandler(u,function(K,U){K.sourcePoint.x=b.fromUnit(U)});var I=this.addEdgeGeometryHandler(x,function(K,U){K.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(K,U){K.targetPoint.x=b.fromUnit(U)});var T=this.addEdgeGeometryHandler(E,function(K,U){K.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};
+ArrangePanel.prototype.addEdgeGeometry=function(a){var b=this,e=this.editorUi,f=e.editor.graph,h=e.getSelectionState(),d=this.createPanel(),g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";g.style.fontWeight="bold";mxUtils.write(g,mxResources.get("width"));d.appendChild(g);var m=this.addUnitInput(d,"pt",12,44,function(){p.apply(this,arguments)});mxUtils.br(d);this.addKeyHandler(m,D);var p=mxUtils.bind(this,function(N){var U=parseInt(m.value);
+U=Math.min(999,Math.max(1,isNaN(U)?1:U));if(U!=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth)){var Y=e.getSelectionState().cells;f.setCellStyles("width",U,Y);e.fireEvent(new mxEventObject("styleChanged","keys",["width"],"values",[U],"cells",Y))}m.value=U+" pt";mxEvent.consume(N)});mxEvent.addListener(m,"blur",p);mxEvent.addListener(m,"change",p);a.appendChild(d);var k=this.createPanel();k.style.paddingBottom="30px";g=document.createElement("div");g.style.position=
+"absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("linestart"));k.appendChild(g);var u=this.addUnitInput(k,this.getUnit(),87,52,function(){G.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),w=this.addUnitInput(k,this.getUnit(),16,52,function(){K.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);this.addLabel(k,mxResources.get("left"),87,64);this.addLabel(k,mxResources.get("top"),16,64);a.appendChild(k);
+this.addKeyHandler(u,D);this.addKeyHandler(w,D);var z=this.createPanel();z.style.paddingBottom="30px";g=document.createElement("div");g.style.position="absolute";g.style.width="70px";g.style.marginTop="0px";mxUtils.write(g,mxResources.get("lineend"));z.appendChild(g);var C=this.addUnitInput(z,this.getUnit(),87,52,function(){L.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),E=this.addUnitInput(z,this.getUnit(),16,52,function(){Q.apply(this,arguments)},this.getUnitStep(),null,
+null,this.isFloatUnit());mxUtils.br(z);this.addLabel(z,mxResources.get("left"),87,64);this.addLabel(z,mxResources.get("top"),16,64);a.appendChild(z);this.addKeyHandler(C,D);this.addKeyHandler(E,D);var D=mxUtils.bind(this,function(N,U,Y){h=e.getSelectionState();N=h.cells[0];if("link"==h.style.shape||"flexArrow"==h.style.shape){if(d.style.display="",Y||document.activeElement!=m)Y=mxUtils.getValue(h.style,"width",mxCellRenderer.defaultShapes.flexArrow.prototype.defaultWidth),m.value=Y+" pt"}else d.style.display=
+"none";1==h.cells.length&&f.model.isEdge(N)?(Y=f.model.getGeometry(N),null!=Y&&null!=Y.sourcePoint&&null==f.model.getTerminal(N,!0)?(u.value=this.inUnit(Y.sourcePoint.x)+" "+this.getUnit(),w.value=this.inUnit(Y.sourcePoint.y)+" "+this.getUnit()):k.style.display="none",null!=Y&&null!=Y.targetPoint&&null==f.model.getTerminal(N,!1)?(C.value=this.inUnit(Y.targetPoint.x)+" "+this.getUnit(),E.value=this.inUnit(Y.targetPoint.y)+" "+this.getUnit()):z.style.display="none"):(k.style.display="none",z.style.display=
+"none")});var G=this.addEdgeGeometryHandler(u,function(N,U){N.sourcePoint.x=b.fromUnit(U)});var K=this.addEdgeGeometryHandler(w,function(N,U){N.sourcePoint.y=b.fromUnit(U)});var L=this.addEdgeGeometryHandler(C,function(N,U){N.targetPoint.x=b.fromUnit(U)});var Q=this.addEdgeGeometryHandler(E,function(N,U){N.targetPoint.y=b.fromUnit(U)});f.getModel().addListener(mxEvent.CHANGE,D);this.listeners.push({destroy:function(){f.getModel().removeListener(D)}});D()};
TextFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(TextFormatPanel,BaseFormatPanel);TextFormatPanel.prototype.init=function(){this.container.style.borderBottom="none";this.addFont(this.container);this.container.appendChild(this.addFontOps(this.createPanel()))};TextFormatPanel.prototype.addFontOps=function(a){a.style.paddingTop="8px";a.style.paddingBottom="6px";0==this.addActions(a,["removeFormat"])&&(a.style.display="none");return a};
TextFormatPanel.prototype.addFont=function(a){function b(q){q=null!=q?q.fontSize:null;return null!=q&&"px"==q.substring(q.length-2)?parseFloat(q):mxConstants.DEFAULT_FONTSIZE}function e(q,A){if(null!=q&&""!=q.textContent){q.style.lineHeight="";var B=mxUtils.getCurrentStyle(q);parseFloat(B.fontSize)*A/100!=parseFloat(B.lineHeight)?q.style.lineHeight=A+"%":""==q.getAttribute("style")&&q.removeAttribute("style")}}function f(q,A){A?q.classList.add("geActiveItem"):q.classList.remove("geActiveItem")}var h=
this.editorUi,d=h.editor.graph,g=h.getSelectionState(),m=this.createTitle(mxResources.get("font"));m.style.paddingLeft="14px";m.style.paddingTop="10px";m.style.paddingBottom="6px";a.appendChild(m);m=this.createPanel();m.style.paddingTop="2px";m.style.paddingBottom="2px";m.style.position="relative";m.style.marginLeft="-2px";m.style.borderWidth="0px";m.className="geToolbarContainer";if(d.cellEditor.isContentEditing()){var p=m.cloneNode(),k=this.editorUi.toolbar.addMenu(mxResources.get("style"),mxResources.get("style"),
!0,"formatBlock",p,null,!0);this.addArrow(k);k.style.width="211px";k.style.alignItems="center";k.style.justifyContent="center";k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.margin="0px";k.style.position="relative";k=k.getElementsByTagName("div")[0];k.style.position="absolute";k.style.right="2px";a.appendChild(p)}a.appendChild(m);p=this.createPanel();p.style.marginTop="8px";p.style.borderWidth="1px";p.style.borderStyle="solid";p.style.paddingTop="6px";p.style.paddingBottom="2px";var u=
-this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",m,null,!0);this.addArrow(u);u.style.width="211px";u.style.alignItems="center";u.style.justifyContent="center";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";u.style.position="relative";k=u.getElementsByTagName("div")[0];k.style.position="absolute";k.style.right="2px";k=m.cloneNode(!1);k.style.marginLeft="-3px";k.style.height="31px";var x=this.editorUi.toolbar.addItems(["bold","italic",
-"underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);x[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");x[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");x[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var z=this.editorUi.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);
-this.styleButtons(x);this.styleButtons([z]);var C=m.cloneNode(!1);C.style.height="31px";C.style.paddingTop="2px";C.style.marginLeft="-3px";C.style.paddingBottom="0px";var E=function(q){return function(){return q()}},D=this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],
+this.editorUi.toolbar.addMenu("Helvetica",mxResources.get("fontFamily"),!0,"fontFamily",m,null,!0);this.addArrow(u);u.style.width="211px";u.style.alignItems="center";u.style.justifyContent="center";u.style.whiteSpace="nowrap";u.style.overflow="hidden";u.style.margin="0px";u.style.position="relative";k=u.getElementsByTagName("div")[0];k.style.position="absolute";k.style.right="2px";k=m.cloneNode(!1);k.style.marginLeft="-3px";k.style.height="31px";var w=this.editorUi.toolbar.addItems(["bold","italic",
+"underline"],k,!0,[Editor.boldImage,Editor.italicImage,Editor.underlineImage]);w[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");w[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");w[2].setAttribute("title",mxResources.get("underline")+" ("+this.editorUi.actions.get("underline").shortcut+")");var z=this.editorUi.toolbar.addItems(["vertical"],k,!0,[Editor.verticalTextImage])[0];a.appendChild(k);
+this.styleButtons(w);this.styleButtons([z]);var C=m.cloneNode(!1);C.style.height="31px";C.style.paddingTop="2px";C.style.marginLeft="-3px";C.style.paddingBottom="0px";var E=function(q){return function(){return q()}},D=this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_LEFT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_LEFT],
"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_LEFT])),C),G=this.editorUi.toolbar.addButton(Editor.alignCenterImage,mxResources.get("center"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_CENTER,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_CENTER],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
-[mxConstants.ALIGN_CENTER])),C),I=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,I]);if(d.cellEditor.isContentEditing()){var L=
-this.editorUi.toolbar.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([L])}var T=this.editorUi.toolbar.addButton(Editor.alignTopImage,mxResources.get("top"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),K=this.editorUi.toolbar.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],
-[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([T,K,U]);a.appendChild(C);var Y,Q,P,M,V;if(d.cellEditor.isContentEditing()){T.style.display="none";K.style.display="none";U.style.display="none";z.style.display="none";var aa=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),
-function(){1==aa.style.opacity&&document.execCommand("justifyfull",!1,null)},C);aa.style.marginRight="9px";this.styleButtons([aa,Y=this.editorUi.toolbar.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C),Q=this.editorUi.toolbar.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C)]);Y.style.marginLeft="10px";E=
-C.cloneNode(!1);E.style.paddingTop="4px";C=[this.editorUi.toolbar.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.outdentImage,
-mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else x[2].style.marginRight="12px",I.style.marginRight="12px";C=m.cloneNode(!1);
-C.removeAttribute("class");C.style.marginLeft="0px";C.style.paddingTop="8px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("position"));var ia=document.createElement("select");ia.style.position="absolute";ia.style.left="126px";ia.style.width="98px";ia.style.borderWidth="1px";ia.style.borderStyle="solid";ia.style.marginTop="-3px";var na="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),qa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,
+[mxConstants.ALIGN_CENTER])),C),K=this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),d.cellEditor.isContentEditing()?function(q){d.cellEditor.alignText(mxConstants.ALIGN_RIGHT,q);h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ALIGN],"values",[mxConstants.ALIGN_RIGHT],"cells",g.cells))}:E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_RIGHT])),C);this.styleButtons([D,G,K]);if(d.cellEditor.isContentEditing()){var L=
+this.editorUi.toolbar.addButton(Editor.strikethroughImage,mxResources.get("strikethrough"),function(){document.execCommand("strikeThrough",!1,null)},k);this.styleButtons([L])}var Q=this.editorUi.toolbar.addButton(Editor.alignTopImage,mxResources.get("top"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP])),C),N=this.editorUi.toolbar.addButton(Editor.alignMiddleImage,mxResources.get("middle"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],
+[mxConstants.ALIGN_MIDDLE])),C),U=this.editorUi.toolbar.addButton(Editor.alignBottomImage,mxResources.get("bottom"),E(this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM])),C);this.styleButtons([Q,N,U]);a.appendChild(C);var Y,P,T,J,V;if(d.cellEditor.isContentEditing()){Q.style.display="none";N.style.display="none";U.style.display="none";z.style.display="none";var Z=this.editorUi.toolbar.addButton(Editor.alignJustifyImage,mxResources.get("block"),
+function(){1==Z.style.opacity&&document.execCommand("justifyfull",!1,null)},C);Z.style.marginRight="9px";this.styleButtons([Z,Y=this.editorUi.toolbar.addButton(Editor.subscriptImage,mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},C),P=this.editorUi.toolbar.addButton(Editor.superscriptImage,mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",!1,null)},C)]);Y.style.marginLeft="10px";E=C.cloneNode(!1);
+E.style.paddingTop="4px";C=[this.editorUi.toolbar.addButton(Editor.orderedListImage,mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.unorderedListImage,mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},E),this.editorUi.toolbar.addButton(Editor.indentImage,mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.outdentImage,
+mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",!1,null)},E),this.editorUi.toolbar.addButton(Editor.removeFormatImage,mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},E),this.editorUi.toolbar.addButton(Editor.codeImage,mxResources.get("html"),function(){d.cellEditor.toggleViewMode()},E)];this.styleButtons(C);C[C.length-2].style.marginLeft="10px";a.appendChild(E)}else w[2].style.marginRight="12px",K.style.marginRight="12px";C=m.cloneNode(!1);
+C.removeAttribute("class");C.style.marginLeft="0px";C.style.paddingTop="8px";C.style.paddingBottom="4px";C.style.fontWeight="normal";mxUtils.write(C,mxResources.get("position"));var ia=document.createElement("select");ia.style.position="absolute";ia.style.left="126px";ia.style.width="98px";ia.style.borderWidth="1px";ia.style.borderStyle="solid";ia.style.marginTop="-3px";var oa="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),sa={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,
mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,
-mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<na.length;E++){var O=document.createElement("option");O.setAttribute("value",na[E]);mxUtils.write(O,
-mxResources.get(na[E]));ia.appendChild(O)}C.appendChild(ia);na=m.cloneNode(!1);na.removeAttribute("class");na.style.marginLeft="0px";na.style.paddingTop="4px";na.style.paddingBottom="4px";na.style.fontWeight="normal";mxUtils.write(na,mxResources.get("writingDirection"));var Z=document.createElement("select");Z.style.position="absolute";Z.style.borderWidth="1px";Z.style.borderStyle="solid";Z.style.left="126px";Z.style.width="98px";Z.style.marginTop="-3px";O=["automatic","leftToRight","rightToLeft"];
-g.html&&(O.push("vertical-leftToRight"),O.push("vertical-rightToLeft"));var ca={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<O.length;E++){var W=document.createElement("option");W.setAttribute("value",O[E]);"vertical-"==O[E].substring(0,9)?mxUtils.write(W,mxResources.get("vertical")+" ("+mxResources.get(O[E].substring(9))+
-")"):mxUtils.write(W,mxResources.get(O[E]));Z.appendChild(W)}na.appendChild(Z);d.isEditing()||(a.appendChild(C),mxEvent.addListener(ia,"change",function(q){d.getModel().beginUpdate();try{var A=qa[ia.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),
-a.appendChild(na),mxEvent.addListener(Z,"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ca[Z.value],g.cells);mxEvent.consume(q)}));var ja=document.createElement("input");ja.style.position="absolute";ja.style.borderWidth="1px";ja.style.borderStyle="solid";ja.style.textAlign="right";ja.style.marginTop="4px";ja.style.left="161px";ja.style.width="53px";ja.style.height="23px";ja.style.boxSizing="border-box";k.appendChild(ja);C=this.installInputHandler(ja,mxConstants.STYLE_FONTSIZE,
-Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ja.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);q!=b(F)?A[B].style.fontSize=q+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ja,
-C,1,10,!0,Menus.prototype.defaultFontSize);C.style.display=ja.style.display;C.style.marginTop="4px";C.style.left="214px";k.appendChild(C);k=u.getElementsByTagName("div")[0];k.style.cssFloat="right";var H=null,ea=d.shapeBackgroundColor,oa=null,sa=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Pa="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",la=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ea==
+mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]};for(E=0;E<oa.length;E++){var O=document.createElement("option");O.setAttribute("value",oa[E]);mxUtils.write(O,
+mxResources.get(oa[E]));ia.appendChild(O)}C.appendChild(ia);oa=m.cloneNode(!1);oa.removeAttribute("class");oa.style.marginLeft="0px";oa.style.paddingTop="4px";oa.style.paddingBottom="4px";oa.style.fontWeight="normal";mxUtils.write(oa,mxResources.get("writingDirection"));var X=document.createElement("select");X.style.position="absolute";X.style.borderWidth="1px";X.style.borderStyle="solid";X.style.left="126px";X.style.width="98px";X.style.marginTop="-3px";O=["automatic","leftToRight","rightToLeft"];
+g.html&&(O.push("vertical-leftToRight"),O.push("vertical-rightToLeft"));var ba={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL,"vertical-leftToRight":mxConstants.TEXT_DIRECTION_VERTICAL_LR,"vertical-rightToLeft":mxConstants.TEXT_DIRECTION_VERTICAL_RL};for(E=0;E<O.length;E++){var da=document.createElement("option");da.setAttribute("value",O[E]);"vertical-"==O[E].substring(0,9)?mxUtils.write(da,mxResources.get("vertical")+" ("+mxResources.get(O[E].substring(9))+
+")"):mxUtils.write(da,mxResources.get(O[E]));X.appendChild(da)}oa.appendChild(X);d.isEditing()||(a.appendChild(C),mxEvent.addListener(ia,"change",function(q){d.getModel().beginUpdate();try{var A=sa[ia.value];null!=A&&(d.setCellStyles(mxConstants.STYLE_LABEL_POSITION,A[0],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,A[1],g.cells),d.setCellStyles(mxConstants.STYLE_ALIGN,A[2],g.cells),d.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,A[3],g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(q)}),
+a.appendChild(oa),mxEvent.addListener(X,"change",function(q){d.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,ba[X.value],g.cells);mxEvent.consume(q)}));var ca=document.createElement("input");ca.style.position="absolute";ca.style.borderWidth="1px";ca.style.borderStyle="solid";ca.style.textAlign="right";ca.style.marginTop="4px";ca.style.left="161px";ca.style.width="53px";ca.style.height="23px";ca.style.boxSizing="border-box";k.appendChild(ca);C=this.installInputHandler(ca,mxConstants.STYLE_FONTSIZE,
+Menus.prototype.defaultFontSize,1,999," "+Editor.fontSizeUnit,function(q){if(null!=d.getSelectedEditingElement()){ca.value=q+" "+Editor.fontSizeUnit;document.execCommand("fontSize",!1,"1");for(var A=d.cellEditor.textarea.getElementsByTagName("font"),B=0;B<A.length;B++)if("1"==A[B].getAttribute("size")){A[B].removeAttribute("size");A[B].style.fontSize="";var F=mxUtils.getCurrentStyle(A[B]);q!=b(F)?A[B].style.fontSize=q+"px":""==A[B].getAttribute("style")&&A[B].removeAttribute("style")}}},!0);C=this.createStepper(ca,
+C,1,10,!0,Menus.prototype.defaultFontSize);C.style.display=ca.style.display;C.style.marginTop="4px";C.style.left="214px";k.appendChild(C);k=u.getElementsByTagName("div")[0];k.style.cssFloat="right";var H=null,ea=d.shapeBackgroundColor,ra=null,qa=d.shapeForegroundColor;k=mxUtils.getLightDarkColor(d.shapeBackgroundColor);var Pa="light-dark("+mxUtils.hex2rgb(k.light)+", "+mxUtils.hex2rgb(k.dark)+")",ma=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return ea==
d.shapeBackgroundColor||ea==Pa?"default":ea},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=d.shapeBackgroundColor),Graph.setTextColor(d.cellEditor.textarea,q,!1),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){H=q},destroy:function(){H=null}},null,null,d.shapeBackgroundColor):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
-"default",null,function(q){d.updateLabelElements(g.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);la.style.fontWeight="bold";var Ba=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);Ba.style.fontWeight="bold";k=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),
-function(){return sa},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){oa=q},destroy:function(){oa=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),
-mxConstants.STYLE_FONTCOLOR,"default",function(q){la.style.display=q==mxConstants.NONE?"none":"";Ba.style.display=la.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,g.cells);d.updateLabelElements(g.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";p.appendChild(k);p.appendChild(la);
+"default",null,function(q){d.updateLabelElements(g.cells,function(A){A.style.backgroundColor=null})},d.shapeBackgroundColor);ma.style.fontWeight="bold";var Ba=this.createCellColorOption(mxResources.get("borderColor"),mxConstants.STYLE_LABEL_BORDERCOLOR,"default",null,null,d.shapeForegroundColor);Ba.style.fontWeight="bold";k=1<=g.vertices.length?d.stylesheet.getDefaultVertexStyle():d.stylesheet.getDefaultEdgeStyle();k=d.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),
+function(){return qa},function(q){null!=d.cellEditor.textarea&&("default"==q&&(q=mxConstants.NONE),Graph.setTextColor(d.cellEditor.textarea,q,!0),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTCOLOR],"values",[q],"cells",g.cells)))},"default",{install:function(q){ra=q},destroy:function(){ra=null}},null,!0,null!=k[mxConstants.STYLE_FONTCOLOR]&&"default"!=k[mxConstants.STYLE_FONTCOLOR]?k[mxConstants.STYLE_FONTCOLOR]:d.shapeForegroundColor):this.createCellColorOption(mxResources.get("fontColor"),
+mxConstants.STYLE_FONTCOLOR,"default",function(q){ma.style.display=q==mxConstants.NONE?"none":"";Ba.style.display=ma.style.display},function(q){q==mxConstants.NONE?d.setCellStyles(mxConstants.STYLE_NOLABEL,"1",g.cells):d.setCellStyles(mxConstants.STYLE_NOLABEL,null,g.cells);d.setCellStyles(mxConstants.STYLE_FONTCOLOR,q,g.cells);d.updateLabelElements(g.cells,function(A){A.removeAttribute("color");A.style.color=null})},d.shapeForegroundColor);k.style.fontWeight="bold";p.appendChild(k);p.appendChild(ma);
k=this.createCellOption(mxResources.get("shadow"),mxConstants.STYLE_TEXT_SHADOW,0);k.style.width="100%";k.style.fontWeight="bold";Editor.enableShadowOption||(k.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(k,60));d.cellEditor.isContentEditing()||(p.appendChild(Ba),p.appendChild(k));a.appendChild(p);p=this.createPanel();p.style.paddingTop="2px";p.style.paddingBottom="4px";k=d.filterSelectionCells(mxUtils.bind(this,function(q){var A=d.view.getState(q);return null==
A||d.isAutoSizeState(A)||d.getModel().isEdge(q)||!d.isTableRow(q)&&!d.isTableCell(q)&&!d.isCellResizable(q)}));C=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",null,null,!0,k);C.style.fontWeight="bold";0<k.length&&p.appendChild(C);k=this.createCellOption(mxResources.get("formattedText"),"html",0,null,null,null,h.actions.get("formattedText"));k.style.fontWeight="bold";p.appendChild(k);k=this.createPanel();k.style.paddingTop="10px";k.style.paddingBottom=
-"28px";k.style.fontWeight="normal";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Fa=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);
-this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ha=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
+"28px";k.style.fontWeight="normal";C=document.createElement("div");C.style.position="absolute";C.style.width="70px";C.style.marginTop="0px";C.style.fontWeight="bold";mxUtils.write(C,mxResources.get("spacing"));k.appendChild(C);var Ca=this.addUnitInput(k,this.getUnit(),87,52,function(){fb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ja=this.addUnitInput(k,this.getUnit(),16,52,function(){cb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(k);
+this.addLabel(k,mxResources.get("top"),87,64);this.addLabel(k,mxResources.get("global"),16,64);mxUtils.br(k);mxUtils.br(k);var Ia=this.addUnitInput(k,this.getUnit(),158,52,function(){ab.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Da=this.addUnitInput(k,this.getUnit(),87,52,function(){gb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),Ga=this.addUnitInput(k,this.getUnit(),16,52,function(){pb.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());
mxUtils.br(k);this.addLabel(k,mxResources.get("left"),158,64);this.addLabel(k,mxResources.get("bottom"),87,64);this.addLabel(k,mxResources.get("right"),16,64);if(d.cellEditor.isContentEditing()){var ta=null,La=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(q){var A=""==q.value?120:parseInt(q.value);A=Math.max(0,isNaN(A)?120:A);if(window.getSelection){null!=ta&&(d.cellEditor.restoreSelection(ta),ta=null);var B=d.getSelectedEditingElement();if(null!=d.cellEditor.textarea&&
-B==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&d.cellEditor.textarea.firstChild.nodeType!=mxConstants.NODETYPE_ELEMENT&&1==d.cellEditor.textarea.children.length){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var N=F.getRangeAt(0);B=document.createElement("div");B.appendChild(N.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();N=new Range;N.selectNodeContents(B);F.addRange(N)}}if(null!=B)for(B!=d.cellEditor.textarea&&
-e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),N=0;N<B.length;N++)F.containsNode(B[N],!0)&&e(B[N],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link",
+B==d.cellEditor.textarea&&null!=d.cellEditor.textarea.firstChild&&d.cellEditor.textarea.firstChild.nodeType!=mxConstants.NODETYPE_ELEMENT&&1==d.cellEditor.textarea.children.length){var F=window.getSelection();if(F.getRangeAt&&0<F.rangeCount){var M=F.getRangeAt(0);B=document.createElement("div");B.appendChild(M.extractContents());d.cellEditor.textarea.innerHTML="";d.cellEditor.textarea.appendChild(B);F.removeAllRanges();M=new Range;M.selectNodeContents(B);F.addRange(M)}}if(null!=B)for(B!=d.cellEditor.textarea&&
+e(B,A),B=B.getElementsByTagName("*"),F=window.getSelection(),M=0;M<B.length;M++)F.containsNode(B[M],!0)&&e(B[M],A)}q.value=A+" %"},function(q){La=q;mxEvent.addGestureListeners(q,mxUtils.bind(this,function(A){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())}));mxEvent.addListener(q,"touchstart",function(){document.activeElement==d.cellEditor.textarea&&(ta=d.cellEditor.saveSelection())});q.value="120 %"}));p=m.cloneNode(!1);p.style.paddingLeft="0px";k=this.editorUi.toolbar.addItems(["link",
"image"],p,!0,[Editor.linkImage,Editor.imageImage]);C=[this.editorUi.toolbar.addButton(Editor.horizontalRuleImage,mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1)},p),this.editorUi.toolbar.addMenuFunctionInContainer(p,Editor.tableImage,mxResources.get("table"),!1,mxUtils.bind(this,function(q){this.editorUi.menus.addInsertTableItem(q,null,null,!1)}))];this.styleButtons(k);this.styleButtons(C);k=this.createPanel();k.style.height="57px";k.style.paddingTop=
-"10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=P&&d.insertColumn(P,null!=M?M.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),
-mxUtils.bind(this,function(){try{null!=P&&d.insertColumn(P,null!=M?M.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=P&&null!=M&&d.deleteColumn(P,M.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=P&&null!=V&&d.insertRow(P,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),
-k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=P&&null!=V&&d.insertRow(P,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=P&&null!=V&&d.deleteRow(P,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();
-p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=P){var A=P.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,N,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(N).toString(16)).substr(-2)+
-("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==M||null!=q&&mxEvent.isShiftDown(q)?P:M;d.processElements(F,function(N){N.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=
-P){var A=P.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,N,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(N).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==M||null!=q&&mxEvent.isShiftDown(q)?P:M;d.processElements(F,function(N){N.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,
-mxResources.get("spacing"),function(){if(null!=P){var q=P.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?P.setAttribute("cellPadding",A):P.removeAttribute("cellPadding")}),mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=P&&P.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,
-mxResources.get("center"),function(){null!=P&&P.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=P&&P.setAttribute("align","right")},m)];this.styleButtons(C);C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(x[q],
-"click",function(){f(x[q],""==x[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(x[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(x[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(x[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,
-mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ja.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(I,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(T,q==mxConstants.ALIGN_TOP);
-f(K,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":
-q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?Z.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?Z.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?
-Z.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(Z.value="vertical-rightToLeft"):Z.value="automatic";if(B||document.activeElement!=Fa)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Fa.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ha)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Ha.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Fa,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),
-null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Ha,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),
-!0);this.addKeyHandler(ja,Ya);this.addKeyHandler(Fa,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ha,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=
-function(ya,Ga){if(null!=ya&&null!=Ga){if(ya==Ga)return!0;if(ya.length>Ga.length+1)return ya.substring(ya.length-Ga.length-1,ya.length)=="-"+Ga}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ga=q;null!=Ga&&1==Ga.childNodes.length;)if(Ga=Ga.childNodes[0],Ga.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},N=mxUtils.getCurrentStyle(q),
-R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,X=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(N);if(window.getSelection)for(var fa=q.getElementsByTagName("*"),da=window.getSelection(),ha=0;ha<fa.length&&(!da.containsNode(fa[ha],!0)||(null==X&&""!=fa[ha].style.fontSize&&(X=parseFloat(fa[ha].style.fontSize)),null==R&&""!=fa[ha].style.lineHeight&&(R=fa[ha].style.lineHeight),null==X||null==R));ha++);null==X&&(X=b(N));if(null==R)for(fa=q;null!=fa&&fa!=d.cellEditor.textarea.parentNode;){if(null!=
-fa.style&&""!=fa.style.lineHeight){R=fa.style.lineHeight;break}fa=fa.parentNode}if(null!=N){f(x[0],"bold"==N.fontWeight||400<N.fontWeight||B("B")||B("STRONG"));f(x[1],"italic"==N.fontStyle||B("I")||B("EM"));f(x[2],"underline"==N.textDecorationLine||B("U"));f(L,"line-through"==N.textDecorationLine||B("STRIKE"));f(Q,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ga){Na.push({name:ya,dispName:Ga,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,
+"10px";k.style.paddingBottom="8px";k.appendChild(this.createTitle(mxResources.get("insert")));k.appendChild(p);a.appendChild(k);k=m.cloneNode(!1);k.style.height="33px";k.style.paddingLeft="0px";C=[this.editorUi.toolbar.addButton(Editor.addColumnLeftImage,mxResources.get("insertColumnBefore"),mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex:0)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addColumnRightImage,mxResources.get("insertColumnAfter"),
+mxUtils.bind(this,function(){try{null!=T&&d.insertColumn(T,null!=J?J.cellIndex+1:-1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeColumnImage,mxResources.get("deleteColumn"),mxUtils.bind(this,function(){try{null!=T&&null!=J&&d.deleteColumn(T,J.cellIndex)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.addRowAboveImage,mxResources.get("insertRowBefore"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),
+k),this.editorUi.toolbar.addButton(Editor.addRowBelowImage,mxResources.get("insertRowAfter"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.insertRow(T,V.sectionRowIndex+1)}catch(q){this.editorUi.handleError(q)}}),k),this.editorUi.toolbar.addButton(Editor.removeRowImage,mxResources.get("deleteRow"),mxUtils.bind(this,function(){try{null!=T&&null!=V&&d.deleteRow(T,V.sectionRowIndex)}catch(q){this.editorUi.handleError(q)}}),k)];this.styleButtons(C);C[2].style.marginRight="10px";p=this.createPanel();
+p.style.paddingTop="10px";p.style.paddingBottom="10px";p.appendChild(this.createTitle(mxResources.get("table")));p.appendChild(k);m=m.cloneNode(!1);m.style.height="33px";m.style.padding="0";C=[this.editorUi.toolbar.addButton(Editor.strokeColorImage,mxResources.get("borderColor"),mxUtils.bind(this,function(q){if(null!=T){var A=T.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+
+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.border=null});null==B||B==mxConstants.NONE?(F.removeAttribute("border"),F.style.border="",F.style.borderCollapse=""):(F.setAttribute("border","1"),F.style.border="1px solid "+B,F.style.borderCollapse="collapse")})}}),m),this.editorUi.toolbar.addButton(Editor.fillColorImage,mxResources.get("backgroundColor"),mxUtils.bind(this,function(q){if(null!=
+T){var A=T.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(B,F,M,R){return"#"+("0"+Number(F).toString(16)).substr(-2)+("0"+Number(M).toString(16)).substr(-2)+("0"+Number(R).toString(16)).substr(-2)});this.editorUi.pickColor(A,function(B){var F=null==J||null!=q&&mxEvent.isShiftDown(q)?T:J;d.processElements(F,function(M){M.style.backgroundColor=null});F.style.backgroundColor=null==B||B==mxConstants.NONE?"":B})}}),m),this.editorUi.toolbar.addButton(Editor.spacingImage,
+mxResources.get("spacing"),function(){if(null!=T){var q=T.getAttribute("cellPadding")||0;q=new FilenameDialog(h,q,mxResources.get("apply"),mxUtils.bind(this,function(A){null!=A&&0<A.length?T.setAttribute("cellPadding",A):T.removeAttribute("cellPadding")}),mxResources.get("spacing"));h.showDialog(q.container,300,80,!0,!0);q.init()}},m),this.editorUi.toolbar.addButton(Editor.alignLeftImage,mxResources.get("left"),function(){null!=T&&T.setAttribute("align","left")},m),this.editorUi.toolbar.addButton(Editor.alignCenterImage,
+mxResources.get("center"),function(){null!=T&&T.setAttribute("align","center")},m),this.editorUi.toolbar.addButton(Editor.alignRightImage,mxResources.get("right"),function(){null!=T&&T.setAttribute("align","right")},m)];this.styleButtons(C);C[2].style.marginRight="10px";p.appendChild(m);a.appendChild(p);var Xa=p}else a.appendChild(p),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(k);for(E=0;3>E;E++)(function(q){mxEvent.addListener(w[q],
+"click",function(){f(w[q],""==w[q].style.backgroundImage)})})(E);var Ya=mxUtils.bind(this,function(q,A,B){g=h.getSelectionState();q=mxUtils.getValue(g.style,mxConstants.STYLE_FONTSTYLE,0);f(w[0],(q&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);f(w[1],(q&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC);f(w[2],(q&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);u.firstChild.nodeValue=mxUtils.getValue(g.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont);f(z,"0"==mxUtils.getValue(g.style,
+mxConstants.STYLE_HORIZONTAL,"1"));if(B||document.activeElement!=ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),ca.value=isNaN(q)?"":q+" "+Editor.fontSizeUnit;q=mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);f(D,q==mxConstants.ALIGN_LEFT);f(G,q==mxConstants.ALIGN_CENTER);f(K,q==mxConstants.ALIGN_RIGHT);q=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);f(Q,q==mxConstants.ALIGN_TOP);
+f(N,q==mxConstants.ALIGN_MIDDLE);f(U,q==mxConstants.ALIGN_BOTTOM);q=mxUtils.getValue(g.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);A=mxUtils.getValue(g.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);ia.value=q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_TOP?"topLeft":q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_TOP?"top":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_TOP?"topRight":q==mxConstants.ALIGN_LEFT&&A==mxConstants.ALIGN_BOTTOM?"bottomLeft":
+q==mxConstants.ALIGN_CENTER&&A==mxConstants.ALIGN_BOTTOM?"bottom":q==mxConstants.ALIGN_RIGHT&&A==mxConstants.ALIGN_BOTTOM?"bottomRight":q==mxConstants.ALIGN_LEFT?"left":q==mxConstants.ALIGN_RIGHT?"right":"center";q=mxUtils.getValue(g.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);q==mxConstants.TEXT_DIRECTION_RTL?X.value="rightToLeft":q==mxConstants.TEXT_DIRECTION_LTR?X.value="leftToRight":q!=mxConstants.TEXT_DIRECTION_AUTO&&g.html?q==mxConstants.TEXT_DIRECTION_VERTICAL_LR?
+X.value="vertical-leftToRight":q==mxConstants.TEXT_DIRECTION_VERTICAL_RL&&(X.value="vertical-rightToLeft"):X.value="automatic";if(B||document.activeElement!=Ja)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING,2)),Ja.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ca)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_TOP,0)),Ca.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ga)q=parseFloat(mxUtils.getValue(g.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),Ga.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Da)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_BOTTOM,0)),Da.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit();if(B||document.activeElement!=Ia)q=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_SPACING_LEFT,0)),Ia.value=isNaN(q)?"":this.inUnit(q)+" "+this.getUnit()});var cb=this.installInputHandler(Ja,mxConstants.STYLE_SPACING,2,-999,999,this.getUnit(" "),
+null,this.isFloatUnit(),!0);var fb=this.installInputHandler(Ca,mxConstants.STYLE_SPACING_TOP,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var pb=this.installInputHandler(Ga,mxConstants.STYLE_SPACING_RIGHT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var gb=this.installInputHandler(Da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ab=this.installInputHandler(Ia,mxConstants.STYLE_SPACING_LEFT,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),
+!0);this.addKeyHandler(ca,Ya);this.addKeyHandler(Ja,Ya);this.addKeyHandler(Ca,Ya);this.addKeyHandler(Ga,Ya);this.addKeyHandler(Da,Ya);this.addKeyHandler(Ia,Ya);d.getModel().addListener(mxEvent.CHANGE,Ya);this.listeners.push({destroy:function(){d.getModel().removeListener(Ya)}});Ya();if(d.cellEditor.isContentEditing()){var ib=null,eb=!1;m=mxUtils.bind(this,function(){eb||(eb=!0,window.setTimeout(mxUtils.bind(this,function(){var q=d.getSelectedEditingElement();if(null!=q&&null!=d.cellEditor.textarea){var A=
+function(ya,Ha){if(null!=ya&&null!=Ha){if(ya==Ha)return!0;if(ya.length>Ha.length+1)return ya.substring(ya.length-Ha.length-1,ya.length)=="-"+Ha}return!1},B=function(ya){if(null!=d.getParentByName(q,ya,d.cellEditor.textarea))return!0;for(var Ha=q;null!=Ha&&1==Ha.childNodes.length;)if(Ha=Ha.childNodes[0],Ha.nodeName==ya)return!0;return!1},F=function(ya){for(;null!=ya&&ya!=d.cellEditor.textarea;){if("block"==mxUtils.getCurrentStyle(ya).display)return ya;ya=ya.parentNode}return null},M=mxUtils.getCurrentStyle(q),
+R=q==d.cellEditor.textarea||""==q.style.lineHeight?null:q.style.lineHeight,W=q==d.cellEditor.textarea||""==q.style.fontSize?null:b(M);if(window.getSelection)for(var ha=q.getElementsByTagName("*"),fa=window.getSelection(),ja=0;ja<ha.length&&(!fa.containsNode(ha[ja],!0)||(null==W&&""!=ha[ja].style.fontSize&&(W=parseFloat(ha[ja].style.fontSize)),null==R&&""!=ha[ja].style.lineHeight&&(R=ha[ja].style.lineHeight),null==W||null==R));ja++);null==W&&(W=b(M));if(null==R)for(ha=q;null!=ha&&ha!=d.cellEditor.textarea.parentNode;){if(null!=
+ha.style&&""!=ha.style.lineHeight){R=ha.style.lineHeight;break}ha=ha.parentNode}if(null!=M){f(w[0],"bold"==M.fontWeight||400<M.fontWeight||B("B")||B("STRONG"));f(w[1],"italic"==M.fontStyle||B("I")||B("EM"));f(w[2],"underline"==M.textDecorationLine||B("U"));f(L,"line-through"==M.textDecorationLine||B("STRIKE"));f(P,B("SUP"));f(Y,B("SUB"));var va=F(q);if(null!=va){B=function(ya,Ha){Na.push({name:ya,dispName:Ha,type:"string",getValue:function(){return Ma[ya]},valueChanged:function(wa,ua){var Va=va.style,
Qa=wa;parseInt(Qa)==Qa&&(Qa+="px",null!=ua&&(ua.value=Qa));Va[ya]=Qa;""==wa&&null!=ua&&(ua.value=Ma[ya])}})};var Ma=mxUtils.getCurrentStyle(va),Na=[];B("paddingTop","Padding Top");B("paddingRight","Padding Right");B("paddingLeft","Padding Left");B("paddingBottom","Padding Bottom");B("marginTop","Margin Top");B("marginRight","Margin Right");B("marginLeft","Margin Left");B("marginBottom","Margin Bottom");B=this.createPanel();this.addProperties(B,Na,g,!0);null!=ib?ib.parentNode.replaceChild(B,ib):a.appendChild(B);
-ib=B}d.cellEditor.isTableSelected()?(f(aa,A(N.textAlign,"justify")),f(D,A(N.textAlign,"left")),f(G,A(N.textAlign,"center")),f(I,A(N.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(N.textAlign,"justify")?(f(aa,A(N.textAlign,"justify")),f(D,!1),f(G,!1),f(I,!1)):(f(aa,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(I,B==mxConstants.ALIGN_RIGHT)));P=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==
-P?null:d.getParentByName(q,"TR",P);M=null==P?null:d.getParentByNames(q,["TD","TH"],P);Xa.style.display=null!=P?"":"none";document.activeElement!=ja&&(ja.value=isNaN(X)?"":X+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=oa&&(sa=d.getTextColor(q,!0),oa(sa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(N.fontFamily))}}eb=
+ib=B}d.cellEditor.isTableSelected()?(f(Z,A(M.textAlign,"justify")),f(D,A(M.textAlign,"left")),f(G,A(M.textAlign,"center")),f(K,A(M.textAlign,"right"))):(B=d.cellEditor.align||mxUtils.getValue(g.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),A(M.textAlign,"justify")?(f(Z,A(M.textAlign,"justify")),f(D,!1),f(G,!1),f(K,!1)):(f(Z,!1),f(D,B==mxConstants.ALIGN_LEFT),f(G,B==mxConstants.ALIGN_CENTER),f(K,B==mxConstants.ALIGN_RIGHT)));T=d.getParentByName(q,"TABLE",d.cellEditor.textarea);V=null==T?
+null:d.getParentByName(q,"TR",T);J=null==T?null:d.getParentByNames(q,["TD","TH"],T);Xa.style.display=null!=T?"":"none";document.activeElement!=ca&&(ca.value=isNaN(W)?"":W+" "+Editor.fontSizeUnit,"string"===typeof R&&0<R.indexOf("%")?La.value=R.replace("%"," %"):(A=parseFloat(R),isNaN(A)?La.value="120 %":La.value=Math.round(100*A)+" %"));null!=ra&&(qa=d.getTextColor(q,!0),ra(qa,!0));null!=H&&(ea=d.getTextColor(q,!1),H(ea,!0));null!=u.firstChild&&(u.firstChild.nodeValue=mxUtils.getCssFontFamily(M.fontFamily))}}eb=
!1}),0))});(mxClient.IS_FF||mxClient.IS_EDGE||mxClient.IS_IE||mxClient.IS_IE11)&&mxEvent.addListener(d.cellEditor.textarea,"DOMSubtreeModified",m);mxEvent.addListener(d.cellEditor.textarea,"input",m);mxEvent.addListener(d.cellEditor.textarea,"touchend",m);mxEvent.addListener(d.cellEditor.textarea,"mouseup",m);mxEvent.addListener(d.cellEditor.textarea,"keyup",m);this.listeners.push({destroy:function(){}});m()}return a};StyleFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
StyleFormatPanel.prototype.init=function(){var a=this.editorUi.getSelectionState();if(!a.containsLabel&&0<a.cells.length){a.containsImage&&1==a.vertices.length&&"image"==a.style.shape&&null!=a.style.image&&"data:image/svg+xml;"==String(a.style.image).substring(0,19)&&this.container.appendChild(this.addSvgStyles(this.createPanel()));a.fill&&this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));
var b=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY);b.style.paddingTop="8px";b.style.paddingBottom="10px";this.container.appendChild(b);this.container.appendChild(this.addEffects(this.createPanel()))}b=this.createPanel();b.style.paddingTop="8px";1==a.cells.length&&(this.addEditOps(b),null!=b.firstChild&&mxUtils.br(b));1<=a.cells.length&&this.addStyleOps(b);null!=b.firstChild&&this.container.appendChild(b)};
StyleFormatPanel.prototype.getCssRules=function(a){var b=document.implementation.createHTMLDocument(""),e=document.createElement("style");mxUtils.setTextContent(e,a);b.body.appendChild(e);return e.sheet.cssRules};
StyleFormatPanel.prototype.addSvgStyles=function(a){var b=this.editorUi.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";a.style.fontWeight="bold";a.style.display="none";try{var e=b.style.editableCssRules;if(null!=e){var f=new RegExp(e),h=b.style.image.substring(b.style.image.indexOf(",")+1),d=window.atob?decodeURIComponent(escape(atob(h))):Base64.decode(h,!0),g=mxUtils.parseXml(d);if(null!=g){var m="light dark"!=g.documentElement.style.colorScheme,p=g.getElementsByTagName("style");
-for(b=0;b<p.length;b++){var k=this.getCssRules(mxUtils.getTextContent(p[b]));if(e=m)for(var u=0;u<k.length;u++)if(0<=k[b].cssText.indexOf("color-scheme: light dark")){e=!1;break}for(u=0;u<k.length;u++)this.addSvgRule(a,k[u],g,p[b],k,u,f,e)}}}}catch(x){}return a};
-StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m){var p=this.editorUi,k=p.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(u,x,z){var C=mxUtils.trim(u.style[x]);if(""!=C&&"url("!=C.substring(0,4)){var E=C;"transparent"==E?E=mxConstants.NONE:mxUtils.isLightDarkColor(E)&&m&&(m=!1);u=this.createColorOption(z+" "+u.selectorText,function(){return E},mxUtils.bind(this,function(D){h[d].style[x]=D==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(D).cssText;D="";for(var G=
+for(b=0;b<p.length;b++){var k=this.getCssRules(mxUtils.getTextContent(p[b]));if(e=m)for(var u=0;u<k.length;u++)if(0<=k[b].cssText.indexOf("color-scheme: light dark")){e=!1;break}for(u=0;u<k.length;u++)this.addSvgRule(a,k[u],g,p[b],k,u,f,e)}}}}catch(w){}return a};
+StyleFormatPanel.prototype.addSvgRule=function(a,b,e,f,h,d,g,m){var p=this.editorUi,k=p.editor.graph;g.test(b.selectorText)&&(g=mxUtils.bind(this,function(u,w,z){var C=mxUtils.trim(u.style[w]);if(""!=C&&"url("!=C.substring(0,4)){var E=C;"transparent"==E?E=mxConstants.NONE:mxUtils.isLightDarkColor(E)&&m&&(m=!1);u=this.createColorOption(z+" "+u.selectorText,function(){return E},mxUtils.bind(this,function(D){h[d].style[w]=D==mxConstants.NONE?"transparent":mxUtils.getLightDarkColor(D).cssText;D="";for(var G=
0;G<h.length;G++)D+=h[G].cssText+" ";f.textContent=D;D=mxUtils.getXml(e.documentElement);k.setCellStyles(mxConstants.STYLE_IMAGE,"data:image/svg+xml,"+(window.btoa?btoa(unescape(encodeURIComponent(D))):Base64.encode(D,!0)),p.getSelectionState().cells)}),"#ffffff",{install:function(D){},destroy:function(){}},null,null,null,m);a.appendChild(u);a.style.display=""}}),g(b,"fill",mxResources.get("fill")),g(b,"stroke",mxResources.get("line")),g(b,"stop-color",mxResources.get("gradient")))};
StyleFormatPanel.prototype.addEditOps=function(a){var b=this.editorUi.getSelectionState();if(1==b.cells.length){var e=document.createElement("select");e.style.width="210px";e.style.textAlign="center";e.style.marginBottom="2px";var f="edit copyAsText editLink editShape editImage editData copyData pasteData editConnectionPoints editGeometry editTooltip editStyle".split(" "),h=null;if(null!=this.editorUi.sidebar){var d=this.editorUi.sidebar.getKeyStyle(b.cells[0].style);h=this.editorUi.sidebar.getLibsForStyle(d);
null!=h||this.editorUi.sidebar.isSearchIndexLoaded()||null==b.style.shape||"mxgraph."!=String(b.style.shape).substring(0,8)||(h=[])}null!=h&&f.push("openLibrary");for(d=0;d<f.length;d++){var g=this.editorUi.actions.get(f[d]);if(null==g||g.enabled){var m=document.createElement("option");m.setAttribute("value",f[d]);var p=mxResources.get(f[d]);mxUtils.write(m,p+("edit"==f[d]?"":"..."));null!=g&&null!=g.shortcut&&(p+=" ("+g.shortcut+")");m.setAttribute("title",p);e.appendChild(m)}}1<e.children.length&&
@@ -3184,27 +3185,27 @@ f=f.view.getState(f.getSelectionCell()),null!=f&&null!=mxUtils.getValue(f.style,
StyleFormatPanel.prototype.addFill=function(a){function b(){g.innerHTML="";C=1;for(var D=0;D<Editor.fillStyles.length;D++){var G=document.createElement("option");G.setAttribute("value",Editor.fillStyles[D].val);mxUtils.write(G,Editor.fillStyles[D].dispName);g.appendChild(G)}}var e=this.editorUi,f=e.editor.graph,h=e.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="6px";var d=document.createElement("select");d.style.position="absolute";d.style.left="104px";d.style.width="70px";d.style.height=
"22px";d.style.marginTop="-3px";d.style.borderWidth="1px";d.style.borderStyle="solid";d.style.boxSizing="border-box";var g=d.cloneNode(!1);mxEvent.addListener(d,"click",function(D){mxEvent.consume(D)});mxEvent.addListener(g,"click",function(D){mxEvent.consume(D)});var m=this.createCellColorOption(mxResources.get("gradient"),mxConstants.STYLE_GRADIENTCOLOR,"default",function(D){d.style.display=null==D||D==mxConstants.NONE?"none":""},function(D){f.updateCellStyles({gradientColor:D},f.getSelectionCells())},
f.getDefaultColor(h.style,mxConstants.STYLE_GRADIENTCOLOR,f.shapeForegroundColor,f.shapeBackgroundColor));m.style.fontWeight="bold";var p="image"==h.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,k=this.createCellColorOption(mxResources.get("fill"),p,"default",null,mxUtils.bind(this,function(D){f.setCellStyles(p,D,h.cells)}),f.getDefaultColor(h.style,p,f.shapeBackgroundColor,f.shapeForegroundColor));k.style.fontWeight="bold";var u=mxUtils.getValue(h.style,p,null);m.style.display=
-null!=u&&u!=mxConstants.NONE&&h.fill&&"image"!=h.style.shape?"":"none";var x=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(u=0;u<x.length;u++){var z=document.createElement("option");z.setAttribute("value",x[u]);mxUtils.write(z,mxResources.get(x[u]));d.appendChild(z)}m.appendChild(d);var C;b();h.gradient&&k.appendChild(g);var E=mxUtils.bind(this,function(){h=e.getSelectionState();var D=mxUtils.getValue(h.style,
-mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var I=document.createElement("option");I.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(I,
-Editor.roughFillStyles[D].dispName);g.appendChild(I)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
+null!=u&&u!=mxConstants.NONE&&h.fill&&"image"!=h.style.shape?"":"none";var w=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_RADIAL];for(u=0;u<w.length;u++){var z=document.createElement("option");z.setAttribute("value",w[u]);mxUtils.write(z,mxResources.get(w[u]));d.appendChild(z)}m.appendChild(d);var C;b();h.gradient&&k.appendChild(g);var E=mxUtils.bind(this,function(){h=e.getSelectionState();var D=mxUtils.getValue(h.style,
+mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH),G=mxUtils.getValue(h.style,"fillStyle","auto");""==D&&(D=mxConstants.DIRECTION_SOUTH);d.value=D;a.style.display=h.fill?"":"none";D=mxUtils.getValue(h.style,p,null);if(h.fill&&null!=D&&D!=mxConstants.NONE&&"filledEdge"!=h.style.shape){if("1"==h.style.sketch){if(2!=C){g.innerHTML="";C=2;for(D=0;D<Editor.roughFillStyles.length;D++){var K=document.createElement("option");K.setAttribute("value",Editor.roughFillStyles[D].val);mxUtils.write(K,
+Editor.roughFillStyles[D].dispName);g.appendChild(K)}g.value="auto"}}else 1!=C&&b();g.value=G;g.value||(G="auto",g.value=G);g.style.display="1"==h.style.sketch||"none"==d.style.display?"":"none";m.style.display=!h.gradient||h.containsImage||"1"==h.style.sketch&&"solid"!=G&&"auto"!=G?"none":""}else g.style.display="none",m.style.display="none"});f.getModel().addListener(mxEvent.CHANGE,E);this.listeners.push({destroy:function(){f.getModel().removeListener(E)}});E();mxEvent.addListener(d,"change",function(D){f.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,
d.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_GRADIENT_DIRECTION],"values",[d.value],"cells",h.cells));mxEvent.consume(D)});mxEvent.addListener(g,"change",function(D){f.setCellStyles("fillStyle",g.value,h.cells);e.fireEvent(new mxEventObject("styleChanged","keys",["fillStyle"],"values",[g.value],"cells",h.cells));mxEvent.consume(D)});a.appendChild(k);a.appendChild(m);k=this.getCustomColors();for(u=0;u<k.length;u++)a.appendChild(this.createCellColorOption(k[u].title,
k[u].key,k[u].defaultValue));return a};StyleFormatPanel.prototype.getCustomColors=function(){var a=[];this.editorUi.getSelectionState().swimlane&&a.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return a};
-StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(I.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));I.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,
+StyleFormatPanel.prototype.addStroke=function(a){function b(H){var ea=f.fromUnit(parseFloat(K.value));ea=Math.min(999,Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));K.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}function e(H){var ea=f.fromUnit(parseFloat(L.value));ea=Math.min(999,
Math.max(0,isNaN(ea)?1:ea));ea!=mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)&&(d.setCellStyles(mxConstants.STYLE_STROKEWIDTH,ea,g.cells),h.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[ea],"cells",g.cells)));L.value=f.inUnit(ea)+" "+f.getUnit();mxEvent.consume(H)}var f=this,h=this.editorUi,d=h.editor.graph,g=h.getSelectionState();a.style.paddingTop="6px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var m=document.createElement("div");
-m.style.fontWeight="bold";g.stroke||(m.style.display="none");var p=document.createElement("select");p.style.position="absolute";p.style.height="22px";p.style.marginTop="-3px";p.style.textAlign="center";p.style.boxSizing="border-box";p.style.left="90px";p.style.width="83px";p.style.borderWidth="1px";p.style.borderStyle="solid";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var x=document.createElement("option");x.setAttribute("value",k[u]);mxUtils.write(x,mxResources.get(k[u]));p.appendChild(x)}mxEvent.addListener(p,
-"change",function(H){d.getModel().beginUpdate();try{var ea=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],oa=["0","0"];"rounded"==p.value?oa=["1","0"]:"curved"==p.value&&(oa=["0","1"]);for(var sa=0;sa<ea.length;sa++)d.setCellStyles(ea[sa],oa[sa],g.cells);h.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",oa,"cells",g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(H)});mxEvent.addListener(p,"click",function(H){mxEvent.consume(H)});var z="image"==g.style.shape?mxConstants.STYLE_IMAGE_BORDER:
+m.style.fontWeight="bold";g.stroke||(m.style.display="none");var p=document.createElement("select");p.style.position="absolute";p.style.height="22px";p.style.marginTop="-3px";p.style.textAlign="center";p.style.boxSizing="border-box";p.style.left="90px";p.style.width="83px";p.style.borderWidth="1px";p.style.borderStyle="solid";for(var k=["sharp","rounded","curved"],u=0;u<k.length;u++){var w=document.createElement("option");w.setAttribute("value",k[u]);mxUtils.write(w,mxResources.get(k[u]));p.appendChild(w)}mxEvent.addListener(p,
+"change",function(H){d.getModel().beginUpdate();try{var ea=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],ra=["0","0"];"rounded"==p.value?ra=["1","0"]:"curved"==p.value&&(ra=["0","1"]);for(var qa=0;qa<ea.length;qa++)d.setCellStyles(ea[qa],ra[qa],g.cells);h.fireEvent(new mxEventObject("styleChanged","keys",ea,"values",ra,"cells",g.cells))}finally{d.getModel().endUpdate()}mxEvent.consume(H)});mxEvent.addListener(p,"click",function(H){mxEvent.consume(H)});var z="image"==g.style.shape?mxConstants.STYLE_IMAGE_BORDER:
mxConstants.STYLE_STROKECOLOR;k="image"==g.style.shape?mxResources.get("border"):mxResources.get("line");k=this.createCellColorOption(k,z,"default",null,mxUtils.bind(this,function(H){d.setCellStyles(z,H,g.cells);if(null==H||H==mxConstants.NONE){H=[];for(var ea=0;ea<g.cells.length;ea++)(d.isTableCell(g.cells[ea])||d.isTableRow(g.cells[ea]))&&H.push(g.cells[ea]);0<H.length&&d.setCellStyles(z,"inherit",H)}}),d.shapeForegroundColor);k.appendChild(p);m.appendChild(k);var C=m.cloneNode(!1);C.style.display=
-"inline-flex";C.style.alignItems="top";C.style.fontWeight="normal";C.style.whiteSpace="nowrap";C.style.position="relative";C.style.paddingLeft="5px";C.style.overflow="hidden";C.style.marginTop="2px";C.style.width="220px";var E=mxUtils.bind(this,function(H,ea,oa,sa,Pa){H=this.editorUi.menus.styleChange(H,"",sa,Pa,"geIcon",null);sa=document.createElement("div");sa.style.width=ea+"px";sa.style.height="1px";sa.style.paddingTop="6px";Pa=oa.split(" ");2==Pa.length?(oa=parseInt(Pa[0])+parseInt(Pa[1]),Pa=
-parseInt(Pa[0])/oa*100,sa.style.borderBottom="1px pat transparent",sa.style.backgroundImage="linear-gradient(to right, currentcolor "+Pa+"%, transparent 0%)",sa.style.backgroundPosition="bottom left",sa.style.backgroundSize=oa+"px 1px",sa.style.backgroundRepeat="repeat-x"):sa.style.borderBottom="1px "+oa+" currentcolor";H.firstChild.firstChild.style.padding="0px 4px 0px 4px";H.firstChild.firstChild.style.width=ea+"px";H.firstChild.firstChild.appendChild(sa);return H});u=this.editorUi.toolbar.addMenuFunctionInContainer(C,
+"inline-flex";C.style.alignItems="top";C.style.fontWeight="normal";C.style.whiteSpace="nowrap";C.style.position="relative";C.style.paddingLeft="5px";C.style.overflow="hidden";C.style.marginTop="2px";C.style.width="220px";var E=mxUtils.bind(this,function(H,ea,ra,qa,Pa){H=this.editorUi.menus.styleChange(H,"",qa,Pa,"geIcon",null);qa=document.createElement("div");qa.style.width=ea+"px";qa.style.height="1px";qa.style.paddingTop="6px";Pa=ra.split(" ");2==Pa.length?(ra=parseInt(Pa[0])+parseInt(Pa[1]),Pa=
+parseInt(Pa[0])/ra*100,qa.style.borderBottom="1px pat transparent",qa.style.backgroundImage="linear-gradient(to right, currentcolor "+Pa+"%, transparent 0%)",qa.style.backgroundPosition="bottom left",qa.style.backgroundSize=ra+"px 1px",qa.style.backgroundRepeat="repeat-x"):qa.style.borderBottom="1px "+ra+" currentcolor";H.firstChild.firstChild.style.padding="0px 4px 0px 4px";H.firstChild.firstChild.style.width=ea+"px";H.firstChild.firstChild.appendChild(qa);return H});u=this.editorUi.toolbar.addMenuFunctionInContainer(C,
null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,75,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,75,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(H,75,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(H,75,"12 12",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(H,75,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+" (1)");E(H,75,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,75,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+
" (3)")}));var D=C.cloneNode(!1),G=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("connection"),!1,mxUtils.bind(this,function(H){Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"",null,null,null,!0,Format.connectionImage.src)).setAttribute("title",mxResources.get("line"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,
mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"",null,null,null,!0,Format.linkEdgeImage.src)).setAttribute("title",mxResources.get("link"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"",null,null,null,!0,Format.arrowImage.src)).setAttribute("title",mxResources.get("arrow"));Format.processMenuIcon(this.editorUi.menus.styleChange(H,
-"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))}));x=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,33,"dashed",[mxConstants.STYLE_DASHED,
+"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"",null,null,null,!0,Format.simpleArrowImage.src)).setAttribute("title",mxResources.get("simpleArrow"))}));w=this.editorUi.toolbar.addMenuFunctionInContainer(D,null,mxResources.get("pattern"),!1,mxUtils.bind(this,function(H){E(H,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));E(H,33,"dashed",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed")+" (1)");E(H,33,"8 8",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","8 8"]).setAttribute("title",mxResources.get("dashed")+" (2)");E(H,33,"12 12",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","12 12"]).setAttribute("title",mxResources.get("dashed")+" (3)");E(H,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",mxResources.get("dotted")+
-" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var I=document.createElement("input");I.style.position="absolute";I.style.textAlign="right";I.style.marginTop="2px";I.style.width="52px";I.style.height="22px";I.style.left="146px";I.style.borderWidth=
-"1px";I.style.borderStyle="solid";I.style.boxSizing="border-box";I.setAttribute("title",mxResources.get("linewidth"));C.appendChild(I);var L=I.cloneNode(!0);D.appendChild(L);var T=this.createStepper(I,b,this.getUnitStep(),9,null,null,this.isFloatUnit());T.style.display=I.style.display;T.style.top="2px";T.style.left="198px";C.appendChild(T);T=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());T.style.display=L.style.display;L.style.position="absolute";T.style.top="2px";T.style.left=
-"198px";D.appendChild(T);mxEvent.addListener(I,"blur",b);mxEvent.addListener(I,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var K=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",
+" (1)");E(H,33,"1 2",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");E(H,33,"1 4",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")}));k=C.cloneNode(!1);var K=document.createElement("input");K.style.position="absolute";K.style.textAlign="right";K.style.marginTop="2px";K.style.width="52px";K.style.height="22px";K.style.left="146px";K.style.borderWidth=
+"1px";K.style.borderStyle="solid";K.style.boxSizing="border-box";K.setAttribute("title",mxResources.get("linewidth"));C.appendChild(K);var L=K.cloneNode(!0);D.appendChild(L);var Q=this.createStepper(K,b,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=K.style.display;Q.style.top="2px";Q.style.left="198px";C.appendChild(Q);Q=this.createStepper(L,e,this.getUnitStep(),9,null,null,this.isFloatUnit());Q.style.display=L.style.display;L.style.position="absolute";Q.style.top="2px";Q.style.left=
+"198px";D.appendChild(Q);mxEvent.addListener(K,"blur",b);mxEvent.addListener(K,"change",b);mxEvent.addListener(L,"blur",e);mxEvent.addListener(L,"change",e);var N=this.editorUi.toolbar.addMenuFunctionInContainer(k,null,mxResources.get("waypoints"),!1,mxUtils.bind(this,function(H){"arrow"!=g.style.shape&&(Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],null,null,!0,Format.straightImage.src)).setAttribute("title",
mxResources.get("straight")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],null,null,!0,Format.orthogonalImage.src)).setAttribute("title",mxResources.get("orthogonal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],
null,null,!0,Format.horizontalElbowImage.src)).setAttribute("title",mxResources.get("vertical")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],null,null,!0,Format.verticalElbowImage.src)).setAttribute("title",mxResources.get("horizontal")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,
mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",null,null,null],null,null,!0,Format.horizontalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],null,null,!0,Format.verticalIsometricImage.src)).setAttribute("title",mxResources.get("isometric")),
@@ -3236,31 +3237,31 @@ Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STY
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],null,null,!1,Format.EROneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],null,null,!1,Format.ERmandOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],null,null,!1,Format.ERmanyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERoneToMany",0],null,null,!1,Format.ERoneToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",0],null,null,!1,Format.ERzeroToOneMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",0],null,null,!1,Format.ERzeroToManyMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,
"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",0],null,null,!1,Format.doubleBlockMarkerImage.src),"scaleX(-1)"),Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW,"endFill"],["doubleBlock",1],null,null,!1,Format.doubleBlockFilledMarkerImage.src),"scaleX(-1)")):Format.processMenuIcon(this.editorUi.menus.edgeStyleChange(H,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],null,null,!1,Format.blockMarkerImage.src),"scaleX(-1)").setAttribute("title",
-mxResources.get("block")),H.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=H.div&&mxUtils.fit(H.div)}),0)}));this.addArrow(G);this.addArrow(K).style.marginTop="-1px";this.addArrow(U);this.addArrow(Y);T=this.addArrow(u);T.className="geIcon";u.style.width="134px";u=this.addArrow(x);u.className="geIcon";u.style.width="22px";var Q=document.createElement("div");Q.style.width="102px";Q.style.height="10px";Q.style.borderBottom="1px solid currentcolor";Q.style.marginLeft="10px";
-T.appendChild(Q);var P=document.createElement("div");P.style.width="30px";P.style.height="10px";P.style.borderBottom="1px solid currentcolor";P.style.marginLeft="10px";u.appendChild(P);a.appendChild(m);a.appendChild(D);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.padding="5px 4px 6px 0px";u.style.fontWeight="normal";x=document.createElement("div");x.style.position="absolute";x.style.maxWidth="78px";x.style.overflow="hidden";x.style.textOverflow="ellipsis";x.style.marginLeft=
-"0px";x.style.marginBottom="12px";x.style.marginTop="2px";x.style.fontWeight="normal";mxUtils.write(x,mxResources.get("lineend"));u.appendChild(x);var M=this.addUnitInput(u,this.getUnit(),98,52,function(){W.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ca.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);T=document.createElement("div");T.style.height="8px";u.appendChild(T);x=x.cloneNode(!1);
-mxUtils.write(x,mxResources.get("linestart"));u.appendChild(x);var aa=this.addUnitInput(u,this.getUnit(),98,52,function(){Z.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);
-m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";x=document.createElement("div");x.style.position="absolute";x.style.marginLeft="3px";x.style.marginBottom="12px";x.style.marginTop="1px";x.style.fontWeight="normal";x.style.width="120px";mxUtils.write(x,mxResources.get("perimeter"));m.appendChild(x);var na=this.addUnitInput(m,this.getUnit(),30,52,function(){ja.apply(this,
-arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var qa=mxUtils.bind(this,function(H,ea,oa){function sa(Pa,la,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,la);return Ba}g=h.getSelectionState();if(oa||document.activeElement!=I)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),I.value=isNaN(H)?"":
-this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");Q.style.borderBottom="1px solid currentcolor";
-"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length&&(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,Q.style.borderBottom="1px solid transparent",Q.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",Q.style.backgroundPosition="bottom left",Q.style.backgroundSize=H+"px 1px",Q.style.backgroundRepeat="repeat-x"));P.style.backgroundImage=Q.style.backgroundImage;
-P.style.backgroundPosition=Q.style.backgroundPosition;P.style.backgroundSize=Q.style.backgroundSize;P.style.backgroundRepeat=Q.style.backgroundRepeat;P.style.borderBottom=Q.style.borderBottom;H=K.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(ea=null),"orthogonalEdgeStyle"==
-ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":H.style.backgroundImage="url("+Format.horizontalElbowImage.src+
-")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",H.style.backgroundImage="link"==
-g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");sa(mxUtils.getValue(g.style,mxConstants.STYLE_STARTARROW,null),
-mxUtils.getValue(g.style,"startFill","1"),U,"start");sa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(K,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(oa||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_STARTSIZE,
-mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),aa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=aa)H=parseInt(mxUtils.getValue(g.style,
-mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),M.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(oa||document.activeElement!=na)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),na.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var Z=this.installInputHandler(aa,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999,
-this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var W=this.installInputHandler(M,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ja=this.installInputHandler(na,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(I,qa);this.addKeyHandler(ia,qa);this.addKeyHandler(aa,
-qa);this.addKeyHandler(V,qa);this.addKeyHandler(M,qa);this.addKeyHandler(na,qa);d.getModel().addListener(mxEvent.CHANGE,qa);this.listeners.push({destroy:function(){d.getModel().removeListener(qa)}});qa();return a};
+mxResources.get("block")),H.div.style.width="40px",window.setTimeout(mxUtils.bind(this,function(){null!=H.div&&mxUtils.fit(H.div)}),0)}));this.addArrow(G);this.addArrow(N).style.marginTop="-1px";this.addArrow(U);this.addArrow(Y);Q=this.addArrow(u);Q.className="geIcon";u.style.width="134px";u=this.addArrow(w);u.className="geIcon";u.style.width="22px";var P=document.createElement("div");P.style.width="102px";P.style.height="10px";P.style.borderBottom="1px solid currentcolor";P.style.marginLeft="10px";
+Q.appendChild(P);var T=document.createElement("div");T.style.width="30px";T.style.height="10px";T.style.borderBottom="1px solid currentcolor";T.style.marginLeft="10px";u.appendChild(T);a.appendChild(m);a.appendChild(D);a.appendChild(C);u=C.cloneNode(!1);u.style.display="block";u.style.padding="5px 4px 6px 0px";u.style.fontWeight="normal";w=document.createElement("div");w.style.position="absolute";w.style.maxWidth="78px";w.style.overflow="hidden";w.style.textOverflow="ellipsis";w.style.marginLeft=
+"0px";w.style.marginBottom="12px";w.style.marginTop="2px";w.style.fontWeight="normal";mxUtils.write(w,mxResources.get("lineend"));u.appendChild(w);var J=this.addUnitInput(u,this.getUnit(),98,52,function(){da.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),V=this.addUnitInput(u,this.getUnit(),30,52,function(){ba.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);Q=document.createElement("div");Q.style.height="8px";u.appendChild(Q);w=w.cloneNode(!1);
+mxUtils.write(w,mxResources.get("linestart"));u.appendChild(w);var Z=this.addUnitInput(u,this.getUnit(),98,52,function(){X.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit()),ia=this.addUnitInput(u,this.getUnit(),30,52,function(){O.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());mxUtils.br(u);this.addLabel(u,mxResources.get("spacing"),98,64).style.fontSize="11px";this.addLabel(u,mxResources.get("size"),30,64).style.fontSize="11px";mxUtils.br(u);m=m.cloneNode(!1);
+m.style.fontWeight="normal";m.style.position="relative";m.style.paddingLeft="16px";m.style.marginBottom="2px";m.style.marginTop="6px";m.style.borderWidth="0px";m.style.paddingBottom="18px";w=document.createElement("div");w.style.position="absolute";w.style.marginLeft="3px";w.style.marginBottom="12px";w.style.marginTop="1px";w.style.fontWeight="normal";w.style.width="120px";mxUtils.write(w,mxResources.get("perimeter"));m.appendChild(w);var oa=this.addUnitInput(m,this.getUnit(),30,52,function(){ca.apply(this,
+arguments)},this.getUnitStep(),null,null,this.isFloatUnit());g.edges.length==g.cells.length?(a.appendChild(k),a.appendChild(u)):g.vertices.length==g.cells.length&&a.appendChild(m);var sa=mxUtils.bind(this,function(H,ea,ra){function qa(Pa,ma,Ba,Ca){Ba=Ba.getElementsByTagName("div")[0];null!=Ba&&h.updateCssForMarker(Ba,Ca,g.style.shape,Pa,ma);return Ba}g=h.getSelectionState();if(ra||document.activeElement!=K)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),K.value=isNaN(H)?"":
+this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=L)H=parseFloat(mxUtils.getValue(g.style,mxConstants.STYLE_STROKEWIDTH,1)),L.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();p.style.visibility="connector"==g.style.shape||"filledEdge"==g.style.shape||"wire"==g.style.shape?"":"hidden";"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?p.value="curved":"1"==mxUtils.getValue(g.style,mxConstants.STYLE_ROUNDED,null)&&(p.value="rounded");P.style.borderBottom="1px solid currentcolor";
+"1"==mxUtils.getValue(g.style,mxConstants.STYLE_DASHED,null)&&(H=mxUtils.getValue(g.style,mxConstants.STYLE_DASH_PATTERN,""),ea=String(H).split(" "),2<=ea.length?(H=parseInt(ea[0])+parseInt(ea[1]),ea=parseInt(ea[0])/H*100,P.style.borderBottom="1px solid transparent",P.style.backgroundImage="linear-gradient(to right, currentcolor "+ea+"%, transparent 0%)",P.style.backgroundPosition="bottom left",P.style.backgroundSize=H+"px 1px",P.style.backgroundRepeat="repeat-x"):P.style.borderBottom="1px dashed currentcolor");
+T.style.backgroundImage=P.style.backgroundImage;T.style.backgroundPosition=P.style.backgroundPosition;T.style.backgroundSize=P.style.backgroundSize;T.style.backgroundRepeat=P.style.backgroundRepeat;T.style.borderBottom=P.style.borderBottom;H=N.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",H.style.height="",ea=mxUtils.getValue(g.style,mxConstants.STYLE_EDGE,null),"1"==mxUtils.getValue(g.style,mxConstants.STYLE_NOEDGESTYLE,
+null)&&(ea=null),"orthogonalEdgeStyle"==ea&&"1"==mxUtils.getValue(g.style,mxConstants.STYLE_CURVED,null)?H.style.backgroundImage="url("+Format.curvedImage.src+")":"straight"==ea||"none"==ea||null==ea?H.style.backgroundImage="url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==ea?H.style.backgroundImage="url("+Format.entityImage.src+")":"elbowEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalElbowImage.src+")":
+H.style.backgroundImage="url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==ea?"vertical"==mxUtils.getValue(g.style,mxConstants.STYLE_ELBOW,null)?H.style.backgroundImage="url("+Format.verticalIsometricImage.src+")":H.style.backgroundImage="url("+Format.horizontalIsometricImage.src+")":H.style.backgroundImage="url("+Format.orthogonalImage.src+")");H=G.getElementsByTagName("div")[0];null!=H&&(H.style.backgroundPosition="center center",H.style.backgroundRepeat="no-repeat",H.className="geAdaptiveAsset",
+H.style.height="",H.style.backgroundImage="link"==g.style.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==g.style.shape?"url("+Format.arrowImage.src+")":"arrow"==g.style.shape?"url("+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")");g.edges.length==g.cells.length?(D.style.display="",C.style.display="none"):(D.style.display="none",C.style.display="");Graph.lineJumpsEnabled&&0<g.edges.length&&0==g.vertices.length&&g.lineJumps&&(a.style.borderBottomStyle="none");qa(mxUtils.getValue(g.style,
+mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(g.style,"startFill","1"),U,"start");qa(mxUtils.getValue(g.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(g.style,"endFill","1"),Y,"end");mxUtils.setOpacity(N,"arrow"==g.style.shape?30:100);"connector"!=g.style.shape&&"flexArrow"!=g.style.shape&&"filledEdge"!=g.style.shape&&"wire"!=g.style.shape?(mxUtils.setOpacity(U,30),mxUtils.setOpacity(Y,30)):(mxUtils.setOpacity(U,100),mxUtils.setOpacity(Y,100));if(ra||document.activeElement!=ia)H=parseInt(mxUtils.getValue(g.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),ia.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Z.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=V)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),V.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=Z)H=
+parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),J.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit();if(ra||document.activeElement!=oa)H=parseInt(mxUtils.getValue(g.style,mxConstants.STYLE_PERIMETER_SPACING,0)),oa.value=isNaN(H)?"":this.inUnit(H)+" "+this.getUnit()});var O=this.installInputHandler(ia,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var X=this.installInputHandler(Z,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ba=this.installInputHandler(V,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var da=this.installInputHandler(J,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0,-999,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var ca=this.installInputHandler(oa,mxConstants.STYLE_PERIMETER_SPACING,0,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);this.addKeyHandler(K,sa);this.addKeyHandler(ia,
+sa);this.addKeyHandler(Z,sa);this.addKeyHandler(V,sa);this.addKeyHandler(J,sa);this.addKeyHandler(oa,sa);d.getModel().addListener(mxEvent.CHANGE,sa);this.listeners.push({destroy:function(){d.getModel().removeListener(sa)}});sa();return a};
StyleFormatPanel.prototype.addLineJumps=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();if(Graph.lineJumpsEnabled&&0<f.edges.length&&0==f.vertices.length&&f.lineJumps){a.style.padding="2px 0px 24px 14px";var h=document.createElement("div");h.style.position="absolute";h.style.maxWidth="78px";h.style.overflow="hidden";h.style.textOverflow="ellipsis";mxUtils.write(h,mxResources.get("lineJumps"));a.appendChild(h);var d=document.createElement("select");d.style.position="absolute";
-d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(x){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,
-f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(x)});mxEvent.addListener(d,"click",function(x){mxEvent.consume(x)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=
-mxUtils.bind(this,function(x,z,C){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(C||document.activeElement!=p)x=parseInt(mxUtils.getValue(f.style,"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(x)?"":this.inUnit(x)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
+d.style.height="21px";d.style.marginTop="-2px";d.style.boxSizing="border-box";d.style.textAlign="center";d.style.right="84px";d.style.width="64px";d.style.borderWidth="1px";d.style.borderStyle="solid";h=["none","arc","gap","sharp","line"];for(var g=0;g<h.length;g++){var m=document.createElement("option");m.setAttribute("value",h[g]);mxUtils.write(m,mxResources.get(h[g]));d.appendChild(m)}mxEvent.addListener(d,"change",function(w){e.getModel().beginUpdate();try{e.setCellStyles("jumpStyle",d.value,
+f.cells),b.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[d.value],"cells",f.cells))}finally{e.getModel().endUpdate()}mxEvent.consume(w)});mxEvent.addListener(d,"click",function(w){mxEvent.consume(w)});a.appendChild(d);var p=this.addUnitInput(a,this.getUnit(),16,52,function(){k.apply(this,arguments)},this.getUnitStep(),null,null,this.isFloatUnit());var k=this.installInputHandler(p,"jumpSize",Graph.defaultJumpSize,0,999,this.getUnit(" "),null,this.isFloatUnit(),!0);var u=
+mxUtils.bind(this,function(w,z,C){f=b.getSelectionState();d.value=mxUtils.getValue(f.style,"jumpStyle","none");if(C||document.activeElement!=p)w=parseInt(mxUtils.getValue(f.style,"jumpSize",Graph.defaultJumpSize)),p.value=isNaN(w)?"":this.inUnit(w)+" "+this.getUnit()});this.addKeyHandler(p,u);e.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){e.getModel().removeListener(u)}});u()}else a.style.display="none";return a};
StyleFormatPanel.prototype.addEffects=function(a){var b=this.editorUi,e=b.editor.graph,f=b.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";var h=document.createElement("table");h.style.width="210px";h.style.fontWeight="bold";h.style.tableLayout="fixed";var d=document.createElement("tbody"),g=document.createElement("tr");g.style.padding="0px";var m=document.createElement("td");m.style.padding="0px";m.style.width="50%";m.setAttribute("valign","top");var p=m.cloneNode(!0);p.style.paddingLeft=
-"8px";g.appendChild(m);g.appendChild(p);d.appendChild(g);h.appendChild(d);a.appendChild(h);var k=m,u=mxUtils.bind(this,function(z,C,E,D){z=this.createCellOption(z,C,E,null,null,D);z.style.width="100%";k.appendChild(z);k=k==m?p:m;return z}),x=mxUtils.bind(this,function(z,C,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,
+"8px";g.appendChild(m);g.appendChild(p);d.appendChild(g);h.appendChild(d);a.appendChild(h);var k=m,u=mxUtils.bind(this,function(z,C,E,D){z=this.createCellOption(z,C,E,null,null,D);z.style.width="100%";k.appendChild(z);k=k==m?p:m;return z}),w=mxUtils.bind(this,function(z,C,E){f=b.getSelectionState();m.innerText="";p.innerText="";k=m;f.rounded&&u(mxResources.get("rounded"),mxConstants.STYLE_ROUNDED,0);f.swimlane&&u(mxResources.get("divider"),"swimlaneLine",1);u(mxResources.get("sketch"),"sketch",0,
function(D,G){e.updateCellStyles({sketch:G?"1":null,curveFitting:G?Editor.sketchDefaultCurveFitting:null,jiggle:G?Editor.sketchDefaultJiggle:null},D)});f.glass&&u(mxResources.get("glass"),mxConstants.STYLE_GLASS,0);z=u(mxResources.get("shadow"),mxConstants.STYLE_SHADOW,0);Editor.enableShadowOption||(z.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(z,60));0<f.edges.length&&0==f.vertices.length&&u(mxResources.get("flowAnimation",null,"Flow Animation"),"flowAnimation",
-0)});e.getModel().addListener(mxEvent.CHANGE,x);this.listeners.push({destroy:function(){e.getModel().removeListener(x)}});x();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
+0)});e.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){e.getModel().removeListener(w)}});w();return a};StyleFormatPanel.prototype.addStyleOps=function(a){1==this.editorUi.getSelectionState().cells.length&&this.addActions(a,["setAsDefaultStyle"]);return a};DiagramStylePanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramStylePanel,BaseFormatPanel);DiagramStylePanel.prototype.init=function(){this.container.appendChild(this.addView(this.createPanel()))};
DiagramStylePanel.prototype.getGlobalStyleButtons=function(){var a=this.editorUi,b=a.editor.graph,e=document.createElement("div");e.style.alignItems="center";e.style.textAlign="left";e.style.display="flex";var f=document.createElement("input");f.setAttribute("type","checkbox");f.style.margin="1px 6px 0px 0px";f.checked=Editor.sketchMode;e.appendChild(f);mxUtils.write(e,mxResources.get("sketch"));mxEvent.addListener(e,"click",function(d){if(b.isEnabled()){var g=!Editor.sketchMode;Editor.sketchMode=
g;b.updateCellStyles({sketch:g?"1":null,curveFitting:g?Editor.sketchDefaultCurveFitting:null,jiggle:g?Editor.sketchDefaultJiggle:null},b.getVerticesAndEdges());mxEvent.consume(d);window.setTimeout(function(){Editor.sketchMode=!g;a.setSketchMode(g)})}});e=[e,mxUtils.button(mxResources.get("rounded"),mxUtils.bind(this,function(d){var g=b.getVerticesAndEdges(),m=!0;if(0<g.length)for(var p=0;p<g.length;p++){var k=b.getCellStyle(g[p]);if(0==mxUtils.getValue(k,mxConstants.STYLE_ROUNDED,0)){m=!1;break}}m=
!m;b.updateCellStyles({rounded:m?"1":"0"},g);m?(b.currentEdgeStyle.rounded="1",b.currentVertexStyle.rounded="1"):(delete b.currentEdgeStyle.rounded,delete b.currentVertexStyle.rounded);mxEvent.consume(d)}))];if(!b.isEnabled())for(f=0;f<e.length;f++)if("BUTTON"==e[f].nodeName)e[f].setAttribute("disabled","disabled");else{var h=e[f].getElementsByTagName("input");0<h.length&&h[0].setAttribute("disabled","disabled")}return e};
@@ -3268,24 +3269,24 @@ DiagramStylePanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.g
"inline-block";g.style.whiteSpace="nowrap";g.style.textOverflow="ellipsis";g.style.overflow="hidden";g.style.maxWidth="92px";g.style.width="92px";g.style.userSelect="none";mxUtils.write(g,d);h.appendChild(g);mxClient.IS_FF&&(g.style.marginTop="1px");var m=document.createElement("select");m.style.textOverflow="ellipsis";m.style.height="22px";m.style.position="absolute";m.style.maxWidth="70px";m.style.width="70px";m.style.left="127px";d=document.createElement("option");d.setAttribute("title",mxResources.get("default")+
" ("+mxResources.get(Graph.getDefaultAdaptiveColorsKey())+")");mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","default");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("automatic"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","auto");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("simple"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));
d.setAttribute("value","simple");m.appendChild(d);d=document.createElement("option");d.setAttribute("title",mxResources.get("none"));mxUtils.write(d,mxUtils.htmlEntities(d.getAttribute("title")));d.setAttribute("value","none");m.appendChild(d);m.value=null==e.adaptiveColors?"default":e.adaptiveColors;mxEvent.addListener(m,"change",function(){var C=new ChangePageSetup(b);C.ignoreColor=!0;C.ignoreImage=!0;C.adaptiveColors=m.value;e.model.execute(C)});h.appendChild(m);if(!b.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)d=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),d.style.position="absolute",d.style.left="196px",h.appendChild(d);a.appendChild(h)}h=document.createElement("table");h.style.width="204px";d=document.createElement("tbody");g=document.createElement("tr");g.style.padding="0px";var p=document.createElement("td");p.style.textAlign="center";p.style.padding="2px";p.style.width="50%";for(var k=p.cloneNode(!0),u=this.getGlobalStyleButtons(),x=0;x<u.length;x+=
-2){var z=u[x];z.style.height="22px";z.style.width="88px";p.appendChild(z);g.appendChild(p);z=u[x+1];null!=z&&(z.style.height="22px",z.style.width="88px",k.appendChild(z));g.appendChild(k);d.appendChild(g);p=p.cloneNode(!1);k=k.cloneNode(!1);g=g.cloneNode(!1)}h.appendChild(d);f.appendChild(h);a.appendChild(f);e.isEnabled()&&this.addGraphStyles(a);return a};
-DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,Q){var P=e.getVerticesAndEdges();f.beginUpdate();try{for(var M=0;M<P.length;M++){var V=e.getCellStyle(P[M]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},
-[P[M]]):e.updateCellStyles({labelBackgroundColor:null!=Q?Q.background:null},[P[M]]);for(var aa=f.isEdge(P[M]),ia=f.getStyle(P[M]),na=aa?e.currentEdgeStyle:e.currentVertexStyle,qa=0;qa<Y.length;qa++)if(null!=V[Y[qa]]&&V[Y[qa]]!=mxConstants.NONE||Y[qa]!=mxConstants.STYLE_FILLCOLOR&&Y[qa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&aa&&Y[qa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[qa],"default"):mxUtils.setStyle(ia,Y[qa],na[Y[qa]]);f.setStyle(P[M],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,
-function(Y,Q,P){if(null!=Y)for(var M=0;M<Q.length;M++)if(null!=Y[Q[M]]&&Y[Q[M]]!=mxConstants.NONE||Q[M]!=mxConstants.STYLE_FILLCOLOR&&Q[M]!=mxConstants.STYLE_STROKECOLOR)Y[Q[M]]=P[Q[M]]}),p=!0,k=mxUtils.bind(this,function(Y,Q,P,M,V){if(null!=Y){null!=P&&(p||null==Q.labelBackgroundColor?p&&(Q.labelBackgroundColor=mxConstants.NONE):(M=null!=M?M.background:null,V=null!=V?V:e,null==M&&(M=V.background),null==M&&(M=V.defaultPageBackgroundColor),Q.labelBackgroundColor=M));for(var aa in Y)if(null==P||null!=
-Q[aa]&&Q[aa]!=mxConstants.NONE||aa!=mxConstants.STYLE_FILLCOLOR&&aa!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(P)&&aa==mxConstants.STYLE_FONTCOLOR?Q[aa]="default":Q[aa]=Y[aa]}}),u=mxUtils.bind(this,function(Y,Q,P,M,V){var aa=document.createElement("div");aa.style.position="absolute";aa.style.display="inline-block";aa.style.overflow="hidden";aa.style.pointerEvents="none";aa.style.width="100%";aa.style.height="100%";V.appendChild(aa);var ia=new Graph(aa,null,null,e.getStylesheet());ia.shapeBackgroundColor=
-"light-dark(#f1f3f4, "+Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,Z){Z=null!=Z?Z:!0;var ca=mxUtils.clone(e.getCellStyle.apply(this,arguments)),W=e.stylesheet.getDefaultVertexStyle(),ja=Q;f.isEdge(O)&&(W=e.stylesheet.getDefaultEdgeStyle(),ja=P);m(ca,d,W);k(Y,ca,O,M,ia);k(ja,ca,O,M,ia);Z&&(ca=e.postProcessCellStyle(O,ca));return ca};ia.model.beginUpdate();
-try{var na=ia.insertVertex(ia.getDefaultParent(),null,"Shape",14,8,70,36,"strokeWidth=2;"),qa=ia.insertEdge(ia.getDefaultParent(),null,"Connector",na,na,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");qa.geometry.points=[new mxPoint(32,66)];qa.geometry.offset=new mxPoint(0,8)}finally{ia.model.endUpdate()}V=ia.view.getDrawPane().ownerSVGElement;null!=V&&(aa=V.cloneNode(!0),aa.style.position="absolute",aa.style.clipPath="rect(0 52% 100% 0)",V.style.clipPath=
-"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(aa))}),x=document.createElement("div");x.style.position="relative";x.style.width="210px";a.appendChild(x);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,Q,P,M,V){var aa=this.format.cachedStyleEntries[V];null==aa&&(aa=document.createElement("div"),aa.className="geItem",aa.style.position="relative",aa.style.width="96px",aa.style.height="86px",aa.style.cursor="pointer",
-aa.style.border="1px solid gray",aa.style.borderRadius="8px",aa.style.margin="1px 2px",aa.style.overflow="hidden",p||null==M||null==M.background||(aa.style.backgroundColor=M.background),u(Y,Q,P,M,aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(Q,e.currentVertexStyle);k(P,e.currentEdgeStyle);f.beginUpdate();try{var na=d.slice(),
-qa;for(qa in Y)na.push(qa);g(na,M);if(!p){var O=new ChangePageSetup(b,null!=M?M.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=M&&null!=M.gridColor?M.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(aa,mxUtils.bind(this,function(ia){aa.style.opacity=.5}),null,mxUtils.bind(this,function(ia){aa.style.opacity=1})),mxEvent.addListener(aa,"mouseenter",mxUtils.bind(this,function(ia){var na=e.getCellStyle;ia=e.background;var qa=e.view.gridColor;p||
-(e.background=null!=M?M.background:null,e.view.gridColor=null!=M&&null!=M.gridColor?M.gridColor:h);e.getCellStyle=function(O,Z){Z=null!=Z?Z:!0;var ca=mxUtils.clone(na.apply(this,arguments)),W=e.stylesheet.getDefaultVertexStyle(),ja=Q;f.isEdge(O)&&(W=e.stylesheet.getDefaultEdgeStyle(),ja=P);m(ca,d,W);k(Y,ca,O,M);k(ja,ca,O,M);Z&&(ca=this.postProcessCellStyle(O,ca));return ca};e.refresh();e.getCellStyle=na;e.background=ia;e.view.gridColor=qa;aa.style.border="2px solid blue";aa.style.margin="0px 1px"})),
-mxEvent.addListener(aa,"mouseleave",mxUtils.bind(this,function(ia){aa.style.border="1px solid gray";aa.style.margin="1px 2px";e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[V]=aa));x.appendChild(aa)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");for(var Y=10*this.format.currentStylePage;Y<
-Math.min(10*(this.format.currentStylePage+1),Editor.styles.length);Y++){var Q=Editor.styles[Y];z(Q.commonStyle,Q.vertexStyle,Q.edgeStyle,Q.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",x.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.position="relative";I.style.textAlign="center";I.style.paddingTop="4px";I.style.width="210px";for(var L=0;L<C;L++){var T=
-document.createElement("div");T.style.display="inline-block";T.style.width="6px";T.style.height="6px";T.style.marginLeft="4px";T.style.marginRight="3px";T.style.borderRadius="3px";T.style.cursor="pointer";T.style.background="transparent";T.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,Q){mxEvent.addListener(T,"click",mxUtils.bind(this,function(){G(Y)}))})(L,T);I.appendChild(T);E.push(T)}a.appendChild(I);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity=
-"1"});mxEvent.addListener(Y,"mouseleave",function(){Y.style.opacity="0.5"})};var K=document.createElement("div");K.className="geAdaptiveAsset";K.style.position="absolute";K.style.left="0px";K.style.top="0px";K.style.bottom="0px";K.style.width="24px";K.style.height="24px";K.style.margin="0px";K.style.cursor="pointer";K.style.opacity="0.5";K.style.backgroundRepeat="no-repeat";K.style.backgroundPosition="center center";K.style.backgroundSize="24px 24px";K.style.backgroundImage="url("+Editor.previousImage+
-")";var U=K.cloneNode(!1);U.style.backgroundImage="url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";I.appendChild(K);I.appendChild(U);mxEvent.addListener(K,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(K);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};
-mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
+EditorUi.isElectronApp)d=b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/4713"),d.style.position="absolute",d.style.left="196px",h.appendChild(d);a.appendChild(h)}h=document.createElement("table");h.style.width="204px";d=document.createElement("tbody");g=document.createElement("tr");g.style.padding="0px";var p=document.createElement("td");p.style.textAlign="center";p.style.padding="2px";p.style.width="50%";for(var k=p.cloneNode(!0),u=this.getGlobalStyleButtons(),w=0;w<u.length;w+=
+2){var z=u[w];z.style.height="22px";z.style.width="88px";p.appendChild(z);g.appendChild(p);z=u[w+1];null!=z&&(z.style.height="22px",z.style.width="88px",k.appendChild(z));g.appendChild(k);d.appendChild(g);p=p.cloneNode(!1);k=k.cloneNode(!1);g=g.cloneNode(!1)}h.appendChild(d);f.appendChild(h);a.appendChild(f);e.isEnabled()&&this.addGraphStyles(a);return a};
+DiagramStylePanel.prototype.addGraphStyles=function(a){var b=this.editorUi,e=b.editor.graph,f=e.getModel(),h=e.view.gridColor,d=["fillColor","strokeColor","fontColor","gradientColor"];a.style.whiteSpace="normal";a.style.paddingLeft="18px";a.style.paddingTop="6px";var g=mxUtils.bind(this,function(Y,P){var T=e.getVerticesAndEdges();f.beginUpdate();try{for(var J=0;J<T.length;J++){var V=e.getCellStyle(T[J]);p||null==V.labelBackgroundColor?p&&e.updateCellStyles({labelBackgroundColor:mxConstants.NONE},
+[T[J]]):e.updateCellStyles({labelBackgroundColor:null!=P?P.background:null},[T[J]]);for(var Z=f.isEdge(T[J]),ia=f.getStyle(T[J]),oa=Z?e.currentEdgeStyle:e.currentVertexStyle,sa=0;sa<Y.length;sa++)if(null!=V[Y[sa]]&&V[Y[sa]]!=mxConstants.NONE||Y[sa]!=mxConstants.STYLE_FILLCOLOR&&Y[sa]!=mxConstants.STYLE_STROKECOLOR)ia=p&&Z&&Y[sa]==mxConstants.STYLE_FONTCOLOR?mxUtils.setStyle(ia,Y[sa],"default"):mxUtils.setStyle(ia,Y[sa],oa[Y[sa]]);f.setStyle(T[J],ia)}}finally{f.endUpdate()}}),m=mxUtils.bind(this,function(Y,
+P,T){if(null!=Y)for(var J=0;J<P.length;J++)if(null!=Y[P[J]]&&Y[P[J]]!=mxConstants.NONE||P[J]!=mxConstants.STYLE_FILLCOLOR&&P[J]!=mxConstants.STYLE_STROKECOLOR)Y[P[J]]=T[P[J]]}),p=!0,k=mxUtils.bind(this,function(Y,P,T,J,V){if(null!=Y){null!=T&&(p||null==P.labelBackgroundColor?p&&(P.labelBackgroundColor=mxConstants.NONE):(J=null!=J?J.background:null,V=null!=V?V:e,null==J&&(J=V.background),null==J&&(J=V.defaultPageBackgroundColor),P.labelBackgroundColor=J));for(var Z in Y)if(null==T||null!=P[Z]&&P[Z]!=
+mxConstants.NONE||Z!=mxConstants.STYLE_FILLCOLOR&&Z!=mxConstants.STYLE_STROKECOLOR)p&&f.isEdge(T)&&Z==mxConstants.STYLE_FONTCOLOR?P[Z]="default":P[Z]=Y[Z]}}),u=mxUtils.bind(this,function(Y,P,T,J,V){var Z=document.createElement("div");Z.style.position="absolute";Z.style.display="inline-block";Z.style.overflow="hidden";Z.style.pointerEvents="none";Z.style.width="100%";Z.style.height="100%";V.appendChild(Z);var ia=new Graph(Z,null,null,e.getStylesheet());ia.shapeBackgroundColor="light-dark(#f1f3f4, "+
+Editor.darkColor+")";ia.resetViewOnRootChange=!1;ia.foldingEnabled=!1;ia.gridEnabled=!1;ia.autoScroll=!1;ia.setTooltips(!1);ia.setConnectable(!1);ia.setPanning(!1);ia.setEnabled(!1);ia.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(e.getCellStyle.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J,ia);k(ca,ba,O,J,ia);X&&(ba=e.postProcessCellStyle(O,ba));return ba};ia.model.beginUpdate();
+try{var oa=ia.insertVertex(ia.getDefaultParent(),null,"Shape",14,8,70,36,"strokeWidth=2;"),sa=ia.insertEdge(ia.getDefaultParent(),null,"Connector",oa,oa,"edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;endSize=5;strokeWidth=2;");sa.geometry.points=[new mxPoint(32,66)];sa.geometry.offset=new mxPoint(0,8)}finally{ia.model.endUpdate()}V=ia.view.getDrawPane().ownerSVGElement;null!=V&&(Z=V.cloneNode(!0),Z.style.position="absolute",Z.style.clipPath="rect(0 52% 100% 0)",V.style.clipPath=
+"rect(0 100% 100% 51%)",V.style.colorScheme="light",V.parentNode.appendChild(Z))}),w=document.createElement("div");w.style.position="relative";w.style.width="210px";a.appendChild(w);null==this.format.cachedStyleEntries&&(this.format.cachedStyleEntries=[]);var z=mxUtils.bind(this,function(Y,P,T,J,V){var Z=this.format.cachedStyleEntries[V];null==Z&&(Z=document.createElement("div"),Z.className="geItem",Z.style.position="relative",Z.style.width="96px",Z.style.height="86px",Z.style.cursor="pointer",Z.style.border=
+"1px solid gray",Z.style.borderRadius="8px",Z.style.margin="1px 2px",Z.style.overflow="hidden",p||null==J||null==J.background||(Z.style.backgroundColor=J.background),u(Y,P,T,J,Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(ia){e.currentVertexStyle=mxUtils.clone(e.defaultVertexStyle);e.currentEdgeStyle=mxUtils.clone(e.defaultEdgeStyle);k(Y,e.currentVertexStyle);k(Y,e.currentEdgeStyle);k(P,e.currentVertexStyle);k(T,e.currentEdgeStyle);f.beginUpdate();try{var oa=d.slice(),sa;for(sa in Y)oa.push(sa);
+g(oa,J);if(!p){var O=new ChangePageSetup(b,null!=J?J.background:null);O.ignoreImage=!0;f.execute(O);f.execute(new ChangeGridColor(b,null!=J&&null!=J.gridColor?J.gridColor:h))}}finally{f.endUpdate()}})),mxEvent.addGestureListeners(Z,mxUtils.bind(this,function(ia){Z.style.opacity=.5}),null,mxUtils.bind(this,function(ia){Z.style.opacity=1})),mxEvent.addListener(Z,"mouseenter",mxUtils.bind(this,function(ia){var oa=e.getCellStyle;ia=e.background;var sa=e.view.gridColor;p||(e.background=null!=J?J.background:
+null,e.view.gridColor=null!=J&&null!=J.gridColor?J.gridColor:h);e.getCellStyle=function(O,X){X=null!=X?X:!0;var ba=mxUtils.clone(oa.apply(this,arguments)),da=e.stylesheet.getDefaultVertexStyle(),ca=P;f.isEdge(O)&&(da=e.stylesheet.getDefaultEdgeStyle(),ca=T);m(ba,d,da);k(Y,ba,O,J);k(ca,ba,O,J);X&&(ba=this.postProcessCellStyle(O,ba));return ba};e.refresh();e.getCellStyle=oa;e.background=ia;e.view.gridColor=sa;Z.style.border="2px solid blue";Z.style.margin="0px 1px"})),mxEvent.addListener(Z,"mouseleave",
+mxUtils.bind(this,function(ia){Z.style.border="1px solid gray";Z.style.margin="1px 2px";e.refresh()})),mxClient.IS_IE||mxClient.IS_IE11||(this.format.cachedStyleEntries[V]=Z));w.appendChild(Z)}),C=Math.ceil(Editor.styles.length/10);this.format.currentStylePage=null!=this.format.currentStylePage?this.format.currentStylePage:0;var E=[],D=mxUtils.bind(this,function(){0<E.length&&(E[this.format.currentStylePage].style.background="#84d7ff");for(var Y=10*this.format.currentStylePage;Y<Math.min(10*(this.format.currentStylePage+
+1),Editor.styles.length);Y++){var P=Editor.styles[Y];z(P.commonStyle,P.vertexStyle,P.edgeStyle,P.graph,Y)}}),G=mxUtils.bind(this,function(Y){0<=Y&&Y<C&&(E[this.format.currentStylePage].style.background="transparent",w.innerText="",this.format.currentStylePage=Y,D())});if(1<C){var K=document.createElement("div");K.style.whiteSpace="nowrap";K.style.position="relative";K.style.textAlign="center";K.style.paddingTop="4px";K.style.width="210px";for(var L=0;L<C;L++){var Q=document.createElement("div");Q.style.display=
+"inline-block";Q.style.width="6px";Q.style.height="6px";Q.style.marginLeft="4px";Q.style.marginRight="3px";Q.style.borderRadius="3px";Q.style.cursor="pointer";Q.style.background="transparent";Q.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Y,P){mxEvent.addListener(Q,"click",mxUtils.bind(this,function(){G(Y)}))})(L,Q);K.appendChild(Q);E.push(Q)}a.appendChild(K);D();if(15>C){L=function(Y){mxEvent.addListener(Y,"mouseenter",function(){Y.style.opacity="1"});mxEvent.addListener(Y,"mouseleave",
+function(){Y.style.opacity="0.5"})};var N=document.createElement("div");N.className="geAdaptiveAsset";N.style.position="absolute";N.style.left="0px";N.style.top="0px";N.style.bottom="0px";N.style.width="24px";N.style.height="24px";N.style.margin="0px";N.style.cursor="pointer";N.style.opacity="0.5";N.style.backgroundRepeat="no-repeat";N.style.backgroundPosition="center center";N.style.backgroundSize="24px 24px";N.style.backgroundImage="url("+Editor.previousImage+")";var U=N.cloneNode(!1);U.style.backgroundImage=
+"url("+Editor.nextImage+")";U.style.left="";U.style.right="2px";K.appendChild(N);K.appendChild(U);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage-1,C))}));mxEvent.addListener(U,"click",mxUtils.bind(this,function(){G(mxUtils.mod(this.format.currentStylePage+1,C))}));L(N);L(U)}}else D();return a};DiagramFormatPanel=function(a,b,e){BaseFormatPanel.call(this,a,b,e);this.init()};mxUtils.extend(DiagramFormatPanel,BaseFormatPanel);
+DiagramFormatPanel.showPageView=!0;DiagramFormatPanel.prototype.showBackgroundImageOption=!0;DiagramFormatPanel.prototype.init=function(){var a=this.editorUi.editor.graph;this.container.appendChild(this.addView(this.createPanel()));a.isEnabled()&&(this.container.appendChild(this.addOptions(this.createPanel())),this.container.appendChild(this.addPaperSize(this.createPanel())),this.container.appendChild(this.addStyleOps(this.createPanel())))};
DiagramFormatPanel.prototype.addView=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("view")));this.addGridOption(a);DiagramFormatPanel.showPageView&&a.appendChild(this.createOption(mxResources.get("pageView"),function(){return e.pageVisible},function(d){b.actions.get("pageView").funct()},{install:function(d){this.listener=function(){d(e.pageVisible)};b.addListener("pageViewChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}));
if(e.isEnabled()){if(this.showBackgroundImageOption){var f=this.createOption(mxResources.get("background"),function(){return null!=e.backgroundImage},function(d){d||(d=new ChangePageSetup(b,null,null),d.ignoreColor=!0,e.model.execute(d))},{install:function(d){this.listener=function(){d(null!=e.backgroundImage)};b.addListener("backgroundImageChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}),h=f.getElementsByTagName("input")[0];null!=h&&(h.style.visibility=null!=e.backgroundImage?
"visible":"hidden");h=f.getElementsByTagName("div")[0];null!=h&&(h.style.display="inline-block",h.style.textOverflow="ellipsis",h.style.overflow="hidden",h.style.maxWidth="80px");mxClient.IS_FF&&(h.style.marginTop="1px");h=mxUtils.button(mxResources.get("change")+"...",function(d){b.showBackgroundImageDialog(null,b.editor.graph.backgroundImage,b.editor.graph.background);mxEvent.consume(d)});h.style.position="absolute";h.style.height="22px";h.style.left="47%";h.style.marginLeft="1px";h.style.width=
@@ -3301,259 +3302,259 @@ m()));d.style.display=h.isGridEnabled()?"":"none";g.style.display=d.style.displa
null,null,p,!0,m);p.style.padding="6px 0 0 0";p.appendChild(d);p.appendChild(g);a.appendChild(p)};DiagramFormatPanel.prototype.addDocumentProperties=function(a){a.appendChild(this.createTitle(mxResources.get("options")));return a};
DiagramFormatPanel.prototype.addPaperSize=function(a){var b=this.editorUi,e=b.editor.graph;a.appendChild(this.createTitle(mxResources.get("paperSize")));var f=PageSetupDialog.addPageFormatPanel(a,"formatpanel",e.pageFormat,function(d){if(null==e.pageFormat||e.pageFormat.width!=d.width||e.pageFormat.height!=d.height)d=new ChangePageSetup(b,null,null,d),d.ignoreColor=!0,d.ignoreImage=!0,e.model.execute(d)});this.addKeyHandler(f.widthInput,function(){f.set(e.pageFormat)});this.addKeyHandler(f.heightInput,
function(){f.set(e.pageFormat)});var h=function(){f.set(e.pageFormat)};b.addListener("pageFormatChanged",h);this.listeners.push({destroy:function(){b.removeListener(h)}});e.getModel().addListener(mxEvent.CHANGE,h);this.listeners.push({destroy:function(){e.getModel().removeListener(h)}});return a};DiagramFormatPanel.prototype.addStyleOps=function(a){this.addActions(a,["editData"]);this.addActions(a,["clearDefaultStyle"]);return a};
-DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function h(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function x(){mxShape.call(this)}
-function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function I(){mxActor.call(this)}function L(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function Q(){mxActor.call(this)}function P(c,l){this.canvas=c;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,P.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,P.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,P.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,P.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-P.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,P.prototype.arcTo)}function M(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function aa(){mxActor.call(this)}function ia(){mxActor.call(this)}function na(){mxActor.call(this)}function qa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function Z(){mxCylinder.call(this)}function ca(){mxShape.call(this)}function W(){mxShape.call(this)}function ja(){mxEllipse.call(this)}
-function H(){mxShape.call(this)}function ea(){mxShape.call(this)}function oa(){mxRectangleShape.call(this)}function sa(){mxShape.call(this)}function Pa(){mxShape.call(this)}function la(){mxShape.call(this)}function Ba(){mxShape.call(this)}function Ca(){mxShape.call(this)}function Fa(){mxCylinder.call(this)}function Ia(){mxCylinder.call(this)}function Ha(){mxRectangleShape.call(this)}function Ja(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function La(){mxArrowConnector.call(this);
-this.spacing=0}function Xa(){mxArrowConnector.call(this);this.spacing=0}function Ya(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function ib(){mxActor.call(this)}function eb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxEllipse.call(this)}
-function R(){mxEllipse.call(this)}function X(){mxEllipse.call(this)}function fa(){mxRhombus.call(this)}function da(){mxEllipse.call(this)}function ha(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ga(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Va(c,l,t,n,r,v,w,J,y,ba){w+=y;var S=n.clone();n.x-=r*(2*w+y);n.y-=v*(2*w+y);r*=w+y;v*=w+y;return function(){c.ellipse(S.x-r-w,S.y-v-w,2*w,2*w);ba?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
-t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var w=l[v];null!=w&&(null==r?c.moveTo(w.x+t,w.y+n):null!=r&&c.lineTo(w.x+t,w.y+n));r=w}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=
+DiagramFormatPanel.prototype.destroy=function(){BaseFormatPanel.prototype.destroy.apply(this,arguments);this.gridEnabledListener&&(this.editorUi.removeListener(this.gridEnabledListener),this.gridEnabledListener=null)};(function(){function a(c,l,t){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=t?t:1;this.updateBoundsFromLine()}function b(){mxSwimlane.call(this)}function e(){mxSwimlane.call(this)}function f(){mxCylinder.call(this)}function h(){mxConnector.call(this)}function d(){mxCylinder.call(this)}function g(){mxActor.call(this)}function m(){mxCylinder.call(this)}function p(){mxCylinder.call(this)}function k(){mxCylinder.call(this)}function u(){mxCylinder.call(this)}function w(){mxShape.call(this)}
+function z(){mxShape.call(this)}function C(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1}function E(){mxActor.call(this)}function D(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function K(){mxActor.call(this)}function L(){mxActor.call(this)}function Q(){mxActor.call(this)}function N(){mxActor.call(this)}function U(){mxActor.call(this)}function Y(){mxActor.call(this)}function P(){mxActor.call(this)}function T(c,l){this.canvas=c;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,T.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,T.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,T.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,T.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
+T.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,T.prototype.arcTo)}function J(){mxRectangleShape.call(this)}function V(){mxRectangleShape.call(this)}function Z(){mxActor.call(this)}function ia(){mxActor.call(this)}function oa(){mxActor.call(this)}function sa(){mxRectangleShape.call(this)}function O(){mxRectangleShape.call(this)}function X(){mxCylinder.call(this)}function ba(){mxShape.call(this)}function da(){mxShape.call(this)}function ca(){mxEllipse.call(this)}
+function H(){mxShape.call(this)}function ea(){mxShape.call(this)}function ra(){mxRectangleShape.call(this)}function qa(){mxShape.call(this)}function Pa(){mxShape.call(this)}function ma(){mxShape.call(this)}function Ba(){mxShape.call(this)}function Ca(){mxShape.call(this)}function Ja(){mxCylinder.call(this)}function Ia(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Ga(){mxDoubleEllipse.call(this)}function ta(){mxDoubleEllipse.call(this)}function La(){mxArrowConnector.call(this);
+this.spacing=0}function Xa(){mxArrowConnector.call(this);this.spacing=0}function Ya(){mxActor.call(this)}function cb(){mxRectangleShape.call(this)}function fb(){mxActor.call(this)}function pb(){mxActor.call(this)}function gb(){mxActor.call(this)}function ab(){mxActor.call(this)}function ib(){mxActor.call(this)}function eb(){mxActor.call(this)}function q(){mxActor.call(this)}function A(){mxActor.call(this)}function B(){mxActor.call(this)}function F(){mxActor.call(this)}function M(){mxEllipse.call(this)}
+function R(){mxEllipse.call(this)}function W(){mxEllipse.call(this)}function ha(){mxRhombus.call(this)}function fa(){mxEllipse.call(this)}function ja(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Na(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ha(){mxActor.call(this)}function wa(c,l,t,n){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=t;this.strokewidth=null!=n?n:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function ua(){mxConnector.call(this)}function Va(c,l,t,n,r,v,x,I,y,aa){x+=y;var S=n.clone();n.x-=r*(2*x+y);n.y-=v*(2*x+y);r*=x+y;v*=x+y;return function(){c.ellipse(S.x-r-x,S.y-v-x,2*x,2*x);aa?c.fillAndStroke():c.stroke()}}mxUtils.extend(a,mxShape);a.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var t=this.line[l];null!=t&&(t=new mxRectangle(t.x,t.y,this.strokewidth,this.strokewidth),null==c?c=
+t:c.add(t))}this.bounds=null!=c?c:new mxRectangle};a.prototype.paintVertexShape=function(c,l,t,n,r){this.paintTableLine(c,this.line,0,0)};a.prototype.paintTableLine=function(c,l,t,n){if(null!=l){var r=null;c.begin();for(var v=0;v<l.length;v++){var x=l[v];null!=x&&(null==r?c.moveTo(x.x+t,x.y+n):null!=r&&c.lineTo(x.x+t,x.y+n));r=x}c.end();c.stroke()}};a.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var t=null,n=
0;n<this.line.length&&!l;n++){var r=this.line[n];null!=r&&null!=t&&(l=mxUtils.rectangleIntersectsSegment(c,t,r));t=r}return l};mxCellRenderer.registerShape("tableLine",a);mxUtils.extend(b,mxSwimlane);b.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};b.prototype.paintVertexShape=function(c,l,t,n,r){var v=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,w=this.isHorizontal(),J=this.getTitleSize();0==J||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(w&&J<r||!w&&J<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,w=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var J=v;v=w;w=J}c.rotate(-this.getShapeRotation(),
-v,w,l+n/2,t+r/2);s=this.scale;l=this.bounds.x/s;t=this.bounds.y/s;n=this.bounds.width/s;r=this.bounds.height/s;this.paintTableForeground(c,l,t,n,r)}};b.prototype.paintTableForeground=function(c,l,t,n,r){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(r=0;r<n.length;r++)a.prototype.paintTableLine(c,n[r],l,t)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
-c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",b);mxUtils.extend(e,b);e.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",e);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.darkOpacity=0;f.prototype.darkOpacity2=0;f.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),J=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(v,r);c.lineTo(0,r-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-v,0),c.lineTo(n,v),c.lineTo(v,
-v),c.close(),c.fill()),0!=J&&(c.setFillAlpha(Math.abs(J)),c.setFillColor(0>J?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,v),c.lineTo(v,r),c.lineTo(0,r-v),c.close(),c.fill()),c.begin(),c.moveTo(v,r),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(n,v),c.end(),c.stroke())};f.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
+!1,x=this.isHorizontal(),I=this.getTitleSize();0==I||this.outline?va.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-t));v||this.outline||!(x&&I<r||!x&&I<n)||this.paintForeground(c,l,t,n,r)};b.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.state){var v=this.flipH,x=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var I=v;v=x;x=I}c.rotate(-this.getShapeRotation(),
+v,x,l+n/2,t+r/2);s=this.scale;l=this.bounds.x/s;t=this.bounds.y/s;n=this.bounds.width/s;r=this.bounds.height/s;this.paintTableForeground(c,l,t,n,r)}};b.prototype.paintTableForeground=function(c,l,t,n,r){n=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(r=0;r<n.length;r++)a.prototype.paintTableLine(c,n[r],l,t)};b.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
+c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",b);mxUtils.extend(e,b);e.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",e);mxUtils.extend(f,mxCylinder);f.prototype.size=20;f.prototype.darkOpacity=0;f.prototype.darkOpacity2=0;f.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),I=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(v,r);c.lineTo(0,r-v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(n-v,0),c.lineTo(n,v),c.lineTo(v,
+v),c.close(),c.fill()),0!=I&&(c.setFillAlpha(Math.abs(I)),c.setFillColor(0>I?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,v),c.lineTo(v,r),c.lineTo(0,r-v),c.close(),c.fill()),c.begin(),c.moveTo(v,r),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(n,v),c.end(),c.stroke())};f.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
f);var Qa=Math.tan(mxUtils.toRadians(30)),Ka=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(h,mxConnector);h.prototype.paintEdgeShape=function(c,l){var t=this.createMarker(c,l,!0),n=this.createMarker(c,l,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this,
arguments);c.setStrokeColor(this.stroke);c.setFillColor(this.stroke);c.setDashed(!1);null!=t&&t();null!=n&&n()};mxCellRenderer.registerShape("wire",h);mxUtils.extend(d,mxCylinder);d.prototype.size=6;d.prototype.paintVertexShape=function(c,l,t,n,r){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(n-v),t+.5*(r-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};mxCellRenderer.registerShape("waypoint",
d);mxUtils.extend(g,mxActor);g.prototype.size=20;g.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/Qa);c.translate((n-l)/2,(r-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*Ka);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Ka)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",g);mxUtils.extend(m,mxCylinder);m.prototype.size=20;m.prototype.redrawPath=function(c,l,t,n,r,v){l=Math.min(n,r/(.5+Qa));v?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Ka)*l),c.lineTo(l,.25*l),c.moveTo(.5*
l,(.5-Ka)*l),c.lineTo(.5*l,(1-Ka)*l)):(c.translate((n-l)/2,(r-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Ka),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-Ka)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",m);mxUtils.extend(p,mxCylinder);p.prototype.redrawPath=function(c,l,t,n,r,v){l=Math.min(r/2,Math.round(r/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),v||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,
l),c.curveTo(0,2*l,n,2*l,n,l),v||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,n,2*l,n,l),v||(c.stroke(),c.begin()),c.translate(0,-l);v||(c.moveTo(0,l),c.curveTo(0,-l/3,n,-l/3,n,l),c.lineTo(n,r-l),c.curveTo(n,r+l/3,0,r+l/3,0,r-l),c.close())};p.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",p);mxUtils.extend(k,mxCylinder);k.prototype.size=30;k.prototype.darkOpacity=
-0;k.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(0,r);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"),
-c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(u,k);mxCellRenderer.registerShape("note2",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(x,mxShape);x.prototype.isoAngle=
-15;x.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
-x);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
-n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
-0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),w&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
-mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),J=mxUtils.getValue(this.style,
-"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));J||(y*=Math.min(n,r));y=Math.min(y,.5*n,.5*(r-t));l=Math.max(l,y);l=Math.min(n-y,l);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(y,0),0),c.lineTo(n-Math.max(y,0),t));w?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(n-y,t),c.arcTo(y,y,0,0,1,n,y+t),c.lineTo(n,r-y),c.arcTo(y,y,0,0,1,n-y,r),c.lineTo(y,
+0;k.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,t);c.begin();c.moveTo(0,0);c.lineTo(n-v,0);c.lineTo(n,v);c.lineTo(n,r);c.lineTo(0,r);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"),
+c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.close(),c.fill()),c.begin(),c.moveTo(n-v,0),c.lineTo(n-v,v),c.lineTo(n,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",k);mxUtils.extend(u,k);mxCellRenderer.registerShape("note2",u);u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(w,mxShape);w.prototype.isoAngle=
+15;w.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(n*Math.tan(v),.5*r);c.translate(l,t);c.begin();c.moveTo(.5*n,0);c.lineTo(n,v);c.lineTo(n,r-v);c.lineTo(.5*n,r);c.lineTo(0,r-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*n,2*v);c.lineTo(n,v);c.moveTo(.5*n,2*v);c.lineTo(.5*n,r);c.stroke()};mxCellRenderer.registerShape("isoCube2",
+w);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*
+n,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.max(0,Math.min(.5*r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(l,t);0==v?(c.rect(0,0,n,r),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*n,v,0,0,1,.5*n,0),c.arcTo(.5*n,v,0,0,1,n,v)):(c.moveTo(0,0),c.arcTo(.5*n,v,0,0,0,.5*n,v),c.arcTo(.5*n,v,
+0,0,0,n,0)),c.lineTo(n,r-v),c.arcTo(.5*n,v,0,0,1,.5*n,r),c.arcTo(.5*n,v,0,0,1,0,r-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(n,v),c.arcTo(.5*n,v,0,0,1,.5*n,2*v),c.arcTo(.5*n,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(E,mxActor);E.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n/2,.5*r,n,0);c.quadTo(.5*n,r/2,n,r);c.quadTo(n/2,.5*r,0,r);c.quadTo(.5*n,r/2,0,0);c.end()};mxCellRenderer.registerShape("switch",E);mxUtils.extend(D,
+mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,"rounded",!1),I=mxUtils.getValue(this.style,
+"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));I||(y*=Math.min(n,r));y=Math.min(y,.5*n,.5*(r-t));l=Math.max(l,y);l=Math.min(n-y,l);x||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(l,0),c.lineTo(l,t)):(c.moveTo(n-l,t),c.lineTo(n-l,0),c.lineTo(n-Math.max(y,0),0),c.lineTo(n-Math.max(y,0),t));x?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(n-y,t),c.arcTo(y,y,0,0,1,n,y+t),c.lineTo(n,r-y),c.arcTo(y,y,0,0,1,n-y,r),c.lineTo(y,
r),c.arcTo(y,y,0,0,1,0,r-y)):(c.moveTo(0,t),c.lineTo(n,t),c.lineTo(n,r),c.lineTo(0,r));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(n-30,t+20),c.lineTo(n-20,t+10),c.lineTo(n-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,
"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-
-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection",
-null);w||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,r-15),c.lineTo(n-20,r-15),
-c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(I,
-mxActor);I.prototype.size=30;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",I);mxUtils.extend(L,mxActor);L.prototype.size=
+t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection",
+null);x||(l*=Math.min(n,r));l=Math.min(l,.5*n,.5*r);v||(l=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,l);c.arcTo(l,l,0,0,1,v+l,0);c.lineTo(n-l,0);c.arcTo(l,l,0,0,1,n,l);c.lineTo(n,r-l);c.arcTo(l,l,0,0,1,n-l,r);c.lineTo(v+l,r);c.arcTo(l,l,0,0,1,v,r-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(n-40,r-20,10,10,3,3),c.stroke(),c.roundrect(n-20,r-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(n-30,r-15),c.lineTo(n-20,r-15),
+c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*r-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*r-5),c.lineTo(15,.5*r+5),c.moveTo(15,.5*r-5),c.lineTo(5,.5*r+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(K,
+mxActor);K.prototype.size=30;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",K);mxUtils.extend(L,mxActor);L.prototype.size=
.4;L.prototype.redrawPath=function(c,l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(n/4,1.4*l,n/2,l/2);c.quadTo(3*n/4,l*(1-1.4),n,l/2);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};L.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),t=c.width,n=c.height;if(null==this.direction||
-this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",L);mxUtils.extend(T,mxActor);T.prototype.size=.3;T.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};T.prototype.redrawPath=function(c,l,t,
-n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",T);var Ua=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ua.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
+this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=n,new mxRectangle(c.x,c.y+l,t,n-2*l);l*=t;return new mxRectangle(c.x+l,c.y,t-2*l,n)}return c};mxCellRenderer.registerShape("tape",L);mxUtils.extend(Q,mxActor);Q.prototype.size=.3;Q.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};Q.prototype.redrawPath=function(c,l,t,
+n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(n,0);c.lineTo(n,r-l/2);c.quadTo(3*n/4,r-1.4*l,n/2,r-l/2);c.quadTo(n/4,r-l*(1-1.4),0,r-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",Q);var Ua=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,t,n){var r=mxUtils.getValue(this.style,"size");return null!=r?n*Math.max(0,Math.min(1,r)):Ua.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=
function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};D.prototype.getLabelMargins=
function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var n=mxUtils.getValue(this.style,"rounded",!1),r=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));r||(v*=Math.min(c.width,c.height));v=Math.min(v,
.5*c.width,.5*(c.height-l));n||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*
-this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,
+this.scale,0,0,0):null};u.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(N,mxActor);N.prototype.size=.2;N.prototype.fixedSize=20;N.prototype.isRoundable=function(){return!0};N.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n,0),new mxPoint(n-l,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("parallelogram",N);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,
l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("trapezoid",U);mxUtils.extend(Y,mxActor);
-Y.prototype.size=.5;Y.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Y);mxUtils.extend(Q,mxActor);
-Q.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",Q);P.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};P.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
-arguments));this.originalClose.apply(this.canvas,arguments)};P.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};P.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};P.prototype.arcTo=function(c,l,t,n,r,v,w){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=w};P.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(S){return"number"===
-typeof S?S?0>S?-1:1:S===S?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var w=Math.round(v/10),J=this.defaultVariation;5>w&&(w=5,J/=3);var y=t(c-this.lastX)*n/w;t=t(l-this.lastY)*r/w;n/=v;r/=v;for(v=0;v<w;v++){var ba=(Math.random()-.5)*J;this.originalLineTo.call(this.canvas,y*v+this.lastX-ba*r,t*v+this.lastY-ba*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=l};P.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Wa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Wa.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new P(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};var ub=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=P)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=
+Y.prototype.size=.5;Y.prototype.redrawPath=function(c,l,t,n,r){c.setFillColor(null);l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(n,0),new mxPoint(l,0),new mxPoint(l,r/2),new mxPoint(0,r/2),new mxPoint(l,r/2),new mxPoint(l,r),new mxPoint(n,r)],this.isRounded,t,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",Y);mxUtils.extend(P,mxActor);
+P.prototype.redrawPath=function(c,l,t,n,r){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=n/5;c.rect(0,0,l,r);c.fillAndStroke();c.rect(2*l,0,l,r);c.fillAndStroke();c.rect(4*l,0,l,r);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",P);T.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};T.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
+arguments));this.originalClose.apply(this.canvas,arguments)};T.prototype.quadTo=function(c,l,t,n){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=n};T.prototype.curveTo=function(c,l,t,n,r,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=r;this.lastY=v};T.prototype.arcTo=function(c,l,t,n,r,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=x};T.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var t=function(S){return"number"===
+typeof S?S?0>S?-1:1:S===S?0:NaN:NaN},n=Math.abs(c-this.lastX),r=Math.abs(l-this.lastY),v=Math.sqrt(n*n+r*r);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var x=Math.round(v/10),I=this.defaultVariation;5>x&&(x=5,I/=3);var y=t(c-this.lastX)*n/x;t=t(l-this.lastY)*r/x;n/=v;r/=v;for(v=0;v<x;v++){var aa=(Math.random()-.5)*I;this.originalLineTo.call(this.canvas,y*v+this.lastX-aa*r,t*v+this.lastY-aa*n)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=l};T.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var Wa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Wa.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new T(c,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};var ub=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var vb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,t,n,r){if(null==c.handJiggle||c.handJiggle.constructor!=T)vb.apply(this,arguments);else{var v=!0;null!=this.style&&(v="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(v||null!=
this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)v||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?v=Math.min(n/2,Math.min(r/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,v=Math.min(n*v,r*v)),c.moveTo(l+
-v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(M,mxRectangleShape);M.prototype.size=.1;M.prototype.fixedSize=!1;M.prototype.isHtmlAllowed=function(){return!1};M.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};M.prototype.paintForeground=
-function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),w=parseFloat(mxUtils.getValue(this.style,"size",this.size));w=v?Math.max(0,Math.min(n,w)):n*Math.max(0,Math.min(1,w));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,w=Math.max(w,Math.min(n*v,r*v)));w=Math.round(w);c.begin();c.moveTo(l+w,t);c.lineTo(l+w,t+r);c.moveTo(l+n-w,t);c.lineTo(l+n-w,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",M);mxCellRenderer.registerShape("process2",M);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(aa,mxHexagon);aa.prototype.size=30;aa.prototype.position=.5;aa.prototype.position2=.5;aa.prototype.base=20;aa.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};aa.prototype.isRoundable=function(){return!0};aa.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),w=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),J=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+J),r-t),new mxPoint(w,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",aa);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,
-t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",
-ia);mxUtils.extend(na,mxHexagon);na.prototype.size=.25;na.prototype.fixedSize=20;na.prototype.isRoundable=function(){return!0};na.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(n-l,0),new mxPoint(n,.5*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",na);mxUtils.extend(qa,mxRectangleShape);qa.prototype.isHtmlAllowed=function(){return!1};qa.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",qa);var jb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+v,t),c.lineTo(l+n-v,t),c.quadTo(l+n,t,l+n,t+v),c.lineTo(l+n,t+r-v),c.quadTo(l+n,t+r,l+n-v,t+r),c.lineTo(l+v,t+r),c.quadTo(l,t+r,l,t+r-v),c.lineTo(l,t+v),c.quadTo(l,t,l+v,t)):(c.moveTo(l,t),c.lineTo(l+n,t),c.lineTo(l+n,t+r),c.lineTo(l,t+r),c.lineTo(l,t)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(J,mxRectangleShape);J.prototype.size=.1;J.prototype.fixedSize=!1;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,t=c.height;c=new mxRectangle(c.x,c.y,l,t);var n=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var r=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;n=Math.max(n,Math.min(l*r,t*r))}c.x+=Math.round(n);c.width-=Math.round(2*n);return c}return c};J.prototype.paintForeground=
+function(c,l,t,n,r){var v=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),x=parseFloat(mxUtils.getValue(this.style,"size",this.size));x=v?Math.max(0,Math.min(n,x)):n*Math.max(0,Math.min(1,x));this.isRounded&&(v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,x=Math.max(x,Math.min(n*v,r*v)));x=Math.round(x);c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.moveTo(l+n-x,t);c.lineTo(l+n-x,t+r);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",J);mxCellRenderer.registerShape("process2",J);mxUtils.extend(V,mxRectangleShape);V.prototype.paintBackground=function(c,l,t,n,r){c.setFillColor(mxConstants.NONE);c.rect(l,t,n,r);c.fill()};V.prototype.paintForeground=function(c,l,t,n,r){};mxCellRenderer.registerShape("transparent",V);mxUtils.extend(Z,mxHexagon);Z.prototype.size=30;Z.prototype.position=.5;Z.prototype.position2=.5;Z.prototype.base=20;Z.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};Z.prototype.isRoundable=function(){return!0};Z.prototype.redrawPath=function(c,l,t,n,r){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var v=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),x=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),I=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-t),new mxPoint(Math.min(n,v+I),r-t),new mxPoint(x,r),new mxPoint(Math.max(0,v),r-t),new mxPoint(0,r-t)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",Z);mxUtils.extend(ia,mxActor);ia.prototype.size=.2;ia.prototype.fixedSize=20;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,t,
+n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(0,r),new mxPoint(l,r/2)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("step",
+ia);mxUtils.extend(oa,mxHexagon);oa.prototype.size=.25;oa.prototype.fixedSize=20;oa.prototype.isRoundable=function(){return!0};oa.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(n-l,0),new mxPoint(n,.5*r),new mxPoint(n-l,r),new mxPoint(l,r),new mxPoint(0,.5*r)],this.isRounded,t,!0)};mxCellRenderer.registerShape("hexagon",oa);mxUtils.extend(sa,mxRectangleShape);sa.prototype.isHtmlAllowed=function(){return!1};sa.prototype.paintForeground=function(c,l,t,n,r){var v=Math.min(n/5,r/5)+1;c.begin();c.moveTo(l+n/2,t+v);c.lineTo(l+n/2,t+r-v);c.moveTo(l+v,t+r/2);c.lineTo(l+n-v,t+r/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",sa);var jb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,t,n,r){jb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var v=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&(c.setShadow(!1),jb.apply(this,[c,l,t,n,r]))}};mxUtils.extend(O,mxRectangleShape);O.prototype.isHtmlAllowed=function(){return!1};O.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};O.prototype.paintForeground=function(c,l,t,n,r){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var v=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var w=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=w){var J=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],ba=this.style["symbol"+v+"Width"],S=this.style["symbol"+v+"Height"],Ea=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Ea,
-Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Ea+=Oa,Ra+=Oa);Oa=l;var ka=t;Oa=J==mxConstants.ALIGN_CENTER?Oa+(n-ba)/2:J==mxConstants.ALIGN_RIGHT?Oa+(n-ba-Ea):Oa+Ea;ka=y==mxConstants.ALIGN_MIDDLE?ka+(r-S)/2:y==mxConstants.ALIGN_BOTTOM?ka+(r-S-Ra):ka+Ra;c.save();J=new w;J.style=this.style;w.prototype.paintVertexShape.call(J,c,Oa,ka,ba,S);c.restore()}v++}while(null!=w)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
-O);mxUtils.extend(Z,mxCylinder);Z.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",Z);mxUtils.extend(ca,mxShape);ca.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/
-2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ca);mxUtils.extend(W,mxShape);W.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};W.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-W);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ja);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(ea,mxShape);
-ea.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};ea.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};ea.prototype.paintForeground=function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",ea);mxUtils.extend(oa,mxRectangleShape);oa.prototype.size=
-40;oa.prototype.isHtmlAllowed=function(){return!1};oa.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};oa.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"participant");null==w||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
-c,l,t,n,v):(w=this.state.view.graph.cellRenderer.getShape(w),null!=w&&w!=oa&&(w=new w,w.apply(this.state),c.save(),w.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};oa.prototype.paintForeground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,
-Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",oa);mxUtils.extend(sa,mxShape);sa.prototype.width=60;sa.prototype.height=30;sa.prototype.corner=10;sa.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};sa.prototype.getLabelMargins=
-function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};sa.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,w=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),J=Math.min(r,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,
-mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(l,t,n,r),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,t,n,r),c.setGradient(this.fill,this.gradient,l,t,n,r,this.gradientDirection)):c.setFillColor(this.fill);c.pointerEvents=!0;c.begin();c.moveTo(l,t);c.lineTo(l+w,t);c.lineTo(l+w,t+Math.max(0,J-1.5*v));c.lineTo(l+Math.max(0,w-v),t+J);c.lineTo(l,t+J);c.close();c.fillAndStroke();this.configurePointerEvents(c);
-c.begin();c.moveTo(l+w,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+J);c.stroke()};mxCellRenderer.registerShape("umlFrame",sa);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,l,t,n){n=oa.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=v;t+=v;n-=2*v;r-=2*v;0<n&&0<r&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);v=0;do{var x=mxCellRenderer.defaultShapes[this.style["symbol"+v]];if(null!=x){var I=this.style["symbol"+v+"Align"],y=this.style["symbol"+v+"VerticalAlign"],aa=this.style["symbol"+v+"Width"],S=this.style["symbol"+v+"Height"],Fa=this.style["symbol"+v+"Spacing"]||0,Ra=this.style["symbol"+v+"VSpacing"]||Fa,
+Oa=this.style["symbol"+v+"ArcSpacing"];null!=Oa&&(Oa*=this.getArcSize(n+this.strokewidth,r+this.strokewidth),Fa+=Oa,Ra+=Oa);Oa=l;var ka=t;Oa=I==mxConstants.ALIGN_CENTER?Oa+(n-aa)/2:I==mxConstants.ALIGN_RIGHT?Oa+(n-aa-Fa):Oa+Fa;ka=y==mxConstants.ALIGN_MIDDLE?ka+(r-S)/2:y==mxConstants.ALIGN_BOTTOM?ka+(r-S-Ra):ka+Ra;c.save();I=new x;I.style=this.style;x.prototype.paintVertexShape.call(I,c,Oa,ka,aa,S);c.restore()}v++}while(null!=x)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",
+O);mxUtils.extend(X,mxCylinder);X.prototype.redrawPath=function(c,l,t,n,r,v){v?(c.moveTo(0,0),c.lineTo(n/2,r/2),c.lineTo(n,0),c.end()):(c.moveTo(0,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(0,r),c.close())};mxCellRenderer.registerShape("message",X);mxUtils.extend(ba,mxShape);ba.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.ellipse(n/4,0,n/2,r/4);c.fillAndStroke();c.begin();c.moveTo(n/2,r/4);c.lineTo(n/2,2*r/3);c.moveTo(n/2,r/3);c.lineTo(0,r/3);c.moveTo(n/2,r/3);c.lineTo(n,r/3);c.moveTo(n/
+2,2*r/3);c.lineTo(0,r);c.moveTo(n/2,2*r/3);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ba);mxUtils.extend(da,mxShape);da.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};da.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,r/4);c.lineTo(0,3*r/4);c.end();c.stroke();c.begin();c.moveTo(0,r/2);c.lineTo(n/6,r/2);c.end();c.stroke();c.ellipse(n/6,0,5*n/6,r);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+da);mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+n/8,t+r);c.lineTo(l+7*n/8,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ca);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(n,0);c.lineTo(0,r);c.moveTo(0,0);c.lineTo(n,r);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(ea,mxShape);
+ea.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};ea.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,0);c.end();c.stroke();c.ellipse(0,r/8,n,7*r/8);c.fillAndStroke()};ea.prototype.paintForeground=function(c,l,t,n,r){c.begin();c.moveTo(3*n/8,r/8*1.1);c.lineTo(5*n/8,r/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",ea);mxUtils.extend(ra,mxRectangleShape);ra.prototype.size=
+40;ra.prototype.isHtmlAllowed=function(){return!1};ra.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};ra.prototype.paintBackground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"participant");null==x||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+c,l,t,n,v):(x=this.state.view.graph.cellRenderer.getShape(x),null!=x&&x!=ra&&(x=new x,x.apply(this.state),c.save(),x.paintVertexShape(c,l,t,n,v),c.restore()));v<r&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+n/2,t+v),c.lineTo(l+n/2,t+r),c.end(),c.stroke())};ra.prototype.paintForeground=function(c,l,t,n,r){var v=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,t,n,
+Math.min(r,v))};mxCellRenderer.registerShape("umlLifeline",ra);mxUtils.extend(qa,mxShape);qa.prototype.width=60;qa.prototype.height=30;qa.prototype.corner=10;qa.prototype.configurePointerEvents=function(c){var l=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=l&&l!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(c.pointerEvents=!1)};qa.prototype.getLabelMargins=
+function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};qa.prototype.paintBackground=function(c,l,t,n,r){var v=this.corner,x=Math.min(n,Math.max(v,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),I=Math.min(r,Math.max(1.5*v,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),y=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,
+mxConstants.NONE);y!=mxConstants.NONE&&(c.setFillColor(y),c.rect(l,t,n,r),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,t,n,r),c.setGradient(this.fill,this.gradient,l,t,n,r,this.gradientDirection)):c.setFillColor(this.fill);c.pointerEvents=!0;c.begin();c.moveTo(l,t);c.lineTo(l+x,t);c.lineTo(l+x,t+Math.max(0,I-1.5*v));c.lineTo(l+Math.max(0,x-v),t+I);c.lineTo(l,t+I);c.close();c.fillAndStroke();this.configurePointerEvents(c);
+c.begin();c.moveTo(l+x,t);c.lineTo(l+n,t);c.lineTo(l+n,t+r);c.lineTo(l,t+r);c.lineTo(l,t+I);c.stroke()};mxCellRenderer.registerShape("umlFrame",qa);mxPerimeter.CenterPerimeter=function(c,l,t,n){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,l,t,n){n=ra.prototype.size;null!=l&&(n=mxUtils.getValue(l.style,"size",n)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*
l.view.scale/2-1;t.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+n,t.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,t,n){n=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,t,n){n=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||
1)*l.view.scale/2-1;null!=l.style.backboneSize&&(n+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return t.x<c.getCenterX()&&(n=-1*(n+1)),new mxPoint(c.getCenterX()+n,Math.min(c.y+c.height,Math.max(c.y,t.y)));t.y<c.getCenterY()&&(n=-1*(n+1));return new mxPoint(Math.min(c.x+c.width,Math.max(c.x,t.x)),c.getCenterY()+n)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=
-function(c,l,t,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",aa.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?K.prototype.fixedSize:K.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));
-r&&(v*=l.view.scale);var w=c.x,J=c.y,y=c.width,ba=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+
-y,J),new mxPoint(w+y-r,J+ba),new mxPoint(w,J+ba),new mxPoint(w+r,J)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);n&&(t.x<w||t.x>w+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(J,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?U.prototype.fixedSize:U.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);
-var w=c.x,J=c.y,y=c.width,ba=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+y-r,J),new mxPoint(w+y,J+ba),new mxPoint(w,J+ba),new mxPoint(w+r,J)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J),new mxPoint(w+y-r,J+
-ba),new mxPoint(w+r,J+ba),new mxPoint(w,J)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J+r),new mxPoint(w+y,J),new mxPoint(w+y,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J+r)]):(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba-r),new mxPoint(w,J+ba),new mxPoint(w,J)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);n&&(t.x<w||t.x>w+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(J,
-c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var w=c.x,J=c.y,y=c.width,ba=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?
-(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(w+y-r,J),new mxPoint(w+y,c),new mxPoint(w+y-r,J+ba),new mxPoint(w,J+ba),new mxPoint(w+r,c),new mxPoint(w,J)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+y,J),new mxPoint(w+y-r,c),new mxPoint(w+y,J+ba),new mxPoint(w+r,J+ba),new mxPoint(w,c),new mxPoint(w+r,J)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,
-Math.min(1,v)),J=[new mxPoint(w,J+r),new mxPoint(S,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba),new mxPoint(S,J+ba-r),new mxPoint(w,J+ba),new mxPoint(w,J+r)]):(r=r?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(w,J),new mxPoint(S,J+r),new mxPoint(w+y,J),new mxPoint(w+y,J+ba-r),new mxPoint(S,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J)]);S=new mxPoint(S,c);n&&(t.x<w||t.x>w+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(J,S,t)};mxStyleRegistry.putValue("stepPerimeter",
-mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?na.prototype.fixedSize:na.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var w=c.x,J=c.y,y=c.width,ba=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,
-Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),J=[new mxPoint(S,J),new mxPoint(w+y,J+r),new mxPoint(w+y,J+ba-r),new mxPoint(S,J+ba),new mxPoint(w,J+ba-r),new mxPoint(w,J+r),new mxPoint(S,J)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),J=[new mxPoint(w+r,J),new mxPoint(w+y-r,J),new mxPoint(w+y,c),new mxPoint(w+y-r,J+ba),new mxPoint(w+r,J+ba),new mxPoint(w,c),new mxPoint(w+r,J)]);S=new mxPoint(S,c);n&&(t.x<w||t.x>w+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(J,S,t)};mxStyleRegistry.putValue("hexagonPerimeter2",
-mxPerimeter.HexagonPerimeter2);mxUtils.extend(Pa,mxShape);Pa.prototype.size=10;Pa.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Pa);mxUtils.extend(la,mxShape);la.prototype.size=10;la.prototype.inset=2;la.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,
-"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+w);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-w,v/2);c.quadTo((n-v)/2-w,v+w,n/2,v+w);c.quadTo((n+v)/2+w,v+w,(n+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",la);mxUtils.extend(Ba,mxShape);Ba.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);
-c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ba);mxUtils.extend(Ca,mxShape);Ca.prototype.inset=2;Ca.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Ca);mxUtils.extend(Fa,mxCylinder);Fa.prototype.jettyWidth=
-20;Fa.prototype.jettyHeight=10;Fa.prototype.redrawPath=function(c,l,t,n,r,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var J=Math.min(l,r-l),y=Math.min(J+2*l,r-l);v?(c.moveTo(t,J),c.lineTo(w,J),c.lineTo(w,J+l),c.lineTo(t,J+l),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,
-y),c.lineTo(t,y),c.lineTo(t,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(t,J),c.close());c.end()};mxCellRenderer.registerShape("module",Fa);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=32;Ia.prototype.jettyHeight=12;Ia.prototype.redrawPath=function(c,l,t,n,r,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var J=.3*r-l/2,y=.7*r-l/2;v?(c.moveTo(t,J),c.lineTo(w,J),c.lineTo(w,
-J+l),c.lineTo(t,J+l),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(t,J),c.close());c.end()};mxCellRenderer.registerShape("component",Ia);mxUtils.extend(Ha,mxRectangleShape);Ha.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,w=r/2,J=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+w),new mxPoint(l+v,t+r),new mxPoint(l,t+w)],this.isRounded,J,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Ha);mxUtils.extend(Ja,mxDoubleEllipse);Ja.prototype.outerStroke=!0;Ja.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&
-(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ja);mxUtils.extend(ta,Ja);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=4;La.prototype.isOpenEnded=function(){return!0};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};La.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
+function(c,l,t,n){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",Z.prototype.size))*l.view.scale))),l.style),l,t,n)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?N.prototype.fixedSize:N.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));
+r&&(v*=l.view.scale);var x=c.x,I=c.y,y=c.width,aa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I)]):(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+
+y,I),new mxPoint(x+y-r,I+aa),new mxPoint(x,I+aa),new mxPoint(x+r,I)]);aa=c.getCenterX();c=c.getCenterY();c=new mxPoint(aa,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?U.prototype.fixedSize:U.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);
+var x=c.x,I=c.y,y=c.width,aa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(r=r?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+y-r,I),new mxPoint(x+y,I+aa),new mxPoint(x,I+aa),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y,I),new mxPoint(x+y-r,I+
+aa),new mxPoint(x+r,I+aa),new mxPoint(x,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(x+y,I),new mxPoint(x+y,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa-r),new mxPoint(x,I+aa),new mxPoint(x,I)]);aa=c.getCenterX();c=c.getCenterY();c=new mxPoint(aa,c);n&&(t.x<x||t.x>x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(I,
+c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?ia.prototype.fixedSize:ia.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,y=c.width,aa=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?
+(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(x+y-r,I),new mxPoint(x+y,c),new mxPoint(x+y-r,I+aa),new mxPoint(x,I+aa),new mxPoint(x+r,c),new mxPoint(x,I)]):l==mxConstants.DIRECTION_WEST?(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+y,I),new mxPoint(x+y-r,c),new mxPoint(x+y,I+aa),new mxPoint(x+r,I+aa),new mxPoint(x,c),new mxPoint(x+r,I)]):l==mxConstants.DIRECTION_NORTH?(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,
+Math.min(1,v)),I=[new mxPoint(x,I+r),new mxPoint(S,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa),new mxPoint(S,I+aa-r),new mxPoint(x,I+aa),new mxPoint(x,I+r)]):(r=r?Math.max(0,Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(x,I),new mxPoint(S,I+r),new mxPoint(x+y,I),new mxPoint(x+y,I+aa-r),new mxPoint(S,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(I,S,t)};mxStyleRegistry.putValue("stepPerimeter",
+mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,t,n){var r="0"!=mxUtils.getValue(l.style,"fixedSize","0"),v=r?oa.prototype.fixedSize:oa.prototype.size;null!=l&&(v=mxUtils.getValue(l.style,"size",v));r&&(v*=l.view.scale);var x=c.x,I=c.y,y=c.width,aa=c.height,S=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(r=r?Math.max(0,
+Math.min(aa,v)):aa*Math.max(0,Math.min(1,v)),I=[new mxPoint(S,I),new mxPoint(x+y,I+r),new mxPoint(x+y,I+aa-r),new mxPoint(S,I+aa),new mxPoint(x,I+aa-r),new mxPoint(x,I+r),new mxPoint(S,I)]):(r=r?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),I=[new mxPoint(x+r,I),new mxPoint(x+y-r,I),new mxPoint(x+y,c),new mxPoint(x+y-r,I+aa),new mxPoint(x+r,I+aa),new mxPoint(x,c),new mxPoint(x+r,I)]);S=new mxPoint(S,c);n&&(t.x<x||t.x>x+y?S.y=t.y:S.x=t.x);return mxUtils.getPerimeterPoint(I,S,t)};mxStyleRegistry.putValue("hexagonPerimeter2",
+mxPerimeter.HexagonPerimeter2);mxUtils.extend(Pa,mxShape);Pa.prototype.size=10;Pa.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(l,t);c.ellipse((n-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(n/2,v);c.lineTo(n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",Pa);mxUtils.extend(ma,mxShape);ma.prototype.size=10;ma.prototype.inset=2;ma.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,
+"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.begin();c.moveTo(n/2,v+x);c.lineTo(n/2,r);c.end();c.stroke();c.begin();c.moveTo((n-v)/2-x,v/2);c.quadTo((n-v)/2-x,v+x,n/2,v+x);c.quadTo((n+v)/2+x,v+x,(n+v)/2+x,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ma);mxUtils.extend(Ba,mxShape);Ba.prototype.paintBackground=function(c,l,t,n,r){c.translate(l,t);c.begin();c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);
+c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Ba);mxUtils.extend(Ca,mxShape);Ca.prototype.inset=2;Ca.prototype.paintBackground=function(c,l,t,n,r){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,t);c.ellipse(0,v,n-2*v,r-2*v);c.fillAndStroke();c.begin();c.moveTo(n/2,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n/2,r);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Ca);mxUtils.extend(Ja,mxCylinder);Ja.prototype.jettyWidth=
+20;Ja.prototype.jettyHeight=10;Ja.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=Math.min(l,r-l),y=Math.min(I+2*l,r-l);v?(c.moveTo(t,I),c.lineTo(x,I),c.lineTo(x,I+l),c.lineTo(t,I+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,
+y),c.lineTo(t,y),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("module",Ja);mxUtils.extend(Ia,mxCylinder);Ia.prototype.jettyWidth=32;Ia.prototype.jettyHeight=12;Ia.prototype.redrawPath=function(c,l,t,n,r,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var I=.3*r-l/2,y=.7*r-l/2;v?(c.moveTo(t,I),c.lineTo(x,I),c.lineTo(x,
+I+l),c.lineTo(t,I+l),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+l),c.lineTo(t,y+l)):(c.moveTo(t,0),c.lineTo(n,0),c.lineTo(n,r),c.lineTo(t,r),c.lineTo(t,y+l),c.lineTo(0,y+l),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,I+l),c.lineTo(0,I+l),c.lineTo(0,I),c.lineTo(t,I),c.close());c.end()};mxCellRenderer.registerShape("component",Ia);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=function(c,l,t,n,r){var v=n/2,x=r/2,I=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;c.begin();this.addPoints(c,[new mxPoint(l+v,t),new mxPoint(l+n,t+x),new mxPoint(l+v,t+r),new mxPoint(l,t+x)],this.isRounded,I,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Ga,mxDoubleEllipse);Ga.prototype.outerStroke=!0;Ga.prototype.paintVertexShape=function(c,l,t,n,r){var v=Math.min(4,Math.min(n/5,r/5));0<n&&0<r&&(c.ellipse(l+v,t+v,n-2*v,r-2*v),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&
+(c.ellipse(l,t,n,r),c.stroke())};mxCellRenderer.registerShape("endState",Ga);mxUtils.extend(ta,Ga);ta.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",ta);mxUtils.extend(La,mxArrowConnector);La.prototype.defaultWidth=4;La.prototype.isOpenEnded=function(){return!0};La.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};La.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",
La);mxUtils.extend(Xa,mxArrowConnector);Xa.prototype.defaultWidth=10;Xa.prototype.defaultArrowWidth=20;Xa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Xa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Xa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
1)};mxCellRenderer.registerShape("flexArrow",Xa);mxUtils.extend(Ya,mxActor);Ya.prototype.size=30;Ya.prototype.isRoundable=function(){return!0};Ya.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size)));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r),new mxPoint(0,l),new mxPoint(n,0),new mxPoint(n,r)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("manualInput",
-Ya);mxUtils.extend(cb,mxRectangleShape);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.isHtmlAllowed=function(){return!1};cb.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(n*w,r*w))}w=Math.max(v,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(r,
-parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,t+v);c.lineTo(l+n,t+v);c.end();c.stroke();c.begin();c.moveTo(l+w,t);c.lineTo(l+w,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",cb);mxUtils.extend(fb,mxActor);fb.prototype.dx=20;fb.prototype.dy=20;fb.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+Ya);mxUtils.extend(cb,mxRectangleShape);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.isHtmlAllowed=function(){return!1};cb.prototype.paintForeground=function(c,l,t,n,r){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var v=0;if(this.isRounded){var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;v=Math.max(v,Math.min(n*x,r*x))}x=Math.max(v,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));v=Math.max(v,Math.min(r,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,t+v);c.lineTo(l+n,t+v);c.end();c.stroke();c.begin();c.moveTo(l+x,t);c.lineTo(l+x,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",cb);mxUtils.extend(fb,mxActor);fb.prototype.dx=20;fb.prototype.dy=20;fb.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint(l,t),new mxPoint(l,r),new mxPoint(0,r)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("corner",fb);mxUtils.extend(pb,mxActor);pb.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.lineTo(0,r);c.end();c.moveTo(n,0);c.lineTo(n,r);c.end();c.moveTo(0,r/2);c.lineTo(n,
r/2);c.end()};mxCellRenderer.registerShape("crossbar",pb);mxUtils.extend(gb,mxActor);gb.prototype.dx=20;gb.prototype.dy=20;gb.prototype.redrawPath=function(c,l,t,n,r){l=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));t=Math.max(0,Math.min(r,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,
0),new mxPoint(n,0),new mxPoint(n,t),new mxPoint((n+l)/2,t),new mxPoint((n+l)/2,r),new mxPoint((n-l)/2,r),new mxPoint((n-l)/2,t),new mxPoint(0,t)],this.isRounded,v,!0);c.end()};mxCellRenderer.registerShape("tee",gb);mxUtils.extend(ab,mxActor);ab.prototype.arrowWidth=.3;ab.prototype.arrowSize=.2;ab.prototype.redrawPath=function(c,l,t,n,r){var v=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"arrowSize",this.arrowSize))));t=(r-v)/2;v=t+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(0,v)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ab);mxUtils.extend(ib,mxActor);ib.prototype.redrawPath=function(c,l,t,n,r){var v=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
-ab.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ab.prototype.arrowSize))));t=(r-v)/2;v=t+v;var w=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r/2),new mxPoint(l,0),new mxPoint(l,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(l,v),new mxPoint(l,r)],this.isRounded,w,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",
+"arrowSize",this.arrowSize))));t=(r-v)/2;v=t+v;var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(0,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("singleArrow",ab);mxUtils.extend(ib,mxActor);ib.prototype.redrawPath=function(c,l,t,n,r){var v=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",
+ab.prototype.arrowWidth))));l=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ab.prototype.arrowSize))));t=(r-v)/2;v=t+v;var x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,r/2),new mxPoint(l,0),new mxPoint(l,t),new mxPoint(n-l,t),new mxPoint(n-l,0),new mxPoint(n,r/2),new mxPoint(n-l,r),new mxPoint(n-l,v),new mxPoint(l,v),new mxPoint(l,r)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",
ib);mxUtils.extend(eb,mxActor);eb.prototype.size=.1;eb.prototype.fixedSize=20;eb.prototype.redrawPath=function(c,l,t,n,r){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(n,0);c.quadTo(n-2*l,r/2,n,r);c.lineTo(l,r);c.quadTo(l-2*l,r/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",eb);
mxUtils.extend(q,mxActor);q.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.close();c.end()};mxCellRenderer.registerShape("or",q);mxUtils.extend(A,mxActor);A.prototype.redrawPath=function(c,l,t,n,r){c.moveTo(0,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,0,r);c.quadTo(n/2,r/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",A);mxUtils.extend(B,mxActor);B.prototype.size=20;B.prototype.isRoundable=function(){return!0};B.prototype.redrawPath=function(c,
l,t,n,r){l=Math.min(n/2,Math.min(r,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(n-l,0),new mxPoint(n,.8*l),new mxPoint(n,r),new mxPoint(0,r),new mxPoint(0,.8*l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("loopLimit",B);mxUtils.extend(F,mxActor);F.prototype.size=.375;F.prototype.isRoundable=function(){return!0};F.prototype.redrawPath=function(c,
-l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(N,mxEllipse);N.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
-c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",N);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(X,mxEllipse);X.prototype.paintVertexShape=function(c,
-l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",X);mxUtils.extend(fa,mxRhombus);fa.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);
-c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",fa);mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",da);mxUtils.extend(ha,mxEllipse);ha.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,w=10+2*v,J=t+r-w/2;c.begin();
-c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,J);c.lineTo(l+v+w,J-w/2);c.moveTo(l+v,J);c.lineTo(l+v+w,J+w/2);c.moveTo(l+v,J);c.lineTo(l+n-v,J);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,J);c.lineTo(l+n-w-v,J-w/2);c.moveTo(l+n-v,J);c.lineTo(l+n-w-v,J+w/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ha);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,
-w=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||w||(c.pointerEvents=!1);var J="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),ba="1"==mxUtils.getValue(this.style,"right","1"),S="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||w||this.outline||J||ba||S||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,
-t),this.outline||J?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||ba?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||S?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,
+l,t,n,r){l=r*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(n,0),new mxPoint(n,r-l),new mxPoint(n/2,r),new mxPoint(0,r-l)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",F);mxUtils.extend(M,mxEllipse);M.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);
+c.begin();c.moveTo(l+n/2,t+r);c.lineTo(l+n,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",M);mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);c.end();c.stroke();c.begin();c.moveTo(l+n/2,t);c.lineTo(l+n/2,t+r);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",R);mxUtils.extend(W,mxEllipse);W.prototype.paintVertexShape=function(c,
+l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*n,t+.145*r);c.lineTo(l+.855*n,t+.855*r);c.end();c.stroke();c.begin();c.moveTo(l+.855*n,t+.145*r);c.lineTo(l+.145*n,t+.855*r);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",W);mxUtils.extend(ha,mxRhombus);ha.prototype.paintVertexShape=function(c,l,t,n,r){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,t+r/2);c.lineTo(l+n,t+r/2);
+c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ha);mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(c,l,t,n,r){c.begin();c.moveTo(l,t);c.lineTo(l+n,t);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke();c.begin();c.moveTo(l,t+r);c.lineTo(l+n,t+r);c.lineTo(l+n/2,t+r/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",fa);mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(c,l,t,n,r){var v=c.state.strokeWidth/2,x=10+2*v,I=t+r-x/2;c.begin();
+c.moveTo(l,t);c.lineTo(l,t+r);c.moveTo(l+v,I);c.lineTo(l+v+x,I-x/2);c.moveTo(l+v,I);c.lineTo(l+v+x,I+x/2);c.moveTo(l+v,I);c.lineTo(l+n-v,I);c.moveTo(l+n,t);c.lineTo(l+n,t+r);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I-x/2);c.moveTo(l+n-v,I);c.lineTo(l+n-x-v,I+x/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",ja);mxUtils.extend(va,mxEllipse);va.prototype.drawHidden=!0;va.prototype.paintVertexShape=function(c,l,t,n,r){this.outline||c.setStrokeColor(null);if(null!=this.style){var v=c.pointerEvents,
+x=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||x||(c.pointerEvents=!1);var I="1"==mxUtils.getValue(this.style,"top","1"),y="1"==mxUtils.getValue(this.style,"left","1"),aa="1"==mxUtils.getValue(this.style,"right","1"),S="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||x||this.outline||I||aa||S||y?(c.rect(l,t,n,r),c.fill(),c.pointerEvents=v,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,
+t),this.outline||I?c.lineTo(l+n,t):c.moveTo(l+n,t),this.outline||aa?c.lineTo(l+n,t+r):c.moveTo(l+n,t+r),this.outline||S?c.lineTo(l,t+r):c.moveTo(l,t+r),(this.outline||y)&&c.lineTo(l,t),c.end(),c.stroke(),c.setLineCap("flat")):c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",va);mxUtils.extend(Ma,mxEllipse);Ma.prototype.paintVertexShape=function(c,l,t,n,r){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,
"line")?(c.moveTo(l+n/2,t),c.lineTo(l+n/2,t+r)):(c.moveTo(l,t+r/2),c.lineTo(l+n,t+r/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Ma);mxUtils.extend(Na,mxActor);Na.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);c.moveTo(0,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(0,r);c.close();c.end()};mxCellRenderer.registerShape("delay",Na);mxUtils.extend(ya,mxActor);ya.prototype.size=.2;ya.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(r,n);var v=
-Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var w=(n-v)/2;v=w+v;c.moveTo(0,l);c.lineTo(w,l);c.lineTo(w,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(w,r);c.lineTo(w,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(Ga,mxActor);Ga.prototype.size=.25;Ga.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ga);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};wa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
+Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(r-v)/2;t=l+v;var x=(n-v)/2;v=x+v;c.moveTo(0,l);c.lineTo(x,l);c.lineTo(x,0);c.lineTo(v,0);c.lineTo(v,l);c.lineTo(n,l);c.lineTo(n,t);c.lineTo(v,t);c.lineTo(v,r);c.lineTo(x,r);c.lineTo(x,t);c.lineTo(0,t);c.close();c.end()};mxCellRenderer.registerShape("cross",ya);mxUtils.extend(Ha,mxActor);Ha.prototype.size=.25;Ha.prototype.redrawPath=function(c,l,t,n,r){l=Math.min(n,r/2);t=Math.min(n-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))*n);c.moveTo(0,r/2);c.lineTo(t,0);c.lineTo(n-l,0);c.quadTo(n,0,n,r/2);c.quadTo(n,r,n-l,r);c.lineTo(t,r);c.close();c.end()};mxCellRenderer.registerShape("display",Ha);mxUtils.extend(wa,mxActor);wa.prototype.cst={RECT2:"mxgraph.basic.rect"};wa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",
type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",
type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",
dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},
-{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=function(c,l,t,n,r,v){var w=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),J=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,
-parseFloat(mxUtils.getValue(this.style,"size",this.size)))),ba=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),S=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Ea=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,S)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,
-"top",!0),ra=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),pa=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),ma=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),za=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Aa=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Da=v&&v.bottomLeftStyle?
+{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];wa.prototype.paintVertexShape=function(c,l,t,n,r){c.translate(l,t);this.strictDrawShape(c,0,0,n,r)};wa.prototype.strictDrawShape=function(c,l,t,n,r,v){var x=v&&v.rectStyle?v.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),I=v&&v.absoluteCornerSize?v.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),y=v&&v.size?v.size:Math.max(0,Math.min(n,
+parseFloat(mxUtils.getValue(this.style,"size",this.size)))),aa=v&&v.rectOutline?v.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),S=v&&v.indent?v.indent:Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Fa=v&&v.dashed?v.dashed:mxUtils.getValue(this.style,"dashed",!1),Ra=v&&v.dashPattern?v.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),Oa=v&&v.relIndent?v.relIndent:Math.max(0,Math.min(50,S)),ka=v&&v.top?v.top:mxUtils.getValue(this.style,
+"top",!0),pa=v&&v.right?v.right:mxUtils.getValue(this.style,"right",!0),na=v&&v.bottom?v.bottom:mxUtils.getValue(this.style,"bottom",!0),la=v&&v.left?v.left:mxUtils.getValue(this.style,"left",!0),xa=v&&v.topLeftStyle?v.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),za=v&&v.topRightStyle?v.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Aa=v&&v.bottomRightStyle?v.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Ea=v&&v.bottomLeftStyle?
v.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Bb=v&&v.fillColor?v.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");v&&v.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Cb=v&&v.strokeWidth?v.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),zb=v&&v.fillColor2?v.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Ab=v&&v.gradientColor2?v.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Db=v&&v.gradientDirection2?
-v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Eb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Fb=Math.max(0,Math.min(50,y));v=wa.prototype;c.setDashed(Ea);Ra&&""!=Ra&&c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);J||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));J||(S=Math.min(Oa*Math.min(n,r)/100));S=Math.min(S,.5*Math.min(n,r)-y);(ka||ra||pa||ma)&&"frame"!=ba&&(c.begin(),ka?v.moveNW(c,l,t,n,r,w,xa,y,ma):c.moveTo(0,
-0),ka&&v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),ra&&v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),pa&&v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),ma&&v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Ea=J=Eb,"none"==zb&&(J=0),"none"==Ab&&(Ea=0),c.setGradient(zb,Ab,0,0,n,r,Db,J,Ea),c.begin(),ka?v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma):c.moveTo(S,0),v.paintLeftInner(c,l,
-t,n,r,w,Da,y,S,pa,ma),ma&&pa&&v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),pa&&ra&&v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),ra&&ka&&v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),ka&&ma&&v.paintNWInner(c,l,t,n,r,w,xa,y,S),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,w,xa,za,Aa,Da,y,ka,ra,pa,ma),c.stroke()));ka||ra||pa||!ma?ka||ra||!pa||ma?!ka&&!ra&&pa&&ma?"frame"!=ba?(c.begin(),v.moveSE(c,
-l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,
-l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),c.fillAndStroke()):ka||!ra||pa||ma?!ka&&ra&&!pa&&ma?"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,
-l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):!ka&&ra&&pa&&!ma?"frame"!=ba?(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,
-Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,
-l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):!ka&&ra&&pa&&ma?"frame"!=ba?(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,
-pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),
-v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):!ka||ra||pa||ma?ka&&!ra&&!pa&&ma?"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,
-r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke()):ka&&!ra&&pa&&!ma?"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,w,
-Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),
-c.fillAndStroke()):ka&&!ra&&pa&&ma?"frame"!=ba?(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,
-pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),c.fillAndStroke()):ka&&ra&&!pa&&
-!ma?"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,
-w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke()):ka&&ra&&!pa&&ma?"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,
-l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,
-S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke()):ka&&ra&&pa&&!ma?"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,
-t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,
-w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke()):ka&&ra&&pa&&ma&&("frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),c.close(),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintSWInner(c,l,t,n,r,w,Da,
-y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.paintNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.paintSE(c,l,t,n,r,w,
-Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),v.paintSW(c,l,t,n,r,w,Da,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),c.close(),v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintSWInner(c,l,t,n,r,w,Da,y,S,pa),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),v.paintSEInner(c,l,t,n,r,w,Aa,y,S),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),v.paintNEInner(c,l,t,n,r,w,za,y,S),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),v.paintNWInner(c,l,t,n,r,w,xa,y,S),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke())):
-"frame"!=ba?(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),"double"==ba&&(v.moveNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,w,xa,y,ma),v.paintTop(c,l,t,n,r,w,za,y,ra),v.lineNEInner(c,l,t,n,r,w,za,y,S,ra),v.paintTopInner(c,l,t,n,r,w,xa,y,S,ma,ka),c.close(),c.fillAndStroke()):"frame"!=ba?(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),"double"==ba&&(v.moveSEInner(c,l,t,n,r,w,
-Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,w,za,y,ka),v.paintRight(c,l,t,n,r,w,Aa,y,pa),v.lineSEInner(c,l,t,n,r,w,Aa,y,S,pa),v.paintRightInner(c,l,t,n,r,w,za,y,S,ka,ra),c.close(),c.fillAndStroke()):"frame"!=ba?(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,l,t,n,r,w,Da,y,ma),"double"==ba&&(v.moveSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,w,Aa,y,ra),v.paintBottom(c,
-l,t,n,r,w,Da,y,ma),v.lineSWInner(c,l,t,n,r,w,Da,y,S,ma),v.paintBottomInner(c,l,t,n,r,w,Aa,y,S,ra,pa),c.close(),c.fillAndStroke()):"frame"!=ba?(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),"double"==ba&&(v.moveNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,w,xa,y,pa),v.paintLeft(c,l,t,n,r,w,xa,y,ka),v.lineNWInner(c,l,t,n,r,w,xa,y,S,ka,ma),v.paintLeftInner(c,l,t,n,r,w,Da,y,S,pa,ma),c.close(),c.fillAndStroke());
-c.begin();v.paintFolds(c,l,t,n,r,w,xa,za,Aa,Da,y,ka,ra,pa,ma);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,J)};wa.prototype.moveNE=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(n,0):c.moveTo(n-J,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.moveTo(n,r):c.moveTo(n,r-J)};wa.prototype.moveSW=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==
-w&&"square"==v||!y?c.moveTo(0,r):c.moveTo(J,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,J,0)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(J,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(n,0):c.lineTo(n-J,0)};
-wa.prototype.paintNE=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,n,J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n,J);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(n,r):c.lineTo(n,r-J)};wa.prototype.paintLeft=function(c,l,t,n,r,v,w,
-J,y){"square"==w||"default"==w&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,J)};wa.prototype.paintSE=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,n-J,r)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n-J,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,w,J,y){"square"==w||"default"==w&&"square"==
-v||!y?c.lineTo(0,r):c.lineTo(J,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,w,J,y){if(y)if("rounded"==w||"default"==w&&"rounded"==v||"invRound"==w||"default"==w&&"invRound"==v){l=0;if("rounded"==w||"default"==w&&"rounded"==v)l=1;c.arcTo(J,J,0,0,l,0,r-J)}else("snip"==w||"default"==w&&"snip"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(0,r-J);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,y,.5*y+
-J);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,y,y+J);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(y,.5*y+J);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+J,y+J),c.lineTo(y,y+J)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(0,y):ba&&!S?c.lineTo(y,0):ba?"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(J+.5*y,y):c.lineTo(J+y,y):c.lineTo(0,
-y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,n-J-.5*y,y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,n-J-y,y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(n-J-.5*y,y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(n-J-y,J+y),c.lineTo(n-J-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(n-y,0):ba&&!S?c.lineTo(n,y):ba?"square"==
-w||"default"==w&&"square"==v?c.lineTo(n-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-y,J+.5*y):c.lineTo(n-y,J+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(y,r):ba&&!S?c.lineTo(0,r-y):ba?"square"==w||"default"==w&&"square"==v?c.lineTo(y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,r-J-.5*y):c.lineTo(y,r-J-y):c.lineTo(y,r):c.lineTo(0,
-r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,w,J,y){if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,n-y,r-J-.5*y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,n-y,r-J-y);else if("snip"==w||"default"==w&&"snip"==v)c.lineTo(n-y,r-J-.5*y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(n-J-y,r-J-y),c.lineTo(n-y,r-J-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(n,r-y):ba&&!S?c.lineTo(n-y,r):"square"==
-w||"default"==w&&"square"==v||!ba?c.lineTo(n-y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-J-.5*y,r-y):c.lineTo(n-J-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,w,J,y,ba){if(!ba)c.lineTo(y,r);else if("square"==w||"default"==w&&"square"==v)c.lineTo(y,r-y);else if("rounded"==w||"default"==w&&"rounded"==v)c.arcTo(J-.5*y,J-.5*y,0,0,0,J+.5*y,r-y);else if("invRound"==w||"default"==w&&"invRound"==v)c.arcTo(J+y,J+y,0,0,1,J+y,r-y);else if("snip"==
-w||"default"==w&&"snip"==v)c.lineTo(J+.5*y,r-y);else if("fold"==w||"default"==w&&"fold"==v)c.lineTo(y+J,r-J-y),c.lineTo(y+J,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.moveTo(y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,r-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,r-J-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,
-r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.lineTo(y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,r-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,r-J-y):c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.moveTo(n-y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(n-y,r-J-.5*y):
-("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(n-y,r-J-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v?c.lineTo(n-y,r-y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-y,r-J-.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n-y,r-J-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,w,
-J,y,ba){ba?"square"==w||"default"==w&&"square"==v||ba?c.moveTo(n-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(n-y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(n-y,J+y):c.moveTo(n,y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,w,J,y,ba){ba?"square"==w||"default"==w&&"square"==v||ba?c.lineTo(n-y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(n-y,J+.5*y):("invRound"==
-w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(n-y,J+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.moveTo(y,0):ba&&!S?c.moveTo(0,y):"square"==w||"default"==w&&"square"==v?c.moveTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.moveTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.moveTo(y,J+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,
-l,t,n,r,v,w,J,y,ba,S){ba||S?!ba&&S?c.lineTo(y,0):ba&&!S?c.lineTo(0,y):"square"==w||"default"==w&&"square"==v?c.lineTo(y,y):"rounded"==w||"default"==w&&"rounded"==v||"snip"==w||"default"==w&&"snip"==v?c.lineTo(y,J+.5*y):("invRound"==w||"default"==w&&"invRound"==v||"fold"==w||"default"==w&&"fold"==v)&&c.lineTo(y,J+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,w,J,y,ba,S,Ea,Ra,Oa,ka){if("fold"==v||"fold"==w||"fold"==J||"fold"==y||"fold"==ba)("fold"==w||"default"==w&&"fold"==v)&&Ea&&
-ka&&(c.moveTo(0,S),c.lineTo(S,S),c.lineTo(S,0)),("fold"==J||"default"==J&&"fold"==v)&&Ea&&Ra&&(c.moveTo(n-S,0),c.lineTo(n-S,S),c.lineTo(n,S)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-S,r),c.lineTo(n-S,r-S),c.lineTo(n,r-S)),("fold"==ba||"default"==ba&&"fold"==v)&&Oa&&ka&&(c.moveTo(0,r-S),c.lineTo(S,r-S),c.lineTo(S,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;
+v.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Eb=v&&v.opacity?v.opacity:mxUtils.getValue(this.style,"opacity","100"),Fb=Math.max(0,Math.min(50,y));v=wa.prototype;c.setDashed(Fa);Ra&&""!=Ra&&c.setDashPattern(Ra);c.setStrokeWidth(Cb);y=Math.min(.5*r,.5*n,y);I||(y=Fb*Math.min(n,r)/100);y=Math.min(y,.5*Math.min(n,r));I||(S=Math.min(Oa*Math.min(n,r)/100));S=Math.min(S,.5*Math.min(n,r)-y);(ka||pa||na||la)&&"frame"!=aa&&(c.begin(),ka?v.moveNW(c,l,t,n,r,x,xa,y,la):c.moveTo(0,
+0),ka&&v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),pa&&v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),na&&v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),la&&v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(zb),Fa=I=Eb,"none"==zb&&(I=0),"none"==Ab&&(Fa=0),c.setGradient(zb,Ab,0,0,n,r,Db,I,Fa),c.begin(),ka?v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la):c.moveTo(S,0),v.paintLeftInner(c,l,
+t,n,r,x,Ea,y,S,na,la),la&&na&&v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),na&&pa&&v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),pa&&ka&&v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),ka&&la&&v.paintNWInner(c,l,t,n,r,x,xa,y,S),c.fill(),"none"==Bb&&(c.begin(),v.paintFolds(c,l,t,n,r,x,xa,za,Aa,Ea,y,ka,pa,na,la),c.stroke()));ka||pa||na||!la?ka||pa||!na||la?!ka&&!pa&&na&&la?"frame"!=aa?(c.begin(),v.moveSE(c,
+l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,
+l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),c.fillAndStroke()):ka||!pa||na||la?!ka&&pa&&!na&&la?"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke(),c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,
+l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke(),c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&!la?"frame"!=aa?(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,
+Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,
+l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):!ka&&pa&&na&&la?"frame"!=aa?(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,
+na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),
+v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):!ka||pa||na||la?ka&&!pa&&!na&&la?"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,
+r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke()):ka&&!pa&&na&&!la?"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke(),c.begin(),v.moveSE(c,l,t,n,r,x,
+Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke(),c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),
+c.fillAndStroke()):ka&&!pa&&na&&la?"frame"!=aa?(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,
+na)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),c.fillAndStroke()):ka&&pa&&!na&&
+!la?"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,
+x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke()):ka&&pa&&!na&&la?"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,
+l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,
+S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke()):ka&&pa&&na&&!la?"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,
+t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,
+x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke()):ka&&pa&&na&&la&&("frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),c.close(),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintSWInner(c,l,t,n,r,x,Ea,
+y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close()),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.paintNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.paintSE(c,l,t,n,r,x,
+Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),v.paintSW(c,l,t,n,r,x,Ea,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),c.close(),v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintSWInner(c,l,t,n,r,x,Ea,y,S,na),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),v.paintSEInner(c,l,t,n,r,x,Aa,y,S),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),v.paintNEInner(c,l,t,n,r,x,za,y,S),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),v.paintNWInner(c,l,t,n,r,x,xa,y,S),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke())):
+"frame"!=aa?(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),"double"==aa&&(v.moveNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka)),c.stroke()):(c.begin(),v.moveNW(c,l,t,n,r,x,xa,y,la),v.paintTop(c,l,t,n,r,x,za,y,pa),v.lineNEInner(c,l,t,n,r,x,za,y,S,pa),v.paintTopInner(c,l,t,n,r,x,xa,y,S,la,ka),c.close(),c.fillAndStroke()):"frame"!=aa?(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),"double"==aa&&(v.moveSEInner(c,l,t,n,r,x,
+Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa)),c.stroke()):(c.begin(),v.moveNE(c,l,t,n,r,x,za,y,ka),v.paintRight(c,l,t,n,r,x,Aa,y,na),v.lineSEInner(c,l,t,n,r,x,Aa,y,S,na),v.paintRightInner(c,l,t,n,r,x,za,y,S,ka,pa),c.close(),c.fillAndStroke()):"frame"!=aa?(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,l,t,n,r,x,Ea,y,la),"double"==aa&&(v.moveSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na)),c.stroke()):(c.begin(),v.moveSE(c,l,t,n,r,x,Aa,y,pa),v.paintBottom(c,
+l,t,n,r,x,Ea,y,la),v.lineSWInner(c,l,t,n,r,x,Ea,y,S,la),v.paintBottomInner(c,l,t,n,r,x,Aa,y,S,pa,na),c.close(),c.fillAndStroke()):"frame"!=aa?(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),"double"==aa&&(v.moveNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la)),c.stroke()):(c.begin(),v.moveSW(c,l,t,n,r,x,xa,y,na),v.paintLeft(c,l,t,n,r,x,xa,y,ka),v.lineNWInner(c,l,t,n,r,x,xa,y,S,ka,la),v.paintLeftInner(c,l,t,n,r,x,Ea,y,S,na,la),c.close(),c.fillAndStroke());
+c.begin();v.paintFolds(c,l,t,n,r,x,xa,za,Aa,Ea,y,ka,pa,na,la);c.stroke()};wa.prototype.moveNW=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(0,0):c.moveTo(0,I)};wa.prototype.moveNE=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(n,0):c.moveTo(n-I,0)};wa.prototype.moveSE=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.moveTo(n,r):c.moveTo(n,r-I)};wa.prototype.moveSW=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==
+x&&"square"==v||!y?c.moveTo(0,r):c.moveTo(I,r)};wa.prototype.paintNW=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,I,0)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(I,0);else c.lineTo(0,0)};wa.prototype.paintTop=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,0):c.lineTo(n-I,0)};
+wa.prototype.paintNE=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n,I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n,I);else c.lineTo(n,0)};wa.prototype.paintRight=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(n,r):c.lineTo(n,r-I)};wa.prototype.paintLeft=function(c,l,t,n,r,v,x,
+I,y){"square"==x||"default"==x&&"square"==v||!y?c.lineTo(0,0):c.lineTo(0,I)};wa.prototype.paintSE=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,n-I,r)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-I,r);else c.lineTo(n,r)};wa.prototype.paintBottom=function(c,l,t,n,r,v,x,I,y){"square"==x||"default"==x&&"square"==
+v||!y?c.lineTo(0,r):c.lineTo(I,r)};wa.prototype.paintSW=function(c,l,t,n,r,v,x,I,y){if(y)if("rounded"==x||"default"==x&&"rounded"==v||"invRound"==x||"default"==x&&"invRound"==v){l=0;if("rounded"==x||"default"==x&&"rounded"==v)l=1;c.arcTo(I,I,0,0,l,0,r-I)}else("snip"==x||"default"==x&&"snip"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(0,r-I);else c.lineTo(0,r)};wa.prototype.paintNWInner=function(c,l,t,n,r,v,x,I,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,y,.5*y+
+I);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,y,y+I);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(y,.5*y+I);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+I,y+I),c.lineTo(y,y+I)};wa.prototype.paintTopInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(0,y):aa&&!S?c.lineTo(y,0):aa?"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(I+.5*y,y):c.lineTo(I+y,y):c.lineTo(0,
+y):c.lineTo(0,0)};wa.prototype.paintNEInner=function(c,l,t,n,r,v,x,I,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,n-I-.5*y,y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,n-I-y,y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-I-.5*y,y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-y,I+y),c.lineTo(n-I-y,y)};wa.prototype.paintRightInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(n-y,0):aa&&!S?c.lineTo(n,y):aa?"square"==
+x||"default"==x&&"square"==v?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,I+.5*y):c.lineTo(n-y,I+y):c.lineTo(n-y,0):c.lineTo(n,0)};wa.prototype.paintLeftInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(y,r):aa&&!S?c.lineTo(0,r-y):aa?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-I-.5*y):c.lineTo(y,r-I-y):c.lineTo(y,r):c.lineTo(0,
+r)};wa.prototype.paintSEInner=function(c,l,t,n,r,v,x,I,y){if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,n-y,r-I-.5*y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,n-y,r-I-y);else if("snip"==x||"default"==x&&"snip"==v)c.lineTo(n-y,r-I-.5*y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(n-I-y,r-I-y),c.lineTo(n-y,r-I-y)};wa.prototype.paintBottomInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(n,r-y):aa&&!S?c.lineTo(n-y,r):"square"==
+x||"default"==x&&"square"==v||!aa?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-I-.5*y,r-y):c.lineTo(n-I-y,r-y):c.lineTo(n,r)};wa.prototype.paintSWInner=function(c,l,t,n,r,v,x,I,y,aa){if(!aa)c.lineTo(y,r);else if("square"==x||"default"==x&&"square"==v)c.lineTo(y,r-y);else if("rounded"==x||"default"==x&&"rounded"==v)c.arcTo(I-.5*y,I-.5*y,0,0,0,I+.5*y,r-y);else if("invRound"==x||"default"==x&&"invRound"==v)c.arcTo(I+y,I+y,0,0,1,I+y,r-y);else if("snip"==
+x||"default"==x&&"snip"==v)c.lineTo(I+.5*y,r-y);else if("fold"==x||"default"==x&&"fold"==v)c.lineTo(y+I,r-I-y),c.lineTo(y+I,r-y)};wa.prototype.moveSWInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.moveTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,r-I-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,r-I-y):c.moveTo(0,r-y)};wa.prototype.lineSWInner=function(c,l,t,n,
+r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.lineTo(y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,r-I-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,r-I-y):c.lineTo(0,r-y)};wa.prototype.moveSEInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.moveTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,r-I-.5*y):
+("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,r-I-y):c.moveTo(n-y,r)};wa.prototype.lineSEInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v?c.lineTo(n-y,r-y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,r-I-.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,r-I-y):c.lineTo(n-y,r)};wa.prototype.moveNEInner=function(c,l,t,n,r,v,x,
+I,y,aa){aa?"square"==x||"default"==x&&"square"==v||aa?c.moveTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(n-y,I+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(n-y,I+y):c.moveTo(n,y)};wa.prototype.lineNEInner=function(c,l,t,n,r,v,x,I,y,aa){aa?"square"==x||"default"==x&&"square"==v||aa?c.lineTo(n-y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(n-y,I+.5*y):("invRound"==
+x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(n-y,I+y):c.lineTo(n,y)};wa.prototype.moveNWInner=function(c,l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.moveTo(y,0):aa&&!S?c.moveTo(0,y):"square"==x||"default"==x&&"square"==v?c.moveTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.moveTo(y,I+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.moveTo(y,I+y):c.moveTo(0,0)};wa.prototype.lineNWInner=function(c,
+l,t,n,r,v,x,I,y,aa,S){aa||S?!aa&&S?c.lineTo(y,0):aa&&!S?c.lineTo(0,y):"square"==x||"default"==x&&"square"==v?c.lineTo(y,y):"rounded"==x||"default"==x&&"rounded"==v||"snip"==x||"default"==x&&"snip"==v?c.lineTo(y,I+.5*y):("invRound"==x||"default"==x&&"invRound"==v||"fold"==x||"default"==x&&"fold"==v)&&c.lineTo(y,I+y):c.lineTo(0,0)};wa.prototype.paintFolds=function(c,l,t,n,r,v,x,I,y,aa,S,Fa,Ra,Oa,ka){if("fold"==v||"fold"==x||"fold"==I||"fold"==y||"fold"==aa)("fold"==x||"default"==x&&"fold"==v)&&Fa&&
+ka&&(c.moveTo(0,S),c.lineTo(S,S),c.lineTo(S,0)),("fold"==I||"default"==I&&"fold"==v)&&Fa&&Ra&&(c.moveTo(n-S,0),c.lineTo(n-S,S),c.lineTo(n,S)),("fold"==y||"default"==y&&"fold"==v)&&Oa&&Ra&&(c.moveTo(n-S,r),c.lineTo(n-S,r-S),c.lineTo(n,r-S)),("fold"==aa||"default"==aa&&"fold"==v)&&Oa&&ka&&(c.moveTo(0,r-S),c.lineTo(S,r-S),c.lineTo(S,r))};mxCellRenderer.registerShape(wa.prototype.cst.RECT2,wa);wa.prototype.constraints=null;mxUtils.extend(ua,mxConnector);ua.prototype.origPaintEdgeShape=ua.prototype.paintEdgeShape;
ua.prototype.paintEdgeShape=function(c,l,t){for(var n=[],r=0;r<l.length;r++)n.push(mxUtils.clone(l[r]));r=c.state.dashed;var v=c.state.fixDash;ua.prototype.origPaintEdgeShape.apply(this,[c,n,t]);3<=c.state.strokeWidth&&(n=mxUtils.getValue(this.style,"fillColor",null),null!=n&&(c.setStrokeColor(n),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(r,v),ua.prototype.origPaintEdgeShape.apply(this,[c,l,t])))};mxCellRenderer.registerShape("filledEdge",ua);"undefined"!==typeof StyleFormatPanel&&function(){var c=
-StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Ea/2,n.y-Ea/2+S/2);c.lineTo(n.x+Ea/2-3*S/2,n.y-3*Ea/2-S/2);c.stroke()}});mxMarker.addMarker("box",
-function(c,l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1),Ra=n.x+S/2,Oa=n.y+Ea/2;n.x-=S;n.y-=Ea;return function(){c.begin();c.moveTo(Ra-S/2-Ea/2,Oa-Ea/2+S/2);c.lineTo(Ra-S/2+Ea/2,Oa-Ea/2-S/2);c.lineTo(Ra+Ea/2-3*S/2,Oa-3*Ea/2-S/2);c.lineTo(Ra-Ea/2-3*S/2,Oa-3*Ea/2+S/2);c.close();ba?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Ea/2,n.y-Ea/2+S/2);c.lineTo(n.x+Ea/2-3*S/2,n.y-3*Ea/2-
-S/2);c.moveTo(n.x-S/2+Ea/2,n.y-Ea/2-S/2);c.lineTo(n.x-Ea/2-3*S/2,n.y-3*Ea/2+S/2);c.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,w,J,y,ba){var S=n.clone(),Ea=Va.apply(this,arguments),Ra=r*(w+2*y),Oa=v*(w+2*y);return function(){Ea.apply(this,arguments);c.begin();c.moveTo(S.x-r*y,S.y-v*y);c.lineTo(S.x-2*Ra+r*y,S.y-2*Oa+v*y);c.moveTo(S.x-Ra-Oa+v*y,S.y-Oa+Ra-r*y);c.lineTo(S.x+Oa-Ra-v*y,S.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
-l,t,n,r,v,w,J,y,ba){var S=r*(w+y+1),Ea=v*(w+y+1),Ra=n.clone();n.x-=S;n.y-=Ea;return function(){c.begin();c.moveTo(Ra.x-Ea,Ra.y+S);c.quadTo(n.x-Ea,n.y+S,n.x,n.y);c.quadTo(n.x+Ea,n.y-S,Ra.x+Ea,Ra.y-S);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,w,J,y,ba){l=r*y*1.118;t=v*y*1.118;r*=w+y;v*=w+y;var S=n.clone();S.x-=l;S.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(S.x,S.y);J?c.lineTo(S.x-r-v/2,S.y-v+r/2):c.lineTo(S.x+v/2-r,S.y-v-r/2);c.lineTo(S.x-r,S.y-v);c.close();ba?
-c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,w,J,y,ba,S){v*=J+ba;w*=J+ba;var Ea=r.clone();return function(){l.begin();l.moveTo(Ea.x,Ea.y);y?l.lineTo(Ea.x-v-w/c,Ea.y-w+v/c):l.lineTo(Ea.x+w/c-v,Ea.y-w-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var nb=function(c,l,t){return db(c,["width"],l,function(n,r,v,w,J){J=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(w.x+r*n/4+v*J/2,w.y+v*n/4-r*J/2)},function(n,
-r,v,w,J,y){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));c.style.width=Math.round(2*n)/c.view.scale-t})},db=function(c,l,t,n,r){return Ta(c,l,function(v){var w=c.absolutePoints;if(null!=w&&0<w.length){var J=w.length-1;v=c.view.translate;var y=c.view.scale,ba=t?w[0]:w[J];w=t?w[1]:w[J-1];J=w.x-ba.x;var S=w.y-ba.y,Ea=Math.sqrt(J*J+S*S);ba=n.call(this,Ea,J/Ea,S/Ea,ba,w);return new mxPoint(ba.x/y-v.x,ba.y/y-v.y)}return null},function(v,w,J){var y=c.absolutePoints,ba=y.length-1;v=c.view.translate;
-var S=c.view.scale,Ea=t?y[0]:y[ba];y=t?y[1]:y[ba-1];ba=y.x-Ea.x;var Ra=y.y-Ea.y,Oa=Math.sqrt(ba*ba+Ra*Ra);w.x=(w.x+v.x)*S;w.y=(w.y+v.y)*S;r.call(this,Oa,ba/Oa,Ra/Oa,Ea,y,w,J)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,function(n,r,v,w,J){J=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(w.x+r*n/4+v*J/2,w.y+v*n/4-r*J/2)},function(n,r,v,w,J,y){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));t.style.startWidth=Math.round(2*n)/t.view.scale-
+StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),t=c.apply(this,arguments);"umlFrame"==l.style.shape&&t.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return t}}();mxMarker.addMarker("dash",function(c,l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-S/2);c.stroke()}});mxMarker.addMarker("box",
+function(c,l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.x+S/2,Oa=n.y+Fa/2;n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra-S/2-Fa/2,Oa-Fa/2+S/2);c.lineTo(Ra-S/2+Fa/2,Oa-Fa/2-S/2);c.lineTo(Ra+Fa/2-3*S/2,Oa-3*Fa/2-S/2);c.lineTo(Ra-Fa/2-3*S/2,Oa-3*Fa/2+S/2);c.close();aa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1);return function(){c.begin();c.moveTo(n.x-S/2-Fa/2,n.y-Fa/2+S/2);c.lineTo(n.x+Fa/2-3*S/2,n.y-3*Fa/2-
+S/2);c.moveTo(n.x-S/2+Fa/2,n.y-Fa/2-S/2);c.lineTo(n.x-Fa/2-3*S/2,n.y-3*Fa/2+S/2);c.stroke()}});mxMarker.addMarker("circle",Va);mxMarker.addMarker("circlePlus",function(c,l,t,n,r,v,x,I,y,aa){var S=n.clone(),Fa=Va.apply(this,arguments),Ra=r*(x+2*y),Oa=v*(x+2*y);return function(){Fa.apply(this,arguments);c.begin();c.moveTo(S.x-r*y,S.y-v*y);c.lineTo(S.x-2*Ra+r*y,S.y-2*Oa+v*y);c.moveTo(S.x-Ra-Oa+v*y,S.y-Oa+Ra-r*y);c.lineTo(S.x+Oa-Ra-v*y,S.y-Oa-Ra+r*y);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,
+l,t,n,r,v,x,I,y,aa){var S=r*(x+y+1),Fa=v*(x+y+1),Ra=n.clone();n.x-=S;n.y-=Fa;return function(){c.begin();c.moveTo(Ra.x-Fa,Ra.y+S);c.quadTo(n.x-Fa,n.y+S,n.x,n.y);c.quadTo(n.x+Fa,n.y-S,Ra.x+Fa,Ra.y-S);c.stroke()}});mxMarker.addMarker("async",function(c,l,t,n,r,v,x,I,y,aa){l=r*y*1.118;t=v*y*1.118;r*=x+y;v*=x+y;var S=n.clone();S.x-=l;S.y-=t;n.x+=-r-l;n.y+=-v-t;return function(){c.begin();c.moveTo(S.x,S.y);I?c.lineTo(S.x-r-v/2,S.y-v+r/2):c.lineTo(S.x+v/2-r,S.y-v-r/2);c.lineTo(S.x-r,S.y-v);c.close();aa?
+c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,t,n,r,v,x,I,y,aa,S){v*=I+aa;x*=I+aa;var Fa=r.clone();return function(){l.begin();l.moveTo(Fa.x,Fa.y);y?l.lineTo(Fa.x-v-x/c,Fa.y-x+v/c):l.lineTo(Fa.x+x/c-v,Fa.y-x-v/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var nb=function(c,l,t){return db(c,["width"],l,function(n,r,v,x,I){I=c.shape.getEdgeWidth()*c.view.scale+t;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,
+r,v,x,I,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));c.style.width=Math.round(2*n)/c.view.scale-t})},db=function(c,l,t,n,r){return Ta(c,l,function(v){var x=c.absolutePoints;if(null!=x&&0<x.length){var I=x.length-1;v=c.view.translate;var y=c.view.scale,aa=t?x[0]:x[I];x=t?x[1]:x[I-1];I=x.x-aa.x;var S=x.y-aa.y,Fa=Math.sqrt(I*I+S*S);aa=n.call(this,Fa,I/Fa,S/Fa,aa,x);return new mxPoint(aa.x/y-v.x,aa.y/y-v.y)}return null},function(v,x,I){var y=c.absolutePoints,aa=y.length-1;v=c.view.translate;
+var S=c.view.scale,Fa=t?y[0]:y[aa];y=t?y[1]:y[aa-1];aa=y.x-Fa.x;var Ra=y.y-Fa.y,Oa=Math.sqrt(aa*aa+Ra*Ra);x.x=(x.x+v.x)*S;x.y=(x.y+v.y)*S;r.call(this,Oa,aa/Oa,Ra/Oa,Fa,y,x,I)})},qb=function(c,l){return function(t){return[db(t,["startWidth"],!0,function(n,r,v,x,I){I=mxUtils.getNumber(t.style,"startWidth",c)*t.view.scale+l;return new mxPoint(x.x+r*n/4+v*I/2,x.y+v*n/4-r*I/2)},function(n,r,v,x,I,y){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));t.style.startWidth=Math.round(2*n)/t.view.scale-
l})]}},bb=function(c){return function(l){return[Ta(l,["arrowWidth","arrowSize"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ab.prototype.arrowWidth))),r=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",ab.prototype.arrowSize)));return new mxPoint(t.x+(1-r)*t.width,t.y+(1-n)*t.height/2)},function(t,n){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(t.y+t.height/2-n.y)/t.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,
-(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Ta(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},rb=function(c,l,t){return function(n){var r=[Ta(n,["size"],function(v){var w=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+w,v.y+
-w)},function(v,w){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,w.x-v.x),Math.min(v.height,w.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},tb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var w=[Ta(v,["size"],function(J){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ba=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(J.x+Math.max(0,Math.min(.5*J.width,
-ba*(y?1:J.width))),J.getCenterY())},function(J,y,ba){J=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-J.x:Math.max(0,Math.min(t,(y.x-J.x)/J.width));this.state.style.size=J},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&w.push(hb(v));return w}},yb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Ta(n,["size"],function(v){var w=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,J=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
-"size",w?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,J*(w?.75:.75*v.width)),v.y+v.height/4)},function(v,w){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?w.x-v.x:Math.max(0,Math.min(c,(w.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l}},hb=function(c,l){return Ta(c,
+(t.x+t.width-n.x)/t.width))})]}},wb=function(c){return function(l){return[Ta(l,["size"],function(t){var n=Math.max(0,Math.min(.5*t.height,parseFloat(mxUtils.getValue(this.state.style,"size",c))));return new mxPoint(t.x,t.y+n)},function(t,n){this.state.style.size=Math.max(0,n.y-t.y)},!0)]}},rb=function(c,l,t){return function(n){var r=[Ta(n,["size"],function(v){var x=Math.max(0,Math.min(v.width,Math.min(v.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(v.x+x,v.y+
+x)},function(v,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(v.width,x.x-v.x),Math.min(v.height,x.y-v.y)))/c)},!1)];t&&mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},tb=function(c,l,t,n,r){t=null!=t?t:.5;return function(v){var x=[Ta(v,["size"],function(I){var y=null!=r?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,aa=parseFloat(mxUtils.getValue(this.state.style,"size",y?r:c));return new mxPoint(I.x+Math.max(0,Math.min(.5*I.width,
+aa*(y?1:I.width))),I.getCenterY())},function(I,y,aa){I=null!=r&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?y.x-I.x:Math.max(0,Math.min(t,(y.x-I.x)/I.width));this.state.style.size=I},!1,n)];l&&mxUtils.getValue(v.style,mxConstants.STYLE_ROUNDED,!1)&&x.push(hb(v));return x}},yb=function(c,l,t){c=null!=c?c:.5;return function(n){var r=[Ta(n,["size"],function(v){var x=null!=t?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,I=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,
+"size",x?t:l)));return new mxPoint(v.x+Math.min(.75*v.width*c,I*(x?.75:.75*v.width)),v.y+v.height/4)},function(v,x){v=null!=t&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?x.x-v.x:Math.max(0,Math.min(c,(x.x-v.x)/v.width*.75));this.state.style.size=v},!1,!0)];mxUtils.getValue(n.style,mxConstants.STYLE_ROUNDED,!1)&&r.push(hb(n));return r}},lb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l}},hb=function(c,l){return Ta(c,
[mxConstants.STYLE_ARCSIZE],function(t){var n=null!=l?l:t.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var r=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(t.x+t.width-Math.min(t.width/2,r),t.y+n)}r=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(t.x+t.width-Math.min(Math.max(t.width/2,t.height/2),Math.min(t.width,t.height)*
-r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,w){var J=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);J.execute=function(ba){for(var S=0;S<l.length;S++)this.copyStyle(l[S]);
-w&&w(ba)};J.getPosition=t;J.setPosition=n;J.ignoreGrid=null!=r?r:!0;if(v){var y=J.positionChanged;J.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return J},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!0,function(n,r,v,w,J){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*c.view.scale)+v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
-3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(ba.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
-!0,function(n,r,v,w,J){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*c.view.scale)+v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
-3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(ba.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),
-Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,w,J){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*
-c.view.scale)-v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(ba.getEvent())||
-Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,w,J){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;J=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(w.x+r*(J+c.shape.strokewidth*
-c.view.scale)-v*n/2,w.y+v*(J+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,w,J,y,ba){n=Math.sqrt(mxUtils.ptSegDistSq(w.x,w.y,J.x,J.y,y.x,y.y));r=mxUtils.ptLineDist(w.x,w.y,w.x+v,w.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(ba.getEvent())||mxEvent.isControlDown(ba.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],
-c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(ba.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=parseFloat(mxUtils.getValue(c.style,
+r),t.y+n)},function(t,n,r){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(t.width,2*(t.x+t.width-n.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(t.width-n.x+t.x)/Math.min(t.width,t.height))))})},Ta=function(c,l,t,n,r,v,x){var I=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);I.execute=function(aa){for(var S=0;S<l.length;S++)this.copyStyle(l[S]);
+x&&x(aa)};I.getPosition=t;I.setPosition=n;I.ignoreGrid=null!=r?r:!0;if(v){var y=I.positionChanged;I.positionChanged=function(){y.apply(this,arguments);c.view.invalidate(this.state.cell);c.view.validate()}}return I},Sa={link:function(c){return[nb(c,!0,10),nb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,t=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(n,r,v,x,I){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
+3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(aa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(n,r,v,x,I){n=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*c.view.scale)+v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)-r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(r-c.shape.strokewidth)/
+3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(aa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),
+Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(t.push(db(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,x,I){n=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*
+c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*n)/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(aa.getEvent())||
+Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),t.push(db(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(n,r,v,x,I){n=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;I=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(x.x+r*(I+c.shape.strokewidth*
+c.view.scale)-v*n/2,x.y+v*(I+c.shape.strokewidth*c.view.scale)+r*n/2)},function(n,r,v,x,I,y,aa){n=Math.sqrt(mxUtils.ptSegDistSq(x.x,x.y,I.x,I.y,y.x,y.y));r=mxUtils.ptLineDist(x.x,x.y,x.x+v,x.y-r,y.x,y.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(r-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*n)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(aa.getEvent())||mxEvent.isControlDown(aa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],
+c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(aa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return t},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var t=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(hb(c,t/2))}l.push(Ta(c,[mxConstants.STYLE_STARTSIZE],function(n){var r=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(n.getCenterX(),n.y+Math.max(0,Math.min(n.height,r))):new mxPoint(n.x+Math.max(0,Math.min(n.width,r)),n.getCenterY())},function(n,r){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var w=[],J=0;J<v.length;J++)v[J]!=c.cell&&r.isSwimlane(v[J])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[J]))==
-n&&w.push(v[J]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],w)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",oa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,
-["width","height"],function(l){var t=Math.max(sa.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",sa.prototype.width))),n=Math.max(1.5*sa.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",sa.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(sa.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*sa.prototype.corner,Math.min(l.height,t.y-l.y)))},
-!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
+mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(n.height,r.y-n.y))):Math.round(Math.max(0,Math.min(n.width,r.x-n.x)))},!1,null,function(n){var r=c.view.graph;if(!mxEvent.isShiftDown(n.getEvent())&&!mxEvent.isControlDown(n.getEvent())&&(r.isTableRow(c.cell)||r.isTableCell(c.cell))){n=r.getSwimlaneDirection(c.style);var v=r.model.getParent(c.cell);v=r.model.getChildCells(v,!0);for(var x=[],I=0;I<v.length;I++)v[I]!=c.cell&&r.isSwimlane(v[I])&&r.getSwimlaneDirection(r.getCurrentCellStyle(v[I]))==
+n&&x.push(v[I]);r.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],x)}}));return l},label:lb(),ext:lb(),rectangle:lb(),triangle:lb(),rhombus:lb(),umlLifeline:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",ra.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},umlFrame:function(c){return[Ta(c,
+["width","height"],function(l){var t=Math.max(qa.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",qa.prototype.width))),n=Math.max(1.5*qa.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",qa.prototype.height)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.width=Math.round(Math.max(qa.prototype.corner,Math.min(l.width,t.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*qa.prototype.corner,Math.min(l.height,t.y-l.y)))},
+!1)]},process:function(c){var l=[Ta(c,["size"],function(t){var n="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),r=parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size));return n?new mxPoint(t.x+r,t.y+t.height/4):new mxPoint(t.x+t.width*r,t.y+t.height/4)},function(t,n){t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*t.width,n.x-t.x)):Math.max(0,Math.min(.5,(n.x-t.x)/t.width));this.state.style.size=t},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,
!1)&&l.push(hb(c));return l},cross:function(c){return[Ta(c,["size"],function(l){var t=Math.min(l.width,l.height);t=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ya.prototype.size)))*t/2;return new mxPoint(l.getCenterX()-t,l.getCenterY()-t)},function(l,t){var n=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-t.y)/n*2,Math.max(0,l.getCenterX()-t.x)/n*2)))})]},note:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,
Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},note2:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",u.prototype.size)))));return new mxPoint(l.x+l.width-t,l.y+t)},
function(l,t){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-t.x),Math.min(l.height,t.y-l.y))))})]},manualInput:function(c){var l=[Ta(c,["size"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Ya.prototype.size)));return new mxPoint(t.x+t.width/4,t.y+3*n/4)},function(t,n){this.state.style.size=Math.round(Math.max(0,Math.min(t.height,4*(n.y-t.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));
return l},dataStorage:function(c){return[Ta(c,["size"],function(l){var t="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),n=parseFloat(mxUtils.getValue(this.state.style,"size",t?eb.prototype.fixedSize:eb.prototype.size));return new mxPoint(l.x+l.width-n*(t?1:l.width),l.getCenterY())},function(l,t){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-t.x)):Math.max(0,Math.min(1,(l.x+l.width-t.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=
-[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",aa.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",aa.prototype.position)));mxUtils.getValue(this.state.style,"base",aa.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",aa.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=
-Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",aa.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",aa.prototype.size))),r=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position",aa.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",aa.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",aa.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));
-return l},internalStorage:function(c){var l=[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&
-l.push(hb(c));return l},module:function(c){return[Ta(c,["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Fa.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Fa.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,
-t.y-l.y))/2)})]},corner:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Ta(c,["dx","dy"],function(l){var t=
-Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",gb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",gb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:bb(1),doubleArrow:bb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,
-20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),folder:function(c){return[Ta(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,
-t.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",T.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,
-Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",x.isoAngle))))*Math.PI/
-200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-
-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));
-return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(na.prototype.size,!0,.5,!0,na.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ga.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,I.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,
-U.prototype.fixedSize),parallelogram:yb(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&
-(l=mxConstants.SHAPE_SWIMLANE);l=Sa[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=Sa[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory=
-{};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var w=c.absolutePoints,J=w[0];w=w[w.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==J&&null!=l&&(J=new mxPoint(l.getCenterX(),l.getCenterY()));null==w&&null!=t&&(w=new mxPoint(t.getCenterX(),
-t.getCenterY()));var y=$a.x,ba=$a.y,S=kb.x,Ea=kb.y,Ra="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=w&&null!=J){c=function(ka,ra,pa){ka-=Oa.x;var ma=ra-Oa.y;ra=(Ea*ka-S*ma)/(y*Ea-ba*S);ka=(ba*ka-y*ma)/(ba*S-y*Ea);Ra?(pa&&(Oa=new mxPoint(Oa.x+y*ra,Oa.y+ba*ra),r.push(Oa)),Oa=new mxPoint(Oa.x+S*ka,Oa.y+Ea*ka)):(pa&&(Oa=new mxPoint(Oa.x+S*ka,Oa.y+Ea*ka),r.push(Oa)),Oa=new mxPoint(Oa.x+y*ra,Oa.y+ba*ra));r.push(Oa)};var Oa=J;null==n&&(n=new mxPoint(J.x+(w.x-J.x)/2,J.y+(w.y-J.y)/
-2));c(n.x,n.y,!0);c(w.x,w.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};g.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;
-c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};x.prototype.getConstraints=function(c,l,t){c=[];var n=
-Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-
-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));return c};aa.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));
-parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),
-new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};I.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};f.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};C.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=
-function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};cb.prototype.constraints=mxRectangleShape.prototype.constraints;eb.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;
-X.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ga.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Fa.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",Fa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",Fa.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));t>15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
-.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
-.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
-0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
-1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+[Ta(c,["size","position"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Z.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Z.prototype.position)));mxUtils.getValue(this.state.style,"base",Z.prototype.base);return new mxPoint(t.x+r*t.width,t.y+t.height-n)},function(t,n){mxUtils.getValue(this.state.style,"base",Z.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(t.height,t.y+t.height-n.y)));this.state.style.position=
+Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["position2"],function(t){var n=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",Z.prototype.position2)));return new mxPoint(t.x+n*t.width,t.y+t.height)},function(t,n){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(n.x-t.x)/t.width)))/100},!1),Ta(c,["base"],function(t){var n=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"size",Z.prototype.size))),r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",Z.prototype.position))),v=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"base",Z.prototype.base)));return new mxPoint(t.x+Math.min(t.width,r*t.width+v),t.y+t.height-n)},function(t,n){var r=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",Z.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(t.width,n.x-t.x-r*t.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l},internalStorage:function(c){var l=
+[Ta(c,["dx","dy"],function(t){var n=Math.max(0,Math.min(t.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),r=Math.max(0,Math.min(t.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(t.x+n,t.y+r)},function(t,n){this.state.style.dx=Math.round(Math.max(0,Math.min(t.width,n.x-t.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(t.height,n.y-t.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(hb(c));return l},module:function(c){return[Ta(c,
+["jettyWidth","jettyHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",Ja.prototype.jettyWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"jettyHeight",Ja.prototype.jettyHeight)));return new mxPoint(l.x+t/2,l.y+2*n)},function(l,t){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y))/2)})]},corner:function(c){return[Ta(c,
+["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",fb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",fb.prototype.dy)));return new mxPoint(l.x+t,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,t.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},tee:function(c){return[Ta(c,["dx","dy"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,
+"dx",gb.prototype.dx))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",gb.prototype.dy)));return new mxPoint(l.x+(l.width+t)/2,l.y+n)},function(l,t){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,t.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},singleArrow:bb(1),doubleArrow:bb(.5),"mxgraph.arrows2.wedgeArrow":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed":qb(20,20),"mxgraph.arrows2.wedgeArrowDashed2":qb(20,20),
+folder:function(c){return[Ta(c,["tabWidth","tabHeight"],function(l){var t=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",D.prototype.tabWidth))),n=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",D.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(t=l.width-t);return new mxPoint(l.x+t,l.y+n)},function(l,t){var n=Math.max(0,Math.min(l.width,t.x-l.x));mxUtils.getValue(this.state.style,
+"tabPosition",D.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(n=l.width-n);this.state.style.tabWidth=Math.round(n);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,t.y-l.y)))},!1)]},document:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Q.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},
+!1)]},tape:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(l.getCenterX(),l.y+t*l.height/2)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(t.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[Ta(c,["isoAngle"],function(l){var t=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",w.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*
+Math.tan(t),.5*l.height))},function(l,t){this.state.style.isoAngle=Math.max(0,50*(t.y-l.y)/l.height)},!0)]},cylinder2:wb(z.prototype.size),cylinder3:wb(C.prototype.size),offPageConnector:function(c){return[Ta(c,["size"],function(l){var t=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(l.getCenterX(),l.y+(1-t)*l.height)},function(l,t){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-t.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=
+[Graph.createHandle(c,["size"],function(t){var n=Math.max(0,Math.min(t.width/2,t.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(t.x+n,t.y+n)},function(t,n){this.state.style.size=Math.round(100*Math.max(0,Math.min(t.height/2,t.width/2,n.x-t.x)))/100})];c=Graph.createHandle(c,["indent"],function(t){var n=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(t.x+.75*t.width,t.y+n*t.height/200)},function(t,
+n){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(n.y-t.y)/t.height)))/100});l.push(c);return l},step:tb(ia.prototype.size,!0,null,!0,ia.prototype.fixedSize),hexagon:tb(oa.prototype.size,!0,.5,!0,oa.prototype.fixedSize),curlyBracket:tb(Y.prototype.size,!1),display:tb(Ha.prototype.size,!1),cube:rb(1,f.prototype.size,!1),card:rb(.5,K.prototype.size,!0),loopLimit:rb(.5,B.prototype.size,!0),trapezoid:yb(.5,U.prototype.size,U.prototype.fixedSize),parallelogram:yb(1,N.prototype.size,
+N.prototype.fixedSize)};Graph.createHandle=Ta;Graph.handleFactory=Sa;var sb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=sb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=Sa[l];null==l&&null!=this.state.shape&&
+this.state.shape.isRoundable()&&(l=Sa[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);c=Sa[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var $a=new mxPoint(1,0),kb=new mxPoint(1,0),ob=mxUtils.toRadians(-30);
+$a=mxUtils.getRotatedPoint($a,Math.cos(ob),Math.sin(ob));var Za=mxUtils.toRadians(-150);kb=mxUtils.getRotatedPoint(kb,Math.cos(Za),Math.sin(Za));mxEdgeStyle.IsometricConnector=function(c,l,t,n,r){var v=c.view;n=null!=n&&0<n.length?n[0]:null;var x=c.absolutePoints,I=x[0];x=x[x.length-1];null!=n&&(n=v.transformControlPoint(c,n));null==I&&null!=l&&(I=new mxPoint(l.getCenterX(),l.getCenterY()));null==x&&null!=t&&(x=new mxPoint(t.getCenterX(),t.getCenterY()));var y=$a.x,aa=$a.y,S=kb.x,Fa=kb.y,Ra="horizontal"==
+mxUtils.getValue(c.style,"elbow","horizontal");if(null!=x&&null!=I){c=function(ka,pa,na){ka-=Oa.x;var la=pa-Oa.y;pa=(Fa*ka-S*la)/(y*Fa-aa*S);ka=(aa*ka-y*la)/(aa*S-y*Fa);Ra?(na&&(Oa=new mxPoint(Oa.x+y*pa,Oa.y+aa*pa),r.push(Oa)),Oa=new mxPoint(Oa.x+S*ka,Oa.y+Fa*ka)):(na&&(Oa=new mxPoint(Oa.x+S*ka,Oa.y+Fa*ka),r.push(Oa)),Oa=new mxPoint(Oa.x+y*pa,Oa.y+aa*pa));r.push(Oa)};var Oa=I;null==n&&(n=new mxPoint(I.x+(x.x-I.x)/2,I.y+(x.y-I.y)/2));c(n.x,n.y,!0);c(x.x,x.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",
+mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var t=new mxElbowEdgeHandler(c);t.snapToTerminals=!1;return t}return xb.apply(this,arguments)};g.prototype.constraints=[];m.prototype.getConstraints=function(c,l,t){c=[];var n=Math.tan(mxUtils.toRadians(30)),r=(.5-n)/2;n=Math.min(l,t/(.5+n));l=(l-n)/2;t=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l+.5*n,t+n*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.25*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+n,t+.75*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*n,t+(1-r)*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t+.75*n));return c};w.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;n=Math.min(l*
+Math.tan(n),.5*t);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+0,n));return c};Z.prototype.getConstraints=function(c,l,t){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var n=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t-n)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,
+t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];va.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=
+mxRectangleShape.prototype.constraints;sa.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;k.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,
+null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,
+0),!1));return c};K.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*n&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};f.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(t+n)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-n)));return c};C.prototype.getConstraints=function(c,l,t){c=[];l=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l+.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-l-.5*(.5*t-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};D.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,
+"tabWidth",this.tabWidth)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(l+n),r))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,r)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(t-r)+r));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,t));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};cb.prototype.constraints=mxRectangleShape.prototype.constraints;eb.prototype.constraints=mxRectangleShape.prototype.constraints;M.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints=
+mxEllipse.prototype.constraints;Ya.prototype.constraints=mxRectangleShape.prototype.constraints;Na.prototype.constraints=mxRectangleShape.prototype.constraints;Ha.prototype.getConstraints=function(c,l,t){c=[];var n=Math.min(l,t/2),r=Math.min(l-n,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,
+.5*(r+l-n),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-n,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(r+l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};Ja.prototype.getConstraints=function(c,l,t){l=parseFloat(mxUtils.getValue(c,"jettyWidth",Ja.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,
+"jettyHeight",Ja.prototype.jettyHeight));var n=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,
+l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(t-.5*c,3.5*c))];t>5*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));t>8*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null,l));t>
+15*c&&n.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return n};B.prototype.constraints=mxRectangleShape.prototype.constraints;F.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,
+1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,
+.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,
+1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,
+1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),
+new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];N.prototype.constraints=mxRectangleShape.prototype.constraints;U.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;gb.prototype.getConstraints=function(c,l,t){c=[];var n=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),r=Math.max(0,Math.min(t,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*n,r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),r));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+n),t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),.5*(t+r)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-n),r));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*n,r));c.push(new mxConnectionConstraint(new mxPoint(0,
@@ -3563,44 +3564,44 @@ X.prototype.constraints=mxEllipse.prototype.constraints;Ma.prototype.constraints
function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-r),t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-n));return c};ib.prototype.getConstraints=function(c,l,t){c=[];var n=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",ab.prototype.arrowWidth)))),r=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",ab.prototype.arrowSize))));n=(t-n)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,t-n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));return c};ya.prototype.getConstraints=
-function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,w=(l-r)/2;r=w+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),n));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,n));return c};oa.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+function(c,l,t){c=[];var n=Math.min(t,l),r=Math.max(0,Math.min(n,n*parseFloat(mxUtils.getValue(this.style,"size",this.size))));n=(t-r)/2;var v=n+r,x=(l-r)/2;r=x+r;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,r,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,t-.5*n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,r,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),n));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,l,n));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+r),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,n));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,n));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,n));return c};ra.prototype.constraints=null;q.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
.9),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,x,z,C){C.getModel().beginUpdate();try{var E=C.getCellGeometry(k);null!=E&&x&&z&&(x/=z,E=E.clone(),1<x?E.height=E.width/x:E.width=E.height*x,C.getModel().setGeometry(k,
+Actions.prototype.init=function(){function a(k){d.escape();k=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),k);null!=k&&d.setSelectionCells(k)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var k=d.getSelectionCells(),u=0;u<k.length;u++)d.cellLabelChanged(k[u],"")}finally{d.getModel().endUpdate()}}}function e(k,u,w,z,C){C.getModel().beginUpdate();try{var E=C.getCellGeometry(k);null!=E&&w&&z&&(w/=z,E=E.clone(),1<w?E.height=E.width/w:E.width=E.height*w,C.getModel().setGeometry(k,
E));C.setCellStyles(mxConstants.STYLE_CLIP_PATH,u,[k]);C.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[k])}finally{C.getModel().endUpdate()}}var f=this.editorUi,h=f.editor,d=h.graph,g=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){d.openLink(f.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";f.openFile()});this.put("smartFit",new Action(mxResources.get("fitWindow")+" / "+mxResources.get("resetView"),
-function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,u=d.container.scrollLeft,x=d.container.scrollTop,z=d.view.translate.x,C=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(x-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?f.actions.get("smartFit").funct():d.isEnabled()&&
-d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,u){try{var x=mxUtils.parseXml(k);h.graph.setSelectionCells(h.graph.importGraphModel(x.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
+function(){d.popupMenuHandler.hideMenu();var k=d.view.scale,u=d.container.scrollLeft,w=d.container.scrollTop,z=d.view.translate.x,C=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(k-d.view.scale)&&5>Math.abs(u-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isSelectionEmpty()?f.actions.get("smartFit").funct():d.isEnabled()&&
+d.startEditingAtCell()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(k,u){try{var w=mxUtils.parseXml(k);h.graph.setSelectionCells(h.graph.importGraphModel(w.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=
null})}).isEnabled=g;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=g;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S");this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var k=new EditDiagramDialog(f);f.showDialog(k.container,620,420,!0,!1);k.init()}).isEnabled=g;this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container,
320,240,!0,!0)}).isEnabled=g;this.addAction("print...",function(){f.showPrintDialog()},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var k=null;try{k=f.copyXml(),null!=k&&d.removeCells(k,!1)}catch(u){}try{null==
k&&mxClipboard.cut(d)}catch(u){f.handleError(u)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(k){}try{mxClipboard.copy(d)}catch(k){f.handleError(k)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(u){if(null!=u){d.getModel().beginUpdate();try{f.pasteXml(u,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),
-k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,I=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/
-E-I)),d.cellsMoved(z,C-D.x,E-D.y))}}function x(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else x()}),k=!0)}catch(z){}k||x()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],
-k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var x=d.getCellGeometry(k[u]);
-null!=x&&(x=x.clone(),x.width=f.copiedSize.width,x.height=f.copiedSize.height,d.getModel().setGeometry(k[u],x))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),
-mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function x(E,D){var G=z.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||D.setAttribute("placeholders",G.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));z.setValue(E,D)}k=null!=u?u:k;var z=
-d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){z.beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)x(z.getRoot(),f.copiedValue);else for(u=0;u<C.length;u++)x(C[u],f.copiedValue)}finally{z.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(k,u){k=null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",
+k=!0)}catch(u){}k||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(k){function u(z){if(null!=z){for(var C=!0,E=0;E<z.length&&C;E++)C=C&&d.model.isEdge(z[E]);var D=d.view.translate;E=d.view.scale;var G=D.x,K=D.y;D=null;if(1==z.length&&C){var L=d.getCellGeometry(z[0]);null!=L&&(D=L.getTerminalPoint(!0))}D=null!=D?D:d.getBoundingBoxFromGeometry(z,C);null!=D&&(C=Math.round(d.snap(d.popupMenuHandler.triggerX/E-G)),E=Math.round(d.snap(d.popupMenuHandler.triggerY/
+E-K)),d.cellsMoved(z,C-D.x,E-D.y))}}function w(){d.getModel().beginUpdate();try{u(mxClipboard.paste(d))}finally{d.getModel().endUpdate()}}if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){k=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(z){if(null!=z){d.getModel().beginUpdate();try{u(f.pasteXml(z,!0))}finally{d.getModel().endUpdate()}}else w()}),k=!0)}catch(z){}k||w()}});this.addAction("swap",function(){var k=d.getSelectionCells();2==k.length&&d.swapShapes(k[0],
+k[1])});this.addAction("copySize",function(){var k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.getModel().isVertex(k)&&(k=d.getCellGeometry(k),null!=k&&(f.copiedSize=new mxRectangle(k.x,k.y,k.width,k.height)))},null,null,"Alt+Shift+F");this.addAction("pasteSize",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedSize){d.getModel().beginUpdate();try{for(var k=d.getResizableCells(d.getSelectionCells()),u=0;u<k.length;u++)if(d.getModel().isVertex(k[u])){var w=d.getCellGeometry(k[u]);
+null!=w&&(w=w.clone(),w.width=f.copiedSize.width,w.height=f.copiedSize.height,d.getModel().setGeometry(k[u],w))}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var k=d.getSelectionCell()||d.getModel().getRoot();d.isEnabled()&&null!=k&&(k=k.cloneValue(),null==k||isNaN(k.nodeType)||(f.copiedValue=k))},null,null,"Alt+Shift+B");this.addAction("copyAsText",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k)try{d.isHtmlLabel(k)?f.writeHtmlToClipboard(d.getLabel(k),
+mxUtils.bind(this,function(u){f.handleError(u)})):f.writeTextToClipboard(d.getLabel(k),mxUtils.bind(this,function(u){f.handleError(u)}))}catch(u){f.handleError(u)}});this.addAction("pasteData",function(k,u){function w(E,D){var G=z.getValue(E);D=E.cloneValue(D);D.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||D.setAttribute("placeholders",G.getAttribute("placeholders"));null!=k&&mxEvent.isShiftDown(k)||D.setAttribute("label",d.convertValueToString(E));z.setValue(E,D)}k=null!=u?u:k;var z=
+d.getModel();if(d.isEnabled()&&!d.isSelectionEmpty()&&null!=f.copiedValue){z.beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());if(0==C.length)w(z.getRoot(),f.copiedValue);else for(u=0;u<C.length;u++)w(C[u],f.copiedValue)}finally{z.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(k,u){k=null!=u?u:k;null!=k&&mxEvent.isShiftDown(k)?b():a(null!=k&&(mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)||mxEvent.isAltDown(k)))},null,null,"Delete");this.addAction("deleteAll",
function(){a(!0)});this.addAction("deleteLabels",function(){b()},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",function(){try{d.setSelectionCells(d.duplicateCells()),d.scrollCellToVisible(d.getSelectionCell())}catch(k){f.handleError(k)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var k=f.getSelectionState();if(null!=k.mergeCell){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",k.rowspan,[k.mergeCell]),d.setCellStyles("colspan",
k.colspan,[k.mergeCell])}finally{d.getModel().endUpdate()}}}));this.put("unmergeCells",new Action(mxResources.get("unmerge"),function(){var k=f.getSelectionState();if(0<k.cells.length){d.getModel().beginUpdate();try{d.setCellStyles("rowspan",null,k.cells),d.setCellStyles("colspan",null,k.cells)}finally{d.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(k,u){k=null!=u?u:k;d.turnShapes(d.getResizableCells(d.getSelectionCells()),
null!=k?mxEvent.isShiftDown(k):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(k){k=d.getSelectionCell();d.isEnabled()&&null!=k&&d.addSelectionCells(d.getEdges(k))}));this.addAction("selectVertices",function(){d.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,
-!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var k=d.getSelectionCells(),u=d.getCurrentCellStyle(d.getSelectionCell()),x=1==mxUtils.getValue(u,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,x,k);d.setCellStyles(mxConstants.STYLE_RESIZABLE,x,k);d.setCellStyles(mxConstants.STYLE_ROTATABLE,x,
-k);d.setCellStyles(mxConstants.STYLE_DELETABLE,x,k);d.setCellStyles(mxConstants.STYLE_EDITABLE,x,k);d.setCellStyles("locked",1==x?0:1,k);d.setCellStyles("connectable",x,k)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){d.model.isVertex(d.getSelectionCell())&&Graph.exploreFromCell(f.editor.graph,f.editor.graph.getSelectionCell())});this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},
+!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var k=d.getSelectionCells(),u=d.getCurrentCellStyle(d.getSelectionCell()),w=1==mxUtils.getValue(u,mxConstants.STYLE_EDITABLE,1)?0:1;d.setCellStyles(mxConstants.STYLE_MOVABLE,w,k);d.setCellStyles(mxConstants.STYLE_RESIZABLE,w,k);d.setCellStyles(mxConstants.STYLE_ROTATABLE,w,
+k);d.setCellStyles(mxConstants.STYLE_DELETABLE,w,k);d.setCellStyles(mxConstants.STYLE_EDITABLE,w,k);d.setCellStyles("locked",1==w?0:1,k);d.setCellStyles("connectable",w,k)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("explore",function(){d.model.isVertex(d.getSelectionCell())&&Graph.exploreFromCell(f.editor.graph,f.editor.graph.getSelectionCell())});this.addAction("home",function(){d.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){d.exitGroup()},
null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){d.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",
function(k){d.orderCells(!1,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+F");this.addAction("sendBackward",function(k){d.orderCells(!0,null,!0)},null,null,Editor.ctrlKey+"+Alt+Shift+B");this.addAction("group",function(){if(d.isEnabled()){var k=mxUtils.sortCells(d.getSelectionCells(),!0);1!=k.length||d.isTable(k[0])||d.isTableRow(k[0])?(k=d.getCellsForGroup(k),1<k.length&&d.setSelectionCell(d.groupCells(null,0,k))):d.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",
-function(){if(d.isEnabled()){var k=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var u=d.ungroupCells();if(null!=k)for(var x=0;x<k.length;x++)d.model.contains(k[x])&&(0==d.model.getChildCount(k[x])&&d.model.isVertex(k[x])&&d.setCellStyles("container","0",[k[x]]),u.push(k[x]))}finally{d.model.endUpdate()}0<u.length&&d.setSelectionCells(u)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var k=d.getSelectionCells();if(null!=k){for(var u=
-[],x=0;x<k.length;x++)d.isTableRow(k[x])||d.isTableCell(k[x])||u.push(k[x]);d.removeCellsFromParent(u);0<u.length&&d.scrollCellToVisible(u[0])}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var k=d.getSelectionCell()||d.getModel().getRoot();f.showDataDialog(k)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=
-"";if(mxUtils.isNode(k.value)){var x=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(x=k.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==x&&(x=k.value.getAttribute("tooltip"));null!=x&&(u=x)}u=new TextareaDialog(f,mxResources.get("editTooltip")+":",u,function(z){d.setTooltipForCell(k,z)});f.showDialog(u.container,320,200,!0,!0);u.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var k=d.getLinkForCell(d.getSelectionCell());
-null!=k&&d.openLink(k)});this.addAction("editLink...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=d.getLinkForCell(k,!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(x,z,C){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<x.length?x:null),d.setAttributeForCell(k,"linkTarget",C)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&
-!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=g;this.addAction("editImage...",function(){f.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,x){k=mxUtils.trim(k);if(0<k.length){var z=null,C=d.getLinkTitle(k);null!=u&&0<u.length&&(z=u[0].iconUrl,C=u[0].name||u[0].type,C=C.charAt(0).toUpperCase()+
-C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));u=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=z?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+z:"spacing=10;"));u.vertex=!0;z=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=z.x;u.geometry.y=z.y;d.setAttributeForCell(u,"linkTarget",x);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),
-d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=g;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),x="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var z=k.getElementsByTagName("a"),C=0;C<z.length&&null==u;C++)z[C].textContent==
-k.textContent&&(u=z[C]);null!=u&&"A"==u.nodeName&&(x=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(x,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=g;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var x=
-k[u];d.getModel().isVertex(x)&&(0<d.getModel().getChildCount(x)?d.updateGroupBounds([x],0,!0):d.updateCellSize(x))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),
-x=0;x<u.length;x++)if(state=d.getView().getState(u[x]),null!=state){var z=mxUtils.getValue(state.style,"html","0");if("1"==z&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[x]]);else if("0"==z&&"1"==k){var C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",k,[u[x]])}}f.fireEvent(new mxEventObject("styleChanged",
+function(){if(d.isEnabled()){var k=d.getEditableCells(d.getSelectionCells());d.model.beginUpdate();try{var u=d.ungroupCells();if(null!=k)for(var w=0;w<k.length;w++)d.model.contains(k[w])&&(0==d.model.getChildCount(k[w])&&d.model.isVertex(k[w])&&d.setCellStyles("container","0",[k[w]]),u.push(k[w]))}finally{d.model.endUpdate()}0<u.length&&d.setSelectionCells(u)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(d.isEnabled()){var k=d.getSelectionCells();if(null!=k){for(var u=
+[],w=0;w<k.length;w++)d.isTableRow(k[w])||d.isTableCell(k[w])||u.push(k[w]);d.removeCellsFromParent(u);0<u.length&&d.scrollCellToVisible(u[0])}}});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var k=d.getSelectionCell()||d.getModel().getRoot();f.showDataDialog(k)},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=
+"";if(mxUtils.isNode(k.value)){var w=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&k.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(w=k.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==w&&(w=k.value.getAttribute("tooltip"));null!=w&&(u=w)}u=new TextareaDialog(f,mxResources.get("editTooltip")+":",u,function(z){d.setTooltipForCell(k,z)});f.showDialog(u.container,320,200,!0,!0);u.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var k=d.getLinkForCell(d.getSelectionCell());
+null!=k&&d.openLink(k)});this.addAction("editLink...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&null!=k&&d.isCellEditable(k)){var u=d.getLinkForCell(k,!0)||"";f.showLinkDialog(u,mxResources.get("ok"),function(w,z,C){d.getModel().beginUpdate();try{d.setLinkForCell(k,0<w.length?w:null),d.setAttributeForCell(k,"linkTarget",C)}finally{d.getModel().endUpdate()}},!0,d.getLinkTargetForCell(k))}},null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){d.isEnabled()&&
+!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),f.actions.get("image").funct())})).isEnabled=g;this.addAction("editImage...",function(){f.actions.get("image").funct()});this.put("insertLink",new Action(mxResources.get("link")+"...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&f.showLinkDialog("",mxResources.get("ok"),function(k,u,w){k=mxUtils.trim(k);if(0<k.length){var z=null,C=d.getLinkTitle(k);null!=u&&0<u.length&&(z=u[0].iconUrl,C=u[0].name||u[0].type,C=C.charAt(0).toUpperCase()+
+C.substring(1),30<C.length&&(C=C.substring(0,30)+"..."));u=new mxCell(C,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=z?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+z:"spacing=10;"));u.vertex=!0;z=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry([u],!0));u.geometry.x=z.x;u.geometry.y=z.y;d.setAttributeForCell(u,"linkTarget",w);d.setLinkForCell(u,k);d.cellSizeUpdated(u,!0);d.getModel().beginUpdate();try{u=d.addCell(u),
+d.fireEvent(new mxEventObject("cellsInserted","cells",[u]))}finally{d.getModel().endUpdate()}d.setSelectionCell(u);d.scrollCellToVisible(d.getSelectionCell())}},!0)},null,null,"L")).isEnabled=g;this.addAction("link...",mxUtils.bind(this,function(){if(d.isEnabled())if(d.cellEditor.isContentEditing()){var k=d.getSelectedElement(),u=d.getParentByName(k,"A",d.cellEditor.textarea),w="";if(null==u&&null!=k&&null!=k.getElementsByTagName)for(var z=k.getElementsByTagName("a"),C=0;C<z.length&&null==u;C++)z[C].textContent==
+k.textContent&&(u=z[C]);null!=u&&"A"==u.nodeName&&(w=u.getAttribute("href")||"",d.selectNode(u));var E=d.cellEditor.saveSelection();f.showLinkDialog(w,mxResources.get("ok"),mxUtils.bind(this,function(D){d.cellEditor.restoreSelection(E);null!=D&&d.insertLink(D)}))}else d.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=g;this.addAction("autosize",function(){var k=d.getSelectionCells();if(null!=k){d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=
+k[u];d.getModel().isVertex(w)&&(0<d.getModel().getChildCount(w)?d.updateGroupBounds([w],0,!0):d.updateCellSize(w))}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){d.snapCellsToGrid(d.getSelectionCells(),d.gridSize)});this.addAction("formattedText",function(){d.stopEditing();var k=d.getCommonStyle(d.getSelectionCells());k="1"==mxUtils.getValue(k,"html","0")?null:"1";d.getModel().beginUpdate();try{for(var u=d.getEditableCells(d.getSelectionCells()),
+w=0;w<u.length;w++)if(state=d.getView().getState(u[w]),null!=state){var z=mxUtils.getValue(state.style,"html","0");if("1"==z&&null==k)d.removeTextStyleForCell(state.cell),d.setCellStyles("html",k,[u[w]]);else if("0"==z&&"1"==k){var C=mxUtils.htmlEntities(d.convertValueToString(state.cell),!1);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(C=C.replace(/\n/g,"<br/>"));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",k,[u[w]])}}f.fireEvent(new mxEventObject("styleChanged",
"keys",["html"],"values",[null!=k?k:"0"],"cells",u))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var k=d.getView().getState(d.getSelectionCell()),u="wrap";d.stopEditing();null!=k&&"wrap"==k.style[mxConstants.STYLE_WHITE_SPACE]&&(u=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,u)});this.addAction("rotation",function(){var k="0",u=d.getView().getState(d.getSelectionCell());null!=u&&(k=u.style[mxConstants.STYLE_ROTATION]||k);k=new FilenameDialog(f,k,mxResources.get("apply"),
-function(x){null!=x&&0<x.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,x)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");f.showDialog(k.container,375,80,!0,!0);k.init()});this.addAction("resetView",function(){d.zoomTo(1);f.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(k){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,f.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(k){d.isFastZoomEnabled()?
+function(w){null!=w&&0<w.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,w)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");f.showDialog(k.container,375,80,!0,!0);k.init()});this.addAction("resetView",function(){d.zoomTo(1);f.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",function(k){d.isFastZoomEnabled()?d.lazyZoom(!0,!0,f.buttonZoomDelay):d.zoomIn()},null,null,Editor.ctrlKey+" + / Alt+Mousewheel");this.addAction("zoomOut",function(k){d.isFastZoomEnabled()?
d.lazyZoom(!1,!0,f.buttonZoomDelay):d.zoomOut()},null,null,Editor.ctrlKey+" - / Alt+Mousewheel");this.addAction("fitWindow",function(){d.pageVisible&&d.isSelectionEmpty()?d.fitPages():f.fitDiagramToWindow()},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible?d.fitPages(1):this.get("pageView").funct()}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){d.pageVisible?d.fitPages(2):this.get("pageView").funct()}),
null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible?d.fitPages(1,!0):this.get("pageView").funct()}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var k=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);!isNaN(u)&&0<u&&d.zoomTo(u/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(k.container,
300,80,!0,!0);k.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var k=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);!isNaN(u)&&0<u&&(u=new ChangePageSetup(f,null,null,null,u/100),u.ignoreColor=!0,u.ignoreImage=!0,d.model.execute(u))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(k.container,300,80,!0,!0);k.init()}));var m=null;m=this.addAction("grid",
@@ -3609,7 +3610,7 @@ m.setEnabled(!1);m=this.addAction("animations",function(){Editor.enableAnimation
m=this.addAction("collapseExpand",function(){var k=new ChangePageSetup(f);k.ignoreColor=!0;k.ignoreImage=!0;k.foldingEnabled=!d.foldingEnabled;d.model.execute(k)});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.foldingEnabled});m.isEnabled=g;m=this.addAction("pageView",mxUtils.bind(this,function(){f.setPageVisible(!d.pageVisible)}));m.setToggleAction(!0);m.setSelectedCallback(function(){return d.pageVisible});m=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=
!d.connectionArrowsEnabled;f.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionArrowsEnabled});m=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());f.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});m=this.addAction("copyConnect",
function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());f.fireEvent(new mxEventObject("copyConnectChanged"))});m.setToggleAction(!0);m.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});m.isEnabled=g;m=this.addAction("autosave",function(){f.editor.setAutosave(!f.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return f.editor.autosave});m.isEnabled=g;m.visible=!1;this.addAction("help",function(){var k="";mxResources.isLanguageSupported(mxClient.language)&&
-(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)}));m=mxUtils.bind(this,function(k,u,x,z){return this.addAction(k,function(){if(null!=x&&d.cellEditor.isContentEditing())x();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+(k="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+k+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(f.showDialog((new AboutDialog(f)).container,320,280,!0,!0,function(){p=!1}),p=!0)}));m=mxUtils.bind(this,function(k,u,w,z){return this.addAction(k,function(){if(null!=w&&d.cellEditor.isContentEditing())w();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var C=d.getEditableCells(d.getSelectionCells());d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
u,C);(u&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(C,function(D){D.style.fontWeight=null;"B"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(C,function(D){D.style.fontStyle=null;"I"==D.nodeName&&d.replaceElement(D)}):(u&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(C,function(D){D.style.textDecoration=null;"U"==D.nodeName&&d.replaceElement(D)});for(var E=0;E<C.length;E++)0==d.model.getChildCount(C[E])&&
d.autoSizeCell(C[E],!1)}finally{d.getModel().endUpdate()}}},null,null,z)});m("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");m("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");m("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){f.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000",
"default",d.shapeForegroundColor)});this.addAction("strokeColor...",function(){f.menus.pickColor(mxConstants.STYLE_STROKECOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("fillColor...",function(){f.menus.pickColor(mxConstants.STYLE_FILLCOLOR,null,null,"default",d.shapeBackgroundColor)});this.addAction("gradientColor...",function(){f.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR,null,null,"default",d.shapeForegroundColor)});this.addAction("backgroundColor...",function(){f.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,
@@ -3618,19 +3619,19 @@ d.autoSizeCell(C[E],!1)}finally{d.getModel().endUpdate()}}},null,null,z)});m("bo
try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),f.fireEvent(new mxEventObject("styleChanged",
"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});
this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var k=d.getSelectionCells(),u=d.getCurrentCellStyle(k[0]),
-x="1"==mxUtils.getValue(u,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,x);d.setCellStyles(mxConstants.STYLE_CURVED,null);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[x,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
+w="1"==mxUtils.getValue(u,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,w);d.setCellStyles(mxConstants.STYLE_CURVED,null);f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[w,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,
"1"),f.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",function(){var k=d.view.getState(d.getSelectionCell()),u="1";null!=k&&null!=d.getFoldingImage(k)&&(u="0");d.setCellStyles("collapsible",u);f.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[u],"cells",d.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var k=d.getEditableCells(d.getSelectionCells());if(null!=k&&0<k.length){var u=d.getModel();u=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",u.getStyle(k[0])||"",function(x){null!=x&&d.setCellStyle(mxUtils.trim(x),k)},null,null,400,220);this.editorUi.showDialog(u.container,420,300,!0,!0);u.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&f.setDefaultStyle(d.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&f.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var k=d.getSelectionCell();if(null!=k&&d.getModel().isEdge(k)){var u=h.graph.selectionCellsHandler.getHandler(k);if(u instanceof mxEdgeHandler){var x=d.view.translate,z=d.view.scale,C=x.x;x=x.y;k=d.getModel().getParent(k);for(var E=d.getCellGeometry(k);d.getModel().isVertex(k)&&null!=E;)C+=E.x,x+=E.y,k=
-d.getModel().getParent(k),E=d.getCellGeometry(k);C=Math.round(d.snap(d.popupMenuHandler.triggerX/z-C));z=Math.round(d.snap(d.popupMenuHandler.triggerY/z-x));u.addPointAt(u.state,C,z)}}});this.addAction("removeWaypoint",function(){var k=f.actions.get("removeWaypoint");null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction("clearAnchors",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var x=
-k[u];d.getModel().isEdge(x)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[x]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[x]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[x]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[x]))}}finally{d.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var x=k[u];if(d.getModel().isEdge(x)){var z=d.getCellGeometry(x);
-null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(x,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",
+mxUtils.bind(this,function(){var k=d.getEditableCells(d.getSelectionCells());if(null!=k&&0<k.length){var u=d.getModel();u=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",u.getStyle(k[0])||"",function(w){null!=w&&d.setCellStyle(mxUtils.trim(w),k)},null,null,400,220);this.editorUi.showDialog(u.container,420,300,!0,!0);u.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&f.setDefaultStyle(d.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&f.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var k=d.getSelectionCell();if(null!=k&&d.getModel().isEdge(k)){var u=h.graph.selectionCellsHandler.getHandler(k);if(u instanceof mxEdgeHandler){var w=d.view.translate,z=d.view.scale,C=w.x;w=w.y;k=d.getModel().getParent(k);for(var E=d.getCellGeometry(k);d.getModel().isVertex(k)&&null!=E;)C+=E.x,w+=E.y,k=
+d.getModel().getParent(k),E=d.getCellGeometry(k);C=Math.round(d.snap(d.popupMenuHandler.triggerX/z-C));z=Math.round(d.snap(d.popupMenuHandler.triggerY/z-w));u.addPointAt(u.state,C,z)}}});this.addAction("removeWaypoint",function(){var k=f.actions.get("removeWaypoint");null!=k.handler&&k.handler.removePoint(k.handler.state,k.index)});this.addAction("clearAnchors",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=
+k[u];d.getModel().isEdge(w)&&(d.setCellStyles(mxConstants.STYLE_EXIT_X,null,[w]),d.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[w]),d.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[w]),d.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[w]))}}finally{d.getModel().endUpdate()}}});this.addAction("clearWaypoints",function(){var k=d.getSelectionCells();if(null!=k){k=d.getEditableCells(d.addAllEdges(k));d.getModel().beginUpdate();try{for(var u=0;u<k.length;u++){var w=k[u];if(d.getModel().isEdge(w)){var z=d.getCellGeometry(w);
+null!=z&&(z=z.clone(),z.points=null,z.x=0,z.y=0,z.offset=null,d.getModel().setGeometry(w,z))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+R");m=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");m=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");m=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,k-1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");m=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!d.isSelectionEmpty()){var k=d.getCurrentCellStyle(d.getSelectionCell());k=mxUtils.getValue(k,mxConstants.STYLE_FONTSIZE,
-mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),x="",z=null;null!=u&&(x=u.style[mxConstants.STYLE_IMAGE]||x,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();
-f.showImageDialog(k,x,function(E,D,G,I,L,T){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var K=d.getSelectionCells();if(null!=E&&(0<E.length||0<K.length)){var U=null;d.getModel().beginUpdate();try{if(0==K.length){K=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=Y.x;K[0].geometry.y=
-Y.y;null!=I&&e(K[0],I,L,T,d);U=K;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,K);var Q=d.getCurrentCellStyle(K[0]);"image"!=Q[mxConstants.STYLE_SHAPE]&&"label"!=Q[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==I&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=D&&null!=G)for(E=0;E<K.length;E++){var P=K[E];if("0"!=d.getCurrentCellStyle(P).expand){var M=
-d.getModel().getGeometry(P);null!=M&&(M=M.clone(),M.width=D,M.height=G,d.getModel().setGeometry(P,M))}null!=I&&e(P,I,L,T,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),x=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
-x&&"image"==z&&(u=new CropImageDialog(f,x,u[mxConstants.STYLE_CLIP_PATH],function(C,E,D){e(k,C,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=g;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),
+mxConstants.DEFAULT_FONTSIZE);d.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,k+1),d.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var k=mxResources.get("image")+" ("+mxResources.get("url")+"):",u=d.getView().getState(d.getSelectionCell()),w="",z=null;null!=u&&(w=u.style[mxConstants.STYLE_IMAGE]||w,z=u.style[mxConstants.STYLE_CLIP_PATH]||z);var C=d.cellEditor.saveSelection();
+f.showImageDialog(k,w,function(E,D,G,K,L,Q){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(C),d.insertImage(E,D,G);else{var N=d.getSelectionCells();if(null!=E&&(0<E.length||0<N.length)){var U=null;d.getModel().beginUpdate();try{if(0==N.length){N=[d.insertVertex(d.getDefaultParent(),null,"",0,0,D,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var Y=d.getCenterInsertPoint(d.getBoundingBoxFromGeometry(N,!0));N[0].geometry.x=Y.x;N[0].geometry.y=
+Y.y;null!=K&&e(N[0],K,L,Q,d);U=N;d.fireEvent(new mxEventObject("cellsInserted","cells",U))}d.setCellStyles(mxConstants.STYLE_IMAGE,0<E.length?E:null,N);var P=d.getCurrentCellStyle(N[0]);"image"!=P[mxConstants.STYLE_SHAPE]&&"label"!=P[mxConstants.STYLE_SHAPE]?d.setCellStyles(mxConstants.STYLE_SHAPE,"image",N):0==E.length&&d.setCellStyles(mxConstants.STYLE_SHAPE,null,N);null==K&&d.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,N);if(null!=D&&null!=G)for(E=0;E<N.length;E++){var T=N[E];if("0"!=d.getCurrentCellStyle(T).expand){var J=
+d.getModel().getGeometry(T);null!=J&&(J=J.clone(),J.width=D,J.height=G,d.getModel().setGeometry(T,J))}null!=K&&e(T,K,L,Q,d)}}finally{d.getModel().endUpdate()}null!=U&&(d.setSelectionCells(U),d.scrollCellToVisible(U[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing(),!0,z)}}).isEnabled=g;this.addAction("crop...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k){var u=d.getCurrentCellStyle(k),w=u[mxConstants.STYLE_IMAGE],z=u[mxConstants.STYLE_SHAPE];
+w&&"image"==z&&(u=new CropImageDialog(f,w,u[mxConstants.STYLE_CLIP_PATH],function(C,E,D){e(k,C,E,D,d)}),f.showDialog(u.container,300,390,!0,!0))}}).isEnabled=g;m=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(f,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("layers"))}),
this.layersWindow.window.setVisible(!0),f.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));m=this.addAction("format",mxUtils.bind(this,function(){f.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");m.setToggleAction(!0);
m.setSelectedCallback(mxUtils.bind(this,function(){return f.isFormatPanelVisible()}));m=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(f,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){f.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){f.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),
f.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");m.setToggleAction(!0);m.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var k=d.getSelectionCell();if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&null!=k&&null!=k.geometry){var u=new ConnectionPointsDialog(f,
@@ -3642,9 +3643,9 @@ function(p){p.removeAttribute("face");p.style.fontFamily=null;"PRE"==p.nodeName&
mxResources.get("custom")+"...","",mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,h,!0,mxUtils.bind(this,function(m){0>mxUtils.indexOf(this.customFonts,m)&&(this.customFonts.push(m),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(f,h){function d(g,m){return f.addItem(g,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+
m+">"))}),h)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML='<h1 style="margin:0px;">'+mxResources.get("heading")+" 1</h1>";d("","h2").firstChild.nextSibling.innerHTML='<h2 style="margin:0px;">'+mxResources.get("heading")+" 2</h2>";d("","h3").firstChild.nextSibling.innerHTML='<h3 style="margin:0px;">'+mxResources.get("heading")+" 3</h3>";d("","h4").firstChild.nextSibling.innerHTML='<h4 style="margin:0px;">'+mxResources.get("heading")+" 4</h4>";d("","h5").firstChild.nextSibling.innerHTML=
'<h5 style="margin:0px;">'+mxResources.get("heading")+" 5</h5>";d("","h6").firstChild.nextSibling.innerHTML='<h6 style="margin:0px;">'+mxResources.get("heading")+" 6</h6>";d("","pre").firstChild.nextSibling.innerHTML='<pre style="margin:0px;">'+mxResources.get("formatted")+"</pre>";d("","blockquote").firstChild.nextSibling.innerHTML='<blockquote style="margin-top:0px;margin-bottom:0px;">'+mxResources.get("blockquote")+"</blockquote>"})));this.put("fontSize",new Menu(mxUtils.bind(this,function(f,h){var d=
-[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,z){return x-z}));for(var g=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<z.length;C++)if("3"==z[C].getAttribute("size")){z[C].removeAttribute("size");z[C].style.fontSize=x+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
-"values",[x],"cells",[b.cellEditor.getEditingCell()]))}}),m=mxUtils.bind(this,function(x){this.styleChange(f,x,[mxConstants.STYLE_FONTSIZE],[x],null,h,function(){g(x)})}),p=0;p<d.length;p++)m(d[p]);f.addSeparator(h);if(0<this.customFontSizes.length){var k=0;for(p=0;p<this.customFontSizes.length;p++)0>mxUtils.indexOf(d,this.customFontSizes[p])&&(m(this.customFontSizes[p]),k++);0<k&&f.addSeparator(h);f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),h);f.addSeparator(h)}var u=
-null;this.promptChange(f,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,h,!0,mxUtils.bind(this,function(x){null!=u&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(u));null!=x&&0<x.length&&(this.customFontSizes.push(x),g(x))}),null,function(){u=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
+[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(w,z){return w-z}));for(var g=mxUtils.bind(this,function(w){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C<z.length;C++)if("3"==z[C].getAttribute("size")){z[C].removeAttribute("size");z[C].style.fontSize=w+"px";break}a.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_FONTSIZE],
+"values",[w],"cells",[b.cellEditor.getEditingCell()]))}}),m=mxUtils.bind(this,function(w){this.styleChange(f,w,[mxConstants.STYLE_FONTSIZE],[w],null,h,function(){g(w)})}),p=0;p<d.length;p++)m(d[p]);f.addSeparator(h);if(0<this.customFontSizes.length){var k=0;for(p=0;p<this.customFontSizes.length;p++)0>mxUtils.indexOf(d,this.customFontSizes[p])&&(m(this.customFontSizes[p]),k++);0<k&&f.addSeparator(h);f.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){this.customFontSizes=[]}),h);f.addSeparator(h)}var u=
+null;this.promptChange(f,mxResources.get("custom")+"...","("+mxResources.get("points")+")",this.defaultFontSize,mxConstants.STYLE_FONTSIZE,h,!0,mxUtils.bind(this,function(w){null!=u&&null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),b.cellEditor.restoreSelection(u));null!=w&&0<w.length&&(this.customFontSizes.push(w),g(w))}),null,function(){u=b.cellEditor.saveSelection();return!1})})));this.put("direction",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("flipH"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPH,
!1)},h);f.addItem(mxResources.get("flipV"),null,function(){b.toggleCellStyles(mxConstants.STYLE_FLIPV,!1)},h);this.addMenuItems(f,["-","rotation"],h)})));this.put("align",new Menu(mxUtils.bind(this,function(f,h){var d=1<this.editorUi.getSelectionState().vertices.length;f.addItem(mxResources.get("leftAlign"),null,function(){b.alignCells(mxConstants.ALIGN_LEFT)},h,null,d);f.addItem(mxResources.get("center"),null,function(){b.alignCells(mxConstants.ALIGN_CENTER)},h,null,d);f.addItem(mxResources.get("rightAlign"),
null,function(){b.alignCells(mxConstants.ALIGN_RIGHT)},h,null,d);f.addSeparator(h);f.addItem(mxResources.get("topAlign"),null,function(){b.alignCells(mxConstants.ALIGN_TOP)},h,null,d);f.addItem(mxResources.get("middle"),null,function(){b.alignCells(mxConstants.ALIGN_MIDDLE)},h,null,d);f.addItem(mxResources.get("bottomAlign"),null,function(){b.alignCells(mxConstants.ALIGN_BOTTOM)},h,null,d);this.addMenuItems(f,["-","snapToGrid"],h)})));this.put("distribute",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("horizontal"),
null,function(){b.distributeCells(!0)},h);f.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1)},h);f.addSeparator(h);this.addSubmenu("distributeSpacing",f,h,mxResources.get("spacing"))})));this.put("distributeSpacing",new Menu(mxUtils.bind(this,function(f,h){f.addItem(mxResources.get("horizontal"),null,function(){b.distributeCells(!0,null,!0)},h);f.addItem(mxResources.get("vertical"),null,function(){b.distributeCells(!1,null,!0)},h)})));this.put("line",new Menu(mxUtils.bind(this,
@@ -3667,26 +3668,26 @@ h)})));this.put("file",new Menu(mxUtils.bind(this,function(f,h){this.addMenuItem
["copyConnect","collapseExpand","-","editDiagram"])})));this.put("help",new Menu(mxUtils.bind(this,function(f,h){this.addMenuItems(f,["help","-","about"])})))};Menus.prototype.put=function(a,b){return this.menus[a]=b};Menus.prototype.get=function(a){return this.menus[a]};Menus.prototype.addSubmenu=function(a,b,e,f){var h=this.get(a),d=null;null!=h&&(h=h.isEnabled(),b.showDisabled||h)&&(d=b.addItem(f||mxResources.get(a),null,null,e,null,h),this.addMenu(a,b,d));return d};
Menus.prototype.addMenu=function(a,b,e){a=this.get(a);null!=a&&(b.showDisabled||a.isEnabled())&&a.execute(b,e)};
Menus.prototype.addInsertTableCellItem=function(a,b){var e=this.editorUi.editor.graph,f=e.getSelectionCell(),h=e.getCurrentCellStyle(f);1<e.getSelectionCount()&&(e.isTableCell(f)&&(f=e.model.getParent(f)),e.isTableRow(f)&&(f=e.model.getParent(f)));var d=e.isTable(f)||e.isTableRow(f)||e.isTableCell(f),g=e.isStack(f)||e.isStackChild(f),m=d,p=d;g&&(h=e.isStack(f)?h:e.getCellStyle(e.model.getParent(f)),p="0"==h.horizontalStack,m=!p);null!=b||!d&&!g?this.addInsertTableItem(a,mxUtils.bind(this,function(k,
-u,x,z,C){u=C||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)?e.createCrossFunctionalSwimlane(u,x,null,null,z||mxEvent.isShiftDown(k)?"Cross-Functional Flowchart":null):e.createTable(u,x,null,null,z||mxEvent.isShiftDown(k)?"Table":null);k=mxEvent.isAltDown(k)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([u],!0));x=null;e.getModel().beginUpdate();try{x=e.importCells([u],k.x,k.y),e.fireEvent(new mxEventObject("cellsInserted","cells",e.model.getDescendants(x[0])))}finally{e.getModel().endUpdate()}null!=
-x&&0<x.length&&(e.scrollCellToVisible(x[0]),e.setSelectionCells(x))}),b):(m&&(b=a.addItem(mxResources.get("insertColumnBefore"),Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableColumn(f,!0)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),Editor.addColumnRightImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableColumn(f,!1)}catch(k){this.editorUi.handleError(k)}})),
+u,w,z,C){u=C||mxEvent.isControlDown(k)||mxEvent.isMetaDown(k)?e.createCrossFunctionalSwimlane(u,w,null,null,z||mxEvent.isShiftDown(k)?"Cross-Functional Flowchart":null):e.createTable(u,w,null,null,z||mxEvent.isShiftDown(k)?"Table":null);k=mxEvent.isAltDown(k)?e.getFreeInsertPoint():e.getCenterInsertPoint(e.getBoundingBoxFromGeometry([u],!0));w=null;e.getModel().beginUpdate();try{w=e.importCells([u],k.x,k.y),e.fireEvent(new mxEventObject("cellsInserted","cells",e.model.getDescendants(w[0])))}finally{e.getModel().endUpdate()}null!=
+w&&0<w.length&&(e.scrollCellToVisible(w[0]),e.setSelectionCells(w))}),b):(m&&(b=a.addItem(mxResources.get("insertColumnBefore"),Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableColumn(f,!0)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertColumnBefore")),b=a.addItem(mxResources.get("insertColumnAfter"),Editor.addColumnRightImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableColumn(f,!1)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertColumnAfter")),b=a.addItem(mxResources.get("deleteColumn"),Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=f)try{g?e.deleteLane(f):e.deleteTableColumn(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("deleteColumn"))),p&&(b=a.addItem(mxResources.get("insertRowBefore"),Editor.addRowAboveImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!0):e.insertTableRow(f,!0)}catch(k){this.editorUi.handleError(k)}})),
b.setAttribute("title",mxResources.get("insertRowBefore")),b=a.addItem(mxResources.get("insertRowAfter"),Editor.addRowBelowImage,mxUtils.bind(this,function(){try{g?e.insertLane(f,!1):e.insertTableRow(f,!1)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",mxResources.get("insertRowAfter")),b=a.addItem(mxResources.get("deleteRow"),Editor.removeRowImage,mxUtils.bind(this,function(){try{g?e.deleteLane(f):e.deleteTableRow(f)}catch(k){this.editorUi.handleError(k)}})),b.setAttribute("title",
mxResources.get("deleteRow")),p=this.editorUi.getSelectionState(),null!=p.mergeCell?this.addMenuItem(a,"mergeCells"):(1<p.style.colspan||1<p.style.rowspan)&&this.addMenuItem(a,"unmergeCells")))};
-Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=x,I=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<I;L++)for(var T=G.insertRow(L),K=0;K<G.rows[0].cells.length;K++)T.insertCell(-1);for(L=0;L<G.rows.length;L++)for(T=G.rows[L],K=T.cells.length;K<D;K++)T.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex+
-1);for(G=0;G<x.rows.length;G++)for(I=x.rows[G],D=0;D<I.cells.length;D++)L=I.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var I=G.cellEditor.textarea.getElementsByTagName("table");
-C=[];for(var L=0;L<I.length;L++)C.push(I[L]);G.container.focus();L=G.pasteHtmlAtCaret;I=["<table>"];for(var T=0;T<E;T++){I.push("<tr>");for(var K=0;K<D;K++)I.push("<td><br></td>");I.push("</tr>")}I.push("</table>");E=I.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",
+Menus.prototype.addInsertTableItem=function(a,b,e,f){function h(C){m=d.getParentByName(mxEvent.getSource(C),"TD");var E=!1;if(null!=m){g=d.getParentByName(m,"TR");var D=mxEvent.isMouseEvent(C)?2:4,G=w,K=Math.min(20,g.sectionRowIndex+D);D=Math.min(20,m.cellIndex+D);for(var L=G.rows.length;L<K;L++)for(var Q=G.insertRow(L),N=0;N<G.rows[0].cells.length;N++)Q.insertCell(-1);for(L=0;L<G.rows.length;L++)for(Q=G.rows[L],N=Q.cells.length;N<D;N++)Q.insertCell(-1);z.innerHTML=m.cellIndex+1+"x"+(g.sectionRowIndex+
+1);for(G=0;G<w.rows.length;G++)for(K=w.rows[G],D=0;D<K.cells.length;D++)L=K.cells[D],G==g.sectionRowIndex&&D==m.cellIndex&&(E="blue"==L.style.backgroundColor),L.style.backgroundColor=G<=g.sectionRowIndex&&D<=m.cellIndex?"blue":"transparent"}mxEvent.consume(C);return E}f=null!=f?f:!0;b=null!=b?b:mxUtils.bind(this,function(C,E,D){var G=this.editorUi.editor.graph;if(null!=G.getParentByName(mxEvent.getSource(C),"TD")&&null!=G.cellEditor.textarea){var K=G.cellEditor.textarea.getElementsByTagName("table");
+C=[];for(var L=0;L<K.length;L++)C.push(K[L]);G.container.focus();L=G.pasteHtmlAtCaret;K=["<table>"];for(var Q=0;Q<E;Q++){K.push("<tr>");for(var N=0;N<D;N++)K.push("<td><br></td>");K.push("</tr>")}K.push("</table>");E=K.join("");L.call(G,E);E=G.cellEditor.textarea.getElementsByTagName("table");if(E.length==C.length+1)for(L=E.length-1;0<=L;L--)if(0==L||E[L]!=C[L-1]){G.selectNode(E[L].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,g=null,m=null;null==e&&(a.div.className+=" geToolbarMenu",
a.labels=!1);a=a.addItem("",null,null,e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1<e.length&&(e[1].style.display="none",e[2].style.display="none");a.firstChild.innerText="";var p=document.createElement("input");p.setAttribute("id","geTitleOption");p.setAttribute("type","checkbox");p.style.verticalAlign="middle";e=document.createElement("label");mxUtils.write(e,mxResources.get("title"));e.setAttribute("for","geTitleOption");
e.style.verticalAlign="middle";mxEvent.addGestureListeners(e,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(p,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));var k=document.createElement("input");k.setAttribute("id","geContainerOption");k.setAttribute("type","checkbox");k.style.verticalAlign="middle";var u=document.createElement("label");mxUtils.write(u,mxResources.get("container"));u.setAttribute("for","geContainerOption");u.style.verticalAlign=
-"middle";mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));f&&(a.firstChild.appendChild(p),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(k),a.firstChild.appendChild(u),mxUtils.br(a.firstChild));var x=function(C,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse=
-"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var I=D.insertRow(G),L=0;L<E;L++)I.insertCell(-1);return D}(5,5);a.firstChild.appendChild(x);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(x,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex+
-1,m.cellIndex+1,p.checked,k.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(x,"mouseover",h)};
-Menus.prototype.edgeStyleChange=function(a,b,e,f,h,d,g,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],x=0;x<k.length;x++){var z=k[x];if(p.getModel().isEdge(z)){if(g){var C=p.getCellGeometry(z);null!=C&&(C=C.clone(),C.points=null,p.getModel().setGeometry(z,C))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[z]);u.push(z)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
+"middle";mxEvent.addGestureListeners(u,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));mxEvent.addGestureListeners(k,null,null,mxUtils.bind(this,function(C){mxEvent.consume(C)}));f&&(a.firstChild.appendChild(p),a.firstChild.appendChild(e),mxUtils.br(a.firstChild),a.firstChild.appendChild(k),a.firstChild.appendChild(u),mxUtils.br(a.firstChild));var w=function(C,E){var D=document.createElement("table");D.className="geInsertTablePicker";D.setAttribute("border","1");D.style.borderCollapse=
+"collapse";D.style.borderStyle="solid";D.style.marginBottom="4px";D.style.marginTop="8px";D.setAttribute("cellPadding","8");for(var G=0;G<C;G++)for(var K=D.insertRow(G),L=0;L<E;L++)K.insertCell(-1);return D}(5,5);a.firstChild.appendChild(w);var z=document.createElement("div");z.style.textAlign="center";z.style.padding="4px";z.style.width="100%";z.innerHTML="1x1";a.firstChild.appendChild(z);mxEvent.addGestureListeners(w,null,null,mxUtils.bind(this,function(C){var E=h(C);null!=m&&null!=g&&E&&(b(C,g.sectionRowIndex+
+1,m.cellIndex+1,p.checked,k.checked),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0))}));mxEvent.addListener(w,"mouseover",h)};
+Menus.prototype.edgeStyleChange=function(a,b,e,f,h,d,g,m){return this.showIconOnly(a.addItem(b,m,mxUtils.bind(this,function(){var p=this.editorUi.editor.graph;p.stopEditing(!1);p.getModel().beginUpdate();try{for(var k=p.getSelectionCells(),u=[],w=0;w<k.length;w++){var z=k[w];if(p.getModel().isEdge(z)){if(g){var C=p.getCellGeometry(z);null!=C&&(C=C.clone(),C.points=null,p.getModel().setGeometry(z,C))}for(var E=0;E<e.length;E++)p.setCellStyles(e[E],f[E],[z]);u.push(z)}}this.editorUi.fireEvent(new mxEventObject("styleChanged",
"cells",u,"keys",e,"values",f,"force",0==k.length))}finally{p.getModel().endUpdate()}}),d,h))};Menus.prototype.showIconOnly=function(a){var b=a.getElementsByTagName("td");for(i=0;i<b.length;i++)"mxPopupMenuItem"==b[i].getAttribute("class")&&(b[i].style.display="none");return a};
-Menus.prototype.styleChange=function(a,b,e,f,h,d,g,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var x=this.editorUi.editor.graph;null!=g&&x.cellEditor.isContentEditing()?g():u(m)}),d,h);p&&this.showIconOnly(a);return a};
+Menus.prototype.styleChange=function(a,b,e,f,h,d,g,m,p,k){var u=this.createStyleChangeFunction(e,f);a=a.addItem(b,k,mxUtils.bind(this,function(){var w=this.editorUi.editor.graph;null!=g&&w.cellEditor.isContentEditing()?g():u(m)}),d,h);p&&this.showIconOnly(a);return a};
Menus.prototype.createStyleChangeFunction=function(a,b){return mxUtils.bind(this,function(e){var f=this.editorUi.editor.graph;f.stopEditing(!1);f.getModel().beginUpdate();try{for(var h=f.getEditableCells(f.getSelectionCells()),d=!1,g=0;g<a.length;g++)if(f.setCellStyles(a[g],b[g],h),a[g]==mxConstants.STYLE_ALIGN&&f.updateLabelElements(h,function(m){m.removeAttribute("align");m.style.textAlign=null}),a[g]==mxConstants.STYLE_FONTFAMILY||"fontSource"==a[g])d=!0;if(d)for(d=0;d<h.length;d++)0==f.model.getChildCount(h[d])&&
f.autoSizeCell(h[d],!1);null!=e&&e();this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",a,"values",b,"cells",h))}finally{f.getModel().endUpdate()}})};
-Menus.prototype.promptChange=function(a,b,e,f,h,d,g,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,x=f,z=u.getView().getState(u.getSelectionCell());null!=z&&(x=z.style[h]||x);var C=null!=k?k():!0;x=new FilenameDialog(this.editorUi,x,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(C){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(h,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
-(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(x.container,300,80,!0,!0);x.init()}),d,p,g)};
+Menus.prototype.promptChange=function(a,b,e,f,h,d,g,m,p,k){return a.addItem(b,null,mxUtils.bind(this,function(){var u=this.editorUi.editor.graph,w=f,z=u.getView().getState(u.getSelectionCell());null!=z&&(w=z.style[h]||w);var C=null!=k?k():!0;w=new FilenameDialog(this.editorUi,w,mxResources.get("apply"),mxUtils.bind(this,function(E){if(null!=E&&0<E.length){if(C){u.getModel().beginUpdate();try{u.stopEditing(!1),u.setCellStyles(h,E)}finally{u.getModel().endUpdate()}}null!=m&&m(E)}}),mxResources.get("enterValue")+
+(0<e.length?" "+e:""),null,null,null,null,function(){null!=m&&null!=k&&m(null)});this.editorUi.showDialog(w.container,300,80,!0,!0);w.init()}),d,p,g)};
Menus.prototype.pickColor=function(a,b,e,f,h,d){this.editorUi.tryAndHandle(mxUtils.bind(this,function(){var g=this.editorUi.editor.graph;if(null!=b&&g.cellEditor.isContentEditing()){var m=g.getSelectedEditingElement();null!=m&&null!=g.cellEditor.textarea&&(m=g.getTextColor(m,"forecolor"==b),this.editorUi.pickColor(m,mxUtils.bind(this,function(k){null!=g.cellEditor.textarea&&(Graph.setTextColor(g.cellEditor.textarea,k,"forecolor"==b),this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",
["forecolor"==b?mxConstants.STYLE_FONTCOLOR:mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],"values",[k],"cells",[g.cellEditor.getEditingCell()])))}),f,h,d))}else{var p=g.getView().getState(g.getSelectionCell());m=mxConstants.NONE;null!=p&&(m=p.style[a]||m);this.editorUi.pickColor(m,ColorDialog.createApplyFunction(this.editorUi,a),f,h,d)}}))};
Menus.prototype.toggleStyle=function(a,b){var e=this.editorUi.editor.graph;b=e.toggleCellStyles(a,b);this.editorUi.fireEvent(new mxEventObject("styleChanged","keys",[a],"values",[b],"cells",e.getSelectionCells()))};
@@ -3739,8 +3740,8 @@ h.addItem(mxResources.get("insertHorizontalRule"),null,mxUtils.bind(this,functio
b.getParentByName(m,"TABLE",b.cellEditor.text2);d=h.addItem("",Editor.addColumnLeftImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(p,null!=g?g.cellIndex:0))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertColumnBefore"));d=h.addItem("",Editor.addColumnRightImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertColumn(p,null!=g?g.cellIndex+1:-1))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertColumnAfter"));
d=h.addItem("Delete column",Editor.removeColumnImage,mxUtils.bind(this,function(){if(null!=g)try{b.deleteColumn(p,g.cellIndex)}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("deleteColumn"));d=h.addItem("",Editor.addRowAboveImage,mxUtils.bind(this,function(){try{b.selectNode(b.insertRow(p,m.sectionRowIndex))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertRowBefore"));d=h.addItem("",Editor.addRowBelowImage,mxUtils.bind(this,
function(){try{b.selectNode(b.insertRow(p,m.sectionRowIndex+1))}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("insertRowAfter"));d=h.addItem("",Editor.removeRowImage,mxUtils.bind(this,function(){try{b.deleteRow(p,m.sectionRowIndex)}catch(k){this.editorUi.handleError(k)}}));d.setAttribute("title",mxResources.get("deleteRow"));d=h.addItem("",Editor.strokeColorImage,mxUtils.bind(this,function(){var k=p.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
-function(u,x,z,C){return"#"+("0"+Number(x).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){null==u||u==mxConstants.NONE?(p.removeAttribute("border"),p.style.border="",p.style.borderCollapse=""):(p.setAttribute("border","1"),p.style.border="1px solid "+u,p.style.borderCollapse="collapse")})}));d.setAttribute("title",mxResources.get("borderColor"));d=h.addItem("",Editor.fillColorImage,mxUtils.bind(this,
-function(){var k=p.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(u,x,z,C){return"#"+("0"+Number(x).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){p.style.backgroundColor=null==u||u==mxConstants.NONE?"":u})}));d.setAttribute("title",mxResources.get("backgroundColor"));d=h.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var k=p.getAttribute("cellPadding")||
+function(u,w,z,C){return"#"+("0"+Number(w).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){null==u||u==mxConstants.NONE?(p.removeAttribute("border"),p.style.border="",p.style.borderCollapse=""):(p.setAttribute("border","1"),p.style.border="1px solid "+u,p.style.borderCollapse="collapse")})}));d.setAttribute("title",mxResources.get("borderColor"));d=h.addItem("",Editor.fillColorImage,mxUtils.bind(this,
+function(){var k=p.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(u,w,z,C){return"#"+("0"+Number(w).toString(16)).substr(-2)+("0"+Number(z).toString(16)).substr(-2)+("0"+Number(C).toString(16)).substr(-2)});this.editorUi.pickColor(k,function(u){p.style.backgroundColor=null==u||u==mxConstants.NONE?"":u})}));d.setAttribute("title",mxResources.get("backgroundColor"));d=h.addItem("",Editor.spacingImage,mxUtils.bind(this,function(){var k=p.getAttribute("cellPadding")||
0;k=new FilenameDialog(this.editorUi,k,mxResources.get("apply"),mxUtils.bind(this,function(u){null!=u&&0<u.length?p.setAttribute("cellPadding",u):p.removeAttribute("cellPadding")}),mxResources.get("spacing"));this.editorUi.showDialog(k.container,300,80,!0,!0);k.init()}));d.setAttribute("title",mxResources.get("spacing"));d=h.addItem("",Editor.alignLeftImage,mxUtils.bind(this,function(){p.setAttribute("align","left")}));d.setAttribute("title",mxResources.get("left"));d=h.addItem("",Editor.alignCenterImage,
mxUtils.bind(this,function(){p.setAttribute("align","center")}));d.setAttribute("title",mxResources.get("center"));d=h.addItem("",Editor.alignRightImage,mxUtils.bind(this,function(){p.setAttribute("align","right")}));d.setAttribute("title",mxResources.get("right"))}}));this.addDropDownArrow(f,Editor.tableImage,38)};Toolbar.prototype.hideMenu=function(){this.editorUi.hideCurrentMenu()};
Toolbar.prototype.addMenu=function(a,b,e,f,h,d,g){var m=this.editorUi.menus.get(f),p=this.addMenuFunction(a,b,e,function(){m.funct.apply(m,arguments)},h,d);g||"function"!==typeof p.setEnabled||m.addListener("stateChanged",function(){p.setEnabled(m.enabled)});return p};Toolbar.prototype.addMenuFunction=function(a,b,e,f,h,d){return this.addMenuFunctionInContainer(null!=h?h:this.container,a,b,e,f,d)};
@@ -3751,113 +3752,115 @@ Toolbar.prototype.addClickHandler=function(a,b){null!=b&&(mxEvent.addListener(a,
Toolbar.prototype.createButton=function(a){var b=document.createElement("a");b.className="geButton";var e=document.createElement("div");null!=a&&"data:"==a.substring(0,5)&&(e.className="geAdaptiveAsset",e.style.backgroundImage="url("+a+")",e.style.backgroundPosition="center center",e.style.backgroundRepeat="no-repeat",e.style.backgroundSize="18px",e.style.width="22px",e.style.height="20px");b.appendChild(e);return b};
Toolbar.prototype.createLabel=function(a,b){b=document.createElement("a");b.className="geLabel";mxUtils.write(b,a);return b};
Toolbar.prototype.addMenuHandler=function(a,b,e,f){if(null!=e){var h=this.editorUi.editor.graph,d=null,g=!0;mxEvent.addListener(a,"click",mxUtils.bind(this,function(m){if(g&&(null==a.enabled||a.enabled)){h.popupMenuHandler.hideMenu();d=new mxPopupMenu(e);d.smartSeparators=!0;d.div.className+=" geToolbarMenu";d.showDisabled=f;d.labels=b;d.autoExpand=!0;!b&&d.div.scrollHeight>d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d,
-arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var I=Math.floor(E),
-L=G*(1-D);E=G*(1-D*(I%2?E-I:1-(E-I)));switch(I){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
+arguments);this.editorUi.resetCurrentMenu();d.destroy()});var p=mxUtils.getOffset(a);d.popup(p.x,p.y+a.offsetHeight,null,m);this.editorUi.setCurrentMenu(d,a)}g=!0;mxEvent.consume(m)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){g=null==d||null==d.div||null==d.div.parentNode;m.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorPicker=function(){function a(E,D,G){if(null==E)return[G,G,G];var K=Math.floor(E),
+L=G*(1-D);E=G*(1-D*(K%2?E-K:1-(E-K)));switch(K){case 6:case 0:return[G,E,L];case 1:return[E,G,L];case 2:return[L,G,E];case 3:return[L,E,G];case 4:return[E,L,G];case 5:return[G,L,E]}}mxEventSource.call(this);var b=document.createElement("div");b.style.overflow="visible";b.style.position="relative";b.style.top="0px";b.style.left="0px";b.style.width="230px";b.style.height="114px";var e=document.createElement("div");e.style.border="1px solid light-dark(black, white)";e.style.backgroundImage="url("+this.hsImage+
")";e.style.position="absolute";e.style.overflow="hidden";e.style.cursor="crosshair";e.style.width="181px";e.style.height="101px";e.style.left="6px";e.style.top="4px";var f=document.createElement("div");f.style.background="url("+this.crossImage+")";f.style.pointerEvents="none";f.style.position="absolute";f.style.width="15px";f.style.height="15px";f.style.left="-8px";f.style.top="-8px";var h=[0,0,1];e.appendChild(f);b.appendChild(e);sliderBox=document.createElement("div");sliderBox.style.position=
"absolute";sliderBox.style.cursor="pointer";sliderBox.style.width="38px";sliderBox.style.height="110px";sliderBox.style.left="199px";sliderBox.style.top="4px";var d=document.createElement("div");d.style.border="1px solid light-dark(black, white)";d.style.pointerEvents="none";d.style.overflow="hidden";d.style.position="absolute";d.style.width="16px";d.style.height="101px";d.style.left="9px";d.style.top="0px";var g=!1,m=!1,p=mxUtils.bind(this,function(E){var D=Math.round(100*(1-h[1]));f.style.left=
-Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),I=0;I<D.length;I++)D[I].style.backgroundColor="rgb("+G[0]*(1-I/D.length)*255+", "+G[1]*(1-I/D.length)*255+", "+G[2]*(1-I/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",
-mxUtils.rgba2hex(D)))}),k=mxUtils.bind(this,function(E){0==h[2]&&(h[2]=1);g=!0;x(E)}),u=mxUtils.bind(this,function(E){m=!0;x(E)}),x=mxUtils.bind(this,function(E){if(g){var D=e.getBoundingClientRect(),G=mxEvent.getClientX(E)-D.left;E=mxEvent.getClientY(E)-D.top;f.style.left=G-8+"px";f.style.top=E-8+"px";G*=6/180;E=1-E/100;D=void 0;0>G&&(G=0);6<G&&(G=6);0>E&&(E=0);1<E&&(E=1);0>D&&(D=0);1<D&&(D=1);G=a(null==G?h[0]:h[0]=G,null==E?h[1]:h[1]=E,null==D?h[2]:h[2]=D);this.fromString("#"+("0"+Math.floor(255*
-G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+("0"+Math.floor(255*G[2]).toString(16)).slice(-2))}else m&&(D=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-D.top,h[2]=Math.max(Math.min(1,1-E/100),0),p())}),z=mxUtils.bind(this,function(){g=m=!1});mxEvent.addGestureListeners(e,k);mxEvent.addGestureListeners(sliderBox,u);mxEvent.addGestureListeners(b,null,x,z);mxEvent.addListener(b,"mouseleave",z);for(k=0;101>k;k+=4)u=document.createElement("div"),u.style.height=
+Math.round(h[0]/6*180)-8+"px";f.style.top=D-8+"px";D=d.childNodes;for(var G=a(h[0],h[1],1),K=0;K<D.length;K++)D[K].style.backgroundColor="rgb("+G[0]*(1-K/D.length)*255+", "+G[1]*(1-K/D.length)*255+", "+G[2]*(1-K/D.length)*255+")";C.style.top=Math.round(100*(1-h[2]))-4+"px";D=a(h[0],h[1],h[2]);D="#"+("0"+Math.round(255*D[0]).toString(16)).slice(-2)+("0"+Math.round(255*D[1]).toString(16)).slice(-2)+("0"+Math.round(255*D[2]).toString(16)).slice(-2);1!=E&&this.fireEvent(new mxEventObject("change","color",
+mxUtils.rgba2hex(D)))}),k=mxUtils.bind(this,function(E){0==h[2]&&(h[2]=1);g=!0;w(E)}),u=mxUtils.bind(this,function(E){m=!0;w(E)}),w=mxUtils.bind(this,function(E){if(g){var D=e.getBoundingClientRect(),G=mxEvent.getClientX(E)-D.left;E=mxEvent.getClientY(E)-D.top;f.style.left=G-8+"px";f.style.top=E-8+"px";G*=6/180;E=1-E/100;D=void 0;0>G&&(G=0);6<G&&(G=6);0>E&&(E=0);1<E&&(E=1);0>D&&(D=0);1<D&&(D=1);G=a(null==G?h[0]:h[0]=G,null==E?h[1]:h[1]=E,null==D?h[2]:h[2]=D);this.fromString("#"+("0"+Math.floor(255*
+G[0]).toString(16)).slice(-2)+("0"+Math.floor(255*G[1]).toString(16)).slice(-2)+("0"+Math.floor(255*G[2]).toString(16)).slice(-2))}else m&&(D=sliderBox.getBoundingClientRect(),E=mxEvent.getClientY(E)-D.top,h[2]=Math.max(Math.min(1,1-E/100),0),p())}),z=mxUtils.bind(this,function(){g=m=!1});mxEvent.addGestureListeners(e,k);mxEvent.addGestureListeners(sliderBox,u);mxEvent.addGestureListeners(b,null,w,z);mxEvent.addListener(b,"mouseleave",z);for(k=0;101>k;k+=4)u=document.createElement("div"),u.style.height=
"4px",u.style.pointerEvents="none",d.appendChild(u);b.appendChild(d);var C=document.createElement("div");C.style.background="url("+this.arrowImage+")";C.style.position="absolute";C.style.pointerEvents="none";C.style.width="7px";C.style.height="11px";C.style.left="2px";C.style.top="-3px";sliderBox.appendChild(C);sliderBox.appendChild(d);b.appendChild(sliderBox);this.fromString=function(E,D){D=null!=D?D:!1;if(null==E||""==E||mxUtils.isVarColor(E)||E==mxConstants.NONE)E="#ffffff",D=!0;var G=mxUtils.parseColor(E);
-E=G.r/255;var I=G.g/255,L=G.b/255,T=Math.min(Math.min(E,I),L);G=Math.max(Math.max(E,I),L);var K=G-T;0===K?E=[null,0,G]:(E=E===T?3+(L-I)/K:I===T?5+(E-L)/K:1+(I-E)/K,E=[6===E?0:E,K/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
+E=G.r/255;var K=G.g/255,L=G.b/255,Q=Math.min(Math.min(E,K),L);G=Math.max(Math.max(E,K),L);var N=G-Q;0===N?E=[null,0,G]:(E=E===Q?3+(L-K)/N:K===Q?5+(E-L)/N:1+(K-E)/N,E=[6===E?0:E,N/G,G]);null!=E[0]&&(h[0]=E[0]);0!=E[2]&&(h[1]=E[1]);h[2]=E[2];p(D)};this.fromString("#ffffff");this.div=b};mxUtils.extend(ColorPicker,mxEventSource);ColorPicker.prototype.hsImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALUAAABlCAIAAACEDzXRAAAKQ0lEQVR42u2d23IjKwxFBeRh5v8/9uQlzXlI2gGELoCEm6pxubp6PI69WoV3C20uIQPAH4A/AH/p41/pDcTxP4BPGDtq3vYJGPpv8craeRdo/fyTI8ZhHnodOGgcV/3rnx8QI0SABO2xfAbiCfVR8Wj+CD8jenbRJNyGOxLoAaH1iLu4EUEHAv1+MsQ4zLE4AiIOcpibv4u9OET6+cP4ASnJ1JH4/G60A9km+GbBxLlpKAkADoR2JnaBrvWD/x1GCZn9EYLEHqVfI6Efx0D7E9tDF/rBSJ54l8FqTUse0J+EvxPrdK0fD4aOLXQi7zyGxMaRvvWjjH2U8o9I44OKnf+wyCpHoR/Phk6d/COq8481YrNI3/qR2B+kMl1Fl6J8o/JrU/GEA6HdiB2ha/0YBVx7rFwNHAj9JuIl6EI/qKyJug4Yvg7xA0QEpB8nQe8itoQu9EOT8M3mTsqUSUzykH6cBO1PbA9d91+ShDzV9xrtcgW21IT6L0yfcS90FKCdw+wS6Q9ISWjVfLTVVT2mdiPGGRduFKWm7dBStWlLmI0j/QExdgp7gT5qCu2BLKiLqtc94hI7PB8auQP4KuyIvSJ960fUqXWcd2F48Khr1bHSj2dDp/afmg7tMrFxpG/9mHMFuqrH3spFw0s0Bgr9OAzamdgFutaPpMuqo6WVEXWJdSL14xhof2J76MKfS2yXWGOVB1WXXGOVdxFSx587CXoLsTE0689RH7VW4RMLeKI9wPpzz4XeS2wDzdbXR52AWStjwiSAA6HdiB2h1f6cqT0whzzuzz0LejuxATTy90Xt40v7CzdGRvKS4O/zQ0AiXaRW5x/dv4vS4A/a308LYR5pFquRRvlHIrKWoCj5woCVId4eR/KPNDjURg2tdEC7rSQN5B9DYR70X5YivVxft7AyrOvrD4V2JnaBJurr+qpemLEywlRhT6qvPx16C7ExdK0fSjcj0maAzsqgBt7rfIxGP46B9iT2gi70I842bNj0U4wd/WAG/L5VP3p0W4iNoYv6Oh6eoJmSMW5laIzF8iT1TtgeV9RZoZ7QvdEUzsQu0CP+HOMKDFoZvDFg6s89CNqf2B5a4e8Hts84W0pgeohBtspBXYp8H3Tk/H23MBtHuvbn5mp7dlU9TUkP+XNJMabzHdCIbnuYDSItzZ+bdgUWrAwNPhwInRxw1/wXuYGj+4vo7flboRpjEQ6EjgojYK9/K04NFfNTauEBypXQWQLAfqQoHl9CfvpQ6C3ExtC9/q2YW2u6X1JWzfsYFPKX3L99LrQ/sT10XR+jKh+UN2AxlDOyXfLQaxxf/fkvT4d2JnaBZv258M6h4IFu2Em7/sezoLcQG0Mjfy6xrqLnVBLGWHw1i69WP5LCCn0TNEL3DLNXpCV/n5oo5jAVLY5Em6i8Pwm6uSNuCrNxpNX+nDira20qqyZriv384xhoZ2IX6Lr/wg8eiwpXYGQqPEgjsBrX+er3X46B9ie2h6bX/4i6IfcLS2mIY++7TfoCuLj6hwgN89CwBJ3Gx8rOVsn0kQ48tDS/4X1L8SzMb3BbkGdtwsD05AbP9YOU8xui+uljZei/P/3qx2HQbsSO0Ar/lveHLZYCVK4GeN1P5N+eAb2R2Aya9ueUY+8dlhLtdhWvgfEfz4AeGf9hR2wcaeTPpacvRdzLTx8J/Qq1Ij995PrJ3/mp0p8LO5YyF0s215g/9yxoZ2IXaLo+FiwtgTlvIAznp4+G3khsBk3Pf5mYvqOwMqZnNnw3i9cRDoT2JPaCZuvreskDuXkHxfQMvfbBgdBbiI2hC/3QLCg6lESZZkrfJ7nSj3gWNEMcRkYJsf5L0BXENBl1WV8/aquMLM9/eSJ0UtxZmFGGg4MigZ75ovHnvsOcUX09zRbzjCrU/K/Rev0gT2i2vu4cZrNI1+sH2e49Yb3lRC6e9fSS9ETohjj7hdkx0rQ/57/rxIrhBQdCv494Hlrtz1lo30Qjz1z+cRh02ndTNIMm1j8NxtmePs+76i+/esJHrH/6dGh/YntoRf9l2RtQWgJXzY4bdtbqx0OhnYldoHv7I79jf4+rOGGaRWr14yToLcTG0Ky/v32rjAsdX9S5vgI4ENqT2Asa7Z/9vq0yStiGNNVHkOe/RGmqwBQ0jEDHFpoJ85BLN+jPaRoHGWl2/2yx3msxVRHjZ0Td4GfV/Bf9bCM1dBiBfrHeJ1HR6dKEedDf5yPdBLilp/efC3Ribb1VxlUHGQe8iTb0598+Hdqf2B6a3b9SOerezsoIBWaJ3IBn1fp0j4PeQmwMzc5/idLK3UZWRkmKX2zA4Vc/DoPeSGwGrdvfY24RpKmVjrLuCQdCuxE7Qkv64TZ3Z44dVPrxUOh3EK9C1/lHGpz7ZzpVsYTF7K8Hyj+Ogd5FbAk9uL9H9LIyYg821sjo13gYtD+xPbRU/9Ds/b1sZTTIr5OStMGHA6GdiV2gUf2UmQcfJdUbXOoe6HoN1A0b2uQD4EBosXJqQTwKnXvXAEX+oZlfGaS9ewetDGCLeV1exH4e9Mr+2TDpv2iggYFW+LdBsTbngv/yUroGH0jleEX7MOgtxMbQ7PzKoMuajKyM8pYIiB194HnQzsQu0Gp/LvpulVHylsgK/TgG2p/YHrqXf6T3bJUBhfxFWUDPg95CbAytm/+ycasM9WOxWu0PnTniLWE2iLRi/4Z3bJXRvY76s0+Arl93I3aMNOHPBce2PdSkL7Kpnwe9l9gGutCPoFgkUtytXAGbex0vKCznSOs00o+ToLcQG0N/QErCrG6jrTIynVUDwo896vCzssPrNnAYtD+xPfR9fwmKeu/CVhm5OAn1STPkvhxBW1KXjeP60Y/DoJ2JXaAL/RCPy+PXc80L9d7OV294dVPbC/fb4EDoLcTG0IV+TCDrrIxMHIFg512BWj9OgvYk9oK+9SMoZG55q/JMiGS40/sLjacu28T3MVfd0Aha+u3QJXr+0Q//MBtHutaPQOzh3H0RBoZS5OJ/MjqJ9x2vQb7qgSuvX0StH0+FLptzrvTDh9gl0oV+iAbi2lAsqNmbK3yBAyLNdbRzW8Y6Btqf2B76A2IURE2zZY16KGfZlwqofJSL4feABka+xCNX+ekx0LuILaFr/Zit7s4ZA7y5Qg2sDr/t4zDodxCvQt/6occctDKGriMPzH85D9qN2BG61g/QwcLSVDSGl78C6LePY6A3EptBf0BKcjWWH/GqyJqoxKnMufEVBLJxAJwJ7U9sDH3fX0CxnIB4orMyuilTyRh6g+0bfDgQ2p/YHrrQD+jV6qb/SdRrMit8TRWwyEabxgFwJrQnsQt0rR+LR3VqFNiGHRBv73ge9EZiM+haPyicuRcVmIxzAMTMl9wfi3sGtBuxF3ShH92C29yJTteU+ohbRrZk3Qe9hdgY+tYPnOqanA+mTN33ZGKE06HQbsQu0LV+MF8+94rU5dK8B8/KyJaI+6D9ie2hC/3Q12QnSnYLn5p9P/6d0D7EltAh5wz/Hv8exON/LUjHOuz5CksAAAAASUVORK5CYII=";
ColorPicker.prototype.crossImage="data:image/gif;base64,R0lGODlhDwAPAKEBAAAAAP///////////yH5BAEKAAIALAAAAAAPAA8AAAIklB8Qx53b4otSUWcvyiz4/4AeQJbmKY4p1HHapBlwPL/uVRsFADs=";ColorPicker.prototype.arrowImage="data:image/gif;base64,R0lGODlhBwALAKECAAAAAP///6g8eKg8eCH5BAEKAAIALAAAAAAHAAsAAAITTIQYcLnsgGxvijrxqdQq6DRJAQA7";
-var ColorDialog=function(a,b,e,f,h,d,g){function m(W){return mxUtils.color2hex("#"+W).substring(1).toUpperCase()}function p(){V.src="none"==M.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(W){""==W.value&&null!=I&&T?W.style.background=W==Y?I.dark:I.light:""==W.value||W.value==mxConstants.NONE||mxUtils.isVarColor(W.value)?W.style.background="transparent":W.style.background="#"+W.value;W.style.color="transparent"==W.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(W.style.background)?
-"#ffffff":"#000000"}function u(){k(K);k(Y)}function x(W){W?g&&null!=I?(K.value=I.light.substring(1).toUpperCase(),W=!1):(K.value="",Y.value="",Q.value="automatic",K.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),Y.setAttribute("title",mxResources.get("useBlackAndWhite")),K.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==K.value&&null!=I&&(K.value=I.light.substring(1).toUpperCase()),K.removeAttribute("placeholder"),K.removeAttribute("title"),""==Y.value&&null!=I&&(Y.value=
-I.dark.substring(1).toUpperCase()),Y.removeAttribute("placeholder"),Y.removeAttribute("title"),W=!1);T=W}function z(W){var ja=W.value,H=ja.toLowerCase();null==h||""!=ja&&"automatic"!=H&&"default"!=H&&H!=mxResources.get("default").toLowerCase()&&H!=mxResources.get("automatic").toLowerCase()||null==I?(W.value==mxConstants.NONE||mxUtils.isVarColor(W.value)||(W.value=m(W.value),na.fromString("#"+W.value)),x(!1),W!=Y||K.value==mxConstants.NONE&&Y.value==mxConstants.NONE||(Q.value="custom"),W==K&&"automatic"==
-Q.value&&(K.value==mxConstants.NONE?Y.value=mxConstants.NONE:mxUtils.isVarColor(K.value)?Y.value=K.value:Y.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+W.value)).substring(1).toUpperCase()),u()):aa.click()}function C(){var W=K.value,ja=Y.value;if(T&&null!=I||(/(^#?[a-zA-Z0-9]*$)/.test(W)||mxUtils.isVarColor(W))&&(/(^#?[a-zA-Z0-9]*$)/.test(ja)||mxUtils.isVarColor(ja))){if(T)W="default";else if(""==W&&(W=mxConstants.NONE),""==ja&&(ja=mxConstants.NONE),W==mxConstants.NONE||mxUtils.isVarColor(W)||
-"#"==W.charAt(0)||(W="#"+m(W)),ja==mxConstants.NONE||mxUtils.isVarColor(ja)||"#"==ja.charAt(0)||(ja="#"+m(ja)),ColorDialog.addRecentColor("none"!=W?W.substring(1):W,12),"automatic"!=Q.value&&ColorDialog.addRecentColor("none"!=ja?ja.substring(1):ja,12),"none"!=W||"none"!=ja)W=W==mxConstants.NONE?"transparent":W,ja=ja==mxConstants.NONE?"transparent":ja,g||"automatic"==Q.value||(W="light-dark("+W+","+ja+")");ia(W);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function E(){mxClient.IS_TOUCH||
-(qa.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?qa.select():document.execCommand("selectAll",!1,null))}function D(){var W=Z(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);W.style.marginBottom="8px";return W}function G(W){13==W.keyCode&&(z(mxEvent.getSource(W)),C())}var I=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,L=a.editor.graph;this.editorUi=a;var T=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||
-mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var K=document.createElement("input");K.style.textOverflow="ellipsis";K.style.margin="0 0 0 4px";K.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var U=document.createElement("div");U.style.display="flex";U.style.alignItems="center";d.appendChild(U);var Y=document.createElement("input");Y.style.textOverflow="ellipsis";Y.style.margin="0 4px";Y.style.maxWidth="60px";Y.style.width=
-"100%";var Q=document.createElement("select");Q.style.textOverflow="ellipsis";Q.style.width="100%";var P=document.createElement("option");P.setAttribute("value","automatic");mxUtils.write(P,mxResources.get("automatic"));Q.appendChild(P);P=document.createElement("option");P.setAttribute("value","custom");mxUtils.write(P,mxResources.get("userDefined"));Q.appendChild(P);Q.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var M=document.createElement("div");M.style.padding="0 6px 0 6px";P=document.createElement("img");
-P.setAttribute("title",mxResources.get("dark"));P.className="geAdaptiveAsset";P.src=Editor.thinDarkImage;P.style.width="20px";M.appendChild(P);mxEvent.addListener(P,"click",function(){Y.focus()});M.appendChild(Y);M.appendChild(Q);M.style.display="flex";M.style.alignItems="center";P=document.createElement("div");P.style.display="flex";P.style.alignItems="center";P.style.userSelect="none";P.style.cursor="pointer";P.style.padding="2px 0 2px 0";var V=document.createElement("img");V.setAttribute("title",
-mxResources.get("dark"));V.className="geAdaptiveAsset";V.style.marginLeft="-2px";P.appendChild(V);mxUtils.write(P,mxResources.get("advanced"));p();mxEvent.addListener(P,"click",function(){M.style.display="none"==M.style.display?"flex":"none";p();p();ColorDialog.collapsed="none"==M.style.display});var aa=mxUtils.button("",function(){x(!0);u();qa.focus();""==qa.value&&null!=I&&T&&na.fromString(qa==Y?I.dark:I.light,!0)});mxEvent.addListener(Q,"change",function(){"automatic"==Q.value?(K.focus(),z(K)):
-(x(!1),mxUtils.isVarColor(Y.value)||(Y.value=T&&null!=I?I.dark.substring(1).toUpperCase():Y.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+K.value)).substring(1).toUpperCase()),Y.focus(),E());u()});mxEvent.addListener(K,"change",function(){z(K)});mxEvent.addListener(Y,"change",function(){z(Y)});var ia=null!=e?e:this.createApplyFunction();this.init=function(){E()};var na=new ColorPicker,qa=Editor.isDarkMode()&&("auto"==L.getAdaptiveColors()||"simple"==L.getAdaptiveColors()&&"custom"==Q.value)&&
-!g?Y:K;mxEvent.addListener(K,"focus",function(){qa=K});mxEvent.addListener(Y,"focus",function(){qa=Y});na.addListener("change",function(W,ja){W=ja.getProperty("color").substring(1).toUpperCase();qa.value.toUpperCase()!=W&&(qa.value=W,z(qa),window.setTimeout(function(){qa.focus()},0))});e=document.createElement("div");e.appendChild(na.div);var O=document.createElement("div");O.style.display="flex";O.style.flexFlow="row wrap";O.style.justifyContent="center";O.style.paddingTop="10px";var Z=mxUtils.bind(this,
-function(W,ja,H,ea){ja=null!=ja?ja:12;var oa=document.createElement("table");oa.style.borderCollapse="collapse";oa.setAttribute("cellspacing","0");oa.style.marginBottom="20px";oa.style.cellSpacing="0px";oa.style.marginLeft="1px";var sa=document.createElement("tbody");oa.appendChild(sa);for(var Pa=W.length/ja,la=0;la<Pa;la++){for(var Ba=document.createElement("tr"),Ca=0;Ca<ja;Ca++)mxUtils.bind(this,function(Fa){var Ia=document.createElement("td");Ia.style.border="0px solid black";Ia.style.padding=
-"0px";Ia.style.width="16px";Ia.style.height="16px";null==Fa&&(Fa=H);if(null!=Fa){Ia.style.borderWidth="1px";Fa==mxConstants.NONE?Ia.style.background="url('"+Dialog.prototype.noColorImage+"')":Ia.style.backgroundColor="#"+Fa;var Ha=this.colorNames[String(Fa).toUpperCase()];null!=Ha&&Ia.setAttribute("title",Ha)}Ba.appendChild(Ia);null!=Fa&&(Ia.style.cursor="pointer",mxEvent.addListener(Ia,"click",function(){if(Fa==mxConstants.NONE){qa==Y&&Y.value==mxConstants.NONE?K.value=mxConstants.NONE:qa.value=
-mxConstants.NONE;if(qa==K||qa==Y&&K.value==mxConstants.NONE)Q.value="automatic";z(qa);window.setTimeout(function(){qa.focus()},0)}else na.fromString("#"+Fa)}),mxEvent.addListener(Ia,"dblclick",C))})(W[la*ja+Ca]);sa.appendChild(Ba)}ea&&(W=document.createElement("td"),W.setAttribute("title",mxResources.get("reset")),W.className="geAdaptiveAsset",W.style.border="1px solid black",W.style.padding="0px",W.style.width="16px",W.style.height="16px",W.style.backgroundImage="url('"+Editor.crossImage+"')",W.style.backgroundPosition=
-"center center",W.style.backgroundSize="14px 14px",W.style.backgroundRepeat="no-repeat",W.style.cursor="pointer",Ba.appendChild(W),mxEvent.addListener(W,"click",function(){ColorDialog.resetRecentColors();oa.parentNode.replaceChild(D(),oa)}));O.appendChild(oa);return oa});g||(d.appendChild(P),!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==L.getAdaptiveColors()||"automatic"!=Q.value||(M.style.display="none",p()),P=document.createElement("img"),P.setAttribute("title",mxResources.get("light")),
-P.className="geAdaptiveAsset",P.src=Editor.thinLightImage,P.style.width="20px",U.appendChild(P),mxEvent.addListener(P,"click",function(){K.focus()}));U.appendChild(K);null!=I&&(aa.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),aa.style.cursor="pointer",aa.style.position="relative",aa.style.marginLeft="4px",aa.innerText="",L=document.createElement("div"),L.style.display="inline-block",L.style.verticalAlign="middle",L.style.borderStyle="solid",L.style.borderWidth="1px",L.style.marginTop=
-"-2px",L.style.width="12px",L.style.height="12px",g?L.style.backgroundColor=I.light:L.style.backgroundImage="linear-gradient(to right bottom, "+I.cssText+" 50%, "+mxUtils.invertLightDarkColor(I).cssText+" 50.3%)",aa.appendChild(L),U.appendChild(aa),mxEvent.addListener(aa,"dblclick",C));var ca=document.createElement("input");ca.setAttribute("type","color");ca.style.position="relative";ca.style.visibility="hidden";ca.style.top="10px";ca.style.width="0px";ca.style.height="0px";ca.style.border="none";
-e.style.whiteSpace="nowrap";U.appendChild(ca);L=mxUtils.button("",function(){document.activeElement==ca?K.focus():(ca.value="#"+K.value,ca.click())});L.style.cursor="pointer";P=document.createElement("img");P.src=Editor.colorDropperImage;P.className="geAdaptiveAsset";P.style.position="relative";P.style.verticalAlign="middle";P.style.marginTop="-2px";P.style.width="auto";P.style.height="14px";L.appendChild(P);U.appendChild(L);e.appendChild(d);mxEvent.addListener(ca,"change",function(){na.fromString(ca.value)});
-g||e.appendChild(M);D();d=Z(this.presetColors);d.style.marginBottom="8px";d=Z(this.defaultColors);d.style.marginBottom="16px";e.appendChild(O);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent="end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));U=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});U.className="geBtn";a.editor.cancelFirst&&
-d.appendChild(U);L=mxUtils.button(mxResources.get("apply"),C);L.className="geBtn gePrimaryBtn";d.appendChild(L);a.editor.cancelFirst||d.appendChild(U);null!=b&&("default"==b?aa.click():(U=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==U.light?K.value=mxConstants.NONE:mxUtils.isVarColor(U.light)?K.value=U.light:(mxUtils.isRgbColor(U.light)?U.light=mxUtils.rgba2hex(U.light):mxUtils.isHexColor(U.light)||(U.light="#"+m(U.light)),K.value=U.light.substring(1).toUpperCase()),b==mxConstants.NONE||
-"transparent"==U.dark?Y.value=mxConstants.NONE:mxUtils.isVarColor(U.dark)?Y.value=U.dark:(mxUtils.isRgbColor(U.dark)?U.dark=mxUtils.rgba2hex(U.dark):mxUtils.isHexColor(U.dark)||(U.dark="#"+m(U.dark)),Y.value=U.dark.substring(1).toUpperCase()),na.fromString(qa.value,!0),u()));g||!ColorDialog.collapsed||"automatic"!=Q.value||Editor.isDarkMode()||(M.style.display="none",p());e.appendChild(d);this.picker=na;this.colorInput=K;mxEvent.addListener(K,"keypress",G);mxEvent.addListener(Y,"keypress",G);mxEvent.addListener(e,
-"keydown",function(W){27==W.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(W))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
+var ColorDialog=function(a,b,e,f,h,d,g){function m(ca){return mxUtils.color2hex("#"+ca).substring(1).toUpperCase()}function p(){Z.src="none"==V.style.display?Editor.arrowRightImage:Editor.arrowDownImage}function k(ca){V.style.display=ca||"none"==V.style.display?"flex":"none";p()}function u(ca){""==ca.value&&null!=L&&N?ca.style.background=ca==P?L.dark:L.light:""==ca.value||ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)?ca.style.background="transparent":ca.style.background="#"+ca.value;ca.style.color=
+"transparent"==ca.style.background?"light-dark(#000000, #ffffff)":mxUtils.isDarkColor(ca.style.background)?"#ffffff":"#000000"}function w(){u(U);u(P)}function z(ca){ca?g&&null!=L?(U.value=L.light.substring(1).toUpperCase(),ca=!1):(U.value="",P.value="",T.value="automatic",U.setAttribute("placeholder",mxResources.get("useBlackAndWhite")),P.setAttribute("title",mxResources.get("useBlackAndWhite")),U.setAttribute("title",mxResources.get("useBlackAndWhite"))):(""==U.value&&null!=L&&(U.value=L.light.substring(1).toUpperCase()),
+U.removeAttribute("placeholder"),U.removeAttribute("title"),""==P.value&&null!=L&&(P.value=L.dark.substring(1).toUpperCase()),P.removeAttribute("placeholder"),P.removeAttribute("title"),ca=!1);N=ca}function C(ca){var H=ca.value,ea=H.toLowerCase();null==h||""!=H&&"automatic"!=ea&&"default"!=ea&&ea!=mxResources.get("default").toLowerCase()&&ea!=mxResources.get("automatic").toLowerCase()||null==L?(ca.value==mxConstants.NONE||mxUtils.isVarColor(ca.value)||(ca.value=m(ca.value),sa.fromString("#"+ca.value)),
+z(!1),ca!=P||U.value==mxConstants.NONE&&P.value==mxConstants.NONE||(T.value="custom"),ca==U&&"automatic"==T.value&&(U.value==mxConstants.NONE?P.value=mxConstants.NONE:mxUtils.isVarColor(U.value)?P.value=U.value:P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+ca.value)).substring(1).toUpperCase()),w()):ia.click()}function E(){var ca=U.value,H=P.value;if(N&&null!=L||(/(^#?[a-zA-Z0-9]*$)/.test(ca)||mxUtils.isVarColor(ca))&&(/(^#?[a-zA-Z0-9]*$)/.test(H)||mxUtils.isVarColor(H))){if(N)ca="default";
+else if(""==ca&&(ca=mxConstants.NONE),""==H&&(H=mxConstants.NONE),ca==mxConstants.NONE||mxUtils.isVarColor(ca)||"#"==ca.charAt(0)||(ca="#"+m(ca)),H==mxConstants.NONE||mxUtils.isVarColor(H)||"#"==H.charAt(0)||(H="#"+m(H)),ca!=mxConstants.NONE&&H!=mxConstants.NONE||ColorDialog.addRecentColor(mxConstants.NONE,12),"automatic"!=T.value&&H!=mxConstants.NONE?ca==mxConstants.NONE?ColorDialog.addRecentColor(H.substring(1),12):ColorDialog.addRecentColor("light-dark("+ca+","+H+")",12):ca!=mxConstants.NONE&&
+ColorDialog.addRecentColor(ca.substring(1),12),"none"!=ca||"none"!=H)ca=ca==mxConstants.NONE?"transparent":ca,H=H==mxConstants.NONE?"transparent":H,g||"automatic"==T.value||(ca="light-dark("+ca+","+H+")");oa(ca);a.hideDialog()}else a.handleError({message:mxResources.get("invalidInput")})}function D(){mxClient.IS_TOUCH||(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null))}function G(){var ca=ba(0==ColorDialog.recentColors.length?
+["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);ca.style.marginBottom="8px";return ca}function K(ca){13==ca.keyCode&&(C(mxEvent.getSource(ca)),E())}var L=null!=d?mxUtils.getLightDarkColor(d,null,null,g):null,Q=a.editor.graph;this.editorUi=a;var N=!1;"default"==b||"transparent"==b||b==mxConstants.NONE||mxUtils.isVarColor(b)||mxUtils.isHexColor(b)||mxUtils.isRgbColor(b)||mxUtils.isLightDarkColor(b)||(b=mxUtils.color2hex(b));var U=document.createElement("input");U.style.textOverflow="ellipsis";U.style.margin=
+"0 0 0 4px";U.style.width="100%";d=document.createElement("div");d.style.padding="0 4px";var Y=document.createElement("div");Y.style.display="flex";Y.style.alignItems="center";d.appendChild(Y);var P=document.createElement("input");P.style.textOverflow="ellipsis";P.style.margin="0 4px";P.style.maxWidth="60px";P.style.width="100%";var T=document.createElement("select");T.style.textOverflow="ellipsis";T.style.width="100%";var J=document.createElement("option");J.setAttribute("value","automatic");mxUtils.write(J,
+mxResources.get("automatic"));T.appendChild(J);J=document.createElement("option");J.setAttribute("value","custom");mxUtils.write(J,mxResources.get("userDefined"));T.appendChild(J);T.value=mxUtils.isLightDarkColor(b)?"custom":"automatic";var V=document.createElement("div");V.style.padding="0 6px 0 6px";J=document.createElement("img");J.setAttribute("title",mxResources.get("dark"));J.className="geAdaptiveAsset";J.src=Editor.thinDarkImage;J.style.width="20px";V.appendChild(J);mxEvent.addListener(J,"click",
+function(){P.focus()});V.appendChild(P);V.appendChild(T);V.style.display="flex";V.style.alignItems="center";J=document.createElement("div");J.style.display="flex";J.style.alignItems="center";J.style.userSelect="none";J.style.cursor="pointer";J.style.padding="2px 0 2px 0";var Z=document.createElement("img");Z.setAttribute("title",mxResources.get("dark"));Z.className="geAdaptiveAsset";Z.style.marginLeft="-2px";J.appendChild(Z);mxUtils.write(J,mxResources.get("advanced"));p();mxEvent.addListener(J,"click",
+function(){k();p();ColorDialog.collapsed="none"==V.style.display});var ia=mxUtils.button("",function(){z(!0);w();O.focus();""==O.value&&null!=L&&N&&sa.fromString(O==P?L.dark:L.light,!0)});mxEvent.addListener(T,"change",function(){"automatic"==T.value?(U.focus(),C(U)):(z(!1),mxUtils.isVarColor(P.value)||(P.value=N&&null!=L?L.dark.substring(1).toUpperCase():P.value=mxUtils.rgba2hex(mxUtils.getInverseColor("#"+U.value)).substring(1).toUpperCase()),P.focus(),D());w()});mxEvent.addListener(U,"change",
+function(){C(U)});mxEvent.addListener(P,"change",function(){C(P)});var oa=null!=e?e:this.createApplyFunction();this.init=function(){D()};var sa=new ColorPicker,O=Editor.isDarkMode()&&("auto"==Q.getAdaptiveColors()||"simple"==Q.getAdaptiveColors()&&"custom"==T.value)&&!g?P:U;mxEvent.addListener(U,"focus",function(){O=U});mxEvent.addListener(P,"focus",function(){O=P});sa.addListener("change",function(ca,H){ca=H.getProperty("color").substring(1).toUpperCase();O.value.toUpperCase()!=ca&&(O.value=ca,C(O),
+window.setTimeout(function(){O.focus()},0))});e=document.createElement("div");e.appendChild(sa.div);var X=document.createElement("div");X.style.display="flex";X.style.flexFlow="row wrap";X.style.justifyContent="center";X.style.paddingTop="10px";var ba=mxUtils.bind(this,function(ca,H,ea,ra){H=null!=H?H:12;var qa=document.createElement("table");qa.style.borderCollapse="collapse";qa.setAttribute("cellspacing","0");qa.style.marginBottom="20px";qa.style.cellSpacing="0px";qa.style.marginLeft="1px";var Pa=
+document.createElement("tbody");qa.appendChild(Pa);for(var ma=ca.length/H,Ba=0;Ba<ma;Ba++){for(var Ca=document.createElement("tr"),Ja=0;Ja<H;Ja++)mxUtils.bind(this,function(Ia){var Da=document.createElement("td");Da.style.border="0px solid black";Da.style.padding="0px";Da.style.width="16px";Da.style.height="16px";null==Ia&&(Ia=ea);if(null!=Ia){Da.style.borderWidth="1px";if(Ia==mxConstants.NONE||null==Ia)Da.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(mxUtils.isLightDarkColor(Ia)){var Ga=
+mxUtils.getLightDarkColor(Ia);Da.style.background="linear-gradient(to right bottom, "+Ga.cssText+" 50%, "+mxUtils.invertLightDarkColor(Ga).cssText+" 50.3%)"}else Da.style.backgroundColor="#"+Ia;Ga=this.colorNames[String(Ia).toUpperCase()];null!=Ga&&Da.setAttribute("title",Ga)}Ca.appendChild(Da);null!=Ia&&(Da.style.cursor="pointer",mxEvent.addListener(Da,"click",function(){if(Ia==mxConstants.NONE){O==P&&P.value==mxConstants.NONE?U.value=mxConstants.NONE:O.value=mxConstants.NONE;if(O==U||O==P&&U.value==
+mxConstants.NONE)T.value="automatic";C(O);window.setTimeout(function(){O.focus()},0)}else if(mxUtils.isLightDarkColor(Ia)){k(!0);T.value="custom";var ta=mxUtils.getLightDarkColor(Ia);U.value=ta.light.substring(1).toUpperCase();P.value=ta.dark.substring(1).toUpperCase();C(U);C(P);O==U?sa.fromString(ta.light):sa.fromString(ta.dark)}else sa.fromString("#"+Ia)}),mxEvent.addListener(Da,"dblclick",E))})(ca[Ba*H+Ja]);Pa.appendChild(Ca)}ra&&(ca=document.createElement("td"),ca.setAttribute("title",mxResources.get("reset")),
+ca.className="geAdaptiveAsset",ca.style.border="1px solid black",ca.style.padding="0px",ca.style.width="16px",ca.style.height="16px",ca.style.backgroundImage="url('"+Editor.crossImage+"')",ca.style.backgroundPosition="center center",ca.style.backgroundSize="14px 14px",ca.style.backgroundRepeat="no-repeat",ca.style.cursor="pointer",Ca.appendChild(ca),mxEvent.addListener(ca,"click",function(){ColorDialog.resetRecentColors();qa.parentNode.replaceChild(G(),qa)}));X.appendChild(qa);return qa});g||(d.appendChild(J),
+!ColorDialog.collapsed||Editor.isDarkMode()&&"auto"==Q.getAdaptiveColors()||"automatic"!=T.value||(V.style.display="none",p()),J=document.createElement("img"),J.setAttribute("title",mxResources.get("light")),J.className="geAdaptiveAsset",J.src=Editor.thinLightImage,J.style.width="20px",Y.appendChild(J),mxEvent.addListener(J,"click",function(){U.focus()}));Y.appendChild(U);null!=L&&(ia.setAttribute("title",mxResources.get(g?"default":"useBlackAndWhite")),ia.style.cursor="pointer",ia.style.position=
+"relative",ia.style.marginLeft="4px",ia.innerText="",Q=document.createElement("div"),Q.style.display="inline-block",Q.style.verticalAlign="middle",Q.style.borderStyle="solid",Q.style.borderWidth="1px",Q.style.marginTop="-2px",Q.style.width="12px",Q.style.height="12px",g?Q.style.backgroundColor=L.light:Q.style.backgroundImage="linear-gradient(to right bottom, "+L.cssText+" 50%, "+mxUtils.invertLightDarkColor(L).cssText+" 50.3%)",ia.appendChild(Q),Y.appendChild(ia),mxEvent.addListener(ia,"dblclick",
+E));var da=document.createElement("input");da.setAttribute("type","color");da.style.position="relative";da.style.visibility="hidden";da.style.top="10px";da.style.width="0px";da.style.height="0px";da.style.border="none";e.style.whiteSpace="nowrap";Y.appendChild(da);Q=mxUtils.button("",function(){document.activeElement==da?U.focus():(da.value="#"+U.value,da.click())});Q.style.cursor="pointer";J=document.createElement("img");J.src=Editor.colorDropperImage;J.className="geAdaptiveAsset";J.style.position=
+"relative";J.style.verticalAlign="middle";J.style.marginTop="-2px";J.style.width="auto";J.style.height="14px";Q.appendChild(J);Y.appendChild(Q);e.appendChild(d);mxEvent.addListener(da,"change",function(){sa.fromString(da.value)});g||e.appendChild(V);G();d=ba(this.presetColors);d.style.marginBottom="8px";d=ba(this.defaultColors);d.style.marginBottom="16px";e.appendChild(X);d=document.createElement("div");d.style.display="flex";d.style.whiteSpace="nowrap";d.style.alignItems="center";d.style.justifyContent=
+"end";a.isOffline()||d.appendChild(a.createHelpIcon("https://github.com/jgraph/drawio/discussions/4713"));Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=f&&f()});Y.className="geBtn";a.editor.cancelFirst&&d.appendChild(Y);Q=mxUtils.button(mxResources.get("apply"),E);Q.className="geBtn gePrimaryBtn";d.appendChild(Q);a.editor.cancelFirst||d.appendChild(Y);null!=b&&("default"==b?ia.click():(Y=mxUtils.getLightDarkColor(b),b==mxConstants.NONE||"transparent"==Y.light?U.value=
+mxConstants.NONE:mxUtils.isVarColor(Y.light)?U.value=Y.light:(mxUtils.isRgbColor(Y.light)?Y.light=mxUtils.rgba2hex(Y.light):mxUtils.isHexColor(Y.light)||(Y.light="#"+m(Y.light)),U.value=Y.light.substring(1).toUpperCase()),b==mxConstants.NONE||"transparent"==Y.dark?P.value=mxConstants.NONE:mxUtils.isVarColor(Y.dark)?P.value=Y.dark:(mxUtils.isRgbColor(Y.dark)?Y.dark=mxUtils.rgba2hex(Y.dark):mxUtils.isHexColor(Y.dark)||(Y.dark="#"+m(Y.dark)),P.value=Y.dark.substring(1).toUpperCase()),sa.fromString(O.value,
+!0),w()));g||!ColorDialog.collapsed||"automatic"!=T.value||Editor.isDarkMode()||(V.style.display="none",p());e.appendChild(d);this.picker=sa;this.colorInput=U;mxEvent.addListener(U,"keypress",K);mxEvent.addListener(P,"keypress",K);mxEvent.addListener(e,"keydown",function(ca){27==ca.keyCode&&(a.hideDialog(),null!=f&&f(),mxEvent.consume(ca))});this.container=e};ColorDialog.prototype.presetColors="E6D0DE CDA2BE B5739D E1D5E7 C3ABD0 A680B8 D4E1F5 A9C4EB 7EA6E0 D5E8D4 9AC7BF 67AB9F D5E8D4 B9E0A5 97D077 FFF2CC FFE599 FFD966 FFF4C3 FFCE9F FFB570 F8CECC F19C99 EA6B66".split(" ");
+ColorDialog.prototype.colorNames={};ColorDialog.prototype.defaultColors="none FFFFFF E6E6E6 CCCCCC B3B3B3 999999 808080 666666 4D4D4D 333333 1A1A1A 000000 FFCCCC FFE6CC FFFFCC E6FFCC CCFFCC CCFFE6 CCFFFF CCE5FF CCCCFF E5CCFF FFCCFF FFCCE6 FF9999 FFCC99 FFFF99 CCFF99 99FF99 99FFCC 99FFFF 99CCFF 9999FF CC99FF FF99FF FF99CC FF6666 FFB366 FFFF66 B3FF66 66FF66 66FFB3 66FFFF 66B2FF 6666FF B266FF FF66FF FF66B3 FF3333 FF9933 FFFF33 99FF33 33FF33 33FF99 33FFFF 3399FF 3333FF 9933FF FF33FF FF3399 FF0000 FF8000 FFFF00 80FF00 00FF00 00FF80 00FFFF 007FFF 0000FF 7F00FF FF00FF FF0080 CC0000 CC6600 CCCC00 66CC00 00CC00 00CC66 00CCCC 0066CC 0000CC 6600CC CC00CC CC0066 990000 994C00 999900 4D9900 009900 00994D 009999 004C99 000099 4C0099 990099 99004D 660000 663300 666600 336600 006600 006633 006666 003366 000066 330066 660066 660033 330000 331A00 333300 1A3300 003300 00331A 003333 001933 000033 190033 330033 33001A".split(" ");
ColorDialog.prototype.createApplyFunction=function(){return ColorDialog.createApplyFunction(this.editorUi,this.currentColorKey)};ColorDialog.createApplyFunction=function(a,b){return function(e){var f=a.editor.graph;f.getModel().beginUpdate();try{f.setCellStyles(b,e),a.fireEvent(new mxEventObject("styleChanged","keys",[b],"values",[e],"cells",f.getSelectionCells()))}finally{f.getModel().endUpdate()}}};ColorDialog.recentColors=[];
ColorDialog.addRecentColor=function(a,b){null!=a&&(mxUtils.remove(a,ColorDialog.recentColors),ColorDialog.recentColors.splice(0,0,a),ColorDialog.recentColors.length>=b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]};ColorDialog.collapsed=!0;
var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href",
-"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,h,d,g,m,p,k,u,x,z,C,E){k=null!=k?k:!1;g=document.createElement("div");g.style.position="absolute";g.style.top="20px";g.style.bottom="20px";g.style.left="20px";g.style.right="20px";m=document.createElement("div");
-m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var I=document.createElement("textarea");u?I.setAttribute("wrap","off"):I.style.wordBreak="break-all";
-I.setAttribute("spellcheck","false");I.setAttribute("autocorrect","off");I.setAttribute("autocomplete","off");I.setAttribute("autocapitalize","off");mxUtils.write(I,e||"");I.style.resize="none";I.style.outline="none";I.style.position="absolute";I.style.boxSizing="border-box";I.style.top="0px";I.style.left="0px";I.style.height="100%";I.style.width="100%";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};D.appendChild(I);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=
-C)for(b=0;b<C.length;b++)(function(T,K,U){T=mxUtils.button(T,function(Y){K(Y,I)});null!=U&&T.setAttribute("title",U);T.className="geBtn";G.appendChild(T)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,I);if(null!=f){var L=mxUtils.button(x||mxResources.get("apply"),function(){k||a.hideDialog();f(I.value)});L.setAttribute("title",
-"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(I,"keypress",function(T){13==T.keyCode&&mxEvent.isControlDown(T)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",
+"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,h,d,g,m,p,k,u,w,z,C,E){k=null!=k?k:!1;g=document.createElement("div");g.style.position="absolute";g.style.top="20px";g.style.bottom="20px";g.style.left="20px";g.style.right="20px";m=document.createElement("div");
+m.style.position="absolute";m.style.left="0px";m.style.right="0px";var D=m.cloneNode(!1),G=m.cloneNode(!1);m.style.top="0px";m.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(m,b);g.appendChild(m);g.appendChild(D);g.appendChild(G);null!=E&&m.appendChild(E);var K=document.createElement("textarea");u?K.setAttribute("wrap","off"):K.style.wordBreak="break-all";
+K.setAttribute("spellcheck","false");K.setAttribute("autocorrect","off");K.setAttribute("autocomplete","off");K.setAttribute("autocapitalize","off");mxUtils.write(K,e||"");K.style.resize="none";K.style.outline="none";K.style.position="absolute";K.style.boxSizing="border-box";K.style.top="0px";K.style.left="0px";K.style.height="100%";K.style.width="100%";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};D.appendChild(K);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=
+C)for(b=0;b<C.length;b++)(function(Q,N,U){Q=mxUtils.button(Q,function(Y){N(Y,K)});null!=U&&Q.setAttribute("title",U);Q.className="geBtn";G.appendChild(Q)})(C[b][0],C[b][1],C[b][2]);d=mxUtils.button(d||mxResources.get("cancel"),function(){a.hideDialog();null!=h&&h()});d.setAttribute("title","Escape");d.className="geBtn";a.editor.cancelFirst&&G.appendChild(d);null!=p&&p(G,K);if(null!=f){var L=mxUtils.button(w||mxResources.get("apply"),function(){k||a.hideDialog();f(K.value)});L.setAttribute("title",
+"Ctrl+Enter");L.className="geBtn gePrimaryBtn";G.appendChild(L);mxEvent.addListener(K,"keydown",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&L.click()})}a.editor.cancelFirst||G.appendChild(d);this.container=g},EditDiagramDialog=function(a){var b=document.createElement("div");b.style.textAlign="right";var e=document.createElement("textarea");e.setAttribute("wrap","off");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize",
"off");e.style.overflow="auto";e.style.resize="none";e.style.width="600px";e.style.height="360px";e.style.marginBottom="16px";var f=a.getDiagramSnapshot();e.value=mxUtils.getPrettyXml(f.node);b.appendChild(e);this.init=function(){e.focus()};Graph.fileSupport&&(e.addEventListener("dragover",function(m){m.stopPropagation();m.preventDefault()},!1),e.addEventListener("drop",function(m){m.stopPropagation();m.preventDefault();if(0<m.dataTransfer.files.length){m=m.dataTransfer.files[0];var p=new FileReader;
p.onload=function(k){e.value=k.target.result};p.readAsText(m)}else e.value=a.extractGraphModelFromEvent(m)},!1));var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});h.className="geBtn";a.editor.cancelFirst&&b.appendChild(h);var d=document.createElement("select");d.style.textOverflow="ellipsis";d.style.width="196px";d.className="geBtn";if(a.editor.graph.isEnabled()){var g=document.createElement("option");g.setAttribute("value","apply");mxUtils.write(g,mxResources.get("apply",
null,"Update Existing Drawing"));d.appendChild(g)}a.editor.graph.isEnabled()&&(g=document.createElement("option"),g.setAttribute("value","insert"),mxUtils.write(g,mxResources.get("insert")),d.appendChild(g));g=document.createElement("option");g.setAttribute("value","new");mxUtils.write(g,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&d.appendChild(g);b.appendChild(d);g=mxUtils.button(mxResources.get("ok"),function(){var m=Graph.zapGremlins(mxUtils.trim(e.value)),p=null;
-if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement;a.updateDiagramData(f,k);a.hideDialog()}catch(C){p=C}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(m),x=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,x);var z=x.getChildren(x.getChildAt(x.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(z));a.hideDialog()}catch(C){p=C}finally{a.editor.graph.model.endUpdate()}}null!=
+if("new"==d.value)a.hideDialog(),a.editor.editAsNew(m);else if("apply"==d.value)try{var k=mxUtils.parseXml(m).documentElement;a.updateDiagramData(f,k);a.hideDialog()}catch(C){p=C}else if("insert"==d.value){a.editor.graph.model.beginUpdate();try{var u=mxUtils.parseXml(m),w=new mxGraphModel;(new mxCodec(u)).decode(u.documentElement,w);var z=w.getChildren(w.getChildAt(w.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(z));a.hideDialog()}catch(C){p=C}finally{a.editor.graph.model.endUpdate()}}null!=
p&&a.handleError(p)});g.className="geBtn gePrimaryBtn";b.appendChild(g);a.editor.cancelFirst||b.appendChild(h);this.container=b};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function b(){var Q=u.value,P=Q.lastIndexOf(".");u.value=0<P?Q.substring(0,P+1)+x.value:Q+"."+x.value;"xml"===x.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),E.setAttribute("disabled","true"),K.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),E.removeAttribute("disabled"),K.removeAttribute("disabled"));"png"===x.value||"svg"===x.value||"pdf"===x.value?L.removeAttribute("disabled"):L.setAttribute("disabled",
-"disabled");"png"===x.value||"jpg"===x.value||"pdf"===x.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled");"png"===x.value?(D.removeAttribute("disabled"),G.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function e(){C.style.backgroundColor=C.value*E.value>MAX_AREA||0>=C.value?"red":"";E.style.backgroundColor=C.value*E.value>MAX_AREA||0>=E.value?"red":""}var f=a.editor.graph,h=f.getGraphBounds(),d=f.view.scale,g=Math.ceil(h.width/
+var ExportDialog=function(a){function b(){var P=u.value,T=P.lastIndexOf(".");u.value=0<T?P.substring(0,T+1)+w.value:P+"."+w.value;"xml"===w.value?(z.setAttribute("disabled","true"),C.setAttribute("disabled","true"),E.setAttribute("disabled","true"),N.setAttribute("disabled","true")):(z.removeAttribute("disabled"),C.removeAttribute("disabled"),E.removeAttribute("disabled"),N.removeAttribute("disabled"));"png"===w.value||"svg"===w.value||"pdf"===w.value?L.removeAttribute("disabled"):L.setAttribute("disabled",
+"disabled");"png"===w.value||"jpg"===w.value||"pdf"===w.value?Q.removeAttribute("disabled"):Q.setAttribute("disabled","disabled");"png"===w.value?(D.removeAttribute("disabled"),G.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"))}function e(){C.style.backgroundColor=C.value*E.value>MAX_AREA||0>=C.value?"red":"";E.style.backgroundColor=C.value*E.value>MAX_AREA||0>=E.value?"red":""}var f=a.editor.graph,h=f.getGraphBounds(),d=f.view.scale,g=Math.ceil(h.width/
d),m=Math.ceil(h.height/d);d=document.createElement("table");var p=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");h=document.createElement("tr");var k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,mxResources.get("filename")+":");h.appendChild(k);var u=document.createElement("input");u.setAttribute("value",a.editor.getOrCreateFilename());u.style.width="180px";k=document.createElement("td");k.appendChild(u);h.appendChild(k);
-p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");h.appendChild(k);var x=document.createElement("select");x.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));x.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),x.appendChild(k));
-k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));x.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));x.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),x.appendChild(k));k=document.createElement("td");k.appendChild(x);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");
+p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");h.appendChild(k);var w=document.createElement("select");w.style.width="180px";k=document.createElement("option");k.setAttribute("value","png");mxUtils.write(k,mxResources.get("formatPng"));w.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),w.appendChild(k));
+k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));w.appendChild(k);k=document.createElement("option");k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));w.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),w.appendChild(k));k=document.createElement("td");k.appendChild(w);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");
k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");h.appendChild(k);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";k=document.createElement("td");k.appendChild(z);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");h.appendChild(k);var C=document.createElement("input");
C.setAttribute("value",g);C.style.width="180px";k=document.createElement("td");k.appendChild(C);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");h.appendChild(k);var E=document.createElement("input");E.setAttribute("value",m);E.style.width="180px";k=document.createElement("td");k.appendChild(E);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");
k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("dpi")+":");h.appendChild(k);var D=document.createElement("select");D.style.width="180px";k=document.createElement("option");k.setAttribute("value","100");mxUtils.write(k,"100dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","200");mxUtils.write(k,"200dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","300");mxUtils.write(k,"300dpi");D.appendChild(k);k=document.createElement("option");
-k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var I=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=
-"",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var Q=parseInt(G.value);isNaN(Q)||0>=Q?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=Q))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");
-L.setAttribute("type","checkbox");L.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(L);mxUtils.write(k,mxResources.get("transparent"));h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");h.appendChild(k);var T=document.createElement("input");T.setAttribute("type","checkbox");T.checked=!1;k=document.createElement("td");k.appendChild(T);
-h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");h.appendChild(k);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";k=document.createElement("td");k.appendChild(K);h.appendChild(k);p.appendChild(h);d.appendChild(p);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(z,"change",
-function(){I=!0;var Q=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*Q).toFixed(2));0<g?(C.value=Math.floor(g*Q),E.value=Math.floor(m*Q)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var Q=parseInt(C.value)/g;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),E.value=Math.floor(m*Q)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var Q=parseInt(E.value)/m;0<Q?(z.value=parseFloat((100*Q).toFixed(2)),C.value=Math.floor(g*
-Q)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var Q=u.value,P=x.value,M=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(K.value)),aa=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==P||"png"==P||
-"pdf"==P)&&L.checked)aa=null;else if(null==aa||aa==mxConstants.NONE)aa="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,Q,P,aa,M,V,ia,T.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
+k.setAttribute("value","400");mxUtils.write(k,"400dpi");D.appendChild(k);k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom"));D.appendChild(k);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min","50");G.setAttribute("step","50");var K=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display=
+"",G.focus()):(G.value=this.value,K||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var P=parseInt(G.value);isNaN(P)||0>=P?G.style.backgroundColor="red":(G.style.backgroundColor="",K||(z.value=P))});k=document.createElement("td");k.appendChild(D);k.appendChild(G);h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");h.appendChild(k);var L=document.createElement("input");
+L.setAttribute("type","checkbox");L.checked=null==f.background||f.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(L);mxUtils.write(k,mxResources.get("transparent"));h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("grid")+":");h.appendChild(k);var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.checked=!1;k=document.createElement("td");k.appendChild(Q);
+h.appendChild(k);p.appendChild(h);h=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");h.appendChild(k);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("value",ExportDialog.lastBorderValue);N.style.width="180px";k=document.createElement("td");k.appendChild(N);h.appendChild(k);p.appendChild(h);d.appendChild(p);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",
+function(){K=!0;var P=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*P).toFixed(2));0<g?(C.value=Math.floor(g*P),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(C,"change",function(){var P=parseInt(C.value)/g;0<P?(z.value=parseFloat((100*P).toFixed(2)),E.value=Math.floor(m*P)):(z.value="100",C.value=g,E.value=m);e()});mxEvent.addListener(E,"change",function(){var P=parseInt(E.value)/m;0<P?(z.value=parseFloat((100*P).toFixed(2)),C.value=Math.floor(g*
+P)):(z.value="100",C.value=g,E.value=m);e()});h=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var U=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var P=u.value,T=w.value,J=Math.max(0,parseFloat(z.value)||100)/100,V=Math.max(0,parseInt(N.value)),Z=f.background,ia=Math.max(1,parseInt(G.value));if(("svg"==T||"png"==T||
+"pdf"==T)&&L.checked)Z=null;else if(null==Z||Z==mxConstants.NONE)Z="#ffffff";ExportDialog.lastBorderValue=V;ExportDialog.exportFile(a,P,T,Z,J,V,ia,Q.checked)}}));U.className="geBtn gePrimaryBtn";var Y=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});Y.className="geBtn";a.editor.cancelFirst?(k.appendChild(Y),k.appendChild(U)):(k.appendChild(U),k.appendChild(Y));h.appendChild(k);p.appendChild(h);d.appendChild(p);this.container=d};ExportDialog.lastBorderValue=0;
ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
ExportDialog.exportFile=function(a,b,e,f,h,d,g,m){m=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(m.getSvg(f,h,d)),b,e);else{var p=m.getGraphBounds(),k=mxUtils.createXmlDocument(),u=k.createElement("output");k.appendChild(u);k=new mxXmlCanvas2D(u);k.translate(Math.floor((d/h-p.x)/m.view.scale),Math.floor((d/h-p.y)/m.view.scale));k.scale(h/m.view.scale);(new mxImageExport).drawState(m.getView().getState(m.model.root),
k);u="xml="+encodeURIComponent(mxUtils.getXml(u));k=Math.ceil(p.width*h/m.view.scale+2*d);h=Math.ceil(p.height*h/m.view.scale+2*d);u.length<=MAX_REQUEST_SIZE&&k*h<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+e+"&filename="+encodeURIComponent(b)+"&bg="+(null!=f?f:"none")+"&w="+k+"&h="+h+"&"+u+"&dpi="+g)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
ExportDialog.saveLocalFile=function(a,b,e,f){b.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(e)+"&format="+f)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,b){function e(){0<K.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),h=a.editor.graph,d=h.getModel().getValue(b);if(!mxUtils.isNode(d)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",d||"");d=g}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(Q){}var k=new mxForm("properties");k.table.style.width=
-"100%";var u=d.attributes,x=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(Q,P){var M=document.createElement("div");M.style.position="relative";M.style.paddingRight="20px";M.style.boxSizing="border-box";M.style.width="100%";var V=document.createElement("a"),aa=mxUtils.createImage(Dialog.prototype.closeImage);aa.style.height="9px";aa.style.fontSize="9px";aa.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",
-mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(aa);P=function(ia){return function(){for(var na=0,qa=0;qa<x.length;qa++){if(x[qa]==ia){z[qa]=null;k.table.deleteRow(na+(null!=E?1:0));break}null!=z[qa]&&na++}}}(P);mxEvent.addListener(V,"click",P);P=Q.parentNode;M.appendChild(Q);M.appendChild(V);P.appendChild(M)};g=function(Q,P,M){x[Q]=P;z[Q]=k.addTextarea(x[C]+
-":",M,2);z[Q].style.width="100%";0<M.indexOf("\n")&&z[Q].setAttribute("rows","2");D(z[Q],P);null!=m[P]&&0==m[P].editable&&z[Q].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),I=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==I.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(Q,P){return"label"==Q.name?1:"label"==P.name?-1:Q.name<P.name?-1:Q.name>
-P.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var T=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(Q){Q=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(P){if(null!=P&&0<P.length&&P!=E)if(h.model.isRoot(b)){var M=a.getPageById(E);if(null!=M)if(null==a.getPageById(P)){var V=a.getPageIndex(M);0<=V&&(a.removePage(M),M.node.setAttribute("id",
-P),E=P,T.innerHTML=mxUtils.htmlEntities(P),a.insertPage(M,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(P)?(h.getModel().cellRemoved(b),b.setId(P),E=P,T.innerHTML=mxUtils.htmlEntities(P),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[P])})}),mxResources.get("id"));a.showDialog(Q.container,300,80,!0,!0);Q.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");
-p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);g=document.createElement("div");g.style.display="flex";g.style.alignItems="center";g.style.boxSizing="border-box";g.style.paddingRight="160px";g.style.whiteSpace="nowrap";g.style.marginTop="6px";g.style.width="100%";var K=document.createElement("input");K.setAttribute("placeholder",mxResources.get("enterPropertyName"));K.setAttribute("type",
-"text");K.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");K.style.boxSizing="border-box";K.style.borderWidth="1px";K.style.borderStyle="solid";K.style.marginLeft="2px";K.style.padding="4px";K.style.width="100%";g.appendChild(K);p.appendChild(g);f.appendChild(p);var U=mxUtils.button(mxResources.get("addProperty"),function(){var Q=K.value;if(0<Q.length&&"label"!=Q&&"id"!=Q&&"placeholders"!=Q&&0>Q.indexOf(":"))try{var P=mxUtils.indexOf(x,Q);if(0<=P&&null!=z[P])z[P].focus();else{d.cloneNode(!1).setAttribute(Q,
-"");0<=P&&(x.splice(P,1),z.splice(P,1));x.push(Q);var M=k.addTextarea(Q+":","",2);M.style.width="100%";z.push(M);D(M,Q);M.focus()}U.setAttribute("disabled","disabled");K.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(K,"keypress",function(Q){13==Q.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():K.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";
-U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";g.appendChild(U);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";g=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(Q){var P=h.getDataForCells([b],!0);Q=new EmbedDialog(a,JSON.stringify(P,null,2),null,null,function(){console.log(P);a.alert("Written to Console (Dev Tools)")},
-mxResources.get("export"),null,"Console","data.json");a.showDialog(Q.container,450,240,!0,!0);Q.init()}));g.setAttribute("title",mxResources.get("export"));g.className="geBtn";var Y=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var Q=!1,P=0;P<x.length;P++)null==z[P]?d.removeAttribute(x[P]):(d.setAttribute(x[P],z[P].value),Q=Q||"placeholder"==x[P]&&"1"==d.getAttribute("placeholders"));Q&&d.removeAttribute("label");h.getModel().setValue(b,
-d)}catch(M){mxUtils.alert(M)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keypress",function(Q){13==Q.keyCode&&mxEvent.isControlDown(Q)&&Y.click()});mxEvent.addListener(K,"keyup",e);mxEvent.addListener(K,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
-G.style.marginRight="10px",I=document.createElement("input"),I.setAttribute("type","checkbox"),I.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(I.setAttribute("checked","checked"),I.defaultChecked=!0),mxEvent.addListener(I,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(I),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),
+var EditDataDialog=function(a,b){function e(){0<N.value.length?U.removeAttribute("disabled"):U.setAttribute("disabled","disabled")}var f=document.createElement("div"),h=a.editor.graph,d=h.getModel().getValue(b);if(!mxUtils.isNode(d)){var g=mxUtils.createXmlDocument().createElement("object");g.setAttribute("label",d||"");d=g}var m={};try{var p=mxUtils.getValue(a.editor.graph.getCurrentCellStyle(b),"metaData",null);null!=p&&(m=JSON.parse(p))}catch(P){}var k=new mxForm("properties");k.table.style.width=
+"100%";var u=d.attributes,w=[],z=[],C=0,E=null!=EditDataDialog.getDisplayIdForCell?EditDataDialog.getDisplayIdForCell(a,b):null,D=function(P,T){var J=document.createElement("div");J.style.position="relative";J.style.paddingRight="20px";J.style.boxSizing="border-box";J.style.width="100%";var V=document.createElement("a"),Z=mxUtils.createImage(Dialog.prototype.closeImage);Z.style.height="9px";Z.style.fontSize="9px";Z.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";V.className="geButton";V.setAttribute("title",
+mxResources.get("delete"));V.style.position="absolute";V.style.top="4px";V.style.right="0px";V.style.margin="0px";V.style.width="9px";V.style.height="9px";V.style.cursor="pointer";V.appendChild(Z);T=function(ia){return function(){for(var oa=0,sa=0;sa<w.length;sa++){if(w[sa]==ia){z[sa]=null;k.table.deleteRow(oa+(null!=E?1:0));break}null!=z[sa]&&oa++}}}(T);mxEvent.addListener(V,"click",T);T=P.parentNode;J.appendChild(P);J.appendChild(V);T.appendChild(J)};g=function(P,T,J){w[P]=T;z[P]=k.addTextarea(w[C]+
+":",J,2);z[P].style.width="100%";0<J.indexOf("\n")&&z[P].setAttribute("rows","2");D(z[P],T);null!=m[T]&&0==m[T].editable&&z[P].setAttribute("disabled","disabled")};p=[];for(var G=h.getModel().getParent(b)==h.getModel().getRoot(),K=h.getCellStyle(b),L=0;L<u.length;L++)("label"!=u[L].nodeName||"1"==K.metaEdit||Graph.translateDiagram||G)&&"placeholders"!=u[L].nodeName&&p.push({name:u[L].nodeName,value:u[L].nodeValue});p.sort(function(P,T){return"label"==P.name?1:"label"==T.name?-1:P.name<T.name?-1:P.name>
+T.name?1:0});if(null!=E){u=document.createElement("div");u.style.width="100%";u.style.fontSize="11px";u.style.textAlign="center";mxUtils.write(u,E);var Q=k.addField(mxResources.get("id")+":",u);mxEvent.addListener(u,"dblclick",function(P){P=new FilenameDialog(a,E,mxResources.get("apply"),mxUtils.bind(this,function(T){if(null!=T&&0<T.length&&T!=E)if(h.model.isRoot(b)){var J=a.getPageById(E);if(null!=J)if(null==a.getPageById(T)){var V=a.getPageIndex(J);0<=V&&(a.removePage(J),J.node.setAttribute("id",
+T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),a.insertPage(J,V))}else a.handleError({message:mxResources.get("alreadyExst",[mxResources.get("page")])})}else null==h.getModel().getCell(T)?(h.getModel().cellRemoved(b),b.setId(T),E=T,Q.innerHTML=mxUtils.htmlEntities(T),h.getModel().cellAdded(b)):a.handleError({message:mxResources.get("alreadyExst",[T])})}),mxResources.get("id"));a.showDialog(P.container,300,80,!0,!0);P.init()})}for(L=0;L<p.length;L++)g(C,p[L].name,p[L].value),C++;p=document.createElement("div");
+p.style.position="absolute";p.style.top="30px";p.style.left="30px";p.style.right="30px";p.style.bottom="80px";p.style.overflowY="auto";p.appendChild(k.table);g=document.createElement("div");g.style.display="flex";g.style.alignItems="center";g.style.boxSizing="border-box";g.style.paddingRight="160px";g.style.whiteSpace="nowrap";g.style.marginTop="6px";g.style.width="100%";var N=document.createElement("input");N.setAttribute("placeholder",mxResources.get("enterPropertyName"));N.setAttribute("type",
+"text");N.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"36":"40");N.style.boxSizing="border-box";N.style.borderWidth="1px";N.style.borderStyle="solid";N.style.marginLeft="2px";N.style.padding="4px";N.style.width="100%";g.appendChild(N);p.appendChild(g);f.appendChild(p);var U=mxUtils.button(mxResources.get("addProperty"),function(){var P=N.value;if(0<P.length&&"label"!=P&&"id"!=P&&"placeholders"!=P&&0>P.indexOf(":"))try{var T=mxUtils.indexOf(w,P);if(0<=T&&null!=z[T])z[T].focus();else{d.cloneNode(!1).setAttribute(P,
+"");0<=T&&(w.splice(T,1),z.splice(T,1));w.push(P);var J=k.addTextarea(P+":","",2);J.style.width="100%";z.push(J);D(J,P);J.focus()}U.setAttribute("disabled","disabled");N.value=""}catch(V){mxUtils.alert(V)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(N,"keypress",function(P){13==P.keyCode&&U.click()});this.init=function(){0<z.length?z[0].focus():N.focus()};U.setAttribute("title",mxResources.get("addProperty"));U.setAttribute("disabled","disabled");U.style.textOverflow="ellipsis";
+U.style.position="absolute";U.style.overflow="hidden";U.style.width="144px";U.style.right="0px";U.className="geBtn";g.appendChild(U);p=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});p.setAttribute("title","Escape");p.className="geBtn";g=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(P){var T=h.getDataForCells([b],!0);P=new EmbedDialog(a,JSON.stringify(T,null,2),null,null,function(){console.log(T);a.alert("Written to Console (Dev Tools)")},
+mxResources.get("export"),null,"Console","data.json");a.showDialog(P.container,450,240,!0,!0);P.init()}));g.setAttribute("title",mxResources.get("export"));g.className="geBtn";var Y=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);d=d.cloneNode(!0);for(var P=!1,T=0;T<w.length;T++)null==z[T]?d.removeAttribute(w[T]):(d.setAttribute(w[T],z[T].value),P=P||"placeholder"==w[T]&&"1"==d.getAttribute("placeholders"));P&&d.removeAttribute("label");h.getModel().setValue(b,
+d)}catch(J){mxUtils.alert(J)}});Y.setAttribute("title","Ctrl+Enter");Y.className="geBtn gePrimaryBtn";mxEvent.addListener(f,"keydown",function(P){13==P.keyCode&&mxEvent.isControlDown(P)&&Y.click()});mxEvent.addListener(N,"keyup",e);mxEvent.addListener(N,"change",e);u=document.createElement("div");u.style.cssText="position:absolute;left:30px;right:30px;text-align:right;bottom:30px;height:40px;";if(a.editor.graph.getModel().isVertex(b)||a.editor.graph.getModel().isEdge(b))G=document.createElement("span"),
+G.style.marginRight="10px",K=document.createElement("input"),K.setAttribute("type","checkbox"),K.style.marginRight="6px","1"==d.getAttribute("placeholders")&&(K.setAttribute("checked","checked"),K.defaultChecked=!0),mxEvent.addListener(K,"click",function(){"1"==d.getAttribute("placeholders")?d.removeAttribute("placeholders"):d.setAttribute("placeholders","1")}),G.appendChild(K),mxUtils.write(G,mxResources.get("placeholders")),null!=EditDataDialog.placeholderHelpLink&&G.appendChild(a.createHelpIcon(EditDataDialog.placeholderHelpLink)),
u.appendChild(G);a.editor.cancelFirst&&u.appendChild(p);u.appendChild(g);u.appendChild(Y);a.editor.cancelFirst||u.appendChild(p);f.appendChild(u);this.container=f};EditDataDialog.getDisplayIdForCell=function(a,b){var e=null;null!=a.editor.graph.getModel().getParent(b)&&(e=b.getId());return e};EditDataDialog.placeholderHelpLink=null;
var LinkDialog=function(a,b,e,f){var h=document.createElement("div");mxUtils.write(h,mxResources.get("editLink")+":");var d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";d.style.paddingRight="20px";var g=document.createElement("input");g.setAttribute("value",b);g.setAttribute("placeholder","http://www.example.com/");g.setAttribute("type","text");
g.style.marginTop="6px";g.style.width="400px";g.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";g.style.backgroundRepeat="no-repeat";g.style.backgroundPosition="100% 50%";g.style.paddingRight="14px";b=document.createElement("div");b.setAttribute("title",mxResources.get("reset"));b.style.position="relative";b.style.left="-16px";b.style.width="12px";b.style.height="14px";b.style.cursor="pointer";b.style.display="inline-block";b.style.top="3px";b.style.background="url("+IMAGE_PATH+"/transparent.gif)";
mxEvent.addListener(b,"click",function(){g.value="";g.focus()});d.appendChild(g);d.appendChild(b);h.appendChild(d);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign="right";mxEvent.addListener(g,"keypress",function(m){13==m.keyCode&&(a.hideDialog(),f(g.value))});b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);e=mxUtils.button(e,function(){a.hideDialog();f(g.value)});e.className="geBtn gePrimaryBtn";d.appendChild(e);a.editor.cancelFirst||d.appendChild(b);h.appendChild(d);this.container=h},OutlineWindow=function(a,b,e,f,h){var d=a.editor.graph,g=document.createElement("div");g.style.position="absolute";g.style.width="100%";g.style.height="100%";g.style.overflow="hidden";this.window=new mxWindow(mxResources.get("outline"),g,b,e,f,h,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,80,80);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);var m=a.createOutline(this.window);a.installResizeHandler(this,!0,function(){m.destroy()});this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit();m.setSuspended(!1)}));this.window.addListener(mxEvent.HIDE,mxUtils.bind(this,function(){m.setSuspended(!0)}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.bind(this,
-function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(g);mxEvent.addMouseWheelListener(function(p,k){for(var u=!1,x=mxEvent.getSource(p);null!=x;){if(x==m.svg){u=!0;break}x=x.parentNode}u&&(u=d.zoomFactor,null!=p.deltaY&&Math.round(p.deltaY)!=p.deltaY&&(u=1+Math.abs(p.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(p))})},LayersWindow=function(a,b,e,f,h){function d(){var P=K.get(p.getLayerForCells(p.getSelectionCells()));
-null!=P?P.appendChild(Q):null!=Q.parentNode&&Q.parentNode.removeChild(Q)}function g(){function P(aa,ia,na,qa){var O=document.createElement("div");O.className="geToolbarContainer";K.put(na,O);O.style.overflow="hidden";O.style.position="relative";O.style.padding="4px";O.style.height="22px";O.style.display="flex";O.style.alignItems="center";O.style.borderWidth="0px 0px 1px 0px";O.style.borderStyle="solid";O.style.whiteSpace="nowrap";O.setAttribute("title",ia+" ("+na.getId()+")");var Z=document.createElement("div");
-Z.style.display="inline-flex";Z.style.alignItems="center";Z.style.width="100%";Z.style.textOverflow="ellipsis";Z.style.overflow="hidden";var ca=document.createElement("span");mxEvent.addListener(O,"dragover",function(H){H.dataTransfer.dropEffect="move";z=aa;H.stopPropagation();H.preventDefault()});mxEvent.addListener(O,"dragstart",function(H){"true"!=ca.contentEditable&&(x=O,mxClient.IS_FF&&H.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(O,"dragend",function(H){null!=x&&null!=z&&
-p.addCell(na,p.model.root,z);z=x=null;H.stopPropagation();H.preventDefault()});var W=document.createElement("img");W.setAttribute("draggable","false");W.setAttribute("align","top");W.setAttribute("border","0");W.className="geAdaptiveAsset";W.style.width="16px";W.style.padding="0px 6px 0 4px";W.style.cursor="pointer";W.setAttribute("title",mxResources.get(p.model.isVisible(na)?"hide":"show"));p.model.isVisible(na)?(W.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(O,90)):(W.setAttribute("src",
-Editor.hiddenImage),mxUtils.setOpacity(O,40));p.isEnabled()||mxUtils.setOpacity(W,50);Z.appendChild(W);mxEvent.addListener(W,"click",function(H){p.isEnabled()&&p.model.setVisible(na,!p.model.isVisible(na));mxEvent.consume(H)});W=document.createElement("img");W.setAttribute("draggable","false");W.setAttribute("align","top");W.setAttribute("border","0");W.className="geAdaptiveAsset";W.style.width="16px";W.style.padding="0px 6px 0 0";W.setAttribute("title",mxResources.get("lockUnlock"));var ja=p.getCurrentCellStyle(na);
-"1"==mxUtils.getValue(ja,"locked","0")?(W.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(W,90),O.style.color="red"):(W.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(W,40));p.isEnabled()&&(W.style.cursor="pointer");mxEvent.addListener(W,"click",function(H){if(p.isEnabled()){var ea=null;p.getModel().beginUpdate();try{ea="1"==mxUtils.getValue(ja,"locked","0")?null:"1",p.setCellStyles("locked",ea,[na])}finally{p.getModel().endUpdate()}"1"==ea&&p.removeSelectionCells(p.getModel().getDescendants(na));
-mxEvent.consume(H)}});Z.appendChild(W);mxUtils.write(ca,ia);ca.style.display="block";ca.style.whiteSpace="nowrap";ca.style.overflow="hidden";ca.style.textOverflow="ellipsis";ca.style.position="absolute";ca.style.padding="2px";ca.style.left="52px";ca.style.right="8px";Z.appendChild(ca);O.appendChild(Z);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ia=document.createElement("div"),ia.style.display="block",ia.style.textAlign="right",ia.style.whiteSpace=
-"nowrap",ia.style.position="absolute",ia.style.right="16px",ia.style.top="6px",0<aa&&(Z=document.createElement("a"),Z.setAttribute("title",mxResources.get("toBack")),Z.className="geButton",Z.style.cssFloat="none",Z.innerHTML="&#9660;",Z.style.width="14px",Z.style.height="14px",Z.style.fontSize="14px",Z.style.margin="0px",Z.style.marginTop="-1px",ia.appendChild(Z),mxEvent.addListener(Z,"click",function(H){p.isEnabled()&&p.addCell(na,p.model.root,aa-1);mxEvent.consume(H)})),0<=aa&&aa<C-1&&(Z=document.createElement("a"),
-Z.setAttribute("title",mxResources.get("toFront")),Z.className="geButton",Z.style.cssFloat="none",Z.innerHTML="&#9650;",Z.style.width="14px",Z.style.height="14px",Z.style.fontSize="14px",Z.style.margin="0px",Z.style.marginTop="-1px",ia.appendChild(Z),mxEvent.addListener(Z,"click",function(H){p.isEnabled()&&p.addCell(na,p.model.root,aa+1);mxEvent.consume(H)})),O.appendChild(ia);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(O.setAttribute("draggable","true"),O.style.cursor="move")}mxEvent.addListener(O,
-"dblclick",function(H){var ea=mxEvent.getSource(H).nodeName;"INPUT"!=ea&&"IMG"!=ea&&"true"!=ca.contentEditable&&(m(na),mxEvent.consume(H))});p.getDefaultParent()==na&&(O.classList.add("geActivePage"),O.style.fontWeight=p.isEnabled()?"bold":"",E=na);mxEvent.addListener(O,"click",function(H){p.isEnabled()&&"true"!=ca.contentEditable&&(p.setDefaultParent(qa),p.view.setCurrentRoot(null),mxEvent.isShiftDown(H)&&p.setSelectionCells(na.children),mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(I.classList.remove("mxDisabled"),
-T.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(I.classList.add("mxDisabled"),T.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";K.clear();for(var M=C-1;0<=M;M--)mxUtils.bind(this,function(aa){P(M,p.convertValueToString(aa)||mxResources.get("background"),aa,aa)})(p.model.getChildAt(p.model.root,M));var V=p.convertValueToString(E)||mxResources.get("background");
-I.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(P){if(p.isEnabled()&&null!=P){var M=K.get(P);if(null!=M){var V=M.getElementsByTagName("span");if(null!=V&&0<V.length){var aa=V[0],ia=mxUtils.getTextContent(aa);aa.style.textOverflow="";aa.style.cursor="text";aa.contentEditable="true";aa.focus();document.execCommand("selectAll",!1,null);M.removeAttribute("draggable");M.style.cursor=
-"";var na=function(qa){if("true"==aa.contentEditable){aa.contentEditable="false";var O=mxUtils.getTextContent(aa);qa&&O!=ia?(O=mxUtils.getTextContent(aa),0<O.length?p.cellLabelChanged(P,O):p.cellLabelChanged(P,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(aa,"keydown",function(qa){if(13==qa.keyCode||27==qa.keyCode)na(13==qa.keyCode),mxEvent.consume(qa)});mxEvent.addListener(aa,"blur",function(qa){na(!0);mxEvent.consume(qa)})}}}}var p=a.editor.graph,k=document.createElement("div");k.style.userSelect=
-"none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom=parseInt("26px")+7+"px";k.appendChild(u);var x=null,z=null;mxEvent.addListener(k,"dragover",function(P){P.dataTransfer.dropEffect="move";z=0;P.stopPropagation();P.preventDefault()});mxEvent.addListener(k,"drop",function(P){P.stopPropagation();P.preventDefault()});
-var C=null,E=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height="26px";D.style.overflow="hidden";D.style.padding="3px 4px 4px 4px";D.style.borderWidth="1px 0px 0px 0px";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var G=document.createElement("a");G.className="geToolbarButton geAdaptiveAsset geToggleItem";G.style.width="16px";G.style.height="18px";
-G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var I=G.cloneNode(!1);I.style.backgroundImage="url("+Editor.trashImage+")";I.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(I,"click",function(P){if(p.isEnabled()){p.model.beginUpdate();try{var M=p.model.root.getIndex(E);p.removeCells([E],!1);0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,
-new mxCell),p.setDefaultParent(null)):0<M&&M<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,M-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(P)});p.isEnabled()||I.classList.add("mxDisabled");D.appendChild(I);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,"click",function(P){if(p.isEnabled()&&!p.isSelectionEmpty()){var M=
-mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,aa){for(var ia=p.getLayerForCells(p.getSelectionCells()),na=C-1;0<=na;na--)mxUtils.bind(this,function(qa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(qa),"locked","0"),Z=V.addItem(p.convertValueToString(qa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,qa)}),aa,null,null,!O);O?V.addCheckmark(Z,Editor.lockedImage):qa==ia&&V.addCheckmark(Z,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,
-na))}),M.x,M.y+L.offsetHeight,P)}});D.appendChild(L);var T=G.cloneNode(!1);T.style.backgroundImage="url("+Editor.editImage+")";T.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(T,"click",function(P){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(P)});p.isEnabled()||T.classList.add("mxDisabled");D.appendChild(T);var K=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,
-"click",function(P){if(p.isEnabled()){P=null;p.model.beginUpdate();try{P=p.cloneCell(E),p.cellLabelChanged(P,mxResources.get("untitledLayer")),P.setVisible(!0),P=p.addCell(P,p.model.root),p.setDefaultParent(P)}finally{p.model.endUpdate()}null==P||p.isCellLocked(P)||p.selectAll(P)}});p.isEnabled()||U.classList.add("mxDisabled");D.appendChild(U);var Y=G.cloneNode(!1);Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(Y,"click",
-function(P){if(p.isEnabled()){p.model.beginUpdate();try{var M=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(M)}finally{p.model.endUpdate()}m(M)}mxEvent.consume(P)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var Q=document.createElement("span");Q.setAttribute("title",mxResources.get("selectionOnly"));Q.innerHTML="&#8226;";Q.style.position="absolute";Q.style.fontWeight="bold";Q.style.fontSize="16pt";Q.style.right="6px";g();
-p.model.addListener(mxEvent.CHANGE,g);p.addListener("defaultParentChanged",g);a.addListener("lockedChanged",g);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?L.classList.add("mxDisabled"):L.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,h,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
-this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=g;a.installResizeHandler(this,!0)};
+function(){m.setSuspended(!1)}));this.window.addListener(mxEvent.MINIMIZE,mxUtils.bind(this,function(){m.setSuspended(!0)}));m.init(g);mxEvent.addMouseWheelListener(function(p,k){for(var u=!1,w=mxEvent.getSource(p);null!=w;){if(w==m.svg){u=!0;break}w=w.parentNode}u&&(u=d.zoomFactor,null!=p.deltaY&&Math.round(p.deltaY)!=p.deltaY&&(u=1+Math.abs(p.deltaY)/20*(u-1)),d.lazyZoom(k,null,null,u),mxEvent.consume(p))})},LayersWindow=function(a,b,e,f,h){function d(){var T=N.get(p.getLayerForCells(p.getSelectionCells()));
+null!=T?T.appendChild(P):null!=P.parentNode&&P.parentNode.removeChild(P)}function g(){function T(Z,ia,oa,sa){var O=document.createElement("div");O.className="geToolbarContainer";N.put(oa,O);O.style.overflow="hidden";O.style.position="relative";O.style.padding="4px";O.style.height="22px";O.style.display="flex";O.style.alignItems="center";O.style.borderWidth="0px 0px 1px 0px";O.style.borderStyle="solid";O.style.whiteSpace="nowrap";O.setAttribute("title",ia+" ("+oa.getId()+")");var X=document.createElement("div");
+X.style.display="inline-flex";X.style.alignItems="center";X.style.width="100%";X.style.textOverflow="ellipsis";X.style.overflow="hidden";var ba=document.createElement("span");mxEvent.addListener(O,"dragover",function(H){H.dataTransfer.dropEffect="move";z=Z;H.stopPropagation();H.preventDefault()});mxEvent.addListener(O,"dragstart",function(H){"true"!=ba.contentEditable&&(w=O,mxClient.IS_FF&&H.dataTransfer.setData("Text","<layer/>"))});mxEvent.addListener(O,"dragend",function(H){null!=w&&null!=z&&p.addCell(oa,
+p.model.root,z);z=w=null;H.stopPropagation();H.preventDefault()});var da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 4px";da.style.cursor="pointer";da.setAttribute("title",mxResources.get(p.model.isVisible(oa)?"hide":"show"));p.model.isVisible(oa)?(da.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(O,90)):(da.setAttribute("src",
+Editor.hiddenImage),mxUtils.setOpacity(O,40));p.isEnabled()||mxUtils.setOpacity(da,50);X.appendChild(da);mxEvent.addListener(da,"click",function(H){p.isEnabled()&&p.model.setVisible(oa,!p.model.isVisible(oa));mxEvent.consume(H)});da=document.createElement("img");da.setAttribute("draggable","false");da.setAttribute("align","top");da.setAttribute("border","0");da.className="geAdaptiveAsset";da.style.width="16px";da.style.padding="0px 6px 0 0";da.setAttribute("title",mxResources.get("lockUnlock"));var ca=
+p.getCurrentCellStyle(oa);"1"==mxUtils.getValue(ca,"locked","0")?(da.setAttribute("src",Editor.lockedImage),mxUtils.setOpacity(da,90),O.style.color="red"):(da.setAttribute("src",Editor.unlockedImage),mxUtils.setOpacity(da,40));p.isEnabled()&&(da.style.cursor="pointer");mxEvent.addListener(da,"click",function(H){if(p.isEnabled()){var ea=null;p.getModel().beginUpdate();try{ea="1"==mxUtils.getValue(ca,"locked","0")?null:"1",p.setCellStyles("locked",ea,[oa])}finally{p.getModel().endUpdate()}"1"==ea&&
+p.removeSelectionCells(p.getModel().getDescendants(oa));mxEvent.consume(H)}});X.appendChild(da);mxUtils.write(ba,ia);ba.style.display="block";ba.style.whiteSpace="nowrap";ba.style.overflow="hidden";ba.style.textOverflow="ellipsis";ba.style.position="absolute";ba.style.padding="2px";ba.style.left="52px";ba.style.right="8px";X.appendChild(ba);O.appendChild(X);if(p.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ia=document.createElement("div"),ia.style.display=
+"block",ia.style.textAlign="right",ia.style.whiteSpace="nowrap",ia.style.position="absolute",ia.style.right="16px",ia.style.top="6px",0<Z&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toBack")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9660;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,
+Z-1);mxEvent.consume(H)})),0<=Z&&Z<C-1&&(X=document.createElement("a"),X.setAttribute("title",mxResources.get("toFront")),X.className="geButton",X.style.cssFloat="none",X.innerHTML="&#9650;",X.style.width="14px",X.style.height="14px",X.style.fontSize="14px",X.style.margin="0px",X.style.marginTop="-1px",ia.appendChild(X),mxEvent.addListener(X,"click",function(H){p.isEnabled()&&p.addCell(oa,p.model.root,Z+1);mxEvent.consume(H)})),O.appendChild(ia);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&
+(O.setAttribute("draggable","true"),O.style.cursor="move")}mxEvent.addListener(O,"dblclick",function(H){var ea=mxEvent.getSource(H).nodeName;"INPUT"!=ea&&"IMG"!=ea&&"true"!=ba.contentEditable&&(m(oa),mxEvent.consume(H))});p.getDefaultParent()==oa&&(O.classList.add("geActivePage"),O.style.fontWeight=p.isEnabled()?"bold":"",E=oa);mxEvent.addListener(O,"click",function(H){p.isEnabled()&&"true"!=ba.contentEditable&&(p.setDefaultParent(sa),p.view.setCurrentRoot(null),mxEvent.isShiftDown(H)&&p.setSelectionCells(oa.children),
+mxEvent.consume(H))});u.appendChild(O)}p.isEnabled()?(K.classList.remove("mxDisabled"),Q.classList.remove("mxDisabled"),U.classList.remove("mxDisabled"),Y.classList.remove("mxDisabled")):(K.classList.add("mxDisabled"),Q.classList.add("mxDisabled"),U.classList.add("mxDisabled"),Y.classList.add("mxDisabled"));C=p.model.getChildCount(p.model.root);u.innerText="";N.clear();for(var J=C-1;0<=J;J--)mxUtils.bind(this,function(Z){T(J,p.convertValueToString(Z)||mxResources.get("background"),Z,Z)})(p.model.getChildAt(p.model.root,
+J));var V=p.convertValueToString(E)||mxResources.get("background");K.setAttribute("title",mxResources.get("removeIt",[V]));U.setAttribute("title",mxResources.get("duplicateIt",[V]));p.isSelectionEmpty()&&L.classList.add("mxDisabled");d()}function m(T){if(p.isEnabled()&&null!=T){var J=N.get(T);if(null!=J){var V=J.getElementsByTagName("span");if(null!=V&&0<V.length){var Z=V[0],ia=mxUtils.getTextContent(Z);Z.style.textOverflow="";Z.style.cursor="text";Z.contentEditable="true";Z.focus();document.execCommand("selectAll",
+!1,null);J.removeAttribute("draggable");J.style.cursor="";var oa=function(sa){if("true"==Z.contentEditable){Z.contentEditable="false";var O=mxUtils.getTextContent(Z);sa&&O!=ia?(O=mxUtils.getTextContent(Z),0<O.length?p.cellLabelChanged(T,O):p.cellLabelChanged(T,mxResources.get("untitledLayer"))):g()}};mxEvent.addListener(Z,"keydown",function(sa){if(13==sa.keyCode||27==sa.keyCode)oa(13==sa.keyCode),mxEvent.consume(sa)});mxEvent.addListener(Z,"blur",function(sa){oa(!0);mxEvent.consume(sa)})}}}}var p=
+a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var u=document.createElement("div");u.style.position="absolute";u.style.overflow="auto";u.style.left="0px";u.style.right="0px";u.style.top="0px";u.style.bottom=parseInt("26px")+7+"px";k.appendChild(u);var w=null,z=null;mxEvent.addListener(k,"dragover",function(T){T.dataTransfer.dropEffect="move";z=0;T.stopPropagation();T.preventDefault()});mxEvent.addListener(k,
+"drop",function(T){T.stopPropagation();T.preventDefault()});var C=null,E=null,D=document.createElement("div");D.className="geToolbarContainer";D.style.position="absolute";D.style.bottom="0px";D.style.left="0px";D.style.right="0px";D.style.height="26px";D.style.overflow="hidden";D.style.padding="3px 4px 4px 4px";D.style.borderWidth="1px 0px 0px 0px";D.style.borderStyle="solid";D.style.display="block";D.style.whiteSpace="nowrap";var G=document.createElement("a");G.className="geToolbarButton geAdaptiveAsset geToggleItem";
+G.style.width="16px";G.style.height="18px";G.style.backgroundPosition="center center";G.style.backgroundRepeat="no-repeat";G.style.backgroundSize="20px";G.style.margin="0 2px";G.style.display="inline-block";G.style.cursor="pointer";var K=G.cloneNode(!1);K.style.backgroundImage="url("+Editor.trashImage+")";K.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(K,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.model.root.getIndex(E);p.removeCells([E],!1);
+0==p.model.getChildCount(p.model.root)?(p.model.add(p.model.root,new mxCell),p.setDefaultParent(null)):0<J&&J<=p.model.getChildCount(p.model.root)?p.setDefaultParent(p.model.getChildAt(p.model.root,J-1)):p.setDefaultParent(null)}finally{p.model.endUpdate()}}mxEvent.consume(T)});p.isEnabled()||K.classList.add("mxDisabled");D.appendChild(K);var L=G.cloneNode();L.style.backgroundImage="url("+Editor.layersImage+")";L.setAttribute("title",mxUtils.trim(mxResources.get("moveSelectionTo",["..."])));mxEvent.addListener(L,
+"click",function(T){if(p.isEnabled()&&!p.isSelectionEmpty()){var J=mxUtils.getOffset(L);a.showPopupMenu(mxUtils.bind(this,function(V,Z){for(var ia=p.getLayerForCells(p.getSelectionCells()),oa=C-1;0<=oa;oa--)mxUtils.bind(this,function(sa){var O="1"==mxUtils.getValue(p.getCurrentCellStyle(sa),"locked","0"),X=V.addItem(p.convertValueToString(sa)||mxResources.get("background"),null,mxUtils.bind(this,function(){O||p.moveCells(p.getSelectionCells(),0,0,!1,sa)}),Z,null,null,!O);O?V.addCheckmark(X,Editor.lockedImage):
+sa==ia&&V.addCheckmark(X,Editor.checkmarkImage)})(p.model.getChildAt(p.model.root,oa))}),J.x,J.y+L.offsetHeight,T)}});D.appendChild(L);var Q=G.cloneNode(!1);Q.style.backgroundImage="url("+Editor.editImage+")";Q.setAttribute("title",mxResources.get("editData"));mxEvent.addListener(Q,"click",function(T){p.isEnabled()&&a.showDataDialog(E);mxEvent.consume(T)});p.isEnabled()||Q.classList.add("mxDisabled");D.appendChild(Q);var N=new mxDictionary,U=G.cloneNode(!1);U.style.backgroundImage="url("+Editor.duplicateImage+
+")";U.setAttribute("title",mxResources.get("duplicate"));mxEvent.addListener(U,"click",function(T){if(p.isEnabled()){T=null;p.model.beginUpdate();try{T=p.cloneCell(E),p.cellLabelChanged(T,mxResources.get("untitledLayer")),T.setVisible(!0),T=p.addCell(T,p.model.root),p.setDefaultParent(T)}finally{p.model.endUpdate()}null==T||p.isCellLocked(T)||p.selectAll(T)}});p.isEnabled()||U.classList.add("mxDisabled");D.appendChild(U);var Y=G.cloneNode(!1);Y.style.backgroundImage="url("+Editor.plusImage+")";Y.setAttribute("title",
+mxResources.get("addLayer"));mxEvent.addListener(Y,"click",function(T){if(p.isEnabled()){p.model.beginUpdate();try{var J=p.addCell(new mxCell(mxResources.get("untitledLayer")),p.model.root);p.setDefaultParent(J)}finally{p.model.endUpdate()}m(J)}mxEvent.consume(T)});p.isEnabled()||Y.classList.add("mxDisabled");D.appendChild(Y);k.appendChild(D);var P=document.createElement("span");P.setAttribute("title",mxResources.get("selectionOnly"));P.innerHTML="&#8226;";P.style.position="absolute";P.style.fontWeight=
+"bold";P.style.fontSize="16pt";P.style.right="6px";g();p.model.addListener(mxEvent.CHANGE,g);p.addListener("defaultParentChanged",g);a.addListener("lockedChanged",g);p.selectionModel.addListener(mxEvent.CHANGE,function(){p.isSelectionEmpty()?L.classList.add("mxDisabled"):L.classList.remove("mxDisabled");d()});this.window=new mxWindow(mxResources.get("layers"),k,b,e,f,h,!0,!0);this.window.minimumSize=new mxRectangle(0,0,150,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);
+this.window.setClosable(!0);this.window.setVisible(!0);this.init=function(){u.scrollTop=u.scrollHeight-u.clientHeight};this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.refreshLayers=g;a.installResizeHandler(this,!0)};
(function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeCPPjIeKHnuZLamxJzHnNIzdyIzsV2+DJm+Y22ZVlPINS35AxuFl1Bo4nQ5IJ7PIfxyW8xzGplLgaG9BGginPqsrUhn55RCZiLoxbRn4v4dAbkYubdBLFkWoRfXYs24CvPz8lGzpNZchT1XDzN8OSEkcF8ZBhnP+1cq2jJgddJORxMmOmMX7w5A96HXzILoS882Mr/IBWqAHTcjxejheKQPvJRo3kWNuP0g0msMlzn6upFoK36/o6A6R34t5fG0RKMGiNdXSwyFVJX4R6mwE9Y+GsodSb1gcv7cCTRUWmCEx1rI2SAbsPvY2+m9QmTl7mCeBdrAdKeMnTGC24X4ylMvU3qWtzY2Yf5/QdB+kwyKPB1i9agqkwEqZJqm+HLULWY27rx0Q72mUWoass8VjGOIQHihN0cRKenQVagMsqEtZ40YXPq4geB2yGWCXNjHdvWUBLwzZJqO0hL+TVEJ2va5urbACZWbCVYXEuLKywZep5bhnERlBRuANDHRa5c1HgwZlFJY2kWnipFFzIUE+znKy+EtINIQLcbvWDo8tdUmlOANNl1A7/85EXGmvHeBG00tYB81LS0AuLBVnVATUY8Ryv9DreSbjX5/Gw7BN6qTSVmRHniapOrKd1UqFa33dmLRcn4eiO68TzJgwXYga5OrAdj+l/P+s/3w5u4BXnkOdFpGwo5wOb+7Cf+7CX/0GtfRfzjCN8YfJX05g2BeQMAv9mxwCtgIWyOwr5L/o7pR+6SJ3Fe/5QLwwr4C6BIv1fKyzpToXHJTbLiG8/GQotrMJyTgA31zp7sYz07uavDfhI0+ET93fNFPKrlqZnmkCBaS85u7Qkeu8E9ciU7jYt/Oin4Cirkdwp8G3qlPh7jTYKupVrjsR5kytjqzkeYIFXRodnI/DcJL3VsvKmexWjgEoQCsdT/N5gLf5grrxeJ6vHTm4gO6UlxdM9fCJr5VdTooZGIdRDXwVSKniAK23gL3Xr/TsPT66RK06s+5MS1xeX2UqEqZDcGRYCDPKrMfWwKV89WhCtCt0umFC9cHJWKCO87lZ93ND0Yx1Ilesax5NH5/A6H4+Kc+ulmZcK+SoYJnx5BWnwRUNUOzoqJMouyS0VN6PSOkRm10jTnAgsGXKVzQTWkNVwXMVcD3cwHzgiccCc+0iwrV+eIB8vYYrzXPHQmiE1ZMQ1dCqZe8YRowhM391K5bkoGWFgTnpJC0cvypov69W1PHZKu61VvUKlrlgOFehv8dRqYiSVFVPrFeh9R+a6FKwUKF/2DYN5EtABZqrc/t6ZBF2b+Aky+I4EDDf0hE76YPlKyXWsFCNdaYrfEHqwDPaoVMBPZl25/OkuXfYh1AuGViPJI2HzBH4syPx50fiP/fFS0ErkVp1KFpUCxjqH1AdWqWlSspDr9t9mp8sRe05lZKcAbbwhWfvXCT5uaMGgh6KpJLW1xfoBw3LaFijA7pLbA/dLBaAHq0vExEoc+vIsCVvS8dsgKfzHs2zF5UcNegfdc9XQw7LtzEBEfnVuw5qsk9o/ZpU+TG0Qy5lmqJsZZKl/bKVR1cmoRI9kMKywhvIGYGrFIq+bi/73BQ0hZ97urenL6JXo5mqakobbtIVV66p/w8gNxay1cYALkHB9QnaBuTxx//OCudewXQalev3OcXoIopkah29PmH7C415oHVru0dODdPkGKapDAJyVt7oUe06YBVuotXIfZ+gJPdtaYfWuto0odAH8LSEDeELJ+eFgmTOYjMjHzutTu3jF0WpG5cTsOdrF/oO4OA7ZEqfB4GIEzsLWN3o6/CT3nipaAhKotcVWg06C0PjypdFnnW8zKDa16wc7zM8ads4WfHympGqW4QkbMBZ9BJqM5HWi99YkIFBog0Hzio7lkrk6FpEIqHNUzdS+rD2lUqc/dJZEPYVaHSDy8bczBP5mZ0nMo6LJDO2Kt7crnZYv2dpIkqO4Lj+UwiaZGA0N9XXHbZnPaKg7UVm+cmsVbpgLwQqTBDlK2QRjYqU9WGg36q1rR4EKSmgVoQS93g0qWbzMLnj/zKeThc2Ny9xdcxvW89tJ4FBZ+TrYS822IEJJ+OfG7MBproKdaU+lm6ha0k6VD5Wkg2Rn63EH5QRvWjn4LGOw95S7TY+lo3TH5bgr0x4r7qHlmhA5xdL8inC2+X+qnIjibHk+hEt7HPJHmiPr5FDKwqa25qJBIaLoGOvda+c0H4n10rRyKPrgymjDoVVMM5x8qynOBbcSwY9gDZTfidm4q9hNigH6Zq7EjwAgaEWn4CdRLdtSHCS1yLr+oE6voukO1CwEDCn2jNsm2CDCNlvtAe2HK3BYr8H2yZ1uJHuZl7so7STbMGZwqkd6+yc2C8a0q/ngU2T1/pvyFPmk83Tn/jK+AeZjy7QxdUCkrSe3NbTqNgL40jzsEOzt6u1D9tkTG81GT/skQ2ayLenp/lHp2H3zgzG+tdOZtsNHX1oJuNi99VAhH9Z9NF0P6/LNDBfboa6fZhgGdkTPhmqg3Eaf+zelGaa70Uruxfjpw7m7dWUBlIMPOJLqqEnlbYw7m/rCMN8W4EIq3yU28lRr/00O6EP07B7pPtJPgO3BzSObqMkNTPyh4nQVpli6C+Kh7umeGXIdYrzyrTE4a54V+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg+3UpO1nNAGReekn+dT/fCb2QYDbrLizeyyPyxWZ8bSBMBkfKP5KJTH8MncwhpdhJEJPjKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvCa99fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hY7OU1LD5pjsLmKV+V7LRWsksxq1hcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng52y6I//yONAG9BDsy/0hb98H4T2Hv7Q9t5BMyMPDTB4Nn9XzMNV9SGpaZMwKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIoSzglobh11Ll0aDyYCql7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCGCwTPmIQ6tuLe/08bRLHSBvMs1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjeCsbzgtnkPNwXuM/X3fC4BwyjB44eY2kUW1gqzKElvowWzyKevTim5hHprYrSXGfbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWodFqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgsRVUy8uA9OYDJGlyEbZyNpS1HacBx90z06HU8knhzZ+GJAVIo1Vl/L92CjS6WtHnxx8r5FZ4xmPbZPYWNQQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRgFQCo8FlPjIwyemeTOGHtHJCIiCLF1sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEraqGfFD0fVEJwXKwldJ25PbrDKdG6T+y0F1RlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPEbVTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiyp9hIlxATesgqVVuZanqbKm6MJh1Y9lBCLL9k9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPKJ1YKpu6aZ3cv+m5HAb00cnVoSnzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C08S2Hz/Mi1Fqe56VEdMY8L6Zn4/H4j64J+gKCZEl0trLXXWAjGMsGJWQg26I8EcMmW9IrrmlhBZrg+JIlHLZJUsDSTda8UlJHNIXvj2Y5Dm0N7+NY9pee1o2LUIfB7vYSCPXf0b/4OxT2bsD8RsTjfKH/6Z9VXOcwfICpjK3rhMzX9DytZOyWPLfXrWCUPg9NPwImrq4cFDp2bgze3FOyVbYDpm9SprndbD67s+TRiPMDD27nJfk83rKrqZ7X5xQq0q9YDHNhWMhV5/fLowhZv+42gEJbG6qJssvEbZBSVOXSZTsKYuja+uiYEEIglnuoh940Z5eYnsnancUvHRghyGUuRsN2kzpsWYZVmcuVBAd9W77MgSF8cWI9JZs5sAeipm0DrrRhtrqDCGj+YStWogZxgwj9oEfBAkdsCZHMvHQ0uwCj1xdrQQeRMG1SSzqzI4JDRSpiZTWQ8TCDQIm6wsMEi66wv1qClVex6HKgZJe6zcRte5SqGO6zX6dWll1JmiVrIz2g68ZgQnab6IEXIcRmwh3ZYRxAHN5hGCfHMT5dGKlkiVuP1WAvj64TsOvFLGDWJOJAP/lY+rOPooctUXaFcG5CMCa1a0AHPB6LmSeMTZjfdEePpjmWiipzbiI1JJMhSCDb6SkZvNPUfwVnB0LYx541RzxuJ/k8hFT3ptWjI2OJC8b3RVLQnYF/CSf9GYYUlJRr45LCdn5cmnOM+J+nGctEOKfpC22h0DCFPGOcUCZPT0PubViEX01O6XyqRR4tbFvn7ONCdyczP8nnzoqrvnzzLNmUx3kP0PNFsKof4FFvGGqlYWNjR/bvu+xaITXs0W3mplMCaGSq9dDgslfw95VecO/809fRxfT0YkqMuRWRmxYdiWa1RIXZ4s43G5IMY9p07mxL6Mn4UtAY33ZVfdkuC2NpZQ2orngTjbcXfnaxl7EVNqU7WUX1OZLvoBYVfDWmbgulWK24yneHH1cVriJPvce4Kh95HZSwgX8Tx5T8neyLftHFIDycVUHfSFbhqFqHRluMTCF73Rk7urVIY0gLE+jEreOr5DkbiOfzMTy0c16rX25fTSgzM38k16QXl41tRaVVG+mqHQ9Kj2tRjO4N49KlY/vbrXN4V1f3WuAjOGZmozND0lk84L9yZ3zmzFEzTpQwu8YD2B2viUbXWWKDSOkmchQHFhbnzo2qkgRHQ8tEBty9dVYSnR8lzW0QZLBgZ46HuswCmA8R9ltgtcHh8HNJD3RKA4PMUdZbLlFOtrvUhnEyICPSHGYAsR3mR598eOA4RDUx91qTOIbeVNIBkpDJiqcJlB1dnsAJOg2hOSqwoxkt5cC8PixAfV9cX8Gqx8PJzjAM7N5oP9h+T2rYzFYabfWizslupwMJu8s4qIywhoDnZ+gK/DqkqPM94mMlfji1sFJxfTppGJD3YpwMzng2OOP54IyfB2f8cgzjvK6saydCejFOBmc8G5zxfHDGz4MzfunPCEXQt3+YDK4TahiP0Ak1jEfohBrGI3RCDeMROqGG8QidMBlcJ9QwHqETahiP0Ak1jEfohBrGI3RCDWMfnSDjVL6Y+cxIeMnoK67frkNzxEEetjrhb7XHe/VlzX35Z/NSCj73REj+FIdndDml9mfNO0Si1lGgL+nuK5gEjn+Du6vZ3iiMhyK1J7EeLjJ0IJ0MTApUp8xL0fUFY+1PIThD4lH4kcAc0ZZ7fsEUO87W7k3yOaX2XX9x6sksJg8y+L2461euSImrmyKhGTR4ZOeLfsTzjUylzdYYbqqzuZbvRY8OMSAUjkF3l2M7rL3GgfcSMN/nCg7P1gX0PUvjzEbVbDt124lo0ptoAFl6SwF7LF4S3QbMsrY0LjilL47hGt08fS+aQ3tDMPNvaYbHaMjVCm4278rUQudkb2+mtp+2Z3RgWoYf/YJS812Jv/v7mYQmH57QA7rd3d5cFu+VZMFuaksRSzpcr7Lp9ktr8l9M6+y/mNb5x6Y1f5j/18prJ60PLq+dtD64vHbS+uDyAhVlI6M799fdE5h8YAK31gsPt6BVaZt6RsUp69DTk3fr9ROx1h3yS5LHHaarfvARrtguLAODtUQzBeyZU8d6kM5KpOZkDlwuH5J18iGsZwOxPmOw7TcZpG2xuxs4cH33aI5Jd5J0A/u0wKZ8oZC56GjUdHaNAwVZp8aD2xqnlQ7dlXy5uknqlI8rfmfa4p+V00n/cZ2kaqGdDEA7r5a267C7hbLPjMiWvXFYo0Y/ZnPdiBUy+ToCJYpL0l6tk/j+06MLbE6e4m3OCmUMBlbBmIwYySAVIUXwCUXkNy1blzguKWaN4jE6VDljtma3rNJVX2ak5eHgFEcCGB0nG3TrWcrDQ+wrQdSQmIkm0+0tpXzFpGTTidwVMBCtiEwAsXob3RfLWCX4ypxyl0oZVL1mDXTKAh75Jk66e3WYbjBMgC8SL0vqzqOpBO7WH5vDDkAZ6haFYTV80TxG3EGhkULjQpwqMUeO68F4KirOKKgkwXBn/2FvzDVZc9pEc2C+SiA3Pgq6yskW3VGGFYeCeDJ2blwWhh1SQRGzpMmTZIdgizN+NtQNGoLctdpe2WPnJ+N/XIVx+o67L/O4wYoztyZe5jFhh4EpiyoZ6kje0SLH+OEmmkWxpN90tkyJ4zpgyWbHhcM19WsZkH6Ras0i8du55AloXNdaztzYgSmjVSMTb53tH+BUg7xhGZYONOBme6EMCujYxrX+rN3BeYD6xunkoQ3XlnTdTqBDlETN0hSK5ABzV3IzOXRyoYOyyjWjlS7C4Gzl2KFuctjgTfkpR62bf3bRrzgai5lv1GzlwbDVWPlKbkk35kykmnDxNfh7Eyk+b73cNsoi+HsbRY71qHcpDnlyBic7MhgeB3Q5TsmbJMsckqeTLbVSk+tI5EHclWjjK84IzRcv3ASRtGEiPyEv+h/61AUTSdPlpplatvIkMKP6LPiW06Ed6OhY1wfKmLYftpG+gY7Fc4RyhcXwxBznF3yQ2LXoERXmbJgl6LsIFIGoOEPugOC7tnWi/CywOxNXSxuzuPakZB7BoTLnqxhxGxNtsOAVRmUdSnF0fvb2MtDBzKimE2/MA2mNB7qTEI8873ZXiid0El/MsdYrniqHt38sni8oclZHCnqsvxCLcqZV5+t+fnro/r7m5ryWStYNhRnMYvM+Tnm60EOFmFThlPqfZeZcvRe6EzZntaWkS0wsOJ8spTa4HjHk+6Ibt48fQlPMCVXtlFkLkvG2iMbZYpnXMBwMWHzFas7yPYRn2FSxmTraXlU05nQ71NwNh5Uc4uTB2MANp7Sh5+EmdN03vFN026Vw7ud/xJ2r5Q8KdgOHyTIb+oN5bt1bHpGwXf/vNj8HUrMgLTPqDioiQ1eBf7KAoiFR2zLDcwecuIa+t7TluwWGYR+m9rzA4ghBJ5iZsdwJqknTOi4mHXJ0HtARirSFPaHPBXL1KyZjxYJaSwJh5izfLind6Vpr9KPN18QcHuVG8GizwuetHvkllLGJuoi6sGeG/eObVOI3NJkAhoY154U58DxDm/F6suBsH7TdDa8wy2tA3fQ6YlC9NOXTGgF0TuGI+bD1SyTEX3M0aAXOM1NHtJU7n0ZywCkYmwWjBz30PNV21NvJzuSeO0EfLBzLSaFI8HQybXkJbo+4tZ/tLMW0krl0QcGMLniY2CkXc+kC1c9lJPUyS1OcetH6+4SiDIMPmf4dGpT+0lgaIX3TQmvUXIL7tS5MjYlzg7gjwTfSQF3xN9z0aDhTy1PUXKarOmnpnCoJzWDUmgLFgLBZGF0hcDmELWGhtiVWVYyHIcbCnNNabPDKOwolTaRtHq1FxLnabcBlpslwVCMGezrNyo69hvxMhe7NKq2yCuzowiK1zpsqmSSnl5yFGAIM7kBRVJ1H68B2DYvgp5cBwwNf58z3A5yua4hje1NQxjHTqlC3Bed2VIAx6JNYZTRNUNy1A2UYw6GIJmxFftcFSGvDF8JELCgYOq0S75NO7UvgzpwS72R8qv8/ZWop8DTbmR5fknemaluT2kvj5fRFJLLje6ss2UCcubWuqSZOMX53Uj4XDH+0nxTziHBunKMpfIOWCGTtjU0KwgfbJPYIawXWuUKzqHiBn+9NQxjAUFssWiW8m2z0WSihRldm5Q/ElaZpXEz/6FMhmihnSOm+CF/mw3DTbBjZdrj6CLXi3E5041VrkdJWbsdN3SXA6E78nQk8jJVwWuBLIXHTLNl9S9Ec04PI8pHWKvfRbYEEcvuS8CixfoyRS1PbcJa+8F+wBL2m181vTnDqPM0v3FlG1+IX+QKnipndmk/ZksMe4W/ANBlflVJJs2W7StlP4oAHehqJJ3NiUn8MSXwN4xO/eAtQGNcsGjSN/bzqTf4DMn7D4rLAvbO91851AIa6CmB9wgvHx0e30ekd9TiPUo9cwMH+3uBFFLT571cSLcAO8roTkUFVIjoWj5N7XieKjDzA4dPtYd3b+jiPZCB+xaTSDirhaBFZnWFuWhNLdP3Sb/diemM6EMb2ms3QNzgeGsc+dOUKGM1ktsSZMgjAqTjuIn5idqksZYIGnp6A8MItr205EY/N+dkKcxzX0bLo3kLK9I8hiEr5BNFrh+KEfgwopR5JhgOTPkq5+gBK/QFjy4GFftODSX9ILqqJg5X/TGjj1R8yV3cYSdoPqRDXLMCAGUNSBtJGzhgsO/Y4jyg+xbxXE4/UhoiespQF77gOa0e7eWi0s/FkrD9WNG0CW882fBvwlNxvvFfyzRgorU/HptUVBG6zdODOGk83i2jQkJ/09x4uccbM/F6NH7EINuHhNEZktuOlMlO0SkxXYfnHZpoRBlaYybU5t2wpfL9lQyThV1L6NUm34kZThkF9C91FPjq0dLTEeyeea4Zle02yhLzFiaaEfORJyjLFIrtJa9XA0Uow6UZAnjseLcPmbjwh94VHlsZGJvFhyLlaFp2fuFnzDo/N8PQNxE4Sv5tiJNcw3WJ05d/Mzi2K0n03poX0KACac1zyGqKn2QyqF6wS7MV+zr3Ffc5W5pn9sNl7vLq9ZZrziinM8xgi12CwVt16W+ucAf8z04VDZ2xY+BrLXtdGBSPi9wrCaqp7RnE87+gFdANgfrM75R4c7dvjxeDKy9T7IFTkqpPoAXYQiJZlrB3kA4/TjEKfHyvEPMjQ8/9oogUz+xaPZ4rkdhWwV3hy27QQUIXFY31wI1PasqxWgZv0xJ31xJ13xv3QajQbpCI/82OJnMLpHwJG11x3p1i4shPunlAdMbY+mDQ74SadcT/xlUw/yfthJ12wCVtxPGJgw35XmVR1CLBmupkxBU53VCE5e4Jdu6a1N/jU1l1rz5B4AuZARroHljjTAMIHFadYVUBjqegcRrgofTqgIKykRANWm7VhSMLHsnbdtYLhX+yd4fYTuTUr3ZK8TFkk6wIn7BA84rk3y4CZBY38HByV/9CefZZqa1Lfl8YJ/XyCfkewgYfsgze+EV67KWnwCyZouIcpJvqubXp6Dx4JM7UHUTRkQsZPvlpZHKKVgpsUaIrDDQU11B6PcKoPHFdt7I03bXa7mAqW41X3yDo3lSmmJL/vwBFhASlaZ0jsXfm6MfThLpmtsXarWZdaWwJP3MEp9za1p9FUGY8NLHuHwdEZkWHpAMndYxfT4lC6Wk739fkD6OMCDguCJSBoA4IClZL1lcDRBKiPmgie8rc3xdFw+kwjeHIM+OwY8Pkx4M9dwLDLEephqUG/cXOaBJxi241gdIG+4kXW43VXMcosk0FYzgZhOR+E5fMgLF8GYfnan+USwwljIWfLACtK/kQvqslwVGfDUZ0PQTVlefBuPZhz8PpuYJkMwnI2CMv5kSxwXGOqMvSUXAmcQrK3XWhuFO41mYyfKrRZTYG1ki5oNfaSB2hC6bslXXbkMUtOTIXkCwSfOD/vaNHt0ykmoqEaniUbpOlZskEanyYLB3zLcLiXhOpJgh1RuSzNZBias2Fozoeh+TwMzZdhaL52pzEGUM0iQB1kRM61k/HD1QkeK5NuTjntucUb3rj/tprpZ8605QWTue7CtACZEpkVMuFND5kWP3MmIwfedJDpkq3XNBgIMnvlDFVLdMVZ0HaSDRPKa4knt0sAoRsm4wvsLhYye9Oj0RIfhHRISpdp4+kRO8y0lcR7L3nwnGCMOLdFAsNyFfA3490RiFWHF8OdweQFbLdrOSJxvmjOlJkv6jLjZBjmZqunZ7Og8kSzaixkPM4YUa53yfEfsR6TCvKKsRd7//4P";
Sidebar.prototype.searchIndexData="7Z1rU+M40Kh/zVbN+wEq98vHkHDbJUxeHGDrfFEpjkh0cKwc2R6G/fVHchKGKMwuRo7Usr21xQyBzUaPW62+qfuP9tkf3bM/Go0ofg2I+POP5kB+t8Rr8kdztPq54Hi9PMWcs5fodCD/QCP2Ev7RPFvGq0D8Sl389QfhMfVxcINnJJiwiMaUiV8ZzVgcs9W7XxgEdCF/ELO1eDWKOXsmj3QeL8VrjbdXhixgXLzyR6NZS/8RP5EfrTEUX182H7Jb23y73Hzb726+pfO3NWw+89t/F9DZBz/qjuRPsxK4IU+xdQK7JS/3gZghcEcXy5IjuF9bX7+lTXBGwjjdAyglYR2DIgZGMaQboeIgdgNMCL2mGQhDHAQsicXhmMwCAoRF245+2LH43wTPgZCwtDV2JMDsjo4iET1DHJbkB2chEAj9zh6EjiGzYUi5nwSYQ6GwvyU6fTMU/kxW6xO6FQVUt49hXxj6VjA0yoohtSJxOIejIVUQHYMgvCXma3Q+X5A5uiJQD09T+vKWxf5SkPDEOnDwtlns49iXkKYhHJU1tfG1dmIBBMW+MJgKQbzXFEBA2FES4JRD14py8AISzgkHHJUxJhBbEtMXhh7xawVDwhAfmqAppgEcdWHHB/NiTtdwINiJX3vil2gkKIA+Sk2JxJRTqIZVx1B4Zk9XoivG6T8sjHFgn4clkdjj8bBdlnUaavDOkGt6j6YJB2pfmQpgbhnI1DdMEJ2GURCA7Mzdyg07o1sQkPJ/dknAieAZ3hk+jXx2OktoMKfhIjo94zj0l+j70xP1yT6NNaNhTPj5DxLG0fa1OY6EDSa+kWt5okHwfo3NTk8s54PVP6X/fEjqi8jx9jufyI8oXmBJHNBQ/E/DkPjx9gOqsNv1fRO2fQA7xfMh6/QnZztuWszPw3lZgLf2gLcPjQAjwC9JSDj10e7dio69v2971Zu2uDOxqnAlSy7Kgr5eU9zkQ5vPCPrx6L7oqDv7/lbv0N8yQtpb4SAQ8h2JDxxFRYe+82F2Gr1lB/qUBMRnq1UiPjq6YklU+KO0Xts/S3uWFMsheTQZVvDNwL8PqViWWOtr4Yk3m/uK5rA08ojEhYCvpYBHabnHWhiP6yXhOIhOr8/GaIxp+MTxqvA6RynJ/CDk/x/PYLjj+EejJkiKr5NfLPN/LjSkaOC1Uke70A+mtb85PogagHowU/aSrq3Yz2Q/oNU9DGiBeSY3eL1ZaaEfiOIFd+pwH8gY+4I+i5aFfyb9/WeS2X0w+Eyoz9l6ycLCH/O9/0zVgXkoxXc1uj1nbK7JEA3m4igRjuAQ83nRn0xH8QFBbxN0x+SP/BI8F5d2DKfblRX6ifT382xNwKe852OxksI/EeWIz575NPhE1gQ/F/+JtPdd+D7kPZKE6JHx5yjGGyLFfjK99r6PAtiR9xLx3e7HhX8uyo45vPUH5rlM8SwgcdEfiHLMtwEbXlPCVzRUy2KL90g6yiMBfKrcF9+XVzYIZI/xgc4JE278Snxb9MfS2S/R+aAsG8xjeSQzdCaLPIt/vCsFwZBDw2UyhuFlGkNBJAh2z2XF5klAotN67fIcXQzZedGfiBqG/IL2eiP49kzGG4o5Po9mvdtC30YkehaL/R80DJIoDRS//XrRn1N3/5RpfmHnGHlOf8vndBEwxqun9FZTCu0pyf+LLKP2XmjsL9Hmf1D0Z9PraFsEJp7NBeXkRdYAe4T/oD7ZPh2xqV688f8U/SEpcczeFyLLJh7S/rMp/EOpO6HVvFdx2qxKdNqo4RmgttsD5XGCg91p8+t/ir49eEN5mbHwaq2ldFbLXH6c75OaizPGjxn/ZQmchwuxCPRtiP0lQaPtzwv/XNSivsw2wY6U3lPYvcvJMMBRhC7ojBM0XMpccvD2MIr+LNRTJnNCJq9nITjQWRKTeWnQK5FlW9vghon1zEvCXKkzameuJ86HuQw+LjhL1qURdjUGmTkhrwN+mcw2xtECx8LNe5WRxtoZjsgUXSWzoqNXjttWZu9OMPpl/1xuEebyGIby9TI8A+Wec3an4XjPYNdYYfumJXsS3cyn7vGeRLUPbNIfD7yy7IG2YgVlNvqP9xQ2nRhKsBMAn8rbG+o4KM1+0G1xdLxn8TC5LctTUPzhlrWzYSW+ntbbjeLfQe/rHsdj8eWrhDvdWk3m2ygpfMcdpd4je6hHh3O3XathHqFv3Xa9WfjgsnqTzKhID3yfRBGaSKqFB71/xSL7BTEt0MPC14hpZ0n0+HpF56vIb/bmRFp8R+PC89UNtWvx9Qao3S6+AddWenFkDqtrQY6ojyacyTOv+BkMJWjywZzXo8rzHarXSmMv9xTWmR1yLdbTQdH51mu61/70AI9Rs1d85azcUcp+YV8L8kPhLTi7FvLfk6LzVV1po3zPzrzCm8iqGt61HzREmBP8LIeFn7GfRSetNNs0q4rPOJ0vCl+v3tVNomghnnrCPi5BxF5t52tUkIcyNzvGIV6Ursy/aTSOPMTF57sfuWgajVwIvsKN5mmDPRou0OYSS9GRW02NDEeja3QhvhSdsl3felj8wHJ/35bLXr2kxVf+NQ3FFR2zcim0ZdSe22AeFj4Qp10Wrw/5PqTxKzr/ueYlGH2ktgqwwDttPFN0ztr9F7U4y1nSfowG/v9LKC++q6IOrTYap9vBHu4+cqFRd3Qv5euilteGpxyH0RPjq7R71a9bxNPzwld3KaPrDIu6dzIe3BU+raIWxpj1X7zxSeEJq+2/zAbxvHs08go/WbRe2+9FmP2ChRbk+7PCFyiqAxXNVtCNSFyKi9OKx5K9G7AWZBafzFnhS5mb+4yNxkVHk2nR8SpGW/aLPVp8vZtB4UOiSqcjs7W2I9lmaszmxc9wt22q4sfRGF3QoAROttKTKPswKB3OMkWF7mi4KDrlerNjUS1fcJY2QJuXp4BcGS5rVkmnXT6Enh6s1wHFoV94Za342Gavtu56qpRGtq1ejrjC4XxJgsIPSVTqyc2WzFxN0tnsRWes1NeZtfGuULPRLDzhusVj8HpYeF9QCWZkn2Gvx7fwwftuzSZf+UlDEiMv5kQOeio67Xptv07U7CWU6+8e8m7Oig5Z7bxjNFVyXfh7VIor0jV6y+d6Mi38jL6DklujZRmC8APa1WaU5HaE1eYO1xOBe7VKQrGaEmQA1UCd4SNwgkbeTdEZd21eJb6eFv4IVPWF0fjQn2ffR0UH3FAawRi1Mf4ihW9O2doX4LrRSyeCb+ErxpXrw9knw+sAvhncopgh8UfRMasFzEYNtxu6WMYvRH5Fg8KfeXa9khsWLjjBcvTXpPCliOpMNqPKYzwofDFtbz913TAqyeNh4fm2bd7gGZ/X68W/zqrdXVwLMZnTMoQqFCOuZ9QLGRMimzmsA1z86paWzXjFmETLyn47OmSxelQvQQ9b7ZlAWphpSNHD4O+iQ27rjpvRgsxmNCAlylkrCT+jBcxjr/DunnKhxGyR1vi+8MpCyYaYjdaP/y68/Kpd240G4W4Hw/JUgfcUx9qoCXdbDSk5Ll9hIuOwDNUWysUzs/qCxBELS9CQUrkOZdRCFpBfGH/elg+tSPHHRylnoFkb7pb8TKJSdPGzrKAl5oacW3KBZ/JC1PnPmITz4mtsu01AN9zbJRBvCJy7JeCsXNrpGE2wfvdjEhSdsJI6MesTfr/16mUYl6Z2wDaan/q+TteBBivhfD/R4h+Cyn1Vs27LjnbaLHHNeOENaqVRlNl7aZPBCNWLTliZSmc2rC8JNwpPeD/QYbZIYyI8b3Tty9UVm7JSy2zWmJucFT59ojTDMJvQngyRx57iF8wLH9xXSrrMTgkVnB/onLCiQ1ZLa43mAiejwk+A2Pkgu4slNaNW8mRc/MvBjX3Chg1jzmLms60fEpShCFQxL8yOqJv8fVF0vmr3cKNBjDsck1VS+HmhVodZ3pE1wSXo86kIstnpt3L0H0HeC439ZXn69Km6w6xcTzzxb9ERW22N4RH+gwpRLjpk5cKU2eqBLeS05wtnZctMmQ3KeSRGU7Yuw4zyet3meeh5hfcElXiR2aF0nneDpoSvaFgGH1Dtvmw0xOxNC9+xT6lrNtsK2Ct+vyI1hG9WfktyT0oZ5Gy2NtF7KH4eymYQY0oC4ssufeIDlyKrumu5ZSVRImnLAc6kBHd66k1FORutw5iKpRdelq1eUJtOUAlavih5P7ORuE1RHJYrLzblTt+iiTHlif9cdMIH2tjsuZdwTgpf2lnv7NfFmb3GOn0oOt9206II35/d9euFr7y3e1HnfnyJPMJp8RMjljlX6b2j8n3ASVD4085qWOihdONIzHoeD5NbmTeVn5hXiZBjw/YKr46tCvPjoGrwclS+117hx/X19gH3jQkwm5NVhHA4R+slC0l0OsSzgKSD3FdFh66UtDSzlyin9P5o1AQ/8XWSEsznKZAgQOn7Ff0hNLUnNB/tIVzg4lcbNTq6lsnR8F8xFq/LsAXUCujsyv9oz+B6Ug4tpBg4X4iXHO0RbNvmDnxZm45K+kB6oB5IGWyj/T4SjeylZUfjn77VyVMJDudaB+zBUAolBPhgvrsoh4+mzBz6QjX80R6BbLBQDvtUewJGTs9gTdg6IKeDcM7ZgoQsidCE8KgEVYX7BSzZL/tOUnJfRz7GPnpkK1x80vt2T72W2fDRRx2WA7Vq3tTbmQNwuqwnQ9lrufig9+2YeitzlEcX9F0ShjRclIF2bz9x3c9cRqTL2qOxnIBWDiWiXAHuZ44TaNOOhVFTEtFu7Bvj2ceL5wa7FLJtDzeXbTF4dCrMn9K1A85e93m3oaXBeTAdo827VLCNwJ7ixa7rSzm4a7eL0ud+xhme+ziKS4JcbTOeObOtj1z2JhGfGe16lZQSvA0dc0kXeEbjnY7ZqZxS8rch+NeDUTlh2xD26wlKbx4vWfhaTurZm2fnQN0bXpeEtnqdJXszUX3c+2UY5eDeV6azWVDkt8PzksAGoMhvSfwUsJeyAFcG02QOHeoD342n2TVsLAt5ZcpV5usE+uRLAtq+Ttm8A7oO0VlCAxm8LTp0pcHgW2sEC9QfabxEHg2oz8KtL1p0+kpHlex9SvXhV9EW08DXuDS468qFmezzx3LgHTMux2SVg7hSfJX9rr8+8Omoyg8Zg/3AKuVtEPcj/kECEi7isqTiAPidj5QL5qWJY6kJicw1nV8nHhE/4TR+PR3KXhcUXQjyLzgo/LiAltK+JXO+2duC02Iuv0Vv71Rw5KqUZ9YreSAvi3w3lJaSmVVKHrAvcUyeCVkXX4MrI4GzX1PPBXeC+bzwpBWLMHNsNg/S19+98pyUSm+dzLer8gB+w4rfo1bp75m9nXUeoG9J/ML4c2mMkpaiuDOHY/OAPrn+uzTqRPUurUj5Nv1QGuZKNZBZZ4f/SEs9U1/nPqRPlMzRZDsFIs0sF988VGacfMUaTynq8JdTTkKxILnOqJzcs98M1+c+EjrGjxl/LQlyJb/5FU9IF/kFDUhUCtg5RLHygF0S0VZof8VW1KV9xaLCd9ZWr4N/xUTU5Xw9mT6URKpzMMh1aY+pz9kLmZVDaUMA/v2qJNIN4ITcvMOm1q0c+Uxl2FL2+tkcoMtGlJz9LIvZrcSxvpJc00bOnuIXzAk6w5Fw8cvBXenHlD11nwN32XQC8zkqg3EIQZ9vqwvLIeBKCKWXuQJLH/h9SOOy6PG2km2zED7Z1BfKeGE57HEAQcLHx8eSyHdnvx+W0Uj4Rm9vMxFp3Oo8XNDi90fVno6zPfF0mAcsKXxpSr2nNIysZVcl2qRHNHomcVx4oW7rTpDUR30xRLs3KThsJWTVym4E6sOmM+FaDpdYfM4ASSlHXjKLXqO4+E3G9Z2eHPCL43KIZ+KzFt7HVFSLDdx3JEgT9ViIOo7xDEeF1zGKZZj9qo8+9an4IRpwjotf9mZfozySGRoGSVSCeLhdwzC9Vk82fSUvZHvDXfO383gpPKlS3Lrv6Hb08LYUdR9AOZoc6IdUcsA9DHAUoRZqlwS6cg88e6vxXKArHT23DSbr9eL3ae5D0DFv/Msh8rpztfNAvu+ZXuAZp35J+B80PrQi85ckJClz9hSXw5xRskTZ+03mgf1afOIgoJvvkRfj4l/RUrMX2bNzeXD3Rrcl0S9t5bKnFd43+JVw1EB3ZMViUhLyqmb/Qnw9N/TNkjAH4aSOL/9GvVqthsZJENNoz4wv+gPQbgyfywOQ3E92ZuSmdrQc+JVZWXasmhR/kOqdUil81ZWyJ/tbg3JEpOYpOnb1nLWj9Cdnf5dEzFWLMnuWKQ/cnInXVys8C8qiXkBEhMt8mloiTle/ztOScFc0jJWD9FcoDE0uH9H4clh47B0A5+gD5XGCA3RTInkHEYPf1KxXCVYL0MsBHEY87JHx5wVnybqifnzqL9smxKcDmVINcdFhK50V39owfB72rm2zDuxLId7hHE0JX9EQF741lzLCrL77sVnod3hOGZqyl+LX4jW7ipRnbr+QB3APp7nT4l/TUMeBtDIHdXPFLS8OFP7UVHRK9qKMPJA/0pMLKocKF5229rC4fGhv36PgsBXtnf36aJ6w0Rmn8xJc/tpvLZK9L3GuzG/YpoUlGqzXAcVh8VNEfd2O57nyn3IcRmvGC38LTG3TZQf7zeAWyZpezoKg+Mb5gb+fOa71Jegc+8+neO2fDiZD5K0wj9H9xEP1Wq120pS1MA8D1Ljfhx8oPDhdLON3Cw/Ik/w2WmOfhoub9LtRva0+IvFR5uzl4+f19lQOMHX2MTUPwyJySR9Skj8Qy8yDT3uLpg0YzQfGrwk03XZKpg6YTP3QE8ufzEadDeVXVO/X2rKgieIAydph8Wvxtk/Yb2dLuwxsuNNUOsgadSdZZdVIubBq1VPxEngqZJ9C1ujX3BQvC1ux0a+7yeqDiNvxWTmqtqywalesPsmq2W+0K1afZdWqWH2SVbdTa4Ln0jFvHwguLfBcPrgmYIBLBzyXj/L3BsD0wYNp1g8j2McHU4evYRofpFOODabXbNU2ofxNWP/ku3DgQnlgbScRilX/LtQPiZ2FU2vgDVC73Wuf/I0Gc7yO6Q/yNrbRBWQWHN6BdyejunXwW9GCg7tl0wDPxp7cNMRWq+j8jg58U9GCCb1lA99c7B32VjDDxgHDqN4/vCZoAk5fHFVwqVjSNAJKBy6UesvOPurX6jW4VBotS7LSl78OlUqnfVjsfWwqAsD8rStfs9aEJDRK2ap5OEPMhffJ0UT8gMS/Sp1QQ+1eCEmMLOjh34JqA+Zkwaf6LacOZIGyYAoOcYyD1yhGLXG8f3yJExIhK1vujVCjJ8zm/S7OIfm45SckaFb23xu0VgXtS9AqQL8H1GnXmifn8BC1lPmrFrWVQNRyAJGFJOJ7RB0HENU/aIdnklEfPKFGw3yY6B2hutBFgOH0zScX3+AoXm+jhp4YR1cTQLjUe+Dmc9S/o9VspLRGJAjg8vpgJJktXq0afF5Wgisf4qrXHMAFSLzqlfLKQqtZSdeHvK7nJIx3Y7XTutCPZuGW3NG7nnio1RYKyiNhJD8wVDYW4lHb8iw08H15LXh7RxUuIgvic0t+JpHMcNfQrjHg225zoD7LGrGG8B2mu0E65z9jEs5BVwdY49RotKYTdHlesfoEq2ZjMhGbsaL1SVrTcUXrs7Ravcn/VrQ+T6vSWp9j1azVO/DCnnDoVPmpf6PTaVV0fkunXcnO7+m0BZ1Jhef3ePqdKVwuVqIBOy738OXGGp+OvHoEnY61XdWRV0ig07FQS7Gh05XNtuq1Ey9gu6olOXM4imgEl5aNq7bvcfUcw9W1iqvlFi0bF9zf0eq7RatRM1++8/3WQ/V2s9beHyY6TKKYrQjf5Q4mAY6fGF/BhWfhTNyyExp/eIO877fn032IFbR/hTYeIG90BR1Zb39olYXC+w2xVru1kbGTQ2ic/aCRQCMbMcAjeCh05svMNgw7H89MhomtoTTabdTNFwRNlq+RbBz8q2lF6x55MeNY7akOScAsOACHoD5Ua4XqNmsQW5E6OxvE1gKMzcImvR96qC2LGcF7AhasDAmn02j17ie7pJ/sTMj9XTN4qKgsaK0NqjSO6hQqC5pKoho2GmjcRJvJznDpWBIkQadW4fkXPC0X6FjbWi0nhMcank6F51/wtNxQPdbwSOlpgMdjwZJ+HJyftOsNuEwsnFaSSadicsik24LLxIJqkUy6zVbVNe4QSreCsg/l4Rw1+oC3jxWVIqC0KyiHUDoVlEMo3XalaT+iUqnaQyq9SlYUKmT2Qbt65NW7NbicbGia33BqQuYESJ46FafT5fr0aoKEA9m+/NX67n2nBECENHtJXE2+iifl4b1GMVkhPx37ex76AYsSDrgcIWsyLyc8XUfw1FtWxCfqtN3gkzW893U81+ETDekZDufoYnQHXe00zMnNhLMbcVQJfXzTadT8bUR4I05g+RhUy+/5dCo+/8qn14bKp9m1zmd0U+/U0GUPDhRd7yIXKM1GjVRUDqh0KiofUllXVA6o9IDLSlYvMy8qsGXFEpV2ReWAShv4wWwBinfTaNYiUFR61nWtgNKGDcWcpOxaCg43lcHoIiA/T+o18e8IDh0bbhGdrU6vz8aoXq/Vag8DdD/xAAHRnF4uFqZBpF2rnTQa8Klk3UV6VLrtFrph/mYvRSwgaIxDvIBclpdV9+oBuhfKBcdogkPyi9FfNK74pHyaDuiZrPPJtYB0HACSNfKtBWT+U3jOcFkYVbdCKuTBDBhH1pyaLo62TKZdPcAFYlR5CCDddiUeWxo/m8LjQeMCFd9p4mg3KxzvcVTS8R5HR0pHEy4OoyftFgdg6TCNA/hmMY2jD/iUNcyiC3lytXEW7UqJ/sLRE1rj7zZcHEY92Z/NfoXj+ZSJrwE5vSUxx9tC2r+bJ40zePd5NQPw39OFagIaTprysvxgOhzsqo6hYVKs1nrG1qK5YepWmP4T07Rfg01J9YGyTk7OD1OtgvMhnG2RpNTZcNFktXPyIbPG3EfT1kkdvOhY5rM77NGYzZMAUK0tiDP/jVPxepzkwufvljzroaOxssX+7vxCU22ufUKbbXUuWwKuOY0IGrdcOOWz5kxyp9R2gVK9ZQNTddb/G5nqlP8PQvDP96zp67zItMCTyVp9qEsmCbcue8eZ+8OGNbJCaHdXfzdt/fznmsuRKRtlhBqtNarX0OXsHBBCy3ppn+C2Spr+Q+aolZL6DcsK4AHAKqL973hSN+Wth2clR4egRjjGQyLN8O39/5m8/78dmdXsAGKlWbaSA6udWqrXpJLaMuo21hWkDyD97+jufUeJSxyTF/wKr6uEfWK7SHfjBHDhi2kLfY8LoMtkAOxzJzIjFveR4HIDF4zpMIkEs5nYhRrycpmwhgac49eK0DtC/+fCe6PUrTcKVGiWN5wmZDiG00QCzgXlBE3roC/LmFfFKZW/G3VYVBogqLSAUYEhKy3Q94ks6ZW/W52SU1nT+Sle0BiL4yc6HWz/Jv5jcSBRztWg15pRGck4/0HCONq+tiPjp0EO8YKwEWM5PfFGQTljccxW735hsP0vY7ZW+aloejUlkHOIZr35+wEZ8fpuXVEObNC3QegvGf+fiswBmSFnUXRyRvCqonNIZ0QjHyqX5uGxZIyLbKxATjYB5QmezwMClVLLovRcpt0nINOxubeuSCA/PVQ0HziVxtBcr9YkCAjYA8smmwlnsOD0FR+q2bAHZ5rwGQ3BqhtjR9Z6jTmOkwiRgKzkqk/HOFwyNc9pDYz0d/fI1LLtqN36/mjUzrcrzAOSx/xnEktXYtueTawU3bJ//gEDrrnPLePpfixsyXrNeIzOpEdHYiCo6qqIQUJ1QxZAMDXaIHfiltMdDaGAUnVWI5syPzIo75lyODvPvnaXC+T0KVmQ6HT49nep2kfEx2ltyzfP5+QlDRyxgM6RtxR2FRTToX6gvjIx/LXkvNAJh4UulshbEzIHA0kVtGxK/hiQJoQ/MSG9BJo8AUSViM8Lxo0BuOHe9BNYoQLIjKSHh3AGIcUuAe4+YTCsVtX2+zdCAK0Ci3LEVmnhPeMROkE0YqdnAXshaeLtAodQAWUUo1+LFMbntfc9B0y/3lOiesB+kqzQJFmtK2T/jQx9e5NZOKFy4MRGVPwexwswGU3gvM7/L/FjONlx4LQmNIpZWMH6FCwZvqpQfQ4Vk0ktcT7CSd+AJxZj/lrB+hSs1JeuWH2KlcyisorVjhVP41QRWnAazoVCPx1uXgEK6IMSzH/js12dgHO5XV9+hIT1zuCqc1CgrjCoaAxkVNerNfbjCtUnUP2JwZ55oDhtjM8K1X+gSt9qiHZvi8bYF69BqY2BiG1MgyDN4CSBWBH9p7IaMsGqzsWvUauOyM9Qq/T+Zzk90BnHcoUVqh2qOafiHU5H8g+gUDJe/kiXkj0x+B6EvBmT0Hnat+sMcJ2QBTDb+KZwiH+QV8YFngCsgjbM51Xakt/FquUxtv12uMSr2Sa7LDPwT/L1aqNJXlcEx+k432QFF0i2IJ0ekE0cXAhIskIbdSyEZpqsZoEUpEpBbzF5a45fKxw7HGmQ+5e8yGqxX9+N2Q8pOzvNU3ZkT4TMJbOL9M9d5glN8QzO1c56raWjgjZL+zoaeS2PcbkOHKDNm4EBo6WbjwAGfRsTsV5AufGmwqhtH9F2jz1g4dVDwWRZlDYnGKj7eCoRQ4JD41jsnuj0TJg48/TsAsKjpXU8XWzXpQGEE/wcLzlLFksgSJo9rT2jjWQY4NVa+OMXAQ4XRHgOyTqAc6uuradR9OkwASeM0hZCMIgoW6hnHEglH+9wiF2zIrI7JongiAgsKOjbiMTCdpELOxG2DHsqir2SO6jzn+tALK3i9B+cZKu7kzsS0SjGIdwwKSxMaRij2om/RSesn/m7xh5AyDS0HIjcuIyS1epV0PkBJm7Ra9sFkwhBCaCwsOxWXbEIjMetsMjWi0sfxXW4uS4EBIdCw7RgXMul+UupQ2QweBNG//YrLAHl/LEdl/iY03fhem7+eh0ioXB8SCUWtpG9wal4bHhw+kR9giay92jFJGVyR+aJD8Zi6do15e6SdZxwAmnP2A5UeCR4OhGKRBavhQt0RwKCI7JJqgBBdJi3bBlmRAMSwtlEdVWnGJcZ8VWc0BvHCAgUu66QF3NMQzASYjlAvqMB63KbZSgPYm1ASNj2lR8oeZGHzWWAowgIE800db5M0LcbOaEEUPmHrejkUpZykp8bv5DL3Fs4J2EERtP2dJSKrFOVHTzflqeNZ8QS6TtP6JqgtAr27b2B8Orr7LL8eZ0HxI859VNYYCBpGnj5Y7qgP2VjRXmsC7WEpsmMRDDlS9VT2Y62/MldYcrXNATHqf+f8xHNYoK0/YDp9P19Jm1qGmy2IFTjAII0vSd2QcNQ6K+K2ReZ/bFpYAkVnfXj8YBdwDbRNPEDsDf8oAlcGrSvYH0OlremvDDdPg3g2rNcoWKzLWTpDkQ4nKMLLquonDDwMw6oy5/aHZkJgwwMH9Wwb9qlk/YGT2VKbj1FpFAdCLTOvkxla5VgGlqjgpYdWrOC9iG0TSZvImPOINV9H9YRubG7YKJST8Z+pulb+bOaLml4ckGDFTr/gdeMA7pApDfkNn9U9ycf6CwgrIBFCu+RJ39r7lIQ2jSzFf0pUV2HJzc0JGh7T3osX4VCqK/lMaZL0ebixVh8blhc9DxpPS5/hQQDasrQtYhC/NcyfjfBMZQ70o2ODRzrZLWOTof4B41fQU3kaTT3NWwmW0cu5MssyNuwnRQIGB9W2S6drjUiYBzUxh6Rrj0iULxPazIi23iA0h9aZQI6JC5xhLZj4WCg6DYsyYQk8W7yGwwaB2WAxg6WS4I5pC3S7u5HE+qmQFwxTv9hYbxVnkBw1NvKFPi6MSBFuk+pw2FCuLzGH4gPDASFGs3tm0KRzmqCtD1Uy6JjngQYu1N1TsztEC+ZrYSbR9MaYDjCUa/tA+lmur+lB0TIBWAS9Z6xjSK7ucKZRNLfb/mWLQ+mgwHedOF+f19bGDtEHrafFRKMutLspd4ytUHQCZrT8L3vDgWJXkx4i6Q2ur7VAvM2M7nC8h7Lue+nEuOjR8YrNvts0ts1bIUXIYFjtAOBI/39ish7Ilevc46ToBKUfSw39P8ldI7+JFCuDwPhckd8uubMT0vtKzR7aDYZ/80g+grNezRpvKBCskMiB1sLzbIJoHzbqBqo9fFfxPOVidbv8WzQvPMLKj4f8HlzDyo6H9CRxl4F5gMwlcb5LZrNmn6k3crWAfbJihSm0XPOpDhbyCyyhLWpVaowfYBpz2DeGocVqA9ApTZiReY0Imuclu1Hp5d8UwPo7V76Q46dJHEcvB9FCYOYXnX/2wqzx5Hf8dqMl36Hq0KzQ7MvQvQJbOMPu3SEy/HqB4D65wGjowSXK0r/RinaXHWYcGkC0Fj+rAKWEZhUV48EjAUOjNuE8BUOxYLRON2RFaYPMckuoAmnSJiYyUyYTBWmDzGJfVYh+ggRC+icPtG0D1jAIgImdAKNjpyNULF5xyadDLvbU6UHI16TjusK+0sakuj0/GfMk3SqMLC4SF2nYYS3WaZw/8fbheZJClaYBByoCQkC4Zn8I18ENHBCjScBACVjt+A2HlRMd0yIFRijCB6m7Xui7Tuib7/uE1XQPg1tVxtcIdsi+yE2Hwmi0zMMpdZImRyUrd3Pw2Y5OhjQt2vvOxT5sAyDcxLI+NCIJ1BqgJXb7xnTRvkiASUqeo00tMEk4fN2Mk569+IsXQkUNprJRl04AorwKWKCpjh8hoJEkZeuUdUylIZLOllKbKWUivhzKCxlwqEWdnZNi8xvAaFvZ4yBiUSrnLLNFTg2p0oLfRLVDVmA7SBdr9lRTuhbGnpNBwVsKvrSv17iCFC3bcVEzDZ6SBfVdjBTdcAdgJHmIeMI2mAvrbaXulAuGPfJ/GTE8VMsyLC0yGoKqGmQcme5n+nOsjadhIfYh3KTXclhWEHRgMnC8LmdttYSnz6AIhrN/ZZBZoMSksYVC+A09OzaDNFc4eBpMxZx29pz84ZA0BzYcd1MYxt04VyHckY86PNmv12IWRfzT+w/C5tt7ojoZGquo8vmr5D5zycsiSGFPtt1i5oGUjtppZlKr2cYhNwtdwQDal6n5gkydZfRJSJrktBZEjwjTxDBCyh2it7sa10qaV474fQfoWFBq9aGWXN2wtkaDRbb4mMYSKwqFFiapGXTnH27eQUpjmQ1vr2pbxxxCubwtcxjc8Igb70kHMpBYzc+sAvlgz5kzLo2gNSHVX0qOcDOFmbrv50Pj7dsxRmOwFxDVDtEWgJTFW/8O5o7xp6ggulb5pJOqYQmO/sxk7pZH3DHSHxyOFeaDo5mC0fSFok0WyCfTj0LaEZUfkDYisYuFik1jhxVDQukLnAQEWBgFCu4Xm9Y4BKwTYsgyFvLvJ+kgAGvks0CApQsrLf2lXCmiVa5gECPNF6iCfafAbWmtUplM3wCWji72dlnYjTrLltBoG9nBFJTPyXfYR5Hau9WPFIe8k9pzz09CRdAwBlRvCJitWBKatVkqlGV8otPau9uzDh5KHsJf8I+QdfhnMpeh3DuFCvGXc8mr/NwU6N9xtPqFjAy1bHpQf2G0aYnVOpGyeHs4kyHQsvqtcff0NoiOtnVkW3Kp8AQa8AjBulKieqANow6oL8BdAdpywEUIO+ZcjgqHKQITZeyQV0grIIoCUBZBTAEiq3AZPj6+2Xz2UYw5wXkIgmCk2kyIwfn2ZBROG0xGjajYjtWEwrmeAchOx5ZUQdkp25adiLx2aJTHFKhiKPTMznwvP7fMJ5oEAxZIING4n/UrKX/iNejmLNnsvtJyNLZpl8EdQD8QK6UeaWHR1q6uA9ppT8ZbFaty6vhCC81n/zBQOijAxsR4o6A9RQr4LCy1gwvVwRsF2z6fezp+LzYAn0PhfcmtKyj1A5rp45PLfE/UXIIgtZbO4XdCXmYHzg6rgvhxqArHPvCf3l1hJsiZR8Uhxwd218kDD9T4wuRV//wBt/ReY0Ziz5RJQ4Dl2KLWRCvW4aE9o/cBGbDtvDIZ+apg6B1UMRlwdb3AhY7Y1Ps9wLpWbApvBA/O6q9rGzGGM8+0ySj4rXhNSXz+Ss6+9TAdhDMOv/ZnudozJ4Ym8vun46Q0pauC7Her2Ia4jB6uwsQEFfMiW7LJjP29EQc1V2dzEejDqkRp6GsP0SPOHYpEGZTuhRmDUeYdTsWmV3gKEbpG7gBS9mUH1RhHROW+IKm3J0YmELrg2thR6T1V0ifnNH1+0GculFdf0eiGCcch7Ezel5tjmdUZ73j5YqOV8pE6rXMUcIvAlsSHMRLH3NyOgjEZwtxOpV+TObUp6Ez21NxiTIHDa/eMGgyDIXsLUlEsSvklPPSHrkoolEqezeyGXco7TTvVfztE33nQJDs6ZppeZE845iGjkADI35DzOdUrHnhTBpOiW1kNnRzJEeQF+OnJzTgxBm91wWyW4c4XiKxOle47YvdR11ITIGTv+BK2qmrWwCUF7URwU+uMOuDYcZXOHbqcFDQZa7Pyw0dFSuLnQl+q/EQa+bI+aujrpdVZOjRoWK9pmYWLy9uF3hFg1c04dgX63BG7HRTe7nhozyK0YA6GiC3B+6ShEQswNGjwd5+3bwPOp8nm/vvjvKzJnfifbg7gfR6TTknMgeG8+XWcISbKm6Zi7tzw8aiNY1x4IzEwdmoO3KuyFxPN+mVF7nr1SoJ6T/p8eDM+QrF278On4iwhFkSoRGNCHa1ct4mwbUQPfExXQEHJXNzLT5gGMkcmAyqu0IPjtil+evAteR1tw4E4F90HhJXQpxgqN0koTt3hRRo1pzYMV6tmPiZK8l9MEou1W1ppxvxQddyfgN3BaFyk8haoHiH8IbOOHbn2i00CbwjPuNzZzQfHHxhvGk1GDhzCVC7aj83eHfXjiADE3+6JQl3KXUNRtZuk5hTlwLsutcC8wL3PfRdEjgwJ8P3JEYTpwIn7Q4QkZssMV9h3xWRazeBiNxk+RqlxpxsoInXrvBTXQlrcndHFlSs3Kk8LJRgpydeQDc4XCSfmpUNAp7a+K5nLRvrMZ+KfesR/oP67tTXQUnyeAlfuNNy66BpjTVu09HIEWZg/Igpc6fbz8EI58z3XPOidh+IYzViSehMXZ2yRa3ZJI9LQgJ/iSlHA18cDRGdBcSZ6pPdhX2gGBuOYrSm/T7G2HQEo9p6w6w0hjhOZGE75s4cINrBlNt0zV+H9Weypu7kxHq6lwB0cY3xWmzHG3cuhfVsC9gYc2e8LeusCPcTZ7ysXdt/e5uRORNF0j4YdVndknWcOFPipW2O6eKaBEnMHIHV0Y2O68Ly5B+u7ER1pKLxneiF7OUpcKdFr/W96CWhM+64dlI5D1iuON0gYLniWls3TiWsVgXrc7CmURLiFXUFl5IfNo7rnuMwccVN7LQsq60H4hAs3Tt+X4a1JmwdkNMzPHt1xnxQ3MR6rZEV1yRdtSYuVwyIrm7yQ5fWcInDRdp5MXaqpkU316vNjYViwYnvEDM1kGpc1i7ICjszp0S7B7surbE7rNSWFW/fm6Tljovd1I1H5AHLlROyqRt31oaVrFauJDTUJuzGYU3InIgVU+zMoagbTNUl5i3Zi0PjXNR6WPPKawvMFf2lBnKM+0OeWG0QOFMgoVa+Zr81rAvsPqQR+ekILjUCbdzwesRiKcJ/vGNs5YwWU9zuL/S0zhWbK7qsp1vMr08tkOO8HMHVtm2NPbKVQ25RS7vRfD68XNmNLWviFeEnEr+enlG2xP9g7krBfr2m+JKZJ2h46cK/TmyIE4cChtrZbW1cS7JKL6s+Erx2FlvmU1IX2wUOgo1t4T+7kmXTbracBzSWxMhbksCdcnLrW/SC4wV1JlDd1a2+18V1hcN5QNAjjZdOdXzU7SKnzY0uluiBBTFeuHOzrWX7INij5oxZqxuRzZWaM8V1ugVQutT+ImSNRs5c/dC+h6XL69aV4nzrJsYtC0+uWUj/SW1aPKdOFaoo4y4zx2f16aHzMHZmXwKQNuStmENRRuvu5q+cLxpyFkUOodMtstZF55o2eyvn/PJsGl1iXkDX6MqlqGNXO6ytzSxmnKA7YdbG6H7tjPvUte0IKNxccaAsajWfktAnp2JFjGNBzxmrQxvZZuUazMZ4ERJX2oB2dS+Q5MCL+sLY8NnalRia9qUbfWa3iR8Q7E6xmX5QIzdkrip/C1L2SMP5SrBwhJg6qN0ksTXjcXQ6WK2XNCbYobSTbumBl65cAxn3l+5081RFLLse08R1hiMyw85syba2EtPlRUPmJ0GJGj9pE2PCI3/BwbMrwHSvd+UALEY3OAl9Rzv9tTNXsusiG+LV2qGrEor12jWuxba8HDVd21Z4PVF3ijJsWxWS14K71LFZ8SezR6+1iYXMnfoVNXeZvVw2F1yu6C/1FnTLvAJLuy7f0CdX4ojaLfu1iQV0NXMoYamdHdflJRO8aCh0fsxfkfdMZU2Go/rsC8nLY9BzRb2psmfe/H/1A4e2qnJ4Ghe2EeUxOqPOdOlU5csCsB8OiZd2NkmXFnsJl4KEc4eAImbGjVoVnKP637xCO/9JuE+jSp99ktcF5eSFMVec84POItnrpLSBRUuXVNnBkLjsxcU5EXNGhym1eHXj2n9HbELdSfbadtIlMzQMCA4dss/2Ja1jfGtessCVCT/q+Afjtqxk5Y5oabcV0ccVzlmAHcGlPTpaF9cVFvr+MqBzd0RMYdbpGGdGn505H7Wn1+QAyyHRUoKwxg/GK8ZlMZT/jKYcU1dKoqxH/q99grbGa4Xs88i8Zxw7hGzftPjKXSVdZsK0YBx5L3S1coibbRvjTxLLeKKjuIybF3/hV+xMpaJtNXZDnwj6UxyYzlxPOgiMGWc2ZjHjM1ni6UowUREz88Urv5A13ETWNK7GJtQPqe9ayzLbVRhbalMs59I7uj07xp3MPWqO7lDzFYx3OFwQvhuu5I602S4tVrg5I2+6s+K0uTH/GTlW1Kg9aSkfaHJIgkvjvOzv0XSsxCzALgW2bZdN3bEXaeO6gks5P+vGcSWhQ0lftWON+S354Agp1Zw1XkzsYRqgM4d2onaXAm1gIY0xf0UjKl6JcODaxFDbroAnPppwoB4oeUkhOcJNe0CaPrdkhpFbxdmKrBnPcXqERPjFTVpt4wEhjwRP6DJJCzSqpHAmck5HHo0nN2UymMxkpwx3dFnHtnfuPVP0Z7JaO8JrV9Bij1dA5g7Jl3pPzngSRfAia6n5HVNmfdvKbIWDjQvlVhsb+7cmvDANAvG5s8Jm3tAQyFZs5s6kIdUFML89BTGh0hhx5yhQu0GYl7KEO3QPQG1hZh7XtkjPnbTmvq2xa8togVjDFWJKVVDmYdw5EHNnQ+p3+tekNSVhSJ3pWWnbqKhCPRlgybi1I6x2sX1rLvijUylx7flB2rTEB4vSZhgVsk8iW+KApKkkh6DZbuos+9JHbln41uWMsTm6xPGScIeoWSuMiom/PB04VPOvuyWnYsEanBz1gvqZvSAdTkO8Ihy7KlPZ20TlwMpRucoej9BiRYIATZabFbpAq6Vr1mvRYqsVdrXRtVnFLlCtE4cSabqjM7RYceZMYtumTJ3/X+K7UjGnRpkzVxpqgZK2ujuDBNX4stHNlzZIdGjeg26bLB1WY2dDpV2j1vqEvbhz8tUtnnxy9DVzBZRSoZq5RkkLlOe5gslmOGFKArKW3owznnJrP071hXRhPrxc8ZabupWo+eBqOoJLmdH81l7ZNK+WK7zqILRX2xFcVnfjvXfmCKaWbjm4DqYHOicMbYKijvBSbIiW0TPxEW+ac4+xL/50xS/s6jad+CoyjsM0T5heAz1tocclEWrMGe9HCdNkPx731q8PcED5DLuSZFWH3fWz+0T541sH2CH7X20flj1OcSyCrngE9dq+C9XOHmo9FkJXvIS+dlLtWARd8Rv0o2jHIuiKK6HdNetoBDuuENzfxV/x9Y+FsOsIQvVaYCt74UreCFezRCD0XfFDtFtU5g4w9JeMu2MP6tYtHomfK9ag9pyqI/FzxhTUrTY+Ej9nDEHtQqKc+Z1R/9V3KCADzQzc8nPnANFtqncsgM6cINp5/iMBdPQIaWfPoR0JoDNniAIQjA50JpawfwhnbyaXO8AkcvUAAXACC3iOHh4N+4eHgOfowdHM3JPpGPBcOTR6+xHorxSS5UxviB0KuyidmqwrPQnPFaWnRk3tb1xJz1WtB0L0XNF62o0jjwHvhvnOzBVU6l+slx/IFt9zMkdXdLF8wa+OYFSb1lnfwxeEc1fgKTLYsR4vkFfCYp64s4mVE8R63veC8eeAPjlz/1A5RKwXEF1id8IFHe3a5iPAc8Vy1q/aPQI8ZwxnaFVrEp4rhjM8yeMsCedIeVs3YKoWjPWc2xXmM7lwF+llb2KfOz0SUJ+t3eleogZgOtYDMG65bx1oRRt/ErJ2xgJUs23WhS+l54oJqN/8JGd6N2LrxkuWRA7VvEDbv+8YuiKHbWgG4ZitydxVEbR/CWmDzxXpA1exMWYx42nVi5sEO9YzIRMs1oGD4BV5yWxF+EKI4yMn7kRVldSIdaCyWRIWUonSXuluUuxb39iez5hD+JRqXvv4CI7RGQlcie33oF3MFADRRF6KcwQguAtd3pK66xtbjwym9JyxCqGVok5x6Ir5osYE29bDqlP8kzoCD5zVMmUvaOBOQFXhZ78iQbyfH7t0DVhpX2vd+dgBdPTosF/YJufMhc7IXxua2bzB54r0dXSnsh4HnzOVHdDusG7weS4XJYCQwZUzClB13CBYMCtn9J96gxXABk78Z3eErw9O+CQ+R6WvBUDzSXzOnL5K9137zm+Kz5XKSnC3WDf4nLm7r9ygtp5I3+BzpQlgF1zINMXnSgNA9eiwfvLeh0RAQncMOzp20H7C6IEsqexe4tSdOAWilfjfDxKcDjinP2Q7/ItA1rRFjvA7mHvyFQ9ErF8LHHtB5zhyJVOu3oL7it2SA7Hbc1d45XDS5sFL7PGlI8h2MmUb2aMjvPKoa86Bl+fMlgTCiyXVlsyIrNqSmXg9EnfsCqW1knG74gwvFnjhTL2dYoYZN1zP3KlxUkXrK16SJis+Ixx5S3cGuO/r+6+1idNjRnASvyIPB+6kUjvWoTH2jAbhXNoWAg91S+aUM9O4SpNNue7Ep8OuTC9XujN8bZSLJrJoSV29JvGlWgc9XAzHaLh053aTWh78pcmHesgSzknov6Lzn/4Sh+4YaIqsGbdnh0kkFuBKJFa10b6STdbCNWIvYRRjyl0lZlzARpyGz2nMnyXi0KSumGk7X8neqTnaJkumLHHm6GxYPjrPA/JDXmt1hFdHNc2M+wLnkfjUDhFTL1J/paIjH2BIngWuUFNOAfP78o3avTOOpmKamd+aCWeOsOopVxSMB7LPf1JnQthKAMO4RXYlzFc/cQVXu2f7iLxiMXEl1qOW+tiBha7DJ8ZXTl1wUZquGz8hr1crKl6ukGVA9kvK3LmNYTvl+x5awxFobdvVUXIIhzPx624Od/U0aUVxml+SIR9HK437X7njrUVtnEQkWblCK4eeFlq0bhmaYC4Di64Qs51V2uJy5qTs5jAGJxdgrpyS1k2LiSSDvj8J8198QmeLyixsTYfOyTzam+vBEpIlPpwjuLq2I2OytMeZZKUiW8ZtMM+p1K7tOzZTKryiGI2xv6TOtKDsWY8nbrFNEu4vceQKN+t7c5qEoTNxWOsJkfu1W2Uqii7Tk6726P8D";
Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3",gcp:"gcp2"};Sidebar.prototype.defaultEntries="general;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.ibm="Analytics Applications Blockchain Data DevOps Infrastructure Management Miscellaneous Security Social Users VPC Boxes Connectors".split(" ");Sidebar.prototype.ibm_cloud=
@@ -12169,24 +12172,24 @@ function(x){l&&(window.clearTimeout(d),this.sync.cleanup(b,g,x))}),q,y):this.upd
DrawioFile.prototype.updateFile=function(b,g,l,d,q){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"immediate",q,"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():this.getLatestVersion(mxUtils.bind(this,function(y){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[y]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=g&&g():null!=y?this.mergeFile(y,b,g,
d,q):this.reloadFile(b,g))}catch(x){null!=g&&g(x)}}),g))};
DrawioFile.prototype.mergeFile=function(b,g,l,d,q){try{var y=b.getShadowPages();if(null!=y&&0<y.length){var x=this.getShadowPages(),D=[this.ui.diffPages(null!=d?d:x,y)],J=this.ignorePatches(D);if(J)this.inConflictState=this.invalidChecksum=!1,this.setDescriptor(b.getDescriptor()),this.descriptorChanged(),EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",J),null!=g&&g();else try{this.stats.fileMerged++;null!=this.sync&&this.sync.sendLocalChanges();var K=this.isModified()?this.ui.diffPages(x,
-this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(x),D[0]),N=this.ui.getHashValueForPages(L,{}),c=this.ui.getHashValueForPages(y,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",x,"pages",y,"patched",L,"patches",D,"changes",K,"checksum",N,"current",c,"valid",N==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",q);if(null!=N&&N!=c)this.checksumError(l,D,null,null,"mergeFile",
-N,c,b.getCurrentRevisionId());else{this.setShadowPages(y);if(null!=this.sync){var e=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?K:null,null,q);null==e||mxUtils.isEmptyObject(e)||D.push(e)}this.patch(D,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=g&&g()}}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(n);try{var f=this.getCurrentUser(),p=null!=f?
+this.isRealtime()?this.ownPages:this.ui.pages):null,L=this.ui.patchPages(this.ui.clonePages(x),D[0]),Q=this.ui.getHashValueForPages(L,{}),c=this.ui.getHashValueForPages(y,{});EditorUi.debug("File.mergeFile",[this],"file",[b],"ui",this.ui.pages,"shadow",x,"pages",y,"patched",L,"patches",D,"changes",K,"checksum",Q,"current",c,"valid",Q==c,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified(),"immediate",q);if(null!=Q&&Q!=c)this.checksumError(l,D,null,null,"mergeFile",
+Q,c,b.getCurrentRevisionId());else{this.setShadowPages(y);if(null!=this.sync){var e=this.sync.patchRealtime(D,DrawioFile.LAST_WRITE_WINS?K:null,null,q);null==e||mxUtils.isEmptyObject(e)||D.push(e)}this.patch(D,DrawioFile.LAST_WRITE_WINS?K:null);this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();null!=g&&g()}}catch(n){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(n);try{var f=this.getCurrentUser(),p=null!=f?
f.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),p,n)}catch(t){}}}else throw Error(mxResources.get("notADiagramFile"));}catch(n){null!=l&&l(n)}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var g=new mxCodec(mxUtils.createXmlDocument()),l=g.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var q=g.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(q=this.ui.anonymizeNode(q,!0));q.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,q,!0);l.appendChild(q)}return mxUtils.getPrettyXml(l)};
DrawioFile.prototype.compressReportData=function(b,g,l){g=null!=g?g:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>g&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,g,l,d,q,y,x,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var J=this.getCurrentUser(),K=null!=J?J.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",N=JSON.stringify(g).length,c=null;if(null!=g&&1E3>N){for(b=0;b<g.length;b++)this.ui.anonymizePatch(g[b]);c=JSON.stringify(g);c=null!=c&&1E3>c.length?Graph.compress(c):
-null}this.getLatestVersion(mxUtils.bind(this,function(e){try{var f=null!=c?"report":"error",p=this.ui.getHashValueForPages(e.getShadowPages()),n="unknown",t="unknown",z="unknown";try{var F=null!=e.initialData&&0<e.initialData.length?mxUtils.parseXml(e.initialData).documentElement:null;null!=F&&(null!=F.getAttribute("version")&&(n=F.getAttribute("version")),null!=F.getAttribute("agent")&&(t=F.getAttribute("agent")),null!=F.getAttribute("type")&&(z=F.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
-f+" in "+q,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+N+"-patches_"+g.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=y?"-expected_"+y:"")+(null!=x?"-current_"+x:"")+(null!=D?"-rev_"+this.ui.hashValue(D):"")+(null!=p?"-latest_"+p:"")+"-latestRev_"+this.ui.hashValue(e.getCurrentRevisionId())+("-latestVersion_"+n)+("-latestAgent_"+t)+("-latestType_"+z));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:q,label:"user_"+
-K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+N+"-patches_"+g.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(e){}};
-DrawioFile.prototype.sendErrorReport=function(b,g,l,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),y=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),D=null!=x?this.ui.hashValue(x.id):"unknown",J=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");x="xml";0<L&&(x=K.substring(L));var N=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.checksumError=function(b,g,l,d,q,y,x,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{var J=this.getCurrentUser(),K=null!=J?J.id:"unknown",L=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",Q=JSON.stringify(g).length,c=null;if(null!=g&&1E3>Q){for(b=0;b<g.length;b++)this.ui.anonymizePatch(g[b]);c=JSON.stringify(g);c=null!=c&&1E3>c.length?Graph.compress(c):
+null}this.getLatestVersion(mxUtils.bind(this,function(e){try{var f=null!=c?"report":"error",p=this.ui.getHashValueForPages(e.getShadowPages()),n="unknown",t="unknown",z="unknown";try{var E=null!=e.initialData&&0<e.initialData.length?mxUtils.parseXml(e.initialData).documentElement:null;null!=E&&(null!=E.getAttribute("version")&&(n=E.getAttribute("version")),null!=E.getAttribute("agent")&&(t=E.getAttribute("agent")),null!=E.getAttribute("type")&&(z=E.getAttribute("type")))}catch(C){}EditorUi.logError("Checksum "+
+f+" in "+q,null,this.getMode()+"."+L,"user_"+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+g.length+(null!=c?"-json_"+c:"")+"-size_"+this.getSize()+(null!=y?"-expected_"+y:"")+(null!=x?"-current_"+x:"")+(null!=D?"-rev_"+this.ui.hashValue(D):"")+(null!=p?"-latest_"+p:"")+"-latestRev_"+this.ui.hashValue(e.getCurrentRevisionId())+("-latestVersion_"+n)+("-latestAgent_"+t)+("-latestType_"+z));EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+L,action:q,label:"user_"+
+K+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+Q+"-patches_"+g.length+"-size_"+this.getSize()})}catch(C){}}),function(){})}catch(e){}};
+DrawioFile.prototype.sendErrorReport=function(b,g,l,d){try{var q=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),y=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),x=this.getCurrentUser(),D=null!=x?this.ui.hashValue(x.id):"unknown",J=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",K=this.getTitle(),L=K.lastIndexOf(".");x="xml";0<L&&(x=K.substring(L));var Q=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+x+")\nUser="+D+J+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=g?"\n\n"+g:
-"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+N+"\n\nShadow:\n"+q+"\n\nData:\n"+y,d)}catch(c){}};
+"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+Q+"\n\nShadow:\n"+q+"\n\nData:\n"+y,d)}catch(c){}};
DrawioFile.prototype.reloadFile=function(b,g){try{this.stats.fileReloaded++;var l=this.ui.diffPages(this.getShadowPages(),this.isRealtime()?this.ownPages:this.ui.pages),d=this.ui.editor.graph,q=d.getSelectionCells(),y=d.getViewState(),x=this.ui.currentPage;this.getLatestVersion(mxUtils.bind(this,function(D){EditorUi.debug("DrawioFile.reloadFile",[this],"modified",this.isModified(),"rev",this.getCurrentRevisionId(),"changes",[l],"viewState",[y],"latestFile",D);null!=D?(this.ui.replaceFileData(D.getData(),
[l]),this.ui.restoreViewState(x,y,q),this.setDescriptor(D.getDescriptor()),this.descriptorChanged(),null!=b&&b()):(this.ui.spinner.stop(),this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){var J=this.ui.getCurrentFile();null!=J&&(J.stats=this.stats,J.patch([l]),J.fileChanged());this.ui.restoreViewState(x,y,q);null!=b&&b()}else null!=g&&g(this.ui.fileLoadedError)}),!0))}),g)}catch(D){null!=g&&g(D)}};
DrawioFile.prototype.copyFile=function(b,g){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var g=!0;if(null!=b)for(var l=0;l<b.length&&g;l++)g=g&&mxUtils.isEmptyObject(b[l]);return g};
-DrawioFile.prototype.patch=function(b,g,l,d){if(null!=b){var q=this.ui.editor.undoManager,y=q.history.slice(),x=q.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var J=this.changeListenerEnabled;this.changeListenerEnabled=l;var K=D.foldingEnabled,L=D.mathEnabled,N=D.cellRenderer.redraw;D.cellRenderer.redraw=function(t){t.view.graph.isEditing(t.cell)&&(t.view.graph.scrollCellToVisible(t.cell),t.view.graph.cellEditor.resize());N.apply(this,arguments)};D.model.beginUpdate();
+DrawioFile.prototype.patch=function(b,g,l,d){if(null!=b){var q=this.ui.editor.undoManager,y=q.history.slice(),x=q.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var J=this.changeListenerEnabled;this.changeListenerEnabled=l;var K=D.foldingEnabled,L=D.mathEnabled,Q=D.cellRenderer.redraw;D.cellRenderer.redraw=function(t){t.view.graph.isEditing(t.cell)&&(t.view.graph.scrollCellToVisible(t.cell),t.view.graph.cellEditor.resize());Q.apply(this,arguments)};D.model.beginUpdate();
try{if(l){for(var c=this.ui.pages.slice(),e=this.ui.currentPage,f=this.ui.applyPatches(this.ui.pages,b,!0,g,this.isModified()),p=0;p<f.length;p++){var n=mxUtils.indexOf(this.ui.pages,f[p]);0>n?this.ui.insertPage(f[p],Math.min(p,this.ui.pages.length)):this.ui.movePage(n,p)}for(p=0;p<c.length;p++)0>mxUtils.indexOf(f,c[p])&&this.ui.removePage(c[p]);0<=mxUtils.indexOf(this.ui.pages,e)&&this.ui.selectPage(e,!0)}else this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,g,this.isModified());0==this.ui.pages.length&&
-this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);D.checkDefaultParent()}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=N;this.changeListenerEnabled=J;l||(q.history=y,q.indexOfNextAdd=x,q.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=D.mathEnabled?(this.ui.editor.updateGraphComponents(),D.refresh()):(K!=D.foldingEnabled?
+this.ui.pages.push(this.ui.createPage());0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0);D.checkDefaultParent()}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=Q;this.changeListenerEnabled=J;l||(q.history=y,q.indexOfNextAdd=x,q.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)L!=D.mathEnabled?(this.ui.editor.updateGraphComponents(),D.refresh()):(K!=D.foldingEnabled?
D.view.revalidate():D.view.validate(),D.sizeDidChange());null!=this.sync&&this.isRealtime()&&!d&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",g,"undoable",l)}return b};
DrawioFile.prototype.save=function(b,g,l,d,q,y){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",q,"manual",y,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!q&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=g&&g();else if(null!=l)l({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(x){if(null!=l)l(x);else throw x;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var g=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=g&&(g.viewState=this.ui.editor.graph.getViewState(),g.needsUpdate=!0)}g=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return g};
@@ -12246,10 +12249,10 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,g){b([])};DrawioFile.prototype.addComment=function(b,g,l){g(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,g){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,g)};LocalFile=function(b,g,l,d,q,y,x){DrawioFile.call(this,b,g);this.title=l;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=q;this.desc=y;this.editable=x};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};
LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.isEditable=function(){return DrawioFile.prototype.isEditable.apply(this,arguments)&&(null==this.editable||this.editable)};LocalFile.prototype.setEditable=function(b){this.editable=b;this.descriptorChanged()};LocalFile.prototype.save=function(b,g,l,d,q){this.saveAs(this.title,g,l,d,q)};LocalFile.prototype.saveAs=function(b,g,l,d,q){this.saveFile(b,!1,g,l,null,d,q)};
LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};LocalFile.prototype.getLatestVersion=function(b,g){null==this.fileHandle?null!=g&&g({message:mxResources.get("cannotOpenFile")}):this.ui.loadFileSystemEntry(this.fileHandle,b,g)};
-LocalFile.prototype.saveFile=function(b,g,l,d,q,y,x){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var D=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var J=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),L=mxUtils.bind(this,function(N){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
-!0;var c=mxUtils.bind(this,function(f){this.savingFile=!1;null!=d&&d({error:f})});this.saveDraft(J);this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);x||this.desc.lastModified==p.lastModified?f.write(D?this.ui.base64ToBlob(N,"image/png"):N).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var t=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(J,t,K,c);this.removeDraft()}catch(z){c(z)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;c(p)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(N,b,D?"image/png":"text/xml",D);else if(N.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf(".");e=0<e?b.substring(e+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(N)+"&filename="+encodeURIComponent(b)+(D?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(N)}));K()}});D?(g=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(N){L(N)}),d,this.ui.getCurrentFile()!=this?J:null,g.scale,g.border)):L(J)};
+LocalFile.prototype.saveFile=function(b,g,l,d,q,y,x){b!=this.title&&(this.editable=this.desc=this.fileHandle=null);this.title=b;q||this.updateFileData();var D=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var J=this.getData(),K=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),L=mxUtils.bind(this,function(Q){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=
+!0;var c=mxUtils.bind(this,function(f){this.savingFile=!1;null!=d&&d({error:f})});this.saveDraft(J);this.fileHandle.createWritable().then(mxUtils.bind(this,function(f){this.fileHandle.getFile().then(mxUtils.bind(this,function(p){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[p],"conflict",this.desc.lastModified!=p.lastModified);x||this.desc.lastModified==p.lastModified?f.write(D?this.ui.base64ToBlob(Q,"image/png"):Q).then(mxUtils.bind(this,function(){f.close().then(mxUtils.bind(this,
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(n){try{var t=this.desc;this.savingFile=!1;this.desc=n;this.fileSaved(J,t,K,c);this.removeDraft()}catch(z){c(z)}}),c)}),c)}),c):(this.inConflictState=!0,c())}),mxUtils.bind(this,function(p){this.invalidFileHandle=!0;c(p)}))}),c)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(Q,b,D?"image/png":"text/xml",D);else if(Q.length<MAX_REQUEST_SIZE){var e=b.lastIndexOf(".");e=0<e?b.substring(e+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+e+"&xml="+encodeURIComponent(Q)+"&filename="+encodeURIComponent(b)+(D?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Q)}));K()}});D?(g=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(Q){L(Q)}),d,this.ui.getCurrentFile()!=this?J:null,g.scale,g.border)):L(J)};
LocalFile.prototype.rename=function(b,g,l){this.title=b;this.descriptorChanged();null!=g&&g()};LocalLibrary=function(b,g,l){LocalFile.call(this,b,g,l)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,g,l){this.saveFile(b,!1,g,l)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,g,l){DrawioFile.call(this,b,g);this.title=l;this.etag=this.getEtag(g)};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.getEtag=function(b){return this.ui.hashValue(null!=b?b:"")};StorageFile.prototype.autosaveDelay=500;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.maxRetries=5;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isSyncSupported=function(){return!0};
StorageFile.prototype.isPolling=function(){return this.isSyncSupported()};StorageFile.prototype.getPollingInterval=function(){return 1E4};StorageFile.prototype.loadDescriptor=function(b,g){this.getLatestVersionId(b,g)};StorageFile.prototype.getLatestVersionId=function(b,g){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(l){b(this.getEtag(l))}),g)};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};
StorageFile.prototype.getTitle=function(){return this.title};StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.getDescriptor=function(){return this.etag};StorageFile.prototype.setDescriptor=function(b){this.etag=b};StorageFile.prototype.getDescriptorEtag=function(b){return b};StorageFile.prototype.save=function(b,g,l){this.saveAs(this.getTitle(),g,l)};
@@ -12268,15 +12271,15 @@ StorageFile.listFiles=function(b,g,l,d){b.getDatabaseItems(function(q){var y=[];
StorageLibrary.prototype.isRenamable=function(b,g,l){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,g,l){DrawioFile.call(this,b,g);this.title=l;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,g,l){RemoteFile.call(this,b,g,l.title);this.libObj=l};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,g,l){};
RemoteLibrary.prototype.saveAs=function(b,g,l){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,g,l){StorageFile.call(this,b,g,l);b=l;g=b.lastIndexOf("/");0<=g&&(b=b.substring(g+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,g,l){return!1};UrlLibrary.prototype.saveAs=function(b,g,l){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,g,l){DrawioFile.call(this,b,g);this.desc=l||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,g,l){function d(N,c,e,f,p,n){function t(){mxEvent.addListener(z,"click",null!=n?n:function(){e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()}),function(U){b.spinner.stop();b.handleError(U)}):
-(b.setMode(e,!0),g())})}D++;++x>l&&(mxUtils.br(J),x=1);var z=document.createElement("a");z.style.overflow="hidden";z.style.display="inline-block";z.className="geBaseButton";z.style.boxSizing="border-box";z.style.fontSize="11px";z.style.position="relative";z.style.margin="4px";z.style.marginTop="8px";z.style.marginBottom="0px";z.style.padding="8px 10px 8px 10px";z.style.width="88px";z.style.height="100px";z.style.whiteSpace="nowrap";z.setAttribute("title",c);var F=document.createElement("div");F.style.textOverflow=
-"ellipsis";F.style.overflow="hidden";F.style.position="absolute";F.style.bottom="8px";F.style.left="0px";F.style.right="0px";mxUtils.write(F,c);z.appendChild(F);if(null!=N){var C=document.createElement("img");C.setAttribute("src",N);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";z.appendChild(C)}else F.style.paddingTop="5px",F.style.whiteSpace="normal",mxClient.IS_IOS?(z.style.padding="0px 10px 20px 10px",z.style.top=
-"6px"):mxClient.IS_FF&&(F.style.paddingTop="0px",F.style.marginTop="-2px");if(null!=p)for(N=0;N<p.length;N++)mxUtils.br(F),mxUtils.write(F,p[N]);if(null!=f&&null==b[f]){C.style.visibility="hidden";mxUtils.setOpacity(F,10);var E=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});E.spin(z);var R=window.setTimeout(function(){null==b[f]&&(E.stop(),z.style.display="none")},3E4);b.addListener("clientLoaded",
-mxUtils.bind(this,function(U,O){null!=b[f]&&O.getProperty("client")==b[f]&&(window.clearTimeout(R),mxUtils.setOpacity(F,100),C.style.visibility="",E.stop(),t(),"drive"==f&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else t();J.appendChild(z)}l=null!=l?l:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";
+var StorageDialog=function(b,g,l){function d(Q,c,e,f,p,n){function t(){mxEvent.addListener(z,"click",null!=n?n:function(){e==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()})):e==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(e,!0);g()}),function(U){b.spinner.stop();b.handleError(U)}):
+(b.setMode(e,!0),g())})}D++;++x>l&&(mxUtils.br(J),x=1);var z=document.createElement("a");z.style.overflow="hidden";z.style.display="inline-block";z.className="geBaseButton";z.style.boxSizing="border-box";z.style.fontSize="11px";z.style.position="relative";z.style.margin="4px";z.style.marginTop="8px";z.style.marginBottom="0px";z.style.padding="8px 10px 8px 10px";z.style.width="88px";z.style.height="100px";z.style.whiteSpace="nowrap";z.setAttribute("title",c);var E=document.createElement("div");E.style.textOverflow=
+"ellipsis";E.style.overflow="hidden";E.style.position="absolute";E.style.bottom="8px";E.style.left="0px";E.style.right="0px";mxUtils.write(E,c);z.appendChild(E);if(null!=Q){var C=document.createElement("img");C.setAttribute("src",Q);C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="60px";C.style.height="60px";C.style.paddingBottom="6px";z.appendChild(C)}else E.style.paddingTop="5px",E.style.whiteSpace="normal",mxClient.IS_IOS?(z.style.padding="0px 10px 20px 10px",z.style.top=
+"6px"):mxClient.IS_FF&&(E.style.paddingTop="0px",E.style.marginTop="-2px");if(null!=p)for(Q=0;Q<p.length;Q++)mxUtils.br(E),mxUtils.write(E,p[Q]);if(null!=f&&null==b[f]){C.style.visibility="hidden";mxUtils.setOpacity(E,10);var F=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});F.spin(z);var R=window.setTimeout(function(){null==b[f]&&(F.stop(),z.style.display="none")},3E4);b.addListener("clientLoaded",
+mxUtils.bind(this,function(U,O){null!=b[f]&&O.getProperty("client")==b[f]&&(window.clearTimeout(R),mxUtils.setOpacity(E,100),C.style.visibility="",F.stop(),t(),"drive"==f&&null!=K.parentNode&&K.parentNode.removeChild(K))}))}else t();J.appendChild(z)}l=null!=l?l:2;var q=document.createElement("div");q.style.textAlign="center";q.style.whiteSpace="nowrap";q.style.paddingTop="0px";q.style.paddingBottom="20px";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.borderWidth="1px 0px 1px 0px";
y.style.padding="10px 0px 20px 0px";var x=0,D=0,J=document.createElement("div");J.style.paddingTop="2px";y.appendChild(J);var K=document.createElement("p"),L=document.createElement("p");L.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(L,mxResources.get("saveDiagramsTo")+":");q.appendChild(L);q.appendChild(y);x=0;"function"===typeof window.DriveClient&&d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===
typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");
null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");y=document.createElement("span");y.style.position="absolute";y.style.cursor="pointer";y.style.bottom="27px";y.style.color="gray";y.style.userSelect="none";y.style.textAlign="center";y.style.left="50%";mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,0)");mxUtils.write(y,mxResources.get("decideLater"));
-q.appendChild(y);mxEvent.addListener(y,"click",function(){b.hideDialog();var N=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=N});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(K.style.padding="7px",K.style.fontSize="9pt",K.style.marginTop="-14px",K.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
+q.appendChild(y);mxEvent.addListener(y,"click",function(){b.hideDialog();var Q=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=Q});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(K.style.padding="7px",K.style.fontSize="9pt",K.style.marginTop="-14px",K.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://www.drawio.com/doc/faq/google-drive-connection-problems" target="_blank"><img border="0" src="'+
mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",q.appendChild(K))},5E3);this.container=q},SplashDialog=function(b){var g=document.createElement("div");g.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var l=b.addLanguageMenu(g,!1,"28px");null!=l&&(l.style.bottom="24px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width=
"32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var q=document.createElement("div");q.style.margin="8px 0px 0px 0px";q.style.padding="18px 0px 24px 0px";l="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",l=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+"/dropbox-logo.svg",l=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",l=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?
(d.src=IMAGE_PATH+"/github-logo.svg",l=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",l=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",l=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",l=mxResources.get("trello")):(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",q.style.paddingBottom="10px",q.style.paddingTop="30px",l=mxResources.get("device"));var y=document.createElement("button");
@@ -12285,106 +12288,106 @@ y.className="geBigButton";y.style.marginBottom="8px";y.style.fontSize="18px";y.s
mxResources.get("changeStorage"));mxEvent.addListener(l,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});g.appendChild(l)}mxUtils.write(y,mxResources.get("createNewDiagram"));mxEvent.addListener(y,"click",function(){b.hideDialog();b.actions.get("new").funct()});q.appendChild(y);mxUtils.br(q);y=document.createElement("button");y.className="geBigButton";y.style.marginBottom="22px";y.style.fontSize="18px";y.style.padding="10px";y.style.width="340px";mxUtils.write(y,
mxResources.get("openExistingDiagram"));mxEvent.addListener(y,"click",function(){b.actions.get("open").funct()});q.appendChild(y);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&
mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(e){y.style.marginBottom="24px";var f=document.createElement("a");f.style.display="inline-block";f.style.color="gray";f.style.cursor="pointer";f.style.marginTop="6px";mxUtils.write(f,mxResources.get("signOut"));y.style.marginBottom="16px";q.style.paddingBottom="18px";mxEvent.addListener(f,"click",function(){b.confirm(mxResources.get("areYouSure"),function(){e()})});q.appendChild(f)},b.mode==App.MODE_GOOGLE&&
-null!=b.drive){var N=b.drive.getUsersList();if(0<N.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");y.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(l=0;l<N.length;l++)x=document.createElement("option"),mxUtils.write(x,N[l].displayName),x.value=l,c.appendChild(x),x=document.createElement("option"),x.innerHTML="&nbsp;&nbsp;&nbsp;",
-mxUtils.write(x,"<"+N[l].email+">"),x.setAttribute("disabled","disabled"),c.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=N.length;c.appendChild(x);mxEvent.addListener(c,"change",function(){var e=c.value,f=N.length!=e;f&&b.drive.setUser(N[e]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});q.appendChild(c)}else l(function(){b.drive.logout()})}else b.mode!=
+null!=b.drive){var Q=b.drive.getUsersList();if(0<Q.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");y.style.marginBottom="16px";q.style.paddingBottom="18px";q.appendChild(d);var c=document.createElement("select");c.style.marginLeft="4px";c.style.width="140px";for(l=0;l<Q.length;l++)x=document.createElement("option"),mxUtils.write(x,Q[l].displayName),x.value=l,c.appendChild(x),x=document.createElement("option"),x.innerHTML="&nbsp;&nbsp;&nbsp;",
+mxUtils.write(x,"<"+Q[l].email+">"),x.setAttribute("disabled","disabled"),c.appendChild(x);x=document.createElement("option");mxUtils.write(x,mxResources.get("addAccount"));x.value=Q.length;c.appendChild(x);mxEvent.addListener(c,"change",function(){var e=c.value,f=Q.length!=e;f&&b.drive.setUser(Q[e]);b.drive.authorize(f,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(p){b.handleError(p,null,function(){b.hideDialog();b.showSplash()})},!0)});q.appendChild(c)}else l(function(){b.drive.logout()})}else b.mode!=
App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?l(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?l(function(){b.gitLab.logout();var e=document.createElement("form");e.setAttribute("method","post");e.setAttribute("action",DRAWIO_GITLAB_URL+"/users/sign_out");e.setAttribute("target","_blank");document.body.appendChild(e);e.submit();e.parentNode.removeChild(e)}):b.mode==App.MODE_TRELLO&&
null!=b.trello?b.trello.isAuthorized()&&l(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&null!=b.dropbox&&l(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):l(function(){b.oneDrive.logout()});g.appendChild(q);this.container=g},EmbedDialog=function(b,g,l,d,q,y,x,D,J){x=null!=x?x:"Check out the diagram I made using @drawio";d=document.createElement("div");var K=/^https?:\/\//.test(g)||/^mailto:\/\//.test(g);null!=y?mxUtils.write(d,y):mxUtils.write(d,mxResources.get(5E5>
g.length?K?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);y=document.createElement("div");y.style.position="absolute";y.style.top="30px";y.style.right="30px";y.style.color="gray";mxUtils.write(y,b.formatFileSize(g.length));d.appendChild(y);var L=document.createElement("textarea");L.setAttribute("autocomplete","off");L.setAttribute("autocorrect","off");L.setAttribute("autocapitalize","off");L.setAttribute("spellcheck","false");L.style.fontFamily="monospace";L.style.wordBreak="break-all";L.style.marginTop=
"10px";L.style.resize="none";L.style.height="150px";L.style.width="440px";L.style.border="1px solid gray";L.value=mxResources.get("updatingDocument");d.appendChild(L);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>g.length?(L.value=g,L.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null)):(L.setAttribute("readonly","true"),L.value=mxResources.get("tooLargeUseDownload"))},0)};y=document.createElement("div");y.style.position=
-"absolute";y.style.bottom="36px";y.style.right="32px";var N=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(N=mxUtils.button(null!=D?D:mxResources.get(5E5>g.length?"preview":"openInNewWindow"),function(){var e=5E5>g.length?L.value:g;if(null!=q)q(e);else if(K)try{var f=b.openLink(e);null!=f&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=
+"absolute";y.style.bottom="36px";y.style.right="32px";var Q=null;!EmbedDialog.showPreviewOption||mxIsElectron||mxClient.IS_CHROMEAPP&&!K||navigator.standalone||!(K||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(Q=mxUtils.button(null!=D?D:mxResources.get(5E5>g.length?"preview":"openInNewWindow"),function(){var e=5E5>g.length?L.value:g;if(null!=q)q(e);else if(K)try{var f=b.openLink(e);null!=f&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=f&&null!=
f.location.href&&f.location.href.substring(0,8)!=e.substring(0,8)&&(f.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(n){}}),l||500)}catch(n){b.handleError({message:n.message||mxResources.get("drawingTooLarge")})}else{var p=window.open();p=null!=p?p.document:null;null!=p?(p.writeln("<html><head><title>"+mxUtils.htmlEntities(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+("<iframe"==g.substring(0,7)?g:mxUtils.htmlEntities(g))+"</body></html>"),
-p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),N.className="geBtn",y.appendChild(N));if(!K||7500<g.length)D=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=J?J:"embed.txt","txt",g,"text/plain")}),D.className="geBtn",y.appendChild(D);if(K&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>g.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(L.value);
+p.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),Q.className="geBtn",y.appendChild(Q));if(!K||7500<g.length)D=mxUtils.button(mxResources.get(mxIsElectron?"save":"download"),function(){b.hideDialog();b.saveData(null!=J?J:"embed.txt","txt",g,"text/plain")}),D.className="geBtn",y.appendChild(D);if(K&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>g.length){var c=mxUtils.button("",function(){try{var e="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(L.value);
b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}});D=document.createElement("img");D.setAttribute("src",Editor.facebookImage);D.setAttribute("width","18");D.setAttribute("height","18");D.setAttribute("border","0");c.appendChild(D);c.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");c.style.verticalAlign="bottom";c.style.paddingTop="4px";c.style.minWidth="46px";c.className="geBtn";y.appendChild(c)}7168>g.length&&(c=
mxUtils.button("",function(){try{var e="https://twitter.com/intent/tweet?text="+encodeURIComponent(x)+"&url="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.setAttribute("src",Editor.tweetImage),D.setAttribute("width","18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",c.appendChild(D),c.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+
" max)"),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c))}!b.isOffline()&&5E5>g.length&&(c=mxUtils.button("",function(){try{var e="mailto:?subject="+encodeURIComponent(J||b.defaultFilename)+"&body="+encodeURIComponent(L.value);b.openLink(e)}catch(f){b.handleError({message:f.message||mxResources.get("drawingTooLarge")})}}),D=document.createElement("img"),D.className="geAdaptiveAsset",D.setAttribute("src",Editor.mailImage),D.setAttribute("width",
"18"),D.setAttribute("height","18"),D.setAttribute("border","0"),D.style.marginBottom="5px",c.appendChild(D),c.style.verticalAlign="bottom",c.style.paddingTop="4px",c.style.minWidth="46px",c.className="geBtn",y.appendChild(c));D=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.appendChild(D);c=mxUtils.button(mxResources.get("copy"),function(){L.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");
-b.alert(mxResources.get("copiedToClipboard"))});5E5>g.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(y.appendChild(c),c.className="geBtn gePrimaryBtn",D.className="geBtn"):null!=N&&(y.appendChild(N),D.className="geBtn",N.className="geBtn gePrimaryBtn");d.appendChild(y);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,g){function l(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var O="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=U&&(O+="&title="+encodeURIComponent(U));0<E.length&&(O+="&s="+E);""!=e.value&&"0"!=e.value&&(O+="&border="+e.value);""!=N.value&&(O+="&height="+N.value);O+="&pan="+(f.checked?"1":"0");O+="&zoom="+(p.checked?"1":"0");O+="&fit="+(F.checked?"1":"0");
+b.alert(mxResources.get("copiedToClipboard"))});5E5>g.length?mxClient.IS_SF||null!=document.documentMode?D.className="geBtn gePrimaryBtn":(y.appendChild(c),c.className="geBtn gePrimaryBtn",D.className="geBtn"):null!=Q&&(y.appendChild(Q),D.className="geBtn",Q.className="geBtn gePrimaryBtn");d.appendChild(y);this.container=d};EmbedDialog.showPreviewOption=!0;
+var GoogleSitesDialog=function(b,g){function l(){var U=null!=R&&null!=R.getTitle()?R.getTitle():this.defaultFilename;if(C.checked&&""!=c.value){var O="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(c.value));null!=U&&(O+="&title="+encodeURIComponent(U));0<F.length&&(O+="&s="+F);""!=e.value&&"0"!=e.value&&(O+="&border="+e.value);""!=Q.value&&(O+="&height="+Q.value);O+="&pan="+(f.checked?"1":"0");O+="&zoom="+(p.checked?"1":"0");O+="&fit="+(E.checked?"1":"0");
O+="&resize="+(z.checked?"1":"0");O+="&x0="+Number(L.value);O+="&y0="+J;q.mathEnabled&&(O+="&math=1");t.checked?O+="&edit=_blank":n.checked&&(O+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));K.value=O}else R.constructor==DriveFile||R.constructor==DropboxFile?(O="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=c.value?O+=encodeURIComponent(mxUtils.htmlEntities(c.value))+"&type=3":(O+=R.getHash().substring(1),O=R.constructor==DropboxFile?O+"&type=2":O+"&type=1"),null!=
-U&&(O+="&title="+encodeURIComponent(U)),""!=N.value&&(U=parseInt(N.value)+parseInt(L.value),O+="&height="+U),K.value=O):K.value=""}var d=document.createElement("div"),q=b.editor.graph,y=q.getGraphBounds(),x=q.view.scale,D=Math.floor(y.x/x-q.view.translate.x),J=Math.floor(y.y/x-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.marginTop="2px";K.style.width="410px";
-d.appendChild(K);mxUtils.br(d);this.init=function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var L=document.createElement("input");L.setAttribute("type","text");L.setAttribute("size","4");L.style.marginRight="16px";L.style.marginLeft="4px";L.value=D;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text");
-N.setAttribute("size","4");N.style.marginLeft="4px";N.value=Math.ceil(y.height/x);d.appendChild(N);mxUtils.br(d);y=document.createElement("hr");y.setAttribute("size","1");y.style.marginBottom="16px";y.style.marginTop="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=g||"";d.appendChild(c);
+U&&(O+="&title="+encodeURIComponent(U)),""!=Q.value&&(U=parseInt(Q.value)+parseInt(L.value),O+="&height="+U),K.value=O):K.value=""}var d=document.createElement("div"),q=b.editor.graph,y=q.getGraphBounds(),x=q.view.scale,D=Math.floor(y.x/x-q.view.translate.x),J=Math.floor(y.y/x-q.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var K=document.createElement("input");K.setAttribute("type","text");K.style.marginBottom="8px";K.style.marginTop="2px";K.style.width="410px";
+d.appendChild(K);mxUtils.br(d);this.init=function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var L=document.createElement("input");L.setAttribute("type","text");L.setAttribute("size","4");L.style.marginRight="16px";L.style.marginLeft="4px";L.value=D;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var Q=document.createElement("input");Q.setAttribute("type","text");
+Q.setAttribute("size","4");Q.style.marginLeft="4px";Q.value=Math.ceil(y.height/x);d.appendChild(Q);mxUtils.br(d);y=document.createElement("hr");y.setAttribute("size","1");y.style.marginBottom="16px";y.style.marginTop="16px";d.appendChild(y);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var c=document.createElement("input");c.setAttribute("type","text");c.setAttribute("size","28");c.style.marginBottom="8px";c.style.marginTop="2px";c.style.width="410px";c.value=g||"";d.appendChild(c);
mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var e=document.createElement("input");e.setAttribute("type","text");e.setAttribute("size","3");e.style.marginBottom="8px";e.style.marginLeft="4px";e.value="0";d.appendChild(e);mxUtils.br(d);var f=document.createElement("input");f.setAttribute("type","checkbox");f.setAttribute("checked","checked");f.defaultChecked=!0;f.style.marginLeft="16px";d.appendChild(f);mxUtils.write(d,mxResources.get("pan")+" ");var p=document.createElement("input");
p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="8px";d.appendChild(p);mxUtils.write(d,mxResources.get("zoom")+" ");var n=document.createElement("input");n.setAttribute("type","checkbox");n.style.marginLeft="8px";n.setAttribute("title",window.location.href);d.appendChild(n);mxUtils.write(d,mxResources.get("edit")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.style.marginLeft="8px";d.appendChild(t);mxUtils.write(d,
-mxResources.get("asNew")+" ");mxUtils.br(d);var z=document.createElement("input");z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="16px";d.appendChild(z);mxUtils.write(d,mxResources.get("resize")+" ");var F=document.createElement("input");F.setAttribute("type","checkbox");F.style.marginLeft="8px";d.appendChild(F);mxUtils.write(d,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
-"8px";d.appendChild(C);mxUtils.write(d,mxResources.get("embed")+" ");var E=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(f,"change",l);mxEvent.addListener(p,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(F,"change",l);mxEvent.addListener(n,"change",l);mxEvent.addListener(t,"change",l);mxEvent.addListener(C,"change",l);mxEvent.addListener(N,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(e,"change",l);mxEvent.addListener(c,"change",l);l();
+mxResources.get("asNew")+" ");mxUtils.br(d);var z=document.createElement("input");z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="16px";d.appendChild(z);mxUtils.write(d,mxResources.get("resize")+" ");var E=document.createElement("input");E.setAttribute("type","checkbox");E.style.marginLeft="8px";d.appendChild(E);mxUtils.write(d,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft=
+"8px";d.appendChild(C);mxUtils.write(d,mxResources.get("embed")+" ");var F=b.getBasenames().join(";"),R=b.getCurrentFile();mxEvent.addListener(f,"change",l);mxEvent.addListener(p,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(E,"change",l);mxEvent.addListener(n,"change",l);mxEvent.addListener(t,"change",l);mxEvent.addListener(C,"change",l);mxEvent.addListener(Q,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(e,"change",l);mxEvent.addListener(c,"change",l);l();
mxEvent.addListener(K,"click",function(){K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign="right";y=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});y.className="geBtn gePrimaryBtn";g.appendChild(y);d.appendChild(g);this.container=d},CreateGraphDialog=function(b,g,l){var d=document.createElement("div");d.style.textAlign="right";this.init=
function(){var q=document.createElement("div");q.style.position="relative";q.style.border="1px solid gray";q.style.boxSizing="border-box";q.style.width="100%";q.style.height="360px";q.style.overflow="hidden";q.style.marginBottom="16px";mxEvent.disableContextMenu(q);d.appendChild(q);var y=new Graph(q);y.setCellsCloneable(!0);y.setPanning(!0);y.setAllowDanglingEdges(!1);y.connectionHandler.select=!1;y.view.setTranslate(20,20);y.border=20;y.panningHandler.useLeftButtonForPanning=!0;mxClient.IS_SVG&&
null!=y.view.getDrawPane()&&(q=y.view.getDrawPane().ownerSVGElement,null!=q&&(q.style.position="absolute"));var x="curved=1;";y.cellRenderer.installCellOverlayListeners=function(f,p,n){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(n.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(t){p.fireEvent(new mxEventObject("pointerdown","event",t,"state",f))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(n.node,"touchstart",function(t){p.fireEvent(new mxEventObject("pointerdown",
"event",t,"state",f))})};y.getAllConnectionConstraints=function(){return null};y.connectionHandler.marker.highlight.keepOnTop=!1;y.connectionHandler.createEdgeState=function(f){f=y.createEdge(null,null,null,null,null,x);return new mxCellState(this.graph.view,f,this.graph.getCellStyle(f))};var D=y.getDefaultParent(),J=mxUtils.bind(this,function(f){var p=new mxCellOverlay(this.connectImage,"Add outgoing");p.cursor="hand";p.addListener(mxEvent.CLICK,function(n,t){y.connectionHandler.reset();y.clearSelection();
-var z=y.getCellGeometry(f),F;N(function(){F=y.insertVertex(D,null,"Entry",z.x,z.y,80,30,"rounded=1;");J(F);y.view.refresh(F);y.insertEdge(D,null,"",f,F,x)},function(){y.scrollCellToVisible(F)})});p.addListener("pointerdown",function(n,t){n=t.getProperty("event");t=t.getProperty("state");y.popupMenuHandler.hideMenu();y.stopEditing(!1);var z=mxUtils.convertPoint(y.container,mxEvent.getClientX(n),mxEvent.getClientY(n));y.connectionHandler.start(t,z.x,z.y);y.isMouseDown=!0;y.isMouseTrigger=mxEvent.isMouseEvent(n);
+var z=y.getCellGeometry(f),E;Q(function(){E=y.insertVertex(D,null,"Entry",z.x,z.y,80,30,"rounded=1;");J(E);y.view.refresh(E);y.insertEdge(D,null,"",f,E,x)},function(){y.scrollCellToVisible(E)})});p.addListener("pointerdown",function(n,t){n=t.getProperty("event");t=t.getProperty("state");y.popupMenuHandler.hideMenu();y.stopEditing(!1);var z=mxUtils.convertPoint(y.container,mxEvent.getClientX(n),mxEvent.getClientY(n));y.connectionHandler.start(t,z.x,z.y);y.isMouseDown=!0;y.isMouseTrigger=mxEvent.isMouseEvent(n);
mxEvent.consume(n)});y.addCellOverlay(f,p)});y.getModel().beginUpdate();try{var K=y.insertVertex(D,null,"Start",0,0,80,30,"ellipse");J(K)}finally{y.getModel().endUpdate()}if("horizontalTree"==l){var L=new mxCompactTreeLayout(y);L.edgeRouting=!1;L.levelDistance=30;L.sortEdges=!0;x="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(L=new mxCompactTreeLayout(y,!1),L.edgeRouting=!1,L.levelDistance=30,L.sortEdges=!0,x="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(L=new mxRadialTreeLayout(y,
-!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_NORTH):"horizontalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_WEST):"circle"==l?L=new mxCircleLayout(y):(L=new mxFastOrganicLayout(y,!1),L.forceConstant=80);if(null!=L){var N=function(f,p){y.getModel().beginUpdate();try{null!=f&&f(),L.execute(y.getDefaultParent(),K)}catch(n){throw n;}finally{f=new mxMorphing(y),f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){y.getModel().endUpdate();
-null!=p&&p()})),f.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(f,p,n,t,z){c.apply(this,arguments);N()};y.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);N()};y.connectionHandler.addListener(mxEvent.CONNECT,function(){N()})}q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&d.appendChild(q);var e=mxUtils.button(mxResources.get("insert"),
+!1),L.edgeRouting=!1,L.levelDistance=80):"verticalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_NORTH):"horizontalFlow"==l?L=new mxHierarchicalLayout(y,mxConstants.DIRECTION_WEST):"circle"==l?L=new mxCircleLayout(y):(L=new mxFastOrganicLayout(y,!1),L.forceConstant=80);if(null!=L){var Q=function(f,p){y.getModel().beginUpdate();try{null!=f&&f(),L.execute(y.getDefaultParent(),K)}catch(n){throw n;}finally{f=new mxMorphing(y),f.addListener(mxEvent.DONE,mxUtils.bind(this,function(){y.getModel().endUpdate();
+null!=p&&p()})),f.startAnimation()}},c=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(f,p,n,t,z){c.apply(this,arguments);Q()};y.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);Q()};y.connectionHandler.addListener(mxEvent.CONNECT,function(){Q()})}q=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});q.className="geBtn";b.editor.cancelFirst&&d.appendChild(q);var e=mxUtils.button(mxResources.get("insert"),
function(f){y.clearCellOverlays();var p=y.getModel().getChildren(y.getDefaultParent());f=mxEvent.isAltDown(f)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(y.getBoundingBoxFromGeometry(p,!0));p=b.editor.graph.importCells(p,f.x,f.y);f=b.editor.graph.view;var n=f.getBounds(p);null!=n&&(n.x-=f.translate.x,n.y-=f.translate.y,b.editor.graph.scrollRectToVisible(n),b.editor.graph.setSelectionCells(p));b.hideDialog()});d.appendChild(e);e.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
d.appendChild(q);this.graph=y};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,g,l,d,q){function y(){null==m||m==mxConstants.NONE?(Q.style.display="none",U.checked=!1):(Q.style.backgroundColor=m,Q.style.display="",U.checked=!0)}var x=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var J=document.createElement("h2");mxUtils.write(J,mxResources.get("background"));J.style.marginTop="0px";D.appendChild(J);var K=null!=l&&null!=l.originalSrc;J=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";
-L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.width="360px";c.value=K||null==l?"":l.src;var e=document.createElement("select");
-e.style.width="360px";if(null!=b.pages)for(var f=0;f<b.pages.length;f++){var p=document.createElement("option");mxUtils.write(p,b.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+b.pages[f].getId());b.pages[f]==b.currentPage&&p.setAttribute("disabled","disabled");null!=l&&l.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),J=!0);e.appendChild(p)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",N.style.display=
-"none",e.style.display="none");var n=document.createElement("option"),t=!1,z=!1,F=function(A,B){t||null!=A&&z||(N.checked?null!=B&&B(n.selected?null:e.value):""==c.value||b.isOffline()?(E.value="",R.value="",null!=B&&B("")):(c.value=mxUtils.trim(c.value),b.loadImage(c.value,function(H){E.value=H.width;R.value=H.height;null!=B&&B(c.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));E.value="";R.value="";null!=B&&B(null)})))},C=mxUtils.bind(this,
-function(A){b.importFiles(A,0,0,b.maxBackgroundSize,function(B,H,T,k,v,G){c.value=B;F();c.focus()},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var H=0;H<B.length;H++)B[H]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?e.focus():c.focus();mxEvent.addListener(e,"focus",function(){L.removeAttribute("checked");N.setAttribute("checked","checked");N.checked=!0});mxEvent.addListener(c,"focus",function(){N.removeAttribute("checked");L.setAttribute("checked",
+var BackgroundImageDialog=function(b,g,l,d,q){function y(){null==m||m==mxConstants.NONE?(N.style.display="none",U.checked=!1):(N.style.backgroundColor=m,N.style.display="",U.checked=!0)}var x=b.editor.graph,D=document.createElement("div");D.style.whiteSpace="nowrap";var J=document.createElement("h2");mxUtils.write(J,mxResources.get("background"));J.style.marginTop="0px";D.appendChild(J);var K=null!=l&&null!=l.originalSrc;J=!1;var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";
+L.setAttribute("value","url");L.setAttribute("type","radio");L.setAttribute("name","geBackgroundImageDialogOption");var Q=document.createElement("input");Q.style.cssText="margin-right:8px;margin-bottom:8px;";Q.setAttribute("value","url");Q.setAttribute("type","radio");Q.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");c.setAttribute("type","text");c.style.marginBottom="8px";c.style.width="360px";c.value=K||null==l?"":l.src;var e=document.createElement("select");
+e.style.width="360px";if(null!=b.pages)for(var f=0;f<b.pages.length;f++){var p=document.createElement("option");mxUtils.write(p,b.pages[f].getName()||mxResources.get("pageWithNumber",[f+1]));p.setAttribute("value","data:page/id,"+b.pages[f].getId());b.pages[f]==b.currentPage&&p.setAttribute("disabled","disabled");null!=l&&l.originalSrc==p.getAttribute("value")&&(p.setAttribute("selected","selected"),J=!0);e.appendChild(p)}K||null!=b.pages&&1!=b.pages.length||(L.style.display="none",Q.style.display=
+"none",e.style.display="none");var n=document.createElement("option"),t=!1,z=!1,E=function(A,B){t||null!=A&&z||(Q.checked?null!=B&&B(n.selected?null:e.value):""==c.value||b.isOffline()?(F.value="",R.value="",null!=B&&B("")):(c.value=mxUtils.trim(c.value),b.loadImage(c.value,function(H){F.value=H.width;R.value=H.height;null!=B&&B(c.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));F.value="";R.value="";null!=B&&B(null)})))},C=mxUtils.bind(this,
+function(A){b.importFiles(A,0,0,b.maxBackgroundSize,function(B,H,T,k,v,G){c.value=B;E();c.focus()},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var H=0;H<B.length;H++)B[H]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){K?e.focus():c.focus();mxEvent.addListener(e,"focus",function(){L.removeAttribute("checked");Q.setAttribute("checked","checked");Q.checked=!0});mxEvent.addListener(c,"focus",function(){Q.removeAttribute("checked");L.setAttribute("checked",
"checked");L.checked=!0});if(Graph.fileSupport){c.setAttribute("placeholder",mxResources.get("dragImagesHere"));var A=D.parentNode,B=null;mxEvent.addListener(A,"dragleave",function(H){null!=B&&(B.parentNode.removeChild(B),B=null);H.stopPropagation();H.preventDefault()});mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(H){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=b.highlightElement(A));H.stopPropagation();H.preventDefault()}));mxEvent.addListener(A,"drop",mxUtils.bind(this,
-function(H){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<H.dataTransfer.files.length)C(H.dataTransfer.files);else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var T=H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(c.value=decodeURIComponent(T),F())}H.stopPropagation();H.preventDefault()}),!1)}};D.appendChild(L);D.appendChild(c);mxUtils.br(D);f=document.createElement("span");f.style.marginLeft="30px";mxUtils.write(f,mxResources.get("width")+
-":");D.appendChild(f);var E=document.createElement("input");E.setAttribute("type","text");E.style.width="60px";E.style.marginLeft="8px";E.style.marginRight="16px";E.value=null==l||K?"":l.width;D.appendChild(E);mxUtils.write(D,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==l||K?"":l.height;D.appendChild(R);mxUtils.br(D);mxUtils.br(D);mxEvent.addListener(c,"change",
-F);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url,F()));c.focus()};D.appendChild(N);D.appendChild(e);mxUtils.br(D);mxUtils.br(D);K?(N.setAttribute("checked","checked"),N.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!J&&N.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),
+function(H){null!=B&&(B.parentNode.removeChild(B),B=null);if(0<H.dataTransfer.files.length)C(H.dataTransfer.files);else if(0<=mxUtils.indexOf(H.dataTransfer.types,"text/uri-list")){var T=H.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)&&(c.value=decodeURIComponent(T),E())}H.stopPropagation();H.preventDefault()}),!1)}};D.appendChild(L);D.appendChild(c);mxUtils.br(D);f=document.createElement("span");f.style.marginLeft="30px";mxUtils.write(f,mxResources.get("width")+
+":");D.appendChild(f);var F=document.createElement("input");F.setAttribute("type","text");F.style.width="60px";F.style.marginLeft="8px";F.style.marginRight="16px";F.value=null==l||K?"":l.width;D.appendChild(F);mxUtils.write(D,mxResources.get("height")+":");var R=document.createElement("input");R.setAttribute("type","text");R.style.width="60px";R.style.marginLeft="8px";R.style.marginRight="16px";R.value=null==l||K?"":l.height;D.appendChild(R);mxUtils.br(D);mxUtils.br(D);mxEvent.addListener(c,"change",
+E);ImageDialog.filePicked=function(A){A.action==google.picker.Action.PICKED&&null!=A.docs[0].thumbnails&&(A=A.docs[0].thumbnails[A.docs[0].thumbnails.length-1],null!=A&&(c.value=A.url,E()));c.focus()};D.appendChild(Q);D.appendChild(e);mxUtils.br(D);mxUtils.br(D);K?(Q.setAttribute("checked","checked"),Q.checked=!0):(L.setAttribute("checked","checked"),L.checked=!0);!J&&Q.checked&&(mxUtils.write(n,mxResources.get("pageNotFound")),n.setAttribute("disabled","disabled"),n.setAttribute("selected","selected"),
n.setAttribute("value","pageNotFound"),e.appendChild(n),mxEvent.addListener(e,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)}));l=document.createElement("div");l.style.display=q?"inline-flex":"none";l.style.alignItems="center";l.style.cursor="default";l.style.minWidth="40%";l.style.height="20px";var U=document.createElement("input");U.setAttribute("type","checkbox");U.style.margin="0px 10px 0px 4px";U.style.verticalAlign="bottom";U.defaultChecked=d!=mxConstants.NONE&&
null!=d;U.checked=U.defaultChecked;l.appendChild(U);mxUtils.write(l,mxResources.get("fillColor"));q=l.cloneNode(!1);var O=document.createElement("input");O.setAttribute("type","checkbox");O.style.margin="0px 10px 0px 30px";O.style.verticalAlign="bottom";O.defaultChecked=x.shadowVisible;O.checked=O.defaultChecked;q.appendChild(O);mxUtils.write(q,mxResources.get("shadow"));mxClient.IS_SVG&&!mxClient.IS_SF||O.setAttribute("disabled","disabled");mxEvent.addListener(q,"click",function(A){mxEvent.getSource(A)!=
-O&&(O.checked=!O.checked)});var Q=document.createElement("button");Q.style.width="36px";Q.style.height="18px";Q.style.cursor="pointer";Q.style.marginLeft="10px";Q.style.backgroundPosition="center center";Q.style.backgroundRepeat="no-repeat";Q.style.verticalAlign="bottom";Q.className="geColorBtn";var m=d;y();mxEvent.addListener(l,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);m=U.checked?"#ffffff":null;y()});mxEvent.addListener(Q,"click",function(A){b.pickColor(m||"none",function(B){m=
-B;y()});mxEvent.consume(A)});l.appendChild(Q);D.appendChild(l);D.appendChild(q);mxUtils.br(D);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);q=mxUtils.button(mxResources.get("reset"),function(){c.value="";E.value="";R.value="";L.checked=!0;m=mxConstants.NONE;y();t=!1});mxEvent.addGestureListeners(q,function(){t=!0});q.className=
-"geBtn";q.width="100";d.appendChild(q);if(Graph.fileSupport){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("type","file");mxEvent.addListener(u,"change",function(A){null!=u.files&&(C(u.files),u.type="",u.type="file",u.value="")});u.style.display="none";D.appendChild(u);q=mxUtils.button(mxResources.get("open"),function(){u.click()});q.className="geBtn";d.appendChild(q)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();F(null,function(A){g(""!=
-A&&null!=A?new mxImage(A,E.value,R.value):null,null==A,m,!mxClient.IS_SVG||mxClient.IS_SF?null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){z=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);D.appendChild(d);this.container=D},ParseDialog=function(b,g,l){function d(e,f,p){var n=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(T,
-k,v,G,I){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,G,I));var M=null;z.getModel().beginUpdate();try{M="txt"==k?b.insertAsPreText(v,y.x,y.y):z.insertVertex(null,null,null,y.x,y.y,G,I,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(v)+";"),z.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:T,format:k},null,2))}finally{z.getModel().endUpdate()}null!=M&&(z.setSelectionCell(M),z.scrollCellToVisible(M))},z=b.editor.graph,F="plantUmlTxt"==
-f?"txt":"plantUmlPng"==f?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==e&&"svg"==F?window.setTimeout(function(){b.spinner.stop();t(e,F,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(e,F,function(T,k,v){b.spinner.stop();t(e,F,T,k,v)},function(T){b.handleError(T)})}}else if("mermaid"==f||"mermaid2drawio"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<n.length&&(0==n[C].trim().length||"%%"==n[C].substring(0,2));)C++;if("---"==n[C].trim()){do C++;while(C<n.length&&"---"!=n[C].trim());C++}C=n[C].trim().toLowerCase();n=C.indexOf(" ");C=C.substring(0,0<n?n:C.length);var E="undefined"!==typeof mxMermaidToDrawio&&
-"mermaid2drawio"==f&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);z=b.editor.graph;E&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();z.setSelectionCells(b.importXml(T,Math.max(y.x,20),Math.max(y.y,20),!0,null,null,!0));z.scrollCellToVisible(z.getSelectionCell())}));b.generateMermaidImage(e,null,function(T,k,v){if(!E){y=
+O&&(O.checked=!O.checked)});var N=document.createElement("button");N.style.width="36px";N.style.height="18px";N.style.cursor="pointer";N.style.marginLeft="10px";N.style.backgroundPosition="center center";N.style.backgroundRepeat="no-repeat";N.style.verticalAlign="bottom";N.className="geColorBtn";var m=d;y();mxEvent.addListener(l,"click",function(A){mxEvent.getSource(A)!=U&&(U.checked=!U.checked);m=U.checked?"#ffffff":null;y()});mxEvent.addListener(N,"click",function(A){b.pickColor(m||"none",function(B){m=
+B;y()});mxEvent.consume(A)});l.appendChild(N);D.appendChild(l);D.appendChild(q);mxUtils.br(D);d=document.createElement("div");d.style.marginTop="30px";d.style.textAlign="right";x=mxUtils.button(mxResources.get("cancel"),function(){t=!0;b.hideDialog()});x.className="geBtn";b.editor.cancelFirst&&d.appendChild(x);q=mxUtils.button(mxResources.get("reset"),function(){c.value="";F.value="";R.value="";L.checked=!0;m=mxConstants.NONE;y();t=!1});mxEvent.addGestureListeners(q,function(){t=!0});q.className=
+"geBtn";q.width="100";d.appendChild(q);if(Graph.fileSupport){var u=document.createElement("input");u.setAttribute("multiple","multiple");u.setAttribute("type","file");mxEvent.addListener(u,"change",function(A){null!=u.files&&(C(u.files),u.type="",u.type="file",u.value="")});u.style.display="none";D.appendChild(u);q=mxUtils.button(mxResources.get("open"),function(){u.click()});q.className="geBtn";d.appendChild(q)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();E(null,function(A){g(""!=
+A&&null!=A?new mxImage(A,F.value,R.value):null,null==A,m,!mxClient.IS_SVG||mxClient.IS_SF?null:O.checked)})});mxEvent.addGestureListeners(applyBtn,function(){z=!0});applyBtn.className="geBtn gePrimaryBtn";d.appendChild(applyBtn);b.editor.cancelFirst||d.appendChild(x);D.appendChild(d);this.container=D},ParseDialog=function(b,g,l){function d(e,f,p){var n=e.split("\n");if("plantUmlPng"==f||"plantUmlSvg"==f||"plantUmlTxt"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var t=function(T,
+k,v,G,I){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,G,I));var M=null;z.getModel().beginUpdate();try{M="txt"==k?b.insertAsPreText(v,y.x,y.y):z.insertVertex(null,null,null,y.x,y.y,G,I,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(v)+";"),z.setAttributeForCell(M,"plantUmlData",JSON.stringify({data:T,format:k},null,2))}finally{z.getModel().endUpdate()}null!=M&&(z.setSelectionCell(M),z.scrollCellToVisible(M))},z=b.editor.graph,E="plantUmlTxt"==
+f?"txt":"plantUmlPng"==f?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==e&&"svg"==E?window.setTimeout(function(){b.spinner.stop();t(e,E,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
+295,212)},200):b.generatePlantUmlImage(e,E,function(T,k,v){b.spinner.stop();t(e,E,T,k,v)},function(T){b.handleError(T)})}}else if("mermaid"==f||"mermaid2drawio"==f){if(b.spinner.spin(document.body,mxResources.get("inserting"))){for(var C=0;C<n.length&&(0==n[C].trim().length||"%%"==n[C].substring(0,2));)C++;if("---"==n[C].trim()){do C++;while(C<n.length&&"---"!=n[C].trim());C++}C=n[C].trim().toLowerCase();n=C.indexOf(" ");C=C.substring(0,0<n?n:C.length);var F="undefined"!==typeof mxMermaidToDrawio&&
+"mermaid2drawio"==f&&("graph"==C||"flowchart"==C||"sequencediagram"==C||"classdiagram"==C||"statediagram-v2"==C||"statediagram"==C||"erdiagram"==C||"requirementdiagram"==C||"gitgraph"==C||"mindmap"==C||"journey"==C);z=b.editor.graph;F&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(T){b.spinner.stop();z.setSelectionCells(b.importXml(T,Math.max(y.x,20),Math.max(y.y,20),!0,null,null,!0));z.scrollCellToVisible(z.getSelectionCell())}));b.generateMermaidImage(e,null,function(T,k,v){if(!F){y=
mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(new mxRectangle(0,0,k,v));b.spinner.stop();var G=null;z.getModel().beginUpdate();try{G=z.insertVertex(null,null,null,y.x,y.y,k,v,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+T+";"),z.setAttributeForCell(G,"mermaidData",JSON.stringify({data:e},null,2))}finally{z.getModel().endUpdate()}null!=G&&(z.setSelectionCell(G),z.scrollCellToVisible(G))}},function(T){"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.resetListeners();b.handleError(T)})}}else if("table"==
-f){f=null;var R=[],U=0,O={};for(C=0;C<n.length;C++){var Q=mxUtils.trim(n[C]);if("primary key"==Q.substring(0,11).toLowerCase()){var m=Q.match(/\((.+)\)/);m&&m[1]&&(O[m[1]]=!0);n.splice(C,1)}else 0<Q.toLowerCase().indexOf("primary key")&&(O[Q.split(" ")[0]]=!0,n[C]=mxUtils.trim(Q.replace(/primary key/i,"")))}for(C=0;C<n.length;C++)if(Q=mxUtils.trim(n[C]),"create table"==Q.substring(0,12).toLowerCase())Q=mxUtils.trim(Q.substring(12)),"("==Q.charAt(Q.length-1)&&(Q=mxUtils.trim(Q.substring(0,Q.length-
-1))),f=new mxCell(Q,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,R.push(f),Q=b.editor.graph.getPreferredSizeForCell(u),null!=Q&&(f.geometry.width=Q.width+10);else if(null!=f&&")"==Q.charAt(0))U+=f.geometry.width+40,f=null;else if("("!=Q&&null!=f){Q=Q.substring(0,","==Q.charAt(Q.length-1)?Q.length-1:Q.length);m=O[Q.split(" ")[0]];var u=new mxCell("",new mxGeometry(0,
-0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(m?"1":"0")+";");u.vertex=!0;var A=new mxCell(m?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(m?"fontStyle=1;":""));A.vertex=!0;u.insert(A);Q=new mxCell(Q,new mxGeometry(30,
-0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(m?"fontStyle=5;":""));Q.vertex=!0;u.insert(Q);Q=b.editor.graph.getPreferredSizeForCell(Q);null!=Q&&f.geometry.width<Q.width+30&&(f.geometry.width=Math.min(320,Math.max(f.geometry.width,Q.width+30)));f.insert(u,m?0:null);f.geometry.height+=30}0<R.length&&(z=b.editor.graph,y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,
-!0)),z.setSelectionCells(z.importCells(R,y.x,y.y)),z.scrollCellToVisible(z.getSelectionCell()))}else if("list"==f){if(0<n.length){z=b.editor.graph;f=null;R=[];for(C=u=0;C<n.length;C++)";"!=n[C].charAt(0)&&(0==n[C].length?f=null:null==f?(f=new mxCell(n[C],new mxGeometry(u,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),f.vertex=!0,R.push(f),Q=z.getPreferredSizeForCell(f),
-null!=Q&&f.geometry.width<Q.width+10&&(f.geometry.width=Q.width+10),u+=f.geometry.width+40):"--"==n[C]?(Q=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),Q.vertex=!0,f.geometry.height+=Q.geometry.height,f.insert(Q)):0<n[C].length&&(U=new mxCell(n[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-U.vertex=!0,Q=z.getPreferredSizeForCell(U),null!=Q&&U.geometry.width<Q.width&&(U.geometry.width=Q.width),f.geometry.width=Math.max(f.geometry.width,U.geometry.width),f.geometry.height+=U.geometry.height,f.insert(U)));if(0<R.length){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0));z.getModel().beginUpdate();try{R=z.importCells(R,y.x,y.y);Q=[];for(C=0;C<R.length;C++)Q.push(R[C]),Q=Q.concat(R[C].children);z.fireEvent(new mxEventObject("cellsInserted","cells",Q))}finally{z.getModel().endUpdate()}z.setSelectionCells(R);
+f){f=null;var R=[],U=0,O={};for(C=0;C<n.length;C++){var N=mxUtils.trim(n[C]);if("primary key"==N.substring(0,11).toLowerCase()){var m=N.match(/\((.+)\)/);m&&m[1]&&(O[m[1]]=!0);n.splice(C,1)}else 0<N.toLowerCase().indexOf("primary key")&&(O[N.split(" ")[0]]=!0,n[C]=mxUtils.trim(N.replace(/primary key/i,"")))}for(C=0;C<n.length;C++)if(N=mxUtils.trim(n[C]),"create table"==N.substring(0,12).toLowerCase())N=mxUtils.trim(N.substring(12)),"("==N.charAt(N.length-1)&&(N=mxUtils.trim(N.substring(0,N.length-
+1))),f=new mxCell(N,new mxGeometry(U,0,160,30),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),f.vertex=!0,R.push(f),N=b.editor.graph.getPreferredSizeForCell(u),null!=N&&(f.geometry.width=N.width+10);else if(null!=f&&")"==N.charAt(0))U+=f.geometry.width+40,f=null;else if("("!=N&&null!=f){N=N.substring(0,","==N.charAt(N.length-1)?N.length-1:N.length);m=O[N.split(" ")[0]];var u=new mxCell("",new mxGeometry(0,
+0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;strokeColor=inherit;top=0;left=0;right=0;bottom="+(m?"1":"0")+";");u.vertex=!0;var A=new mxCell(m?"PK":"",new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;strokeColor=inherit;top=0;left=0;bottom=0;right=0;"+(m?"fontStyle=1;":""));A.vertex=!0;u.insert(A);N=new mxCell(N,new mxGeometry(30,
+0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;strokeColor=inherit;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(m?"fontStyle=5;":""));N.vertex=!0;u.insert(N);N=b.editor.graph.getPreferredSizeForCell(N);null!=N&&f.geometry.width<N.width+30&&(f.geometry.width=Math.min(320,Math.max(f.geometry.width,N.width+30)));f.insert(u,m?0:null);f.geometry.height+=30}0<R.length&&(z=b.editor.graph,y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,
+!0)),z.setSelectionCells(z.importCells(R,y.x,y.y)),z.scrollCellToVisible(z.getSelectionCell()))}else if("list"==f){if(0<n.length){z=b.editor.graph;f=null;R=[];for(C=u=0;C<n.length;C++)";"!=n[C].charAt(0)&&(0==n[C].length?f=null:null==f?(f=new mxCell(n[C],new mxGeometry(u,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),f.vertex=!0,R.push(f),N=z.getPreferredSizeForCell(f),
+null!=N&&f.geometry.width<N.width+10&&(f.geometry.width=N.width+10),u+=f.geometry.width+40):"--"==n[C]?(N=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),N.vertex=!0,f.geometry.height+=N.geometry.height,f.insert(N)):0<n[C].length&&(U=new mxCell(n[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
+U.vertex=!0,N=z.getPreferredSizeForCell(U),null!=N&&U.geometry.width<N.width&&(U.geometry.width=N.width),f.geometry.width=Math.max(f.geometry.width,U.geometry.width),f.geometry.height+=U.geometry.height,f.insert(U)));if(0<R.length){y=mxEvent.isAltDown(p)?y:z.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0));z.getModel().beginUpdate();try{R=z.importCells(R,y.x,y.y);N=[];for(C=0;C<R.length;C++)N.push(R[C]),N=N.concat(R[C].children);z.fireEvent(new mxEventObject("cellsInserted","cells",N))}finally{z.getModel().endUpdate()}z.setSelectionCells(R);
z.scrollCellToVisible(z.getSelectionCell())}}}else{u=function(T){var k=B[T];null==k&&(k=new mxCell(T,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),k.vertex=!0,B[T]=k,R.push(k));return k};var B={};R=[];for(C=0;C<n.length;C++)if(";"!=n[C].charAt(0)){var H=n[C].split("->");2<=H.length&&(m=u(H[0]),A=u(H[H.length-1]),H=new mxCell(2<H.length?H[1]:"",new mxGeometry),H.edge=!0,H.geometry.relative=!0,m.insertEdge(H,!0),A.insertEdge(H,!1),R.push(H))}if(0<R.length){n=document.createElement("div");n.style.visibility=
-"hidden";document.body.appendChild(n);z=new Graph(n);z.getModel().beginUpdate();try{R=z.importCells(R);for(C=0;C<R.length;C++)z.getModel().isVertex(R[C])&&(Q=z.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,Q.width),R[C].geometry.height=Math.max(R[C].geometry.height,Q.height));C=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(z,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(z.getDefaultParent(),R),C=!1):"circle"==
-f?(new mxCircleLayout(z)).execute(z.getDefaultParent()):(U=new mxFastOrganicLayout(z),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(z.getDefaultParent()));C&&(O=new mxParallelEdgeLayout(z),O.spacing=30,O.execute(z.getDefaultParent()))}finally{z.getModel().endUpdate()}z.clearCellOverlays();Q=[];b.editor.graph.getModel().beginUpdate();try{R=z.getModel().getChildren(z.getDefaultParent()),y=mxEvent.isAltDown(p)?y:b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0)),Q=b.editor.graph.importCells(R,
-y.x,y.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",Q))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(Q);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());z.destroy();n.parentNode.removeChild(n)}}}function q(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value||
+"hidden";document.body.appendChild(n);z=new Graph(n);z.getModel().beginUpdate();try{R=z.importCells(R);for(C=0;C<R.length;C++)z.getModel().isVertex(R[C])&&(N=z.getPreferredSizeForCell(R[C]),R[C].geometry.width=Math.max(R[C].geometry.width,N.width),R[C].geometry.height=Math.max(R[C].geometry.height,N.height));C=!0;"horizontalFlow"==f||"verticalFlow"==f?((new mxHierarchicalLayout(z,"horizontalFlow"==f?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(z.getDefaultParent(),R),C=!1):"circle"==
+f?(new mxCircleLayout(z)).execute(z.getDefaultParent()):(U=new mxFastOrganicLayout(z),U.disableEdgeStyle=!1,U.forceConstant=180,U.execute(z.getDefaultParent()));C&&(O=new mxParallelEdgeLayout(z),O.spacing=30,O.execute(z.getDefaultParent()))}finally{z.getModel().endUpdate()}z.clearCellOverlays();N=[];b.editor.graph.getModel().beginUpdate();try{R=z.getModel().getChildren(z.getDefaultParent()),y=mxEvent.isAltDown(p)?y:b.editor.graph.getCenterInsertPoint(z.getBoundingBoxFromGeometry(R,!0)),N=b.editor.graph.importCells(R,
+y.x,y.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",N))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(N);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());z.destroy();n.parentNode.removeChild(n)}}}function q(){return"list"==D.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==D.value||
"mermaid2drawio"==D.value?"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==D.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==D.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
"plantUmlSvg"==D.value||"plantUmlTxt"==D.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var y=b.editor.graph.getFreeInsertPoint();g=document.createElement("div");g.style.textAlign="right";var x=document.createElement("textarea");x.style.boxSizing="border-box";x.style.resize=
"none";x.style.width="100%";x.style.height="354px";x.style.marginBottom="16px";var D=document.createElement("select");D.className="geBtn";if("formatSql"==l||"mermaid"==l&&"draw.io"!=b.getServiceName()&&"atlassian"!=b.getServiceName())D.style.display="none";var J=document.createElement("option");J.setAttribute("value","list");mxUtils.write(J,mxResources.get("list"));"plantUml"!=l&&"mermaid"!=l&&D.appendChild(J);null!=l&&"fromText"!=l||J.setAttribute("selected","selected");J=document.createElement("option");
J.setAttribute("value","table");mxUtils.write(J,mxResources.get("formatSql"));"formatSql"==l&&(D.appendChild(J),J.setAttribute("selected","selected"));J=document.createElement("option");J.setAttribute("value","mermaid");mxUtils.write(J,mxResources.get("image"));if("mermaid"==l)if("undefined"!==typeof mxMermaidToDrawio){var K=document.createElement("option");K.setAttribute("value","mermaid2drawio");K.setAttribute("selected","selected");mxUtils.write(K,mxResources.get("diagram"));D.appendChild(K)}else D.style.display=
-"none";D.appendChild(J);J=document.createElement("option");J.setAttribute("value","diagram");mxUtils.write(J,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,mxResources.get("horizontalFlow"));var N=document.createElement("option");N.setAttribute("value","verticalFlow");mxUtils.write(N,mxResources.get("verticalFlow"));
-"plantUml"!=l&&"mermaid"!=l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L),D.appendChild(N));J=document.createElement("option");J.setAttribute("value","plantUmlSvg");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&J.setAttribute("selected","selected");K=document.createElement("option");K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value",
+"none";D.appendChild(J);J=document.createElement("option");J.setAttribute("value","diagram");mxUtils.write(J,mxResources.get("diagram"));K=document.createElement("option");K.setAttribute("value","circle");mxUtils.write(K,mxResources.get("circle"));var L=document.createElement("option");L.setAttribute("value","horizontalFlow");mxUtils.write(L,mxResources.get("horizontalFlow"));var Q=document.createElement("option");Q.setAttribute("value","verticalFlow");mxUtils.write(Q,mxResources.get("verticalFlow"));
+"plantUml"!=l&&"mermaid"!=l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L),D.appendChild(Q));J=document.createElement("option");J.setAttribute("value","plantUmlSvg");mxUtils.write(J,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&J.setAttribute("selected","selected");K=document.createElement("option");K.setAttribute("value","plantUmlPng");mxUtils.write(K,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");L=document.createElement("option");L.setAttribute("value",
"plantUmlTxt");mxUtils.write(L,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(D.appendChild(J),D.appendChild(K),D.appendChild(L));var c=q();x.value=c;g.appendChild(x);this.init=function(){x.focus()};Graph.fileSupport&&(x.addEventListener("dragover",function(e){e.stopPropagation();e.preventDefault()},!1),x.addEventListener("drop",function(e){e.stopPropagation();e.preventDefault();if(0<e.dataTransfer.files.length){e=
e.dataTransfer.files[0];var f=new FileReader;f.onload=function(p){x.value=p.target.result};f.readAsText(e)}},!1));g.appendChild(D);mxEvent.addListener(D,"change",function(){var e=q();if(0==x.value.length||x.value==c)c=e,x.value=c});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(J=mxUtils.button(mxResources.get("help"),function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),J.className="geBtn",g.appendChild(J));J=mxUtils.button(mxResources.get("close"),
-function(){x.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});J.className="geBtn";b.editor.cancelFirst&&g.appendChild(J);K=mxUtils.button(mxResources.get("insert"),function(e){try{b.hideDialog(),d(x.value,D.value,e)}catch(f){b.handleError(f)}});K.className="geBtn gePrimaryBtn";g.appendChild(K);b.editor.cancelFirst||g.appendChild(J);this.container=g},NewDialog=function(b,g,l,d,q,y,x,D,J,K,L,N,c,e,f,p,n,t){function z(ka){null!=ka&&(ma=Aa=ka?135:140);ka=!0;
-if(null!=Ua)for(;k<Ua.length&&(ka||0!=mxUtils.mod(k,30));){var ta=Ua[k++];ta=m(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs,ta.type);ka&&ta.click();ka=!1}}function F(ka,ta,ra,la,qa,ya){if(null!=ka&&mxUtils.isAncestorNode(document.body,la)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ea=new mxCodec(ka.ownerDocument),Ha=new mxGraphModel;Ea.decode(ka,Ha);b.sidebar.createTooltip(la,Ha.root.children,
+function(){x.value==c?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});J.className="geBtn";b.editor.cancelFirst&&g.appendChild(J);K=mxUtils.button(mxResources.get("insert"),function(e){try{b.hideDialog(),d(x.value,D.value,e)}catch(f){b.handleError(f)}});K.className="geBtn gePrimaryBtn";g.appendChild(K);b.editor.cancelFirst||g.appendChild(J);this.container=g},NewDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q,c,e,f,p,n,t){function z(ka){null!=ka&&(ma=Aa=ka?135:140);ka=!0;
+if(null!=Ua)for(;k<Ua.length&&(ka||0!=mxUtils.mod(k,30));){var ta=Ua[k++];ta=m(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs,ta.type);ka&&ta.click();ka=!1}}function E(ka,ta,ra,la,qa,ya){if(null!=ka&&mxUtils.isAncestorNode(document.body,la)){ka=mxUtils.parseXml(ka);ka=Editor.parseDiagramNode(ka.documentElement,null,!0);var Ea=new mxCodec(ka.ownerDocument),Ha=new mxGraphModel;Ea.decode(ka,Ha);b.sidebar.createTooltip(la,Ha.root.children,
Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-120,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-120,800),null!=qa?mxResources.get(qa):null,!0,new mxPoint(ta,ra),!0,function(){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;null!=ya&&R(la,null,null,ya,infoObj,clibs)},!0,!1)}}function C(){var ka=document.createElement("div");ka.style.position="absolute";ka.style.overflow="visible";
ka.style.left="8px";ka.style.right="8px";ka.style.bottom="8px";ka.style.top="8px";mxUtils.write(ka,mxResources.get("describeYourDiagram")+":");mxUtils.br(ka);var ta=document.createElement("input");ta.setAttribute("type","text");ta.setAttribute("placeholder",mxResources.get("processForHiringNewEmployee"));ta.style.width="100%";ta.style.marginTop="6px";ta.style.marginBottom="4px";ta.style.boxSizing="border-box";ka.appendChild(ta);ka.init=function(){ta.focus()};mxUtils.br(ka);var ra=document.createElement("div");
ra.style.top="86px";ra.style.left="2px";ra.style.right="2px";ra.style.bottom="2px";ra.style.position="absolute";ra.style.border="1px solid #424242";var la=document.createElement("div");la.style.boxSizing="border-box";la.style.position="relative";la.style.textAlign="center";la.style.top="50%";mxUtils.write(la,mxResources.get("blankDiagram"));ra.appendChild(la);var qa=document.createElement("select");qa.className="geBtn";qa.style.maxWidth="160px";qa.style.marginLeft="0px";la=document.createElement("option");
mxUtils.write(la,mxResources.get("diagramType"));la.setAttribute("value","");qa.appendChild(la);for(var ya=0;ya<EditorUi.mermaidDiagramTypes.length;ya++){la=document.createElement("option");var Ea=EditorUi.mermaidDiagramTypes[ya],Ha=Ea;Ea==urlParams["smart-template-type"]&&la.setAttribute("selected","selected");"erDiagram"==Ha&&(Ha="entityRelationshipDiagram");Ha=mxResources.get(Ha,null,Ha.charAt(0).toUpperCase()+Ha.substring(1).replace(/[A-Z]/g," $&"));la.setAttribute("value",Ea);mxUtils.write(la,
Ha);qa.appendChild(la)}var Pa=mxUtils.button(mxResources.get("generate"),function(){var Ka=ta.value,Na=qa.value.replace(/([A-Z])/g," $1").toLowerCase();Ka="Write the declaration code for a detailed and complex "+(""!=Na?Na:"graph")+' that shows "'+(""!=Ka?Ka:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';Na=""!=qa.value?" ("+mxUtils.trim(mxUtils.getTextContent(qa.options[qa.selectedIndex]))+")":"";var Va="gantt"==qa.value||"pie"==qa.value||
"timeline"==qa.value||"quadrantchart"==qa.value||"c4context"==qa.value,Ma=ta.value+Na;"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(Qa){Va||(ia=aa=Qa,wa="Smart Template: "+Ma)}));b.spinner.spin(document.body,mxResources.get("loading"))&&b.generateOpenAiMermaidDiagram(Ka,function(Qa,Ya,Ga,fb){b.spinner.stop();ra.innerHTML="";var Ta=document.createElement("img");Ta.setAttribute("title",Ma);Ta.src="data:image/svg+xml;base64,"+Ya.substring(Ya.indexOf(",")+
-1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ra.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ga,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ia=aa=Qa;Qa=I.cloneNode(!0);ra.appendChild(Qa);Ya=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ga=function(gb){S||F(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,
+1);Ta.style.cursor="pointer";Ta.style.width="100%";Ta.style.height="100%";ra.appendChild(Ta);Qa=b.createMermaidXml(Qa,EditorUi.defaultMermaidConfig,Ya,Ga,fb,Ma);var ib="<mxfile><diagram>"+Graph.compress(Qa)+"</diagram></mxfile>";if(Va||"undefined"===typeof mxMermaidToDrawio)ia=aa=Qa;Qa=I.cloneNode(!0);ra.appendChild(Qa);Ya=function(gb){S=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};Ga=function(gb){S||E(ib,mxEvent.getClientX(gb),mxEvent.getClientY(gb),Ta,Ma)};mxEvent.addGestureListeners(Ta,
Ya,null,Ga);mxEvent.addGestureListeners(Qa,Ya,null,Ga)},function(Qa){b.spinner.stop();null!=mxMermaidToDrawio.resetListeners&&mxMermaidToDrawio.resetListeners();b.handleError(Qa)})});Pa.setAttribute("disabled","disabled");Pa.className="geBtn gePrimaryBtn";la=function(){window.setTimeout(function(){""!=ta.value?Pa.removeAttribute("disabled"):Pa.setAttribute("disabled","disabled")},0)};ya=urlParams["smart-template"];null!=ya&&"1"!=ya&&(ta.value=decodeURIComponent(ya),la(),"1"==urlParams["smart-template-generate"]&&
window.setTimeout(function(){Pa.click()},0));mxEvent.addListener(ta,"change",la);mxEvent.addListener(ta,"keydown",la);mxEvent.addListener(ta,"cut",la);mxEvent.addListener(ta,"paste",la);mxEvent.addListener(ta,"keydown",function(Ka){13==Ka.keyCode&&Pa.click()});la=document.createElement("div");la.style.height="40px";la.style.marginTop="4px";la.style.marginBottom="4px";la.style.whiteSpace="nowrap";la.style.overflowX="auto";la.style.overflowY="hidden";la.appendChild(qa);la.appendChild(Pa);ka.appendChild(la);
-ka.appendChild(ra);return ka}function E(){null!=aa&&aa==ia&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:wa});if(ha&&null!=e)l||b.hideDialog(),e(ha,na,T.value);else if(d)l||b.hideDialog(),d(aa,T.value,pa,ca);else{var ka=T.value;if(null!=ka&&0<ka.length){var ta=function(la,qa,ya){b.createFile(ya,aa,null!=ca&&0<ca.length?ca:null,la,function(){b.hideDialog()},null,qa,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ra=new SaveDialog(b,
+ka.appendChild(ra);return ka}function F(){null!=aa&&aa==ia&&EditorUi.logEvent({category:"OPENAI-DIAGRAM",action:"templateGenerated",label:wa});if(ha&&null!=e)l||b.hideDialog(),e(ha,na,T.value);else if(d)l||b.hideDialog(),d(aa,T.value,pa,ca);else{var ka=T.value;if(null!=ka&&0<ka.length){var ta=function(la,qa,ya){b.createFile(ya,aa,null!=ca&&0<ca.length?ca:null,la,function(){b.hideDialog()},null,qa,null,null!=fa&&0<fa.length?fa:null)};if(b.mode==App.MODE_GOOGLE||b.mode==App.MODE_ONEDRIVE){var ra=new SaveDialog(b,
ka,mxUtils.bind(this,function(la,qa,ya){ta(qa,ya,la.value)}),null,null,null,null,b.mode);b.showDialog(ra.container,420,150,!0,!1);ra.init()}else b.pickFolder(b.mode,function(la){ta(b.mode,la,ka)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}}function R(ka,ta,ra,la,qa,ya,Ea){return da!=ka?(null!=da&&(da.style.backgroundColor="transparent",da.style.border="2px solid transparent",0<da.getElementsByTagName("table").length&&(da.getElementsByTagName("table")[0].style.visibility=
"visible"),da==sa&&(sa.style.backgroundImage=Ia,sa.style.backgroundPosition="center center",sa.style.backgroundRepeat="no-repeat",sa.style.backgroundSize="contain",xa.style.visibility="hidden",Ba.style.visibility="hidden",Da.style.visibility="hidden",za.style.visibility="hidden",Fa.style.visibility=null!=ia?"visible":"hidden",sa.getElementsByTagName("table")[0].style.visibility="visible")),""!=ka.style.backgroundImage&&0<ka.getElementsByTagName("table").length&&(ka.getElementsByTagName("table")[0].style.visibility=
"hidden"),ka==sa&&(ta=ia,null!=ta?(Fa.style.visibility="visible",Fa.style.visibility=null!=ia?"visible":"hidden",za.style.visibility="visible"):(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="hidden",Fa.style.visibility="hidden")),G.removeAttribute("disabled"),aa=ta,ca=ra,fa=ya,da=ka,ha=la,pa=Ea,na=qa,da.style.border=J,!0):!1}function U(){sa.style.backgroundImage="";sa.getElementsByTagName("table")[0].style.visibility="hidden";xa.style.visibility=
-"visible";Ba.style.visibility="visible";Da.style.visibility="visible";za.style.visibility="hidden";Fa.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function O(){xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";sa.style.backgroundImage=Ia;sa.style.backgroundSize="contain";za.style.visibility="visible";Fa.style.visibility="visible"}function Q(ka){var ta=mxUtils.trim(xa.value);
+"visible";Ba.style.visibility="visible";Da.style.visibility="visible";za.style.visibility="hidden";Fa.style.visibility="hidden";xa.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?xa.select():document.execCommand("selectAll",!1,null)}function O(){xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";sa.style.backgroundImage=Ia;sa.style.backgroundSize="contain";za.style.visibility="visible";Fa.style.visibility="visible"}function N(ka){var ta=mxUtils.trim(xa.value);
if(ka||""==ta)null!=wa&&(xa.value=wa,O());else{xa.style.visibility="hidden";Ba.style.visibility="hidden";Da.style.visibility="hidden";var ra=!1;ka='Write a detailed and complex MermaidJS declaration for "'+(""!=ta?ta:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.';"undefined"!==typeof mxMermaidToDrawio&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(la){la!=b.emptyDiagramXml&&(ra=!0,aa=la)}));sa.style.backgroundImage="url("+Editor.spinImage+
")";sa.style.backgroundSize="12px 12px";b.generateOpenAiMermaidDiagram(ka,function(la,qa,ya,Ea){da==sa&&"hidden"==xa.style.visibility&&(Ia="url(data:image/svg+xml;base64,"+qa.substring(qa.indexOf(",")+1)+")",sa.setAttribute("title",ta),ia=aa=la=ra?aa:b.createMermaidXml(la,EditorUi.defaultMermaidConfig,qa,ya,Ea,ta),wa=ta,O())},function(la){da==sa&&(xa.style.visibility="visible",Ba.style.visibility="visible",Da.style.visibility="visible",za.style.visibility="visible",Fa.style.visibility="visible",b.handleError(la))})}}
function m(ka,ta,ra,la,qa,ya,Ea,Ha,Pa,Ka,Na,Va){function Ma(Oa,bb){null==fb?(Ta=Oa,Ta=/^https?:\/\//.test(Ta)?b.editor.isCorsEnabledForUrl(Ta)?Ta:PROXY_URL+"?url="+encodeURIComponent(Ta):TEMPLATE_PATH+"/"+Ta,mxUtils.get(Ta,mxUtils.bind(this,function(cb){200<=cb.getStatus()&&299>=cb.getStatus()&&(fb=cb.getText());bb(fb,Ta)}))):bb(fb,Ta)}function Qa(Oa,bb){if(null==ka||M||b.sidebar.currentElt==Ga)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=P){var cb="<mxfile><diagram>"+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+
-P.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+P.naturalWidth+'" height="'+P.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";F(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,ka)}else b.sidebar.currentElt=Ga,M=!0,Ma(ka,function(hb){if(M&&b.sidebar.currentElt==Ga)try{F(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}M=!1})}function Ya(){var Oa=document.createElement("table");
+P.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+P.naturalWidth+'" height="'+P.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>";E(cb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),ra,ka)}else b.sidebar.currentElt=Ga,M=!0,Ma(ka,function(hb){if(M&&b.sidebar.currentElt==Ga)try{E(hb,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa),Ga,bb)}catch(Za){b.sidebar.currentElt=null,b.handleError(Za)}M=!1})}function Ya(){var Oa=document.createElement("table");
Oa.setAttribute("width","100%");Oa.setAttribute("height","100%");Oa.style.background="light-dark(rgba(255,255,255,0.85), transparent)";Oa.style.lineHeight="1.3em";Oa.style.border="none";var bb=document.createElement("tbody"),cb=document.createElement("tr"),hb=document.createElement("td");hb.setAttribute("align","center");hb.setAttribute("valign","middle");var Za=document.createElement("span");Za.style.display="inline-block";Za.style.padding="2px 8px";Za.style.userSelect="none";Za.style.borderRadius=
"8px";Za.style.background="rgba(255,255,255,0.7)";Za.style.overflow="hidden";Za.style.textOverflow="ellipsis";Za.style.maxWidth=ma-34+"px";mxUtils.write(Za,mxResources.get(ra,null,ra));hb.appendChild(Za);cb.appendChild(hb);bb.appendChild(cb);Oa.appendChild(bb);return Oa}var Ga=null;if("generative"!=Va||null==sa){Ga=document.createElement("div");Ga.className="geTemplate geAdaptiveAsset";Ga.style.backgroundOrigin="content-box";Ga.style.backgroundPosition="center center";Ga.style.backgroundRepeat="no-repeat";
Ga.style.backgroundSize="contain";Ga.style.boxSizing="border-box";Ga.style.borderRadius="12px";Ga.style.position="relative";Ga.style.height=ma+"px";Ga.style.width=Aa+"px";Ga.style.padding="4px";Ga.style.border="2px solid transparent";var fb=null,Ta=ka;null!=ra?Ga.setAttribute("title",mxResources.get(ra,null,ra)):null!=la&&0<la.length&&Ga.setAttribute("title",la)}else Ga=sa;if(null!=ya){Ga.style.display="inline-flex";Ga.style.justifyContent="center";Ga.style.alignItems="center";qa=document.createElement("img");
-qa.setAttribute("src",ya);qa.setAttribute("alt",la);qa.style.maxWidth=ma+"px";qa.style.maxHeight=Aa+"px";P=qa;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(qa);qa.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea,Na)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){E();mxEvent.consume(Oa)})}else if(!Ka&&null!=ka&&0<ka.length){var gb=
-function(Oa){v.spin(ua)&&Ma(ka,function(bb,cb){v.stop();null!=bb&&(R(Ga,bb,ta,null,null,Na,cb),Oa&&E())})};ya=Pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";Ga.style.backgroundImage="url("+ya+")";null!=ra&&Ga.appendChild(Ya());mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ga.appendChild(Ya()),"generative"==Va&&null==sa&&(Ga.style.backgroundImage=Ia,Ga.style.overflow="visible",
-Ga.appendChild(Fa),Ga.appendChild(za),Ga.appendChild(xa),Ga.appendChild(Ba),Ga.appendChild(Da),sa=Ga),qa&&R(Ga),null!=Ha?(mxEvent.addGestureListeners(Ga,null,null,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea)})),mxEvent.addListener(Ga,"click",Ha)):(mxEvent.addListener(Ga,"click",function(Oa){R(Ga,null,null,ka,Ea)&&"generative"==Va&&null==ia&&U()}),mxEvent.addListener(Ga,"dblclick",function(Oa){"generative"!=Va?E():"hidden"==xa.style.visibility&&U();mxEvent.consume(Oa)}));null!=ka&&(ya=I.cloneNode(!0),
+qa.setAttribute("src",ya);qa.setAttribute("alt",la);qa.style.maxWidth=ma+"px";qa.style.maxHeight=Aa+"px";P=qa;var ib=ya.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");Ga.appendChild(qa);qa.onerror=function(){this.src!=ib?this.src=ib:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea,Na)}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){F();mxEvent.consume(Oa)})}else if(!Ka&&null!=ka&&0<ka.length){var gb=
+function(Oa){v.spin(ua)&&Ma(ka,function(bb,cb){v.stop();null!=bb&&(R(Ga,bb,ta,null,null,Na,cb),Oa&&F())})};ya=Pa||TEMPLATE_PATH+"/"+ka.substring(0,ka.length-4)+".png";Ga.style.backgroundImage="url("+ya+")";null!=ra&&Ga.appendChild(Ya());mxEvent.addGestureListeners(Ga,mxUtils.bind(this,function(Oa){gb()}),null,null);mxEvent.addListener(Ga,"dblclick",function(Oa){gb(!0);mxEvent.consume(Oa)})}else Ga.appendChild(Ya()),"generative"==Va&&null==sa&&(Ga.style.backgroundImage=Ia,Ga.style.overflow="visible",
+Ga.appendChild(Fa),Ga.appendChild(za),Ga.appendChild(xa),Ga.appendChild(Ba),Ga.appendChild(Da),sa=Ga),qa&&R(Ga),null!=Ha?(mxEvent.addGestureListeners(Ga,null,null,mxUtils.bind(this,function(Oa){R(Ga,null,null,ka,Ea)})),mxEvent.addListener(Ga,"click",Ha)):(mxEvent.addListener(Ga,"click",function(Oa){R(Ga,null,null,ka,Ea)&&"generative"==Va&&null==ia&&U()}),mxEvent.addListener(Ga,"dblclick",function(Oa){"generative"!=Va?F():"hidden"==xa.style.visibility&&U();mxEvent.consume(Oa)}));null!=ka&&(ya=I.cloneNode(!0),
Ga.appendChild(ya),mxEvent.addGestureListeners(ya,mxUtils.bind(this,function(Oa){S=b.sidebar.currentElt==Ga}),null,null),mxEvent.addListener(ya,"click",mxUtils.bind(this,function(Oa){S||Qa(Oa,null!=ra?ra:la);mxEvent.consume(Oa)})));ua.appendChild(Ga);return Ga}function u(){function ka(Ma,Qa){Ma=mxResources.get(Ma,null,Ma.substring(0,1).toUpperCase()+Ma.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"&hellip;");return Ma+(null!=Qa?" ("+Qa.length+")":"")}function ta(Ma,Qa,Ya){mxEvent.addListener(Qa,
"click",function(){Wa!=Qa&&(null!=Wa&&(Wa.style.backgroundColor=""),Wa=Qa,Wa.style.backgroundColor=x,ua.scrollTop=0,ua.innerText="",k=0,null!=Ja[Ma].content?(ua.appendChild(Ja[Ma].content),aa=ia,Ua=null,null!=Ja[Ma].content.init&&Ja[Ma].content.init()):(Ua=Ya?Ra[Ma][Ya]:Ja[Ma],W=null,z(!1)))});null!=urlParams["smart-template"]&&"smartTemplate"==Ma&&Qa.click()}db&&(db=!1,mxEvent.addListener(ua,"scroll",function(Ma){ua.scrollTop+ua.clientHeight>=ua.scrollHeight&&(z(),mxEvent.consume(Ma))}));if(0<ab){var ra=
document.createElement("div");ra.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(ra,mxResources.get("custom"));oa.appendChild(ra);for(var la in Sa){var qa=document.createElement("div");ra=la;var ya=Sa[la];18<ra.length&&(ra=ra.substring(0,18)+"&hellip;");qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";qa.setAttribute("title",ra+" ("+
@@ -12397,10 +12400,10 @@ D=500>(window.innerWidth||document.documentElement.clientWidth||document.body.cl
IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";g||D||!l||B.appendChild(H);l&&mxUtils.write(B,(D?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=
b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var T=document.createElement("input");T.setAttribute("value",b.defaultFilename+H);T.style.marginLeft="10px";T.style.width=g||D?"144px":"244px";this.init=function(){l&&Editor.selectFilename(T);null!=ua.parentNode&&null!=ua.parentNode.parentNode&&mxEvent.addGestureListeners(ua.parentNode.parentNode,mxUtils.bind(this,function(ka){null!=b.sidebar&&
b.sidebar.hideTooltip()}),null,null)};l&&(B.appendChild(T),t?T.style.width=g||D?"350px":"450px":null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,T,b.editor.diagramFileTypes),t.style.marginLeft="6px",t.style.width=g||D?"80px":"180px",B.appendChild(t)));t=!1;var k=0,v=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),G=mxUtils.button(p||mxResources.get("create"),function(){G.setAttribute("disabled",
-"disabled");E();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";var I=document.createElement("img");I.setAttribute("src",Editor.magnifyImage);I.setAttribute("title",mxResources.get("preview"));I.className="geAdaptiveAsset geActiveButton";I.style.position="absolute";I.style.borderRadius="16px";I.style.background="white";I.style.cursor="default";I.style.padding="2px";I.style.opacity="0.8";I.style.height="16px";I.style.right="2px";I.style.top="2px";var M=!1,P=null,S=!1;if(N||c){var V=
+"disabled");F();G.removeAttribute("disabled")});G.className="geBtn gePrimaryBtn";var I=document.createElement("img");I.setAttribute("src",Editor.magnifyImage);I.setAttribute("title",mxResources.get("preview"));I.className="geAdaptiveAsset geActiveButton";I.style.position="absolute";I.style.borderRadius="16px";I.style.background="white";I.style.cursor="default";I.style.padding="2px";I.style.opacity="0.8";I.style.height="16px";I.style.right="2px";I.style.top="2px";var M=!1,P=null,S=!1;if(Q||c){var V=
[],W=null,X=null,Z=null,Y=function(ka){G.setAttribute("disabled","disabled");for(var ta=0;ta<V.length;ta++)V[ta].className=ta==ka?"geBtn gePrimaryBtn":"geBtn"};t=!0;p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="30px";A.appendChild(p);D=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){oa.style.display="";va.style.display="";ua.style.left="160px";Y(0);ua.scrollTop=0;ua.innerText="";k=0;W!=Ua&&(Ua=W,Ja=X,ab=Z,oa.innerText="",u(),W=null)});V.push(D);
p.appendChild(D);var ba=function(ka){oa.style.display="none";va.style.display="none";ua.style.left="30px";Y(ka?-1:1);null==W&&(W=Ua);ua.scrollTop=0;ua.innerText="";v.spin(ua);var ta=function(ra,la,qa){k=0;v.stop();Ua=ra;qa=qa||{};var ya=0,Ea;for(Ea in qa)ya+=qa[Ea].length;if(la)ua.innerText=la;else if(0==ra.length&&0==ya)ua.innerText=mxResources.get("noDiagrams",null,"No Diagrams Found");else if(ua.innerText="",0<ya){oa.style.display="";ua.style.left="160px";oa.innerText="";ab=0;Ja={"draw.io":ra};
-for(Ea in qa)Ja[Ea]=qa[Ea];u()}else z(!0)};ka?c(ea.value,ta):N(ta)};N&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),p.appendChild(D),V.push(D));if(c){D=document.createElement("span");D.style.marginLeft="10px";D.innerText=mxResources.get("search")+":";p.appendChild(D);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(ka){13==ka.keyCode&&ba(!0)});p.appendChild(ea);
+for(Ea in qa)Ja[Ea]=qa[Ea];u()}else z(!0)};ka?c(ea.value,ta):Q(ta)};Q&&(D=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){ba()}),p.appendChild(D),V.push(D));if(c){D=document.createElement("span");D.style.marginLeft="10px";D.innerText=mxResources.get("search")+":";p.appendChild(D);var ea=document.createElement("input");ea.style.marginRight="10px";ea.style.marginLeft="10px";ea.style.width="220px";mxEvent.addListener(ea,"keypress",function(ka){13==ka.keyCode&&ba(!0)});p.appendChild(ea);
D=mxUtils.button(mxResources.get("search"),function(){ba(!0)});D.className="geBtn";p.appendChild(D)}Y(0)}var ca=null,fa=null,aa=null,da=null,ha=null,pa=null,na=null,ia=null,wa=null,ua=document.createElement("div");ua.style.border="1px solid #d3d3d3";ua.style.position="absolute";ua.style.left="160px";ua.style.right="34px";p=(l?72:40)+(t?30:0);ua.style.top=p+"px";ua.style.bottom="68px";ua.style.margin="6px 0 0 -1px";ua.style.padding="6px";ua.style.overflow="auto";var va=document.createElement("div");
va.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;height:22px;margin-top: 6px;white-space: nowrap;";var Ca=document.createElement("input");Ca.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px;border-radius:0px;";Ca.setAttribute("placeholder",mxResources.get("search"));Ca.setAttribute("type","text");va.appendChild(Ca);var ja=document.createElement("img");ja.setAttribute("src",Editor.magnifyImage);ja.setAttribute("title",mxResources.get("search"));
ja.className="geAdaptiveAsset";ja.style.position="relative";ja.style.cursor="pointer";ja.style.opacity="0.5";ja.style.height="16px";ja.style.left="-20px";ja.style.top="4px";ja.style.background="url('"+b.editor.transparentImage+"')";va.appendChild(ja);mxEvent.addListener(ja,"click",function(){ja.getAttribute("src")!=Editor.magnifyImage&&(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search")),Ca.value="",null!=Xa&&(Xa.click(),Xa=null));Ca.focus()});mxEvent.addListener(Ca,
@@ -12409,137 +12412,137 @@ Sa[Na],qa=0;qa<la.length;qa++)for(ya=la[qa],Ea=ya.title.split(" "),Ea.push(Na),H
mxUtils.write(ra,mxResources.get(0==Na.length?"noResultsFor":"resultsFor",[ta]));ua.appendChild(ra);null!=Wa&&null==Xa&&(Wa.style.backgroundColor="",Xa=Wa,Wa=ra);Ua=Na;W=null;z(!1)}mxEvent.consume(ka)}}));mxEvent.addListener(Ca,"keyup",mxUtils.bind(this,function(ka){""==Ca.value?(ja.setAttribute("src",Editor.magnifyImage),ja.setAttribute("title",mxResources.get("search"))):(ja.setAttribute("src",Editor.crossImage),ja.setAttribute("title",mxResources.get("reset")))}));p+=23;var oa=document.createElement("div");
oa.style.cssText="position:absolute;left:30px;width:128px;top:"+p+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(ua,"scroll",function(){b.sidebar.hideTooltip()});var ma=140,Aa=ma,sa=null,Ia="url("+Editor.sparklesImage+")",xa=document.createElement("textarea");xa.setAttribute("placeholder",mxResources.get("describeYourDiagram"));xa.style.position="absolute";xa.style.fontFamily="sans-serif";xa.style.outline="none";xa.style.left="0px";xa.style.right="0px";
xa.style.top="0px";xa.style.bottom="38px";xa.style.resize="none";xa.style.boxSizing="border-box";xa.style.fontSize="12px";xa.style.border="none";xa.style.margin="8px";var Ba=document.createElement("button");Ba.className="geBtn gePrimaryBtn";Ba.style.position="absolute";Ba.style.bottom="0px";Ba.style.height="30px";Ba.style.right="0px";Ba.style.left="0px";Ba.style.margin="8px";Ba.style.fontSize="14px";Ba.style.borderRadius="4px";Ba.setAttribute("disabled","disabled");Ba.setAttribute("title",mxResources.get("ok"));
-mxUtils.write(Ba,mxResources.get("ok"));var Fa=I.cloneNode(!0),La=!1;mxEvent.addGestureListeners(Fa,function(ka){La=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ka){if(!La&&null!=ia){var ta="<mxfile><diagram>"+Graph.compress(ia)+"</diagram></mxfile>";F(ta,mxEvent.getClientX(ka),mxEvent.getClientY(ka),sa,wa)}});var za=I.cloneNode(!0);za.setAttribute("src",Editor.editImage);za.setAttribute("title",mxResources.get("edit"));za.style.right="";za.style.left="2px";var Da=
+mxUtils.write(Ba,mxResources.get("ok"));var Fa=I.cloneNode(!0),La=!1;mxEvent.addGestureListeners(Fa,function(ka){La=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display},null,function(ka){if(!La&&null!=ia){var ta="<mxfile><diagram>"+Graph.compress(ia)+"</diagram></mxfile>";E(ta,mxEvent.getClientX(ka),mxEvent.getClientY(ka),sa,wa)}});var za=I.cloneNode(!0);za.setAttribute("src",Editor.editImage);za.setAttribute("title",mxResources.get("edit"));za.style.right="";za.style.left="2px";var Da=
I.cloneNode(!0);Da.setAttribute("src",Editor.helpImage);Da.setAttribute("title",mxResources.get("help"));Da.style.opacity="1";Da.style.right="-8px";Da.style.top="-8px";mxEvent.addListener(Da,"click",function(ka){b.openLink("https://www.drawio.com/blog/write-query-generate-diagram");mxEvent.consume(ka)});xa.style.visibility="hidden";Ba.style.visibility="hidden";za.style.visibility="hidden";Da.style.visibility="hidden";Fa.style.visibility="hidden";mxEvent.addListener(za,"click",U);mxEvent.addListener(xa,
-"input",function(){""!=xa.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){Q()});mxEvent.addListener(xa,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(Q(!0),mxEvent.consume(ka)):(Q(),mxEvent.consume(ka))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==
+"input",function(){""!=xa.value?Ba.removeAttribute("disabled"):Ba.setAttribute("disabled","disabled")});mxEvent.addListener(Ba,"click",function(){N()});mxEvent.addListener(xa,"keydown",function(ka){13!=ka.keyCode||mxEvent.isShiftDown(ka)?27==ka.keyCode&&(N(!0),mxEvent.consume(ka)):(N(),mxEvent.consume(ka))});var Ja={},Ra={},Sa={},ab=0,db=!0,Wa=null,Xa=null;Ja.basic=[{title:"blankDiagram"}];var Ua=Ja.basic;Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==
typeof mxMermaidToDrawio&&window.isMermaidEnabled&&Ja.basic.push({title:"generate",type:"generative"});Editor.enableChatGpt&&b.isExternalDataComms()&&"draw.io"==b.getServiceName()&&"undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled&&(Ja.smartTemplate={content:C()});if(!g){var eb=function(){mxUtils.get($a,function(ka){if(!jb){jb=!0;ka=ka.getXml().documentElement.firstChild;for(var ta={};null!=ka;){if("undefined"!==typeof ka.getAttribute)if("parsererror"==ka.nodeName)null!=window.console&&
console.log("Parser error in "+L+": "+ka.textContent);else if("clibs"==ka.nodeName){for(var ra=ka.getAttribute("name"),la=ka.getElementsByTagName("add"),qa=[],ya=0;ya<la.length;ya++)qa.push(encodeURIComponent(mxUtils.getTextContent(la[ya])));null!=ra&&0<qa.length&&(ta[ra]=qa.join(";"))}else if(qa=ka.getAttribute("url"),null!=qa){la=ka.getAttribute("section");ra=ka.getAttribute("subsection");if(null==la&&(ya=qa.indexOf("/"),la=qa.substring(0,ya),null==ra)){var Ea=qa.indexOf("/",ya+1);-1<Ea&&(ra=qa.substring(ya+
1,Ea))}ya=Ja[la];null==ya&&(ya=[],Ja[la]=ya);qa=ka.getAttribute("clibs");null!=ta[qa]&&(qa=ta[qa]);qa={url:ka.getAttribute("url"),libs:ka.getAttribute("libs"),title:ka.getAttribute("title"),tooltip:ka.getAttribute("name")||ka.getAttribute("url"),preview:ka.getAttribute("preview"),clibs:qa,tags:ka.getAttribute("tags")};ya.push(qa);null!=ra&&(ya=Ra[la],null==ya&&(ya={},Ra[la]=ya),la=ya[ra],null==la&&(la=[],ya[ra]=la),la.push(qa))}ka=ka.nextSibling}v.stop();u()}})};A.appendChild(va);A.appendChild(oa);
-A.appendChild(ua);var jb=!1,$a=L;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));v.spin(ua);null!=n?n(function(ka,ta){Sa=ka;Z=ab=ta;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(ka){b.dialog.container.firstChild==A&&13==ka.keyCode&&E()});n=document.createElement("div");n.style.marginTop=g?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";p=mxUtils.button(mxResources.get("cancel"),
-function(){null!=y&&y();b.hideDialog(!0)});p.className="geBtn";!b.editor.cancelFirst||q&&null==y||n.appendChild(p);g||"1"==urlParams.embed||q||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(g=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ta){null!=ta&&0<ta.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ta),function(ra){aa=ra;ca=null;templateRealURl=ta;b.hideDialog();E()},function(ra){b.handleError(ra)})},
+A.appendChild(ua);var jb=!1,$a=L;/^https?:\/\//.test($a)&&!b.editor.isCorsEnabledForUrl($a)&&($a=PROXY_URL+"?url="+encodeURIComponent($a));v.spin(ua);null!=n?n(function(ka,ta){Sa=ka;Z=ab=ta;eb()},eb):eb();X=Ja}mxEvent.addListener(T,"keypress",function(ka){b.dialog.container.firstChild==A&&13==ka.keyCode&&F()});n=document.createElement("div");n.style.marginTop=g?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="24px";n.style.right="40px";p=mxUtils.button(mxResources.get("cancel"),
+function(){null!=y&&y();b.hideDialog(!0)});p.className="geBtn";!b.editor.cancelFirst||q&&null==y||n.appendChild(p);g||"1"==urlParams.embed||q||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(g=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ka=new FilenameDialog(b,"",mxResources.get("create"),function(ta){null!=ta&&0<ta.length&&b.editor.loadUrl(b.editor.getProxiedUrl(ta),function(ra){aa=ra;ca=null;templateRealURl=ta;b.hideDialog();F()},function(ra){b.handleError(ra)})},
mxResources.get("url"),null,null,null,!1);b.showDialog(ka.container,300,80,!0,!0);ka.init()}),g.className="geBtn",n.appendChild(g));Graph.fileSupport&&f&&(f=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ka=document.createElement("input");ka.setAttribute("multiple","multiple");ka.setAttribute("type","file");mxEvent.addListener(ka,"change",function(ta){b.openFiles(ka.files,!0);ka.value=""});ka.style.display="none";document.body.appendChild(ka);b.newDlgFileInputElt=
ka}b.newDlgFileInputElt.click()}),f.className="geBtn",n.appendChild(f));n.appendChild(G);b.editor.cancelFirst||null!=d||q&&null==y||n.appendChild(p);A.appendChild(n);this.container=A};NewDialog.tagsList={};
var SaveDialog=function(b,g,l,d,q,y,x,D){function J(A,B,H,T,k,v){var G=null;if(null==d||0>mxUtils.indexOf(d,A))if(k=null!=k?k:b.getTitleForService(A),0<=mxUtils.indexOf(U,A)||null!=b.getServiceForName(A)){G=document.createElement("option");if("pick"==v)G.innerHTML=mxUtils.htmlEntities(k)+"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",G.setAttribute("value","pickFolder-"+A),G.setAttribute("title",k+" - "+mxResources.get("pickFolder")+"...");else{var I=A+
(null!=H?"-"+H:""),M=m[I];null!=M&&null!=M.option&&M.option.parentNode.removeChild(M.option);M=null;if(null!=B){"/"==B.charAt(B.length-1)&&(B=B.substring(0,B.length-1));"/"==B.charAt(0)&&(B=B.substring(1));M=B;if(A!=App.MODE_GITHUB&&A==App.MODE_GITLAB){var P=M.lastIndexOf("/");0<=P&&(M=M.substring(P+1))}40<M.length&&(M=M.substring(0,20)+"..."+M.substring(M.length-20))}G.innerHTML=mxUtils.htmlEntities(k)+(null!=M?"&nbsp;&nbsp;&#8211&nbsp;&nbsp;"+mxUtils.htmlEntities(M):"");G.setAttribute("title",k+
-(null!=B?" ("+B+")":"")+(null!=H&&decodeURIComponent(H)!=B?" ["+H+"]":""));G.setAttribute("value",I);m[I]={option:G,mode:A,path:B,id:H};SaveDialog.lastValue==I&&null==D?T=!0:null==T&&("root"==v?T=null==D&&b.mode==A||null!=A&&A==D:"pickFolder-"==E.value.substring(0,11)&&(T=!0));T&&G.setAttribute("selected","selected")}E.appendChild(G)}return G}function K(A){b.pickFolder(A,function(B){var H=null;A==App.MODE_GOOGLE&&null!=B.docs&&0<B.docs.length?H={mode:A,path:B.docs[0].name,id:B.docs[0].id}:A==App.MODE_ONEDRIVE&&
-null!=B.value&&0<B.value.length?H={mode:A,path:B.value[0].name,id:OneDriveFile.prototype.getIdOf(B.value[0])}:(A==App.MODE_GITHUB||A==App.MODE_GITLAB)&&null!=B&&0<B.length&&(H={mode:A,path:decodeURIComponent(B),id:B});null!=H&&(R.style.display="",b.addRecent(H,"Folders",5),B=J(H.mode,H.path,H.id,!0),E.innerHTML="",m={},L(),H=E.selectedIndex,E.value=B.value,0>E.selectedIndex&&(E.selectedIndex=H))},!0,!0,!0,!0)}function L(){var A=b.getRecent("Folders"),B=0;if(null!=A&&0<A.length){for(var H=0;H<A.length;H++)null!=
-J(A[H].mode,A[H].path,A[H].id)&&B++;0<B&&E.appendChild(O.cloneNode(!0))}J(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");J(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(J(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),J(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&J(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);J(App.MODE_GITHUB,null,null,null,null,"pick");J(App.MODE_GITLAB,null,
-null,null,null,"pick");J(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&J(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&J(App.MODE_BROWSER);A&&J("download");Editor.popupsAllowed&&J("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(E.appendChild(O.cloneNode(!0)),B=E.value,E.appendChild(R),
-E.value=B);if("pickFolder-"==E.value.substring(0,11)||"reset"==E.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),E.insertBefore(B,E.firstChild);Q=E.value}function N(){if("reset"==E.value)b.resetRecent("Folders"),E.innerHTML="",E.value="",pickFolderOption=null,m={},L();else if("pickFolder-"==E.value.substring(0,11)){var A=E.value.substring(11);E.value=Q;K(A)}else if(null!=C&&null!=m[E.value]&&
-null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){A=b.getExtensionForService(m[E.value].mode);var B=F.value;null!=A&&0>g.indexOf(".")&&0>B.indexOf(".")&&(F.value=B+A)}u.innerHTML="";mxUtils.write(u,mxResources.get("download"==E.value||"_blank"==E.value?"ok":"save"));""==E.value?u.setAttribute("disabled","disabled"):u.removeAttribute("disabled")}var c=document.createElement("div");c.style.display="flex";c.style.flexWrap="wrap";c.style.whiteSpace="nowrap";var e=
+(null!=B?" ("+B+")":"")+(null!=H&&decodeURIComponent(H)!=B?" ["+H+"]":""));G.setAttribute("value",I);m[I]={option:G,mode:A,path:B,id:H};SaveDialog.lastValue==I&&null==D?T=!0:null==T&&("root"==v?T=null==D&&b.mode==A||null!=A&&A==D:"pickFolder-"==F.value.substring(0,11)&&(T=!0));T&&G.setAttribute("selected","selected")}F.appendChild(G)}return G}function K(A){b.pickFolder(A,function(B){var H=null;A==App.MODE_GOOGLE&&null!=B.docs&&0<B.docs.length?H={mode:A,path:B.docs[0].name,id:B.docs[0].id}:A==App.MODE_ONEDRIVE&&
+null!=B.value&&0<B.value.length?H={mode:A,path:B.value[0].name,id:OneDriveFile.prototype.getIdOf(B.value[0])}:(A==App.MODE_GITHUB||A==App.MODE_GITLAB)&&null!=B&&0<B.length&&(H={mode:A,path:decodeURIComponent(B),id:B});null!=H&&(R.style.display="",b.addRecent(H,"Folders",5),B=J(H.mode,H.path,H.id,!0),F.innerHTML="",m={},L(),H=F.selectedIndex,F.value=B.value,0>F.selectedIndex&&(F.selectedIndex=H))},!0,!0,!0,!0)}function L(){var A=b.getRecent("Folders"),B=0;if(null!=A&&0<A.length){for(var H=0;H<A.length;H++)null!=
+J(A[H].mode,A[H].path,A[H].id)&&B++;0<B&&F.appendChild(O.cloneNode(!0))}J(App.MODE_GOOGLE,mxResources.get("myDrive"),"root",null,null,"root");J(App.MODE_GOOGLE,null,null,null,null,"pick");null!=b.oneDrive&&(J(App.MODE_ONEDRIVE,mxResources.get("myFiles"),OneDriveFile.prototype.getIdOf(b.oneDrive.rootId),null,null,"root"),J(App.MODE_ONEDRIVE,null,null,null,null,"pick"));null!=b.dropbox&&J(App.MODE_DROPBOX,"Apps"+b.dropbox.appPath);J(App.MODE_GITHUB,null,null,null,null,"pick");J(App.MODE_GITLAB,null,
+null,null,null,"pick");J(App.MODE_TRELLO);A=!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice;EditorUi.nativeFileSupport&&A&&J(App.MODE_DEVICE,null,null,b.mode==App.MODE_DEVICE||null!=d&&0<=mxUtils.indexOf(d,App.MODE_BROWSER)?!0:null);isLocalStorage&&"0"!=urlParams.browser&&J(App.MODE_BROWSER);A&&J("download");Editor.popupsAllowed&&J("_blank",null,null,null,mxResources.get("openInNewWindow"));0<B&&(F.appendChild(O.cloneNode(!0)),B=F.value,F.appendChild(R),
+F.value=B);if("pickFolder-"==F.value.substring(0,11)||"reset"==F.value)B=document.createElement("option"),B.setAttribute("value",""),B.setAttribute("selected","selected"),mxUtils.write(B,mxResources.get("pickFolder")+"..."),F.insertBefore(B,F.firstChild);N=F.value}function Q(){if("reset"==F.value)b.resetRecent("Folders"),F.innerHTML="",F.value="",pickFolderOption=null,m={},L();else if("pickFolder-"==F.value.substring(0,11)){var A=F.value.substring(11);F.value=N;K(A)}else if(null!=C&&null!=m[F.value]&&
+null!=b.editor.diagramFileTypes&&"drawio"==b.editor.diagramFileTypes[C.value].extension){A=b.getExtensionForService(m[F.value].mode);var B=E.value;null!=A&&0>g.indexOf(".")&&0>B.indexOf(".")&&(E.value=B+A)}u.innerHTML="";mxUtils.write(u,mxResources.get("download"==F.value||"_blank"==F.value?"ok":"save"));""==F.value?u.setAttribute("disabled","disabled"):u.removeAttribute("disabled")}var c=document.createElement("div");c.style.display="flex";c.style.flexWrap="wrap";c.style.whiteSpace="nowrap";var e=
document.createElement("div");e.style.display="grid";e.style.gap="5px 8px";e.style.gridAutoRows="auto auto 44px";e.style.gridAutoColumns="0fr minmax(0,1fr)";e.style.width="100%";var f=null,p=null;if(null!=q&&null!=y&&"image/"==y.substring(0,6)&&("image/svg"!=y.substring(0,9)||mxClient.IS_SVG)){e.style.display="inline-grid";e.style.flexBasis="75%";f=document.createElement("div");f.style.display="inline-block";f.style.height="auto";f.style.maxWidth="25%";f.style.margin="auto";var n=document.createElement("img"),
t=x?q:btoa(unescape(encodeURIComponent(q)));n.setAttribute("src","data:"+y+";base64,"+t);n.style.boxSizing="border-box";n.style.maxHeight="50px";n.style.maxWidth="100%";n.style.paddingLeft="10px";f.appendChild(n);mxClient.IS_FF||"image/png"!=y||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||(p=mxUtils.button(mxResources.get("copy"),function(){var A=b.base64ToBlob(t,"image/png");A=new ClipboardItem({"image/png":A,"text/html":new Blob(['<img src="data:'+y+";base64,"+t+'">'],{type:"text/html"})});
navigator.clipboard.write([A]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(B){b.handleError(B)}))},null,"geBtn"));Editor.popupsAllowed&&(null==d||0>mxUtils.indexOf(d,"_blank"))?(f.setAttribute("title",mxResources.get("openInNewWindow")),f.style.cursor="pointer",mxEvent.addGestureListeners(f,null,null,function(A){mxEvent.isPopupTrigger(A)||b.openInNewWindow(q,y,x)})):f.setAttribute("title",mxResources.get("preview"))}n=document.createElement("div");
-n.style.display="flex";n.style.padding="1px";n.style.alignItems="center";n.style.justifyContent="flex-end";n.style.gridColumn="1";n.style.whiteSpace="nowrap";var z=document.createElement("div");z.style.display="grid";z.style.padding="1px";z.style.alignItems="center";z.style.gridColumn="2";z.style.gridAutoColumns="minmax(0,1fr) auto";z.style.gap="6px";mxUtils.write(n,mxResources.get("saveAs")+":");var F=document.createElement("input");F.setAttribute("type","text");F.setAttribute("value",g);F.style.boxSizing=
-"border-box";F.style.width="100%";z.appendChild(F);e.appendChild(n);e.appendChild(z);var C=null;null!=b.editor.diagramFileTypes&&null==y&&(n=n.cloneNode(!1),z=z.cloneNode(!1),mxUtils.write(n,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),C.style.boxSizing="border-box",C.style.width="100%",z.appendChild(C),e.appendChild(n),e.appendChild(z));n=n.cloneNode(!1);z=z.cloneNode(!1);mxUtils.write(n,mxResources.get("where")+":");var E=document.createElement("select");
-E.style.textOverflow="ellipsis";E.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],O=document.createElement("option");O.setAttribute("disabled","disabled");O.innerHTML="-----------------";var Q=null,m={},u=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=E.value;var A=m[SaveDialog.lastValue];null!=A&&l(F,A.mode,A.id)},null,"geBtn gePrimaryBtn");
-mxEvent.addListener(F,"keypress",function(A){13==A.keyCode&&u.click()});mxEvent.addListener(E,"change",N);L();N();z.appendChild(E);null!=SaveDialog.lastValue&&null!=m[SaveDialog.lastValue]&&(E.value=SaveDialog.lastValue);e.appendChild(n);e.appendChild(z);c.appendChild(e);null!=f&&c.appendChild(f);e=document.createElement("div");e.style.flexBasis="100%";e.style.textAlign="right";e.style.marginTop=null!=y?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||e.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));
-f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&e.appendChild(f);null!=p&&e.appendChild(p);e.appendChild(u);b.editor.cancelFirst||e.appendChild(f);c.appendChild(e);this.init=function(){Editor.selectFilename(F)};this.container=c},CreateDialog=function(b,g,l,d,q,y,x,D,J,K,L,N,c,e,f,p,n){function t(Q,m,u,A){function B(){mxEvent.addListener(H,"click",function(){var I=u;if(x){var M=C.value,P=M.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>P){I=null!=
-I?I:O.value;var S="";I==App.MODE_GOOGLE?S=b.drive.extension:I==App.MODE_GITHUB?S=b.gitHub.extension:I==App.MODE_GITLAB?S=b.gitLab.extension:I==App.MODE_TRELLO?S=b.trello.extension:I==App.MODE_DROPBOX?S=b.dropbox.extension:I==App.MODE_ONEDRIVE?S=b.oneDrive.extension:I==App.MODE_DEVICE&&(S=".drawio");0<=P&&(M=M.substring(0,P));C.value=M+S}}z(u)})}var H=document.createElement("a");H.style.overflow="hidden";var T=document.createElement("img");T.src=Q;T.setAttribute("border","0");T.setAttribute("align",
+n.style.display="flex";n.style.padding="1px";n.style.alignItems="center";n.style.justifyContent="flex-end";n.style.gridColumn="1";n.style.whiteSpace="nowrap";var z=document.createElement("div");z.style.display="grid";z.style.padding="1px";z.style.alignItems="center";z.style.gridColumn="2";z.style.gridAutoColumns="minmax(0,1fr) auto";z.style.gap="6px";mxUtils.write(n,mxResources.get("saveAs")+":");var E=document.createElement("input");E.setAttribute("type","text");E.setAttribute("value",g);E.style.boxSizing=
+"border-box";E.style.width="100%";z.appendChild(E);e.appendChild(n);e.appendChild(z);var C=null;null!=b.editor.diagramFileTypes&&null==y&&(n=n.cloneNode(!1),z=z.cloneNode(!1),mxUtils.write(n,mxResources.get("type")+":"),C=FilenameDialog.createFileTypes(b,E,b.editor.diagramFileTypes),C.style.boxSizing="border-box",C.style.width="100%",z.appendChild(C),e.appendChild(n),e.appendChild(z));n=n.cloneNode(!1);z=z.cloneNode(!1);mxUtils.write(n,mxResources.get("where")+":");var F=document.createElement("select");
+F.style.textOverflow="ellipsis";F.style.gridColumn="1";var R=document.createElement("option");mxUtils.write(R,mxResources.get("reset"));R.setAttribute("value","reset");var U=["browser","device","download","_blank"],O=document.createElement("option");O.setAttribute("disabled","disabled");O.innerHTML="-----------------";var N=null,m={},u=mxUtils.button(mxResources.get("save"),function(){SaveDialog.lastValue=F.value;var A=m[SaveDialog.lastValue];null!=A&&l(E,A.mode,A.id)},null,"geBtn gePrimaryBtn");
+mxEvent.addListener(E,"keypress",function(A){13==A.keyCode&&u.click()});mxEvent.addListener(F,"change",Q);L();Q();z.appendChild(F);null!=SaveDialog.lastValue&&null!=m[SaveDialog.lastValue]&&(F.value=SaveDialog.lastValue);e.appendChild(n);e.appendChild(z);c.appendChild(e);null!=f&&c.appendChild(f);e=document.createElement("div");e.style.flexBasis="100%";e.style.textAlign="right";e.style.marginTop=null!=y?"16px":"8px";b.isOffline()&&!mxClient.IS_CHROMEAPP||e.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/save-file-formats"));
+f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()},null,"geBtn");b.editor.cancelFirst&&e.appendChild(f);null!=p&&e.appendChild(p);e.appendChild(u);b.editor.cancelFirst||e.appendChild(f);c.appendChild(e);this.init=function(){Editor.selectFilename(E)};this.container=c},CreateDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q,c,e,f,p,n){function t(N,m,u,A){function B(){mxEvent.addListener(H,"click",function(){var I=u;if(x){var M=C.value,P=M.lastIndexOf(".");if(0>g.lastIndexOf(".")&&0>P){I=null!=
+I?I:O.value;var S="";I==App.MODE_GOOGLE?S=b.drive.extension:I==App.MODE_GITHUB?S=b.gitHub.extension:I==App.MODE_GITLAB?S=b.gitLab.extension:I==App.MODE_TRELLO?S=b.trello.extension:I==App.MODE_DROPBOX?S=b.dropbox.extension:I==App.MODE_ONEDRIVE?S=b.oneDrive.extension:I==App.MODE_DEVICE&&(S=".drawio");0<=P&&(M=M.substring(0,P));C.value=M+S}}z(u)})}var H=document.createElement("a");H.style.overflow="hidden";var T=document.createElement("img");T.src=N;T.setAttribute("border","0");T.setAttribute("align",
"absmiddle");T.style.width="60px";T.style.height="60px";T.style.paddingBottom="6px";H.style.display="inline-block";H.className="geBaseButton";H.style.position="relative";H.style.margin="4px";H.style.padding="8px 8px 10px 8px";H.style.whiteSpace="nowrap";H.appendChild(T);H.style.color="gray";H.style.fontSize="11px";var k=document.createElement("div");H.appendChild(k);mxUtils.write(k,m);if(null!=A&&null==b[A]){T.style.visibility="hidden";mxUtils.setOpacity(k,10);var v=new Spinner({lines:12,length:12,
-width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(H);var G=window.setTimeout(function(){null==b[A]&&(v.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),T.style.visibility="",v.stop(),B())}))}else B();R.appendChild(H);++U==N&&(mxUtils.br(R),U=0)}function z(Q){var m=C.value;if(null==Q||null!=m&&0<m.length)n&&b.hideDialog(),
-l(m,Q,C)}L="1"==urlParams.noDevice?!1:L;x=null!=x?x:!0;D=null!=D?D:!0;N=null!=N?N:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var F=document.createElement("h2");mxUtils.write(F,q||mxResources.get("create"));F.style.marginTop="0px";F.style.marginBottom="24px";y.appendChild(F);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";
+width:5,radius:10,rotate:0,color:"light-dark(#000000, #C0C0C0)",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});v.spin(H);var G=window.setTimeout(function(){null==b[A]&&(v.stop(),H.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[A]&&(window.clearTimeout(G),mxUtils.setOpacity(k,100),T.style.visibility="",v.stop(),B())}))}else B();R.appendChild(H);++U==Q&&(mxUtils.br(R),U=0)}function z(N){var m=C.value;if(null==N||null!=m&&0<m.length)n&&b.hideDialog(),
+l(m,N,C)}L="1"==urlParams.noDevice?!1:L;x=null!=x?x:!0;D=null!=D?D:!0;Q=null!=Q?Q:4;n=null!=n?n:!0;y=document.createElement("div");y.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(y);var E=document.createElement("h2");mxUtils.write(E,q||mxResources.get("create"));E.style.marginTop="0px";E.style.marginBottom="24px";y.appendChild(E);q=document.createElement("span");mxUtils.write(q,mxResources.get("filename")+":");q.style.maxWidth="106px";q.style.overflow="hidden";q.style.textOverflow="ellipsis";
q.style.display="inline-block";y.appendChild(q);var C=document.createElement("input");C.setAttribute("value",g);C.style.width="180px";C.style.marginLeft="10px";C.style.marginBottom="20px";C.style.maxWidth="70%";this.init=function(){Editor.selectFilename(C)};y.appendChild(C);null!=p&&null!=b.editor.diagramFileTypes&&(p=FilenameDialog.createFileTypes(b,C,b.editor.diagramFileTypes),p.style.marginLeft="6px",p.style.width="90px",y.appendChild(p));p=null;if("1"!=urlParams.noDevice&&null!=c&&null!=e&&"image/"==
-e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";q=document.createElement("img");var E=f?c:btoa(unescape(encodeURIComponent(c)));q.setAttribute("src","data:"+e+";base64,"+E);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");y.appendChild(q);mxClient.IS_FF||"image/png"!=e||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||
-(p=mxUtils.button(mxResources.get("copy"),function(Q){Q=b.base64ToBlob(E,"image/png");Q=new ClipboardItem({"image/png":Q,"text/html":new Blob(['<img src="data:'+e+";base64,"+E+'">'],{type:"text/html"})});navigator.clipboard.write([Q]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(m){b.handleError(m)}))}),p.style.marginTop="6px",p.className="geBtn");J&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,
-null,null,function(Q){mxEvent.isPopupTrigger(Q)||z("_blank")}))}mxUtils.br(y);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";y.appendChild(R);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),O.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",
+e.substring(0,6)&&("image/svg"!=e.substring(0,9)||mxClient.IS_SVG)){C.style.width="160px";q=document.createElement("img");var F=f?c:btoa(unescape(encodeURIComponent(c)));q.setAttribute("src","data:"+e+";base64,"+F);q.style.position="absolute";q.style.top="70px";q.style.right="100px";q.style.maxWidth="120px";q.style.maxHeight="80px";mxUtils.setPrefixedStyle(q.style,"transform","translate(50%,-50%)");y.appendChild(q);mxClient.IS_FF||"image/png"!=e||null==navigator.clipboard||"function"!==typeof window.ClipboardItem||
+(p=mxUtils.button(mxResources.get("copy"),function(N){N=b.base64ToBlob(F,"image/png");N=new ClipboardItem({"image/png":N,"text/html":new Blob(['<img src="data:'+e+";base64,"+F+'">'],{type:"text/html"})});navigator.clipboard.write([N]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(m){b.handleError(m)}))}),p.style.marginTop="6px",p.className="geBtn");J&&Editor.popupsAllowed&&(q.style.cursor="pointer",mxEvent.addGestureListeners(q,
+null,null,function(N){mxEvent.isPopupTrigger(N)||z("_blank")}))}mxUtils.br(y);var R=document.createElement("div");R.style.textAlign="center";var U=0;R.style.marginTop="6px";y.appendChild(R);var O=document.createElement("select");O.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(c,mxResources.get("googleDrive")),O.appendChild(c),t(IMAGE_PATH+"/google-drive-logo.svg",
mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(c,mxResources.get("oneDrive")),O.appendChild(c),b.mode==App.MODE_ONEDRIVE&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),"function"===typeof window.DropboxClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_DROPBOX),
mxUtils.write(c,mxResources.get("dropbox")),O.appendChild(c),b.mode==App.MODE_DROPBOX&&c.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_GITHUB),mxUtils.write(c,mxResources.get("github")),O.appendChild(c),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(c=document.createElement("option"),
c.setAttribute("value",App.MODE_GITLAB),mxUtils.write(c,mxResources.get("gitlab")),O.appendChild(c),t(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(c=document.createElement("option"),c.setAttribute("value",App.MODE_TRELLO),mxUtils.write(c,mxResources.get("trello")),O.appendChild(c),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||
null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)c=document.createElement("option"),c.setAttribute("value",App.MODE_DEVICE),mxUtils.write(c,mxResources.get("device")),O.appendChild(c),b.mode!=App.MODE_DEVICE&&D||c.setAttribute("selected","selected"),L&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);D&&isLocalStorage&&"0"!=urlParams.browser&&(D=document.createElement("option"),D.setAttribute("value",App.MODE_BROWSER),mxUtils.write(D,mxResources.get("browser")),O.appendChild(D),
b.mode==App.MODE_BROWSER&&D.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));D=document.createElement("div");D.style.marginTop="26px";D.style.textAlign="center";null!=K&&(L=mxUtils.button(mxResources.get("help"),function(){b.openLink(K)}),L.className="geBtn",D.appendChild(L));L=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});
L.className="geBtn";b.editor.cancelFirst&&null==d&&D.appendChild(L);null==d&&(c=mxUtils.button(mxResources.get("decideLater"),function(){z(null)}),c.className="geBtn",D.appendChild(c));J&&Editor.popupsAllowed&&(J=mxUtils.button(mxResources.get("openInNewWindow"),function(){z("_blank")}),J.className="geBtn",D.appendChild(J));CreateDialog.showDownloadButton&&(J=mxUtils.button(mxResources.get("download"),function(){z("download")}),J.className="geBtn",D.appendChild(J),null!=p&&(J.style.marginTop="6px",
-D.style.marginTop="6px"));null!=p&&(mxUtils.br(D),D.appendChild(p));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(Q){13==Q.keyCode?z(App.MODE_DEVICE):27==Q.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(D);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+D.style.marginTop="6px"));null!=p&&(mxUtils.br(D),D.appendChild(p));b.editor.cancelFirst&&null==d||D.appendChild(L);mxEvent.addListener(C,"keypress",function(N){13==N.keyCode?z(App.MODE_DEVICE):27==N.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});y.appendChild(D);this.container=y};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
var PopupDialog=function(b,g,l,d,q){q=null!=q?q:!0;var y=document.createElement("div");y.style.textAlign="left";y.style.height="100%";mxUtils.write(y,mxResources.get("fileOpenLocation"));mxUtils.br(y);mxUtils.br(y);var x=mxUtils.button(mxResources.get("openInThisWindow"),function(){q&&b.hideDialog();null!=d&&d()});x.className="geBtn";x.style.marginBottom="8px";x.style.width="280px";y.appendChild(x);mxUtils.br(y);var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){q&&b.hideDialog();
-null!=l&&l();b.openLink(g,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=x.style.width;y.appendChild(D);mxUtils.br(y);mxUtils.br(y);mxUtils.write(y,mxResources.get("allowPopups"));this.container=y},ImageDialog=function(b,g,l,d,q,y,x,D){function J(){0<N.value.length?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");"data:"!=N.value.substring(0,5)?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")}y=null!=y?y:!0;var K=b.editor.graph,L=document.createElement("div");
-mxUtils.write(L,g);g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";g.style.paddingRight="20px";var N=document.createElement("input");N.setAttribute("value",l);N.setAttribute("type","text");N.setAttribute("spellcheck","false");N.setAttribute("autocorrect","off");N.setAttribute("autocomplete","off");N.setAttribute("autocapitalize","off");N.style.marginTop=
-"6px";N.style.width=(Graph.fileSupport?460:340)-20+"px";N.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";N.style.backgroundRepeat="no-repeat";N.style.backgroundPosition="100% 50%";N.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage+
-"')";mxEvent.addListener(l,"click",function(){N.value="";N.focus()});g.appendChild(N);g.appendChild(l);L.appendChild(g);var c=D,e,f,p=function(C,E,R,U){var O="data:"==C.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(Q){b.spinner.stop();b.hideDialog();var m=!1===U?1:null!=E&&null!=R?Math.max(E/Q.width,R/Q.height):Math.min(1,Math.min(520/Q.width,520/Q.height));y&&(C=b.convertDataUri(C));d(C,
-Math.round(Number(Q.width)*m),Math.round(Number(Q.height)*m),c,e,f)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,c,e,f)):(C=b.convertDataUri(C),E=null==E?120:E,R=null==R?100:R,b.hideDialog(),d(C,E,R,c,e,f))},n=function(C,E){if(null!=C){var R=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?p(C,R.width,R.height,E):p(C,null,null,E)}else b.hideDialog(),d(null)};this.init=function(){N.focus();
-if(Graph.fileSupport){N.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=L.parentNode,E=null;mxEvent.addListener(C,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){null!=E&&(E.parentNode.removeChild(E),
-E=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(O,Q,m,u,A,B,H,T){n(O,T)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var Q=0;Q<O.length;Q++)O[Q]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&n(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),
-!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign="center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(N.value=C.url));N.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");
-t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(E,R,U,O,Q,m){n(E)},function(){},function(E){return"image/"==E.type.substring(0,6)},function(E){for(var R=0;R<E.length;R++)E[R]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
-g.className="geBtn";D.appendChild(g)}mxEvent.addListener(N,"keypress",function(C){13==C.keyCode&&n(N.value)});var z=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,N.value,c,function(E,R,U){c=E;e=R;f=U});b.showDialog(C.container,300,390,!0,!0)});x&&(z.className="geBtn",D.appendChild(z));var F=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=N.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(N.value),
-E=new Image;E.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(E,R,mxUtils.bind(this,function(O,Q,m){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(N.value=O,J()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},E.width>b.maxImageSize||E.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};E.onerror=function(){b.spinner.stop();
-b.handleError({message:mxResources.get("fileNotFound")})};E.src=C}});F.className="geBtn";mxEvent.addListener(N,"change",function(C){c=null;J()});J();D.appendChild(F);x=mxUtils.button(mxResources.get("apply"),function(){n(N.value)});x.className="geBtn gePrimaryBtn";D.appendChild(x);b.editor.cancelFirst||D.appendChild(l);Graph.fileSupport&&(D.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",
-x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),L.appendChild(x));L.appendChild(D);this.container=L},LinkDialog=function(b,g,l,d,q,y,x){function D(C,E){var R=document.createElement("option");mxUtils.write(R,mxResources.get(C));R.value=C;z.appendChild(R);F[C]=E}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,
+null!=l&&l();b.openLink(g,null,!0)});D.className="geBtn gePrimaryBtn";D.style.width=x.style.width;y.appendChild(D);mxUtils.br(y);mxUtils.br(y);mxUtils.write(y,mxResources.get("allowPopups"));this.container=y},ImageDialog=function(b,g,l,d,q,y,x,D){function J(){0<Q.value.length?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");"data:"!=Q.value.substring(0,5)?E.removeAttribute("disabled"):E.setAttribute("disabled","disabled")}y=null!=y?y:!0;var K=b.editor.graph,L=document.createElement("div");
+mxUtils.write(L,g);g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow="clip";g.style.cursor="default";g.style.paddingRight="20px";var Q=document.createElement("input");Q.setAttribute("value",l);Q.setAttribute("type","text");Q.setAttribute("spellcheck","false");Q.setAttribute("autocorrect","off");Q.setAttribute("autocomplete","off");Q.setAttribute("autocapitalize","off");Q.style.marginTop=
+"6px";Q.style.width=(Graph.fileSupport?460:340)-20+"px";Q.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";Q.style.backgroundRepeat="no-repeat";Q.style.backgroundPosition="100% 50%";Q.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage+
+"')";mxEvent.addListener(l,"click",function(){Q.value="";Q.focus()});g.appendChild(Q);g.appendChild(l);L.appendChild(g);var c=D,e,f,p=function(C,F,R,U){var O="data:"==C.substring(0,5);!b.isOffline()||O&&"undefined"===typeof chrome?0<C.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(C,function(N){b.spinner.stop();b.hideDialog();var m=!1===U?1:null!=F&&null!=R?Math.max(F/N.width,R/N.height):Math.min(1,Math.min(520/N.width,520/N.height));y&&(C=b.convertDataUri(C));d(C,
+Math.round(Number(N.width)*m),Math.round(Number(N.height)*m),c,e,f)},function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(C,null,null,c,e,f)):(C=b.convertDataUri(C),F=null==F?120:F,R=null==R?100:R,b.hideDialog(),d(C,F,R,c,e,f))},n=function(C,F){if(null!=C){var R=q?null:K.getModel().getGeometry(K.getSelectionCell());null!=R?p(C,R.width,R.height,F):p(C,null,null,F)}else b.hideDialog(),d(null)};this.init=function(){Q.focus();
+if(Graph.fileSupport){Q.setAttribute("placeholder",mxResources.get("dragImagesHere"));var C=L.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(R){null!=F&&(F.parentNode.removeChild(F),F=null);R.stopPropagation();R.preventDefault()});mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){null!=F&&(F.parentNode.removeChild(F),
+F=null);if(0<R.dataTransfer.files.length)b.importFiles(R.dataTransfer.files,0,0,b.maxImageSize,function(O,N,m,u,A,B,H,T){n(O,T)},function(){},function(O){return"image/"==O.type.substring(0,6)},function(O){for(var N=0;N<O.length;N++)O[N]()},!mxEvent.isControlDown(R),null,null,!0);else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var U=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(U)&&n(decodeURIComponent(U))}R.stopPropagation();R.preventDefault()}),
+!1)}};D=document.createElement("div");D.style.marginTop="14px";D.style.textAlign="center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&D.appendChild(l);ImageDialog.filePicked=function(C){C.action==google.picker.Action.PICKED&&null!=C.docs[0].thumbnails&&(C=C.docs[0].thumbnails[C.docs[0].thumbnails.length-1],null!=C&&(Q.value=C.url));Q.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var t=document.createElement("input");
+t.setAttribute("multiple","multiple");t.setAttribute("type","file");mxEvent.addListener(t,"change",function(C){null!=t.files&&(b.importFiles(t.files,0,0,b.maxImageSize,function(F,R,U,O,N,m){n(F)},function(){},function(F){return"image/"==F.type.substring(0,6)},function(F){for(var R=0;R<F.length;R++)F[R]()},!0),t.type="",t.type="file",t.value="")});t.style.display="none";document.body.appendChild(t);b.imgDlgFileInputElt=t}g=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});
+g.className="geBtn";D.appendChild(g)}mxEvent.addListener(Q,"keypress",function(C){13==C.keyCode&&n(Q.value)});var z=mxUtils.button(mxResources.get("crop"),function(){var C=new CropImageDialog(b,Q.value,c,function(F,R,U){c=F;e=R;f=U});b.showDialog(C.container,300,390,!0,!0)});x&&(z.className="geBtn",D.appendChild(z));var E=mxUtils.button(mxResources.get("embed"),function(){if("data:"!=Q.value.substring(0,5)&&b.spinner.spin(document.body,mxResources.get("loading"))){var C=b.editor.createImageUrlConverter().convert(Q.value),
+F=new Image;F.onload=function(){b.editor.convertImageToDataUri(C,function(R){b.confirmImageResize(function(U){b.resizeImage(F,R,mxUtils.bind(this,function(O,N,m){b.spinner.stop();null!=O&&O.length<b.maxImageBytes?(Q.value=O,J()):b.handleError({message:mxResources.get("imageTooBig")})}),U,b.maxImageSize)},F.width>b.maxImageSize||F.height>b.maxImageSize||R.length>b.maxImageBytes)},mxUtils.bind(this,function(){b.handleError({message:mxResources.get("fileNotFound")})}))};F.onerror=function(){b.spinner.stop();
+b.handleError({message:mxResources.get("fileNotFound")})};F.src=C}});E.className="geBtn";mxEvent.addListener(Q,"change",function(C){c=null;J()});J();D.appendChild(E);x=mxUtils.button(mxResources.get("apply"),function(){n(Q.value)});x.className="geBtn gePrimaryBtn";D.appendChild(x);b.editor.cancelFirst||D.appendChild(l);Graph.fileSupport&&(D.style.marginTop="120px",L.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",L.style.backgroundPosition="center 65%",L.style.backgroundRepeat="no-repeat",
+x=document.createElement("div"),x.style.position="absolute",x.style.width="420px",x.style.top="58%",x.style.textAlign="center",x.style.fontSize="18px",x.style.color="#a0c3ff",mxUtils.write(x,mxResources.get("dragImagesHere")),L.appendChild(x));L.appendChild(D);this.container=L},LinkDialog=function(b,g,l,d,q,y,x){function D(C,F){var R=document.createElement("option");mxUtils.write(R,mxResources.get(C));R.value=C;z.appendChild(R);E[C]=F}var J=document.createElement("div");J.style.height="100%";mxUtils.write(J,
mxResources.get("editLink")+":");var K=document.createElement("div");K.className="geTitle";K.style.backgroundColor="transparent";K.style.borderColor="transparent";K.style.whiteSpace="nowrap";K.style.textOverflow="clip";K.style.cursor="default";var L=document.createElement("input");L.setAttribute("placeholder",mxResources.get("dragUrlsHere"));L.setAttribute("type","text");L.style.marginTop="6px";L.style.width="414px";L.style.boxSizing="border-box";L.style.backgroundImage="url('"+Dialog.prototype.clearImage+
-"')";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="14px";L.style.marginBottom="4px";var N=document.createElement("div");N.setAttribute("title",mxResources.get("reset"));N.style.position="relative";N.style.left="-16px";N.style.width="12px";N.style.height="14px";N.style.cursor="pointer";N.style.display="inline-block";N.style.top="3px";N.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(N,"click",function(){L.value="";L.focus()});
+"')";L.style.backgroundRepeat="no-repeat";L.style.backgroundPosition="100% 50%";L.style.paddingRight="14px";L.style.marginBottom="4px";var Q=document.createElement("div");Q.setAttribute("title",mxResources.get("reset"));Q.style.position="relative";Q.style.left="-16px";Q.style.width="12px";Q.style.height="14px";Q.style.cursor="pointer";Q.style.display="inline-block";Q.style.top="3px";Q.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(Q,"click",function(){L.value="";L.focus()});
var c=document.createElement("input");c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geLinkDialogOption");var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","url");e.setAttribute("type","radio");e.setAttribute("name","geLinkDialogOption");var f=document.createElement("select");f.style.width="414px";var p=document.createElement("input");p.setAttribute("type",
-"checkbox");p.style.margin="0 6p 0 6px";null!=x&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);x=null!=x?x:"_blank";p.setAttribute("title",x);y&&(L.style.width="200px");if(q&&null!=b.pages){null!=g&&Graph.isPageLink(g)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(L.setAttribute("value",g),c.setAttribute("checked","checked"),c.defaultChecked=!0);K.appendChild(c);K.appendChild(L);K.appendChild(N);y&&(K.appendChild(p),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);
-K.appendChild(e);q=!1;for(y=0;y<b.pages.length;y++)N=document.createElement("option"),mxUtils.write(N,b.pages[y].getName()||mxResources.get("pageWithNumber",[y+1])),N.setAttribute("value","data:page/id,"+b.pages[y].getId()),g==N.getAttribute("value")&&(N.setAttribute("selected","selected"),q=!0),f.appendChild(N);if(!q&&e.checked){var n=document.createElement("option");mxUtils.write(n,mxResources.get("pageNotFound"));n.setAttribute("disabled","disabled");n.setAttribute("selected","selected");n.setAttribute("value",
-"pageNotFound");f.appendChild(n);mxEvent.addListener(f,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)})}K.appendChild(f)}else L.setAttribute("value",g),K.appendChild(L),K.appendChild(N);J.appendChild(K);var t=mxUtils.button(l,function(){b.hideDialog();d(e.checked?"pageNotFound"!==f.value?f.value:g:L.value,LinkDialog.selectedDocs,p.checked?x:null)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){e.checked?f.focus():(L.focus(),mxClient.IS_GC||
-mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(L,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var C=J.parentNode,E=null;mxEvent.addListener(C,"dragleave",function(R){null!=E&&(E.parentNode.removeChild(E),E=null);R.stopPropagation();R.preventDefault()});
-mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==E&&(!mxClient.IS_IE||10<document.documentMode)&&(E=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){try{null!=E&&(E.parentNode.removeChild(E),E=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,t.click())}catch(U){b.handleError(U)}R.stopPropagation();
+"checkbox");p.style.margin="0 6p 0 6px";null!=x&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);x=null!=x?x:"_blank";p.setAttribute("title",x);y&&(L.style.width="200px");if(q&&null!=b.pages){null!=g&&Graph.isPageLink(g)?(e.setAttribute("checked","checked"),e.defaultChecked=!0):(L.setAttribute("value",g),c.setAttribute("checked","checked"),c.defaultChecked=!0);K.appendChild(c);K.appendChild(L);K.appendChild(Q);y&&(K.appendChild(p),mxUtils.write(K,mxResources.get("openInNewWindow")));mxUtils.br(K);
+K.appendChild(e);q=!1;for(y=0;y<b.pages.length;y++)Q=document.createElement("option"),mxUtils.write(Q,b.pages[y].getName()||mxResources.get("pageWithNumber",[y+1])),Q.setAttribute("value","data:page/id,"+b.pages[y].getId()),g==Q.getAttribute("value")&&(Q.setAttribute("selected","selected"),q=!0),f.appendChild(Q);if(!q&&e.checked){var n=document.createElement("option");mxUtils.write(n,mxResources.get("pageNotFound"));n.setAttribute("disabled","disabled");n.setAttribute("selected","selected");n.setAttribute("value",
+"pageNotFound");f.appendChild(n);mxEvent.addListener(f,"change",function(){null==n.parentNode||n.selected||n.parentNode.removeChild(n)})}K.appendChild(f)}else L.setAttribute("value",g),K.appendChild(L),K.appendChild(Q);J.appendChild(K);var t=mxUtils.button(l,function(){b.hideDialog();d(e.checked?"pageNotFound"!==f.value?f.value:g:L.value,LinkDialog.selectedDocs,p.checked?x:null)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){e.checked?f.focus():(L.focus(),mxClient.IS_GC||
+mxClient.IS_FF||5<=document.documentMode?L.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(f,"focus",function(){c.removeAttribute("checked");e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(L,"focus",function(){e.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});if(Graph.fileSupport){var C=J.parentNode,F=null;mxEvent.addListener(C,"dragleave",function(R){null!=F&&(F.parentNode.removeChild(F),F=null);R.stopPropagation();R.preventDefault()});
+mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(R){null==F&&(!mxClient.IS_IE||10<document.documentMode)&&(F=b.highlightElement(C));R.stopPropagation();R.preventDefault()}));mxEvent.addListener(C,"drop",mxUtils.bind(this,function(R){try{null!=F&&(F.parentNode.removeChild(F),F=null),0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")&&(L.value=decodeURIComponent(R.dataTransfer.getData("text/uri-list")),c.setAttribute("checked","checked"),c.checked=!0,t.click())}catch(U){b.handleError(U)}R.stopPropagation();
R.preventDefault()}),!1)}};l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="right";b.isOffline()||l.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/custom-links"));K=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});K.style.verticalAlign="middle";K.className="geBtn";b.editor.cancelFirst&&l.appendChild(K);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(C){if(C.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=C.docs;
-var E=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==C.docs[0].mimeType.substring(0,23)?E="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(E="https://drive.google.com/#folders/"+C.docs[0].id);L.value=E;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var z=document.createElement("select");z.className="geBtn";z.style.position="relative";z.style.top="1px";z.style.maxWidth="120px";var F={};
-q=document.createElement("option");mxUtils.write(q,mxResources.get("select")+"...");q.value="";z.appendChild(q);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(E){LinkDialog.filePicked(E)}).build()}b.linkPicker.setVisible(!0)}))});
-"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(C){L.value=C[0].link;L.focus()}})});null!=b.oneDrive&&D("oneDrive",function(){b.oneDrive.pickFile(function(C,E){null!=E&&null!=E.value&&0<E.value.length&&(L.value=E.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&D("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var E=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");
-L.value="https://github.com/"+E+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});null!=b.gitLab&&D("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=C){C=C.split("/");var E=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+E+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});1<z.children.length&&(l.appendChild(z),mxEvent.addListener(z,"change",function(C){null!=F[z.value]&&(F[z.value](),z.value="")}));mxEvent.addListener(L,"keypress",function(C){13==C.keyCode&&t.click()});l.appendChild(t);
+var F=C.docs[0].url;"application/mxe"==C.docs[0].mimeType||null!=C.docs[0].mimeType&&"application/vnd.jgraph."==C.docs[0].mimeType.substring(0,23)?F="https://www.draw.io/#G"+C.docs[0].id:"application/vnd.google-apps.folder"==C.docs[0].mimeType&&(F="https://drive.google.com/#folders/"+C.docs[0].id);L.value=F;L.focus()}else LinkDialog.selectedDocs=null;L.focus()};var z=document.createElement("select");z.className="geBtn";z.style.position="relative";z.style.top="1px";z.style.maxWidth="120px";var E={};
+q=document.createElement("option");mxUtils.write(q,mxResources.get("select")+"...");q.value="";z.appendChild(q);"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&D("googleDrive",function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();if(null==b.linkPicker){var C=b.drive.createLinkPicker();b.linkPicker=C.setCallback(function(F){LinkDialog.filePicked(F)}).build()}b.linkPicker.setVisible(!0)}))});
+"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&D("dropbox",function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(C){L.value=C[0].link;L.focus()}})});null!=b.oneDrive&&D("oneDrive",function(){b.oneDrive.pickFile(function(C,F){null!=F&&null!=F.value&&0<F.value.length&&(L.value=F.value[0].webUrl,L.focus())},!0)});null!=b.gitHub&&D("github",function(){b.gitHub.pickFile(function(C){if(null!=C){C=C.split("/");var F=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");
+L.value="https://github.com/"+F+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});null!=b.gitLab&&D("gitlab",function(){b.gitLab.pickFile(function(C){if(null!=C){C=C.split("/");var F=C[0],R=C[1],U=C[2];C=C.slice(3,C.length).join("/");L.value=DRAWIO_GITLAB_URL+"/"+F+"/"+R+"/blob/"+U+"/"+C;L.focus()}})});1<z.children.length&&(l.appendChild(z),mxEvent.addListener(z,"change",function(C){null!=E[z.value]&&(E[z.value](),z.value="")}));mxEvent.addListener(L,"keypress",function(C){13==C.keyCode&&t.click()});l.appendChild(t);
b.editor.cancelFirst||l.appendChild(K);J.appendChild(l);this.container=J},FeedbackDialog=function(b,g,l,d){var q=document.createElement("div"),y=document.createElement("div");mxUtils.write(y,mxResources.get("sendYourFeedback"));y.style.fontSize="18px";y.style.marginBottom="18px";q.appendChild(y);y=document.createElement("div");mxUtils.write(y,mxResources.get("yourEmailAddress")+(l?"":" ("+mxResources.get("required")+")"));q.appendChild(y);var x=document.createElement("input");x.setAttribute("type",
-"text");x.style.marginTop="6px";x.style.width="600px";var D=mxUtils.button(mxResources.get("sendMessage"),function(){var N=L.value+(K.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;N.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=
-FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=g?g:"Feedback")+":\n"+N),function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});D.className=
+"text");x.style.marginTop="6px";x.style.width="600px";var D=mxUtils.button(mxResources.get("sendMessage"),function(){var Q=L.value+(K.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;Q.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=
+FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(x.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=g?g:"Feedback")+":\n"+Q),function(c){b.spinner.stop();200<=c.getStatus()&&299>=c.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});D.className=
"geBtn gePrimaryBtn";if(!l){D.setAttribute("disabled","disabled");var J=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(x,"change",function(){0<x.value.length&&0<J.test(x.value)?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled")});mxEvent.addListener(x,"keyup",function(){0<x.value.length&&J.test(x.value)?D.removeAttribute("disabled"):D.setAttribute("disabled",
-"disabled")})}q.appendChild(x);this.init=function(){x.focus()};var K=document.createElement("input");K.setAttribute("type","checkbox");K.setAttribute("checked","checked");K.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";l.appendChild(K);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("includeCopyOfMyDiagram"));l.appendChild(y);mxEvent.addListener(y,"click",function(N){K.checked=!K.checked;mxEvent.consume(N)});q.appendChild(l);y=document.createElement("div");
+"disabled")})}q.appendChild(x);this.init=function(){x.focus()};var K=document.createElement("input");K.setAttribute("type","checkbox");K.setAttribute("checked","checked");K.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";l.appendChild(K);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("includeCopyOfMyDiagram"));l.appendChild(y);mxEvent.addListener(y,"click",function(Q){K.checked=!K.checked;mxEvent.consume(Q)});q.appendChild(l);y=document.createElement("div");
mxUtils.write(y,mxResources.get("feedback"));q.appendChild(y);var L=document.createElement("textarea");L.style.resize="none";L.style.width="600px";L.style.height="140px";L.style.marginTop="6px";L.setAttribute("placeholder",mxResources.get("comments"));q.appendChild(L);l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";b.editor.cancelFirst?(l.appendChild(y),l.appendChild(D)):(l.appendChild(D),
l.appendChild(y));q.appendChild(l);this.container=q};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,g,l){var d=document.createElement("div"),q=document.createElement("h3");q.style.marginTop="3px";mxUtils.write(q,mxResources.get("revisionHistory"));d.appendChild(q);q=document.createElement("div");q.style.position="absolute";q.style.overflow="auto";q.style.width="170px";q.style.height="378px";d.appendChild(q);var y=document.createElement("div");y.style.position="absolute";y.style.left="200px";y.style.width="470px";y.style.height="376px";y.style.overflow="hidden";y.style.borderWidth=
"1px";y.style.borderStyle="solid";var x=document.createElement("div");x.style.position="absolute";x.style.display="none";x.style.textAlign="center";x.style.padding="8px";x.style.borderRadius="8px";x.style.left="50%";x.style.top="50%";x.style.whiteSpace="nowrap";x.style.transform="translate(-50%, -50%)";x.style.background="inherit";x.style.border="1px solid";y.appendChild(x);mxEvent.disableContextMenu(y);d.appendChild(y);var D=new Graph(y);D.setTooltips(!1);D.setEnabled(!1);D.setPanning(!0);D.panningHandler.ignoreCell=
-!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var J=0,K=null,L=0,N=D.getGlobalVariable;D.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==X?L+1:"pagecount"==X?null!=K?K.length:1:N.apply(this,arguments)};D.getLinkForCell=function(){return null};for(var c=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,
-shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),e=b.getCurrentFile(),f=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},n=0;n<f.length;n++)p[f[n].getAttribute("id")]=f[n];var t=null,z=null,F=null,C=null,E=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=F&&D.zoomIn()},20);E.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=F&&D.zoomOut()},20);R.setAttribute("disabled",
-"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=F&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);U.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);O.setAttribute("disabled","disabled");var Q=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);Q.setAttribute("disabled","disabled");var m=y.cloneNode(!1);m.style.pointerEvent=
+!0;D.panningHandler.useLeftButtonForPanning=!0;D.minFitScale=null;D.maxFitScale=null;D.centerZoom=!0;var J=0,K=null,L=0,Q=D.getGlobalVariable;D.getGlobalVariable=function(X){return"page"==X&&null!=K&&null!=K[L]?K[L].getAttribute("name"):"pagenumber"==X?L+1:"pagecount"==X?null!=K?K.length:1:Q.apply(this,arguments)};D.getLinkForCell=function(){return null};for(var c=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"light-dark(#000000, #C0C0C0)",speed:1.4,trail:60,
+shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),e=b.getCurrentFile(),f=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),p={},n=0;n<f.length;n++)p[f[n].getAttribute("id")]=f[n];var t=null,z=null,E=null,C=null,F=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){null!=E&&D.zoomIn()},20);F.setAttribute("disabled","disabled");var R=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){null!=E&&D.zoomOut()},20);R.setAttribute("disabled",
+"disabled");var U=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){null!=E&&(1==D.view.scale?(D.maxFitScale=8,D.fit(8)):D.zoomActual(),D.center())},20);U.setAttribute("disabled","disabled");var O=b.createToolbarButton(Editor.compareImage,mxResources.get("compare"),null,20);O.setAttribute("disabled","disabled");var N=b.createToolbarButton(Editor.thinDataImage,mxResources.get("merge"),null,20);N.setAttribute("disabled","disabled");var m=y.cloneNode(!1);m.style.pointerEvent=
"none";y.parentNode.appendChild(m);var u=new Graph(m);u.setTooltips(!1);u.setEnabled(!1);u.setPanning(!0);u.panningHandler.ignoreCell=!0;u.panningHandler.useLeftButtonForPanning=!0;u.minFitScale=null;u.maxFitScale=null;u.centerZoom=!0;var A=document.createElement("div");A.style.textAlign="left";A.style.color="gray";A.style.backgroundColor="transparent";A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.style.whiteSpace="nowrap";A.style.cursor="default";A.style.height="100%";A.style.display=
"inline-flex";A.style.alignItems="center";A.style.flexGrow="1";mxEvent.addListener(A,"click",function(){var X=mxUtils.getTextContent(A);""!=X&&b.alert(X)});var B=null;mxEvent.addGestureListeners(O,function(X){try{var Z=null!=K[J]?p[K[J].getAttribute("id")]:null;mxUtils.setOpacity(O,20);x.innerText="";if(null==Z)x.style.display="inline-block",mxUtils.write(x,mxResources.get("pageNotFound"));else{B=A.innerHTML;A.innerHTML=mxResources.get("current");y.style.display="none";m.style.display="";m.style.backgroundColor=
y.style.backgroundColor;var Y=Editor.parseDiagramNode(Z);(new mxCodec(Y.ownerDocument)).decode(Y,u.getModel());u.view.scaleAndTranslate(D.view.scale,D.view.translate.x,D.view.translate.y);u.mathEnabled="1"==Y.getAttribute("math");u.setAdaptiveColors(Y.getAttribute("adaptiveColors"));Editor.MathJaxRender&&u.mathEnabled&&Editor.MathJaxRender(u.container)}}catch(ba){x.style.display="inline-block",x.innerText="",mxUtils.write(x,mxResources.get("pageNotFound")+": "+ba.message)}},null,function(){mxUtils.setOpacity(O,
-60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",A.innerHTML=B,m.style.display="none")});mxEvent.addListener(Q,"click",mxUtils.bind(this,function(X){null!=F&&(X=b.getPagesForNode(F.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{e.patch(Y,null,!0,!0),b.hideDialog(),
-b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var H=mxUtils.button(mxResources.get("restore"),function(X){null!=F&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(H.setAttribute("disabled","disabled"),e.save(!0,function(Z){b.spinner.stop();
+60);x.style.display="none";x.innerText="";"none"==y.style.display&&(y.style.display="",A.innerHTML=B,m.style.display="none")});mxEvent.addListener(N,"click",mxUtils.bind(this,function(X){null!=E&&(X=b.getPagesForNode(E.documentElement),X=b.diffPages(b.pages,X),X=new TextareaDialog(b,mxResources.get("merge")+":",JSON.stringify(X,null,2),function(Z){try{if(0<Z.length&&b.editor.graph.isEnabled()){var Y=[JSON.parse(Z)];b.confirm(mxResources.get("areYouSure"),function(){try{e.patch(Y,null,!0,!0),b.hideDialog(),
+b.hideDialog()}catch(ba){b.handleError(ba)}})}else b.hideDialog()}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get(b.editor.graph.isEnabled()?"merge":"close")),b.showDialog(X.container,620,460,!0,!0),X.init())}));var H=mxUtils.button(mxResources.get("restore"),function(X){null!=E&&null!=C&&b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(C):b.spinner.spin(document.body,mxResources.get("restoring"))&&(H.setAttribute("disabled","disabled"),e.save(!0,function(Z){b.spinner.stop();
H.removeAttribute("disabled");b.replaceFileData(C);b.hideDialog()},function(Z){b.spinner.stop();H.removeAttribute("disabled");b.editor.setStatus("");b.handleError(Z,null!=Z?mxResources.get("errorSavingFile"):null)}))})});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");var T=document.createElement("select");T.setAttribute("disabled","disabled");T.style.userSelect="none";T.style.maxWidth="100px";T.style.marginLeft="10px";T.style.display="none";var k=null;mxEvent.addListener(T,
-"change",function(X){null!=k&&(k(X),mxEvent.consume(X))});var v=mxUtils.button(mxResources.get("open"),function(){null!=F&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(F.documentElement)),b.openLink(b.getUrl(),null,!0))});v.className="geBtn";v.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});G.className="geBtn";G.setAttribute("disabled","disabled");null!=
+"change",function(X){null!=k&&(k(X),mxEvent.consume(X))});var v=mxUtils.button(mxResources.get("open"),function(){null!=E&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(E.documentElement)),b.openLink(b.getUrl(),null,!0))});v.className="geBtn";v.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("createRevision"),function(){b.actions.get("save").funct(!1)});G.className="geBtn";G.setAttribute("disabled","disabled");null!=
l&&(v.style.display="none");f=document.createElement("div");f.style.position="absolute";f.style.top="482px";f.style.right="28px";f.style.left="32px";f.style.justifyContent="end";f.style.display="flex";var I=document.createElement("div");I.className="geToolbarContainer";I.style.backgroundColor="transparent";I.style.display="flex";I.style.alignItems="center";I.style.justifyContent="stretch";I.style.left="32px";I.style.right="32px";I.style.border="none";I.style.top="440px";I.style.height="28px";var M=
null;if(null!=g&&0<g.length){y.style.cursor="move";var P=document.createElement("table");P.style.borderWidth="1px";P.style.borderStyle="solid";P.style.borderCollapse="collapse";P.style.borderSpacing="0px";P.style.width="100%";var S=document.createElement("tbody"),V=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(J=mxUtils.indexOf(b.pages,b.currentPage));for(n=g.length-1;0<=n;n--){var W=function(X){var Z=new Date(X.modifiedDate),Y=null;if(0<=Z.getTime()){var ba=function(ca){c.stop();
x.innerText="";var fa=mxUtils.parseXml(ca),aa=b.editor.extractGraphModel(fa.documentElement,!0);if(null!=aa){var da=function(wa){null!=wa&&(wa=ha(Editor.parseDiagramNode(wa)));return wa},ha=function(wa){var ua=wa.getAttribute("background");if(null==ua||""==ua||ua==mxConstants.NONE)ua=D.defaultPageBackgroundColor;y.style.backgroundColor=mxUtils.getLightDarkColor(ua);(new mxCodec(wa.ownerDocument)).decode(wa,D.getModel());D.maxFitScale=1;D.fit(8);D.center();D.mathEnabled="1"==wa.getAttribute("math");
-D.setAdaptiveColors(wa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&D.mathEnabled&&Editor.MathJaxRender(D.container);return wa};T.style.display="none";T.innerText="";F=fa;C=ca;K=parseSelectFunction=null;L=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");K=[];for(ca=0;ca<fa.length;ca++)K.push(fa[ca]);L=Math.min(J,K.length-1);0<K.length&&da(K[L]);if(1<K.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<K.length;ca++){fa=document.createElement("option");fa.setAttribute("title",
+D.setAdaptiveColors(wa.getAttribute("adaptiveColors"));Editor.MathJaxRender&&D.mathEnabled&&Editor.MathJaxRender(D.container);return wa};T.style.display="none";T.innerText="";E=fa;C=ca;K=parseSelectFunction=null;L=0;if("mxfile"==aa.nodeName){fa=aa.getElementsByTagName("diagram");K=[];for(ca=0;ca<fa.length;ca++)K.push(fa[ca]);L=Math.min(J,K.length-1);0<K.length&&da(K[L]);if(1<K.length)for(T.removeAttribute("disabled"),T.style.display="",ca=0;ca<K.length;ca++){fa=document.createElement("option");fa.setAttribute("title",
pa+" ("+K[ca].getAttribute("id")+")");fa.setAttribute("value",ca);var pa=K[ca].getAttribute("name")||mxResources.get("pageWithNumber",[ca+1]);aa=b.getPageById(K[ca].getAttribute("id"));var na="";if(null!=aa){var ia=new DiagramPage(K[ca]);b.getHashValueForPages([aa])!=b.getHashValueForPages([ia])&&(na=" (M)")}else na=" (X)";mxUtils.write(fa,pa+na);ca==L&&fa.setAttribute("selected","selected");T.appendChild(fa)}k=function(){try{var wa=parseInt(T.value);L=J=wa;da(K[wa])}catch(ua){T.value=J,b.handleError(ua)}}}else ha(aa);
-pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());A.setAttribute("title",Y.getAttribute("title"));E.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");O.removeAttribute("disabled");Q.removeAttribute("disabled");null!=e&&e.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));
-mxUtils.setOpacity(E,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(Q,60)}else T.style.display="none",T.innerText="",A.innerText="",x.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=
+pa=X.lastModifyingUserName;null!=pa&&20<pa.length&&(pa=pa.substring(0,20)+"...");A.innerText="";mxUtils.write(A,(null!=pa?pa+" ":"")+Z.toLocaleDateString()+" "+Z.toLocaleTimeString());A.setAttribute("title",Y.getAttribute("title"));F.removeAttribute("disabled");R.removeAttribute("disabled");U.removeAttribute("disabled");O.removeAttribute("disabled");N.removeAttribute("disabled");null!=e&&e.isRestricted()||(b.editor.graph.isEnabled()&&H.removeAttribute("disabled"),v.removeAttribute("disabled"),G.removeAttribute("disabled"));
+mxUtils.setOpacity(F,60);mxUtils.setOpacity(R,60);mxUtils.setOpacity(U,60);mxUtils.setOpacity(O,60);mxUtils.setOpacity(N,60)}else T.style.display="none",T.innerText="",A.innerText="",x.innerText="",mxUtils.write(A,mxResources.get("errorLoadingFile")),mxUtils.write(x,mxResources.get("errorLoadingFile"))};Y=document.createElement("tr");Y.style.borderBottomWidth="1px";Y.style.borderBottomStyle="solid";Y.style.fontSize="12px";Y.style.cursor="pointer";var ea=document.createElement("td");ea.style.padding=
"6px";ea.style.whiteSpace="nowrap";X==g[g.length-1]?mxUtils.write(ea,mxResources.get("current")):Z.toDateString()===V?mxUtils.write(ea,Z.toLocaleTimeString()):mxUtils.write(ea,Z.toLocaleDateString()+" "+Z.toLocaleTimeString());Y.appendChild(ea);Y.setAttribute("title",Z.toLocaleDateString()+" "+Z.toLocaleTimeString()+(null!=X.fileSize?" "+b.formatFileSize(parseInt(X.fileSize)):"")+(null!=X.lastModifyingUserName?" "+X.lastModifyingUserName:""));mxEvent.addListener(Y,"click",function(ca){z!=X&&(c.stop(),
-null!=t&&(t.style.backgroundColor=""),z=X,t=Y,t.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=F=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=D.defaultPageBackgroundColor,x.innerText="",D.getModel().clear(),H.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"),v.setAttribute("disabled",
-"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(E,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(Q,20),c.spin(y),X.getXml(function(fa){if(z==X)try{ba(fa)}catch(aa){A.innerText=mxResources.get("error")+": "+aa.message}},function(fa){c.stop();T.style.display="none";T.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,
+null!=t&&(t.style.backgroundColor=""),z=X,t=Y,t.style.backgroundColor="light-dark(#ebf2f9, #000000)",C=E=null,A.removeAttribute("title"),A.innerText=mxResources.get("loading")+"...",y.style.backgroundColor=D.defaultPageBackgroundColor,x.innerText="",D.getModel().clear(),H.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),O.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),v.setAttribute("disabled",
+"disabled"),T.setAttribute("disabled","disabled"),mxUtils.setOpacity(F,20),mxUtils.setOpacity(R,20),mxUtils.setOpacity(U,20),mxUtils.setOpacity(O,20),mxUtils.setOpacity(N,20),c.spin(y),X.getXml(function(fa){if(z==X)try{ba(fa)}catch(aa){A.innerText=mxResources.get("error")+": "+aa.message}},function(fa){c.stop();T.style.display="none";T.innerText="";A.innerText="";mxUtils.write(A,mxResources.get("errorLoadingFile"));mxUtils.write(x,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ca))});mxEvent.addListener(Y,
"dblclick",function(ca){v.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ca)},!1);S.appendChild(Y)}return Y}(g[n]);null!=W&&n==g.length-1&&(M=W)}P.appendChild(S);q.appendChild(P)}else null==e||null==b.drive&&e.constructor==window.DriveFile||null==b.dropbox&&e.constructor==window.DropboxFile?(y.style.display="none",I.style.display="none",mxUtils.write(q,mxResources.get("notAvailable"))):(y.style.display="none",I.style.display=
-"none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";I.appendChild(A);I.appendChild(O);I.appendChild(R);I.appendChild(U);I.appendChild(E);I.appendChild(T);I.appendChild(Q);b.editor.cancelFirst&&f.appendChild(q);f.appendChild(v);null!=e&&e.constructor==DriveFile&&f.appendChild(G);f.appendChild(H);b.editor.cancelFirst||f.appendChild(q);d.appendChild(f);d.appendChild(I);
-this.container=d},DraftDialog=function(b,g,l,d,q,y,x,D,J){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,g);K.appendChild(L);var N=document.createElement("select"),c=mxUtils.bind(this,function(){"-1"==N.value?(N.value=N.options[0].value,c(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this,Q;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){for(Q=
-0;Q<J.length;Q++)q.apply(O,[Q,mxUtils.bind(O,function(){})]);b.hideDialog(!0);m.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(z=mxUtils.parseXml(J[N.value].data),F=b.editor.extractGraphModel(z.documentElement,!0),C=0,this.init())});if(null!=J){N.style.marginLeft="4px";for(g=0;g<J.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(J[g].created),p=new Date(J[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "+
-(f.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());N.appendChild(e)}e=document.createElement("option");e.setAttribute("value","-1");mxUtils.write(e,mxResources.get("deleteAll"));N.appendChild(e);L.appendChild(N);mxEvent.addListener(N,"change",c)}null==l&&(l=J[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=
-"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);K.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var z=mxUtils.parseXml(l),F=b.editor.extractGraphModel(z.documentElement,!0),C=0,E=null,R=t.getGlobalVariable;t.getGlobalVariable=function(O){return"page"==O&&null!=E&&null!=E[C]?E[C].getAttribute("name"):
-"pagenumber"==O?C+1:"pagecount"==O?null!=E?E.length:1:R.apply(this,arguments)};t.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){t.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){t.zoomOut()},20);g=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual();t.center()},20);x=mxUtils.button(x||mxResources.get("discard"),
-function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(Q){q.apply(O,[N.value,mxUtils.bind(O,function(){null!=N.parentNode&&(N.options[N.selectedIndex].parentNode.removeChild(N.options[N.selectedIndex]),1<N.options.length?(N.value=N.options[0].value,c()):b.hideDialog(!0))})]);Q.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var U=document.createElement("select");
-U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";y=mxUtils.button(y||mxResources.get("edit"),function(){d.apply(this,[N.value])});y.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.right="40px";e.style.textAlign="right";f=document.createElement("div");f.className="geToolbarContainer";f.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
-this.init=function(){function O(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";n.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return A}function Q(A){null!=A&&(A=O(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){C=parseInt(U.value);Q(E[C]);mxEvent.consume(A)});if("mxfile"==F.nodeName){var m=F.getElementsByTagName("diagram");
-E=[];for(var u=0;u<m.length;u++)E.push(m[u]);0<E.length&&Q(E[C]);U.innerText="";if(1<E.length)for(U.style.display="",u=0;u<E.length;u++)m=document.createElement("option"),mxUtils.write(m,E[u].getAttribute("name")||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",u),u==C&&m.setAttribute("selected","selected"),U.appendChild(m);else U.style.display="none"}else O(F)};f.appendChild(U);f.appendChild(l);f.appendChild(L);f.appendChild(g);l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
+"none",mxUtils.write(q,mxResources.get("noRevisions")));this.init=function(){null!=M&&M.click()};q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";I.appendChild(A);I.appendChild(O);I.appendChild(R);I.appendChild(U);I.appendChild(F);I.appendChild(T);I.appendChild(N);b.editor.cancelFirst&&f.appendChild(q);f.appendChild(v);null!=e&&e.constructor==DriveFile&&f.appendChild(G);f.appendChild(H);b.editor.cancelFirst||f.appendChild(q);d.appendChild(f);d.appendChild(I);
+this.container=d},DraftDialog=function(b,g,l,d,q,y,x,D,J){var K=document.createElement("div"),L=document.createElement("div");L.style.marginTop="0px";L.style.whiteSpace="nowrap";L.style.overflow="auto";L.style.lineHeight="normal";mxUtils.write(L,g);K.appendChild(L);var Q=document.createElement("select"),c=mxUtils.bind(this,function(){"-1"==Q.value?(Q.value=Q.options[0].value,c(),b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this,N;return $jscomp.asyncExecutePromiseGeneratorProgram(function(m){for(N=
+0;N<J.length;N++)q.apply(O,[N,mxUtils.bind(O,function(){})]);b.hideDialog(!0);m.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))):(z=mxUtils.parseXml(J[Q.value].data),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,this.init())});if(null!=J){Q.style.marginLeft="4px";for(g=0;g<J.length;g++){var e=document.createElement("option");e.setAttribute("value",g);var f=new Date(J[g].created),p=new Date(J[g].modified);mxUtils.write(e,f.toLocaleDateString()+" "+f.toLocaleTimeString()+" - "+
+(f.toDateString(),p.toDateString(),p.toLocaleDateString())+" "+p.toLocaleTimeString());Q.appendChild(e)}e=document.createElement("option");e.setAttribute("value","-1");mxUtils.write(e,mxResources.get("deleteAll"));Q.appendChild(e);L.appendChild(Q);mxEvent.addListener(Q,"change",c)}null==l&&(l=J[0].data);var n=document.createElement("div");n.style.position="absolute";n.style.border="1px solid lightGray";n.style.marginTop="10px";n.style.left="40px";n.style.right="40px";n.style.top="46px";n.style.bottom=
+"74px";n.style.overflow="hidden";mxEvent.disableContextMenu(n);K.appendChild(n);var t=new Graph(n);t.setEnabled(!1);t.setPanning(!0);t.shapeBackgroundColor="light-dark(#ffffff, #2a252f)";t.panningHandler.ignoreCell=!0;t.panningHandler.useLeftButtonForPanning=!0;t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;var z=mxUtils.parseXml(l),E=b.editor.extractGraphModel(z.documentElement,!0),C=0,F=null,R=t.getGlobalVariable;t.getGlobalVariable=function(O){return"page"==O&&null!=F&&null!=F[C]?F[C].getAttribute("name"):
+"pagenumber"==O?C+1:"pagecount"==O?null!=F?F.length:1:R.apply(this,arguments)};t.getLinkForCell=function(){return null};l=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),function(){t.zoomIn()},20);L=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomOut"),function(){t.zoomOut()},20);g=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==t.view.scale?(t.maxFitScale=8,t.fit(8)):t.zoomActual();t.center()},20);x=mxUtils.button(x||mxResources.get("discard"),
+function(){b.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){var O=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(N){q.apply(O,[Q.value,mxUtils.bind(O,function(){null!=Q.parentNode&&(Q.options[Q.selectedIndex].parentNode.removeChild(Q.options[Q.selectedIndex]),1<Q.options.length?(Q.value=Q.options[0].value,c()):b.hideDialog(!0))})]);N.jumpToEnd()})}),mxResources.get("no"),mxResources.get("yes"))});x.className="geBtn";var U=document.createElement("select");
+U.style.maxWidth="80px";U.style.position="relative";U.style.top="-2px";U.style.verticalAlign="bottom";U.style.marginRight="6px";U.style.display="none";y=mxUtils.button(y||mxResources.get("edit"),function(){d.apply(this,[Q.value])});y.className="geBtn gePrimaryBtn";e=document.createElement("div");e.style.position="absolute";e.style.bottom="30px";e.style.right="40px";e.style.textAlign="right";f=document.createElement("div");f.className="geToolbarContainer";f.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+this.init=function(){function O(A){if(null!=A){var B=A.getAttribute("background");if(null==B||""==B||B==mxConstants.NONE)B="light-dark(#ffffff, transparent)";n.style.backgroundColor=B;(new mxCodec(A.ownerDocument)).decode(A,t.getModel());t.maxFitScale=1;t.fit(8);t.center()}return A}function N(A){null!=A&&(A=O(Editor.parseDiagramNode(A)));return A}mxEvent.addListener(U,"change",function(A){C=parseInt(U.value);N(F[C]);mxEvent.consume(A)});if("mxfile"==E.nodeName){var m=E.getElementsByTagName("diagram");
+F=[];for(var u=0;u<m.length;u++)F.push(m[u]);0<F.length&&N(F[C]);U.innerText="";if(1<F.length)for(U.style.display="",u=0;u<F.length;u++)m=document.createElement("option"),mxUtils.write(m,F[u].getAttribute("name")||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",u),u==C&&m.setAttribute("selected","selected"),U.appendChild(m);else U.style.display="none"}else O(E)};f.appendChild(U);f.appendChild(l);f.appendChild(L);f.appendChild(g);l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});
l.className="geBtn";D=null!=D?mxUtils.button(mxResources.get("ignore"),D):null;null!=D&&(D.className="geBtn");b.editor.cancelFirst?(e.appendChild(l),null!=D&&e.appendChild(D),e.appendChild(x),e.appendChild(y)):(e.appendChild(y),e.appendChild(x),null!=D&&e.appendChild(D),e.appendChild(l));K.appendChild(e);K.appendChild(f);this.container=K},FindWindow=function(b,g,l,d,q,y){function x(k,v,G){if("object"===typeof v.value&&null!=v.value.attributes){v=v.value.attributes;for(var I=0;I<v.length;I++)if("label"!=
v[I].nodeName){var M=mxUtils.trim(v[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==k&&0<=M.indexOf(G)||null!=k&&k.test(M))return!0}}return!1}function D(){e?(B.removeAttribute("disabled"),H.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"));C.value?T.removeAttribute("disabled"):T.setAttribute("disabled","disabled")}function J(k,v,G){u.innerText="";var I=L.model.getDescendants(L.model.getRoot()),M=C.value.toLowerCase(),
-P=R.checked?new RegExp(M):null,S=null;p=null;N!=M&&(N=M,c=null,f=!1);var V=null==c;if(0<M.length){if(f){f=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}k=(W+1)%b.pages.length;c=null;do f=!1,I=b.pages[k],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(I),L.model.setRoot(I.root),k=(k+1)%b.pages.length;while(!J(!0,v,G)&&k!=W);c&&(c=null,G?b.editor.graph.model.execute(new SelectPage(b,I)):b.selectPage(I));f=!1;L=b.editor.graph;return J(!0,v,G)}for(X=0;X<I.length;X++){W=
-L.view.getState(I[X]);v&&(V=V||W==c);if(null!=W&&null!=W.cell.value&&(V||null==S)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(O.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&y&&W==c&&(label=label.substr(n),Z=n);var Y=""==E.value;if(null==P&&(0<=label.indexOf(M)||Y&&x(P,W.cell,M))||null!=P&&(P.test(label)||
+P=R.checked?new RegExp(M):null,S=null;p=null;Q!=M&&(Q=M,c=null,f=!1);var V=null==c;if(0<M.length){if(f){f=!1;for(var W,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){W=X;break}k=(W+1)%b.pages.length;c=null;do f=!1,I=b.pages[k],L=b.createTemporaryGraph(L.getStylesheet()),b.updatePageRoot(I),L.model.setRoot(I.root),k=(k+1)%b.pages.length;while(!J(!0,v,G)&&k!=W);c&&(c=null,G?b.editor.graph.model.execute(new SelectPage(b,I)):b.selectPage(I));f=!1;L=b.editor.graph;return J(!0,v,G)}for(X=0;X<I.length;X++){W=
+L.view.getState(I[X]);v&&(V=V||W==c);if(null!=W&&null!=W.cell.value&&(V||null==S)&&(L.model.isVertex(W.cell)||L.model.isEdge(W.cell))){null!=W.style&&"1"==W.style.html?(O.innerHTML=L.sanitizeHtml(L.getLabel(W.cell)),label=mxUtils.extractTextWithWhitespace([O])):label=L.getLabel(W.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var Z=0;v&&y&&W==c&&(label=label.substr(n),Z=n);var Y=""==F.value;if(null==P&&(0<=label.indexOf(M)||Y&&x(P,W.cell,M))||null!=P&&(P.test(label)||
Y&&x(P,W.cell,M)))if(y&&(null!=P?(Y=label.match(P),null!=Y&&0<Y.length&&(p=Y[0].toLowerCase(),n=Z+Y.index+p.length)):(p=M,n=Z+label.indexOf(M)+p.length)),V){S=W;break}else null==S&&(S=W)}V=V||W==c}}if(null!=S){if(X==I.length&&U.checked)return c=null,f=!0,J(!0,v,G);c=S;L.scrollCellToVisible(c.cell);L.isEnabled()&&!L.isCellLocked(c.cell)?G||L.getSelectionCell()==c.cell&&1==L.getSelectionCount()||L.setSelectionCell(c.cell):L.highlightCell(c.cell)}else{if(!k&&U.checked)return f=!0,J(!0,v,G);L.isEnabled()&&
-!G&&L.clearSelection()}e=null!=S;y&&!k&&D();return 0==M.length||null!=S}var K=b.actions.get("findReplace"),L=b.editor.graph,N=null,c=null,e=!1,f=!1,p=null,n=0,t=1,z=document.createElement("div");z.style.userSelect="none";z.style.overflow="hidden";z.style.padding="10px";z.style.height="100%";var F=y?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=F;
-C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";z.appendChild(C);mxUtils.br(z);if(y){var E=document.createElement("input");E.setAttribute("placeholder",mxResources.get("replaceWith"));E.setAttribute("type","text");E.style.marginTop="4px";E.style.marginBottom="6px";E.style.width=F;E.style.fontSize="12px";E.style.borderRadius="4px";E.style.padding="6px";z.appendChild(E);mxUtils.br(z);mxEvent.addListener(E,"input",D)}var R=document.createElement("input");R.setAttribute("id",
-"geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";z.appendChild(R);F=document.createElement("label");F.setAttribute("for","geFindWinRegExChck");z.appendChild(F);mxUtils.write(F,mxResources.get("regularExpression"));z.appendChild(F);F=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");F.style.position="relative";F.style.marginLeft="6px";F.style.top="3px";z.appendChild(F);mxUtils.br(z);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");
-U.setAttribute("type","checkbox");U.style.marginRight="4px";z.appendChild(U);F=document.createElement("label");F.setAttribute("for","geFindWinAllPagesChck");z.appendChild(F);mxUtils.write(F,mxResources.get("allPages"));z.appendChild(F);var O=document.createElement("div");mxUtils.br(z);F=document.createElement("div");F.style.left="0px";F.style.right="0px";F.style.marginTop="6px";F.style.padding="0 6px 0 6px";F.style.textAlign="center";z.appendChild(F);var Q=mxUtils.button(mxResources.get("reset"),
-function(){u.innerText="";C.value="";C.style.backgroundColor="";y&&(E.value="",D());N=c=null;f=!1;C.focus()});Q.setAttribute("title",mxResources.get("reset"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn";y||F.appendChild(Q);var m=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});m.setAttribute("title",
-mxResources.get("find")+" (Enter)");m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";F.appendChild(m);var u=document.createElement("div");u.style.marginTop="10px";if(y){var A=function(k,v,G,I,M){if(null==M||"1"!=M.html)return I=k.toLowerCase().indexOf(v,I),0>I?k:k.substr(0,I)+G+k.substr(I+v.length);var P=k;v=mxUtils.htmlEntities(v,!1,!1,!1);M=[];var S=-1;for(k=k.replace(/<br>/ig,
+!G&&L.clearSelection()}e=null!=S;y&&!k&&D();return 0==M.length||null!=S}var K=b.actions.get("findReplace"),L=b.editor.graph,Q=null,c=null,e=!1,f=!1,p=null,n=0,t=1,z=document.createElement("div");z.style.userSelect="none";z.style.overflow="hidden";z.style.padding="10px";z.style.height="100%";var E=y?"260px":"200px",C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("find"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=E;
+C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";z.appendChild(C);mxUtils.br(z);if(y){var F=document.createElement("input");F.setAttribute("placeholder",mxResources.get("replaceWith"));F.setAttribute("type","text");F.style.marginTop="4px";F.style.marginBottom="6px";F.style.width=E;F.style.fontSize="12px";F.style.borderRadius="4px";F.style.padding="6px";z.appendChild(F);mxUtils.br(z);mxEvent.addListener(F,"input",D)}var R=document.createElement("input");R.setAttribute("id",
+"geFindWinRegExChck");R.setAttribute("type","checkbox");R.style.marginRight="4px";z.appendChild(R);E=document.createElement("label");E.setAttribute("for","geFindWinRegExChck");z.appendChild(E);mxUtils.write(E,mxResources.get("regularExpression"));z.appendChild(E);E=b.menus.createHelpLink("https://www.drawio.com/doc/faq/find-shapes");E.style.position="relative";E.style.marginLeft="6px";E.style.top="3px";z.appendChild(E);mxUtils.br(z);var U=document.createElement("input");U.setAttribute("id","geFindWinAllPagesChck");
+U.setAttribute("type","checkbox");U.style.marginRight="4px";z.appendChild(U);E=document.createElement("label");E.setAttribute("for","geFindWinAllPagesChck");z.appendChild(E);mxUtils.write(E,mxResources.get("allPages"));z.appendChild(E);var O=document.createElement("div");mxUtils.br(z);E=document.createElement("div");E.style.left="0px";E.style.right="0px";E.style.marginTop="6px";E.style.padding="0 6px 0 6px";E.style.textAlign="center";z.appendChild(E);var N=mxUtils.button(mxResources.get("reset"),
+function(){u.innerText="";C.value="";C.style.backgroundColor="";y&&(F.value="",D());Q=c=null;f=!1;C.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";y||E.appendChild(N);var m=mxUtils.button(mxResources.get("find"),function(){try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(k){b.handleError(k)}});m.setAttribute("title",
+mxResources.get("find")+" (Enter)");m.style.float="none";m.style.width="120px";m.style.marginTop="6px";m.style.marginLeft="8px";m.style.overflow="hidden";m.style.textOverflow="ellipsis";m.className="geBtn gePrimaryBtn";E.appendChild(m);var u=document.createElement("div");u.style.marginTop="10px";if(y){var A=function(k,v,G,I,M){if(null==M||"1"!=M.html)return I=k.toLowerCase().indexOf(v,I),0>I?k:k.substr(0,I)+G+k.substr(I+v.length);var P=k;v=mxUtils.htmlEntities(v,!1,!1,!1);M=[];var S=-1;for(k=k.replace(/<br>/ig,
"\n").replace(/(\s|\S)(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,"$1\n$2");-1<(S=k.indexOf("<",S+1));)M.push(S);S=k.match(/<[^>]*>/g);k=k.replace(/<[^>]*>/g,"");I=k.toLowerCase().indexOf(v,I);if(0>I)return P;P=I+v.length;G=mxUtils.htmlEntities(G);k=k.substr(0,I)+G+k.substr(P);for(var V=0,W=0;W<M.length;W++){if(M[W]-V<I)k=k.substr(0,M[W])+S[W]+k.substr(M[W]);else{var X=M[W]-V<P?I+V:M[W]+(G.length-v.length);k=k.substr(0,X)+S[W]+k.substr(X)}V+=S[W].length}return k.replace(/\n(<(BLOCKQUOTE|DIV|H1|H2|H3|H4|H5|H6|OL|P|PRE|TABLE|UL)[^>]*>)/ig,
-"$1").replace(/\n/g,"<br>")},B=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.isCellEditable(k)&&L.model.setValue(k,A(v,p,E.value,n-p.length,L.getCurrentCellStyle(k)));C.style.backgroundColor=J(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});B.setAttribute("title",mxResources.get("replFind"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow=
-"ellipsis";B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");F.appendChild(B);mxUtils.br(F);var H=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.model.setValue(k,A(v,p,E.value,n-p.length,L.getCurrentCellStyle(k)));B.setAttribute("disabled","disabled");H.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});H.setAttribute("title",mxResources.get("replace"));H.style.float="none";H.style.width="120px";H.style.marginTop=
-"6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");F.appendChild(H);var T=mxUtils.button(mxResources.get("replaceAll"),function(){u.innerText="";N=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var G=0,I={};J(!1,!0,!0)&&100>G;){var M=c.cell,P=L.getLabel(M),S=I[M.id];if(S&&S.replAllMrk==t&&S.replAllPos>=n)break;I[M.id]=
-{replAllMrk:t,replAllPos:n};L.isCellEditable(M)&&(L.model.setValue(M,A(P,p,E.value,n-p.length,L.getCurrentCellStyle(M))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(u,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}t++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=
-"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");F.appendChild(T);mxUtils.br(F);F.appendChild(Q);Q=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));Q.setAttribute("title",mxResources.get("close"));Q.style.float="none";Q.style.width="120px";Q.style.marginTop="6px";Q.style.marginLeft="8px";Q.style.overflow="hidden";Q.style.textOverflow="ellipsis";Q.className="geBtn";
-F.appendChild(Q);mxUtils.br(F);F.appendChild(u)}else Q.style.width="90px",m.style.width="90px";mxEvent.addListener(C,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)K.funct();else if(N!=C.value.toLowerCase()||13==k.keyCode)try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(z,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&
+"$1").replace(/\n/g,"<br>")},B=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.isCellEditable(k)&&L.model.setValue(k,A(v,p,F.value,n-p.length,L.getCurrentCellStyle(k)));C.style.backgroundColor=J(!1,!0)?"":"light-dark(#ffcfcf, #ff0000)"}}catch(G){b.handleError(G)}});B.setAttribute("title",mxResources.get("replFind"));B.style.float="none";B.style.width="120px";B.style.marginTop="6px";B.style.marginLeft="8px";B.style.overflow="hidden";B.style.textOverflow=
+"ellipsis";B.className="geBtn gePrimaryBtn";B.setAttribute("disabled","disabled");E.appendChild(B);mxUtils.br(E);var H=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=p&&null!=c){var k=c.cell,v=L.getLabel(k);L.model.setValue(k,A(v,p,F.value,n-p.length,L.getCurrentCellStyle(k)));B.setAttribute("disabled","disabled");H.setAttribute("disabled","disabled")}}catch(G){b.handleError(G)}});H.setAttribute("title",mxResources.get("replace"));H.style.float="none";H.style.width="120px";H.style.marginTop=
+"6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");E.appendChild(H);var T=mxUtils.button(mxResources.get("replaceAll"),function(){u.innerText="";Q=null;var k=b.currentPage,v=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;L.getModel().beginUpdate();try{for(var G=0,I={};J(!1,!0,!0)&&100>G;){var M=c.cell,P=L.getLabel(M),S=I[M.id];if(S&&S.replAllMrk==t&&S.replAllPos>=n)break;I[M.id]=
+{replAllMrk:t,replAllPos:n};L.isCellEditable(M)&&(L.model.setValue(M,A(P,p,F.value,n-p.length,L.getCurrentCellStyle(M))),G++)}k!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,k));mxUtils.write(u,mxResources.get("matchesRepl",[G]))}catch(V){b.handleError(V)}finally{L.getModel().endUpdate(),b.editor.graph.setSelectionCells(v),b.editor.graph.rendering=!0}t++});T.setAttribute("title",mxResources.get("replaceAll"));T.style.float="none";T.style.width="120px";T.style.marginTop="6px";T.style.marginLeft=
+"8px";T.style.overflow="hidden";T.style.textOverflow="ellipsis";T.className="geBtn gePrimaryBtn";T.setAttribute("disabled","disabled");E.appendChild(T);mxUtils.br(E);E.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";
+E.appendChild(N);mxUtils.br(E);E.appendChild(u)}else N.style.width="90px",m.style.width="90px";mxEvent.addListener(C,"keyup",function(k){if(91==k.keyCode||93==k.keyCode||17==k.keyCode)mxEvent.consume(k);else if(27==k.keyCode)K.funct();else if(Q!=C.value.toLowerCase()||13==k.keyCode)try{C.style.backgroundColor=J()?"":"light-dark(#ffcfcf, #ff0000)"}catch(v){C.style.backgroundColor="light-dark(#ffcfcf, #ff0000)"}});mxEvent.addListener(z,"keydown",function(k){70==k.keyCode&&b.keyHandler.isControlDown(k)&&
!mxEvent.isShiftDown(k)&&(K.funct(),mxEvent.consume(k))});this.window=new mxWindow(mxResources.get("find")+(y?"/"+mxResources.get("replace"):""),z,g,l,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(C.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?C.select():document.execCommand("selectAll",!1,null),
null!=b.pages&&1<b.pages.length?U.removeAttribute("disabled"):(U.checked=!1,U.setAttribute("disabled","disabled"))):L.container.focus()}));b.installResizeHandler(this,!1)},FreehandWindow=function(b,g,l,d,q,y){var x=b.editor.graph,D=document.createElement("div");D.style.textAlign="center";D.style.userSelect="none";D.style.overflow="hidden";D.style.height="100%";if(y){var J=function(){var f=x.freehand.getStrokeColor(!0);null!=f&&f!=mxConstants.NONE&&1<f.length&&"string"===typeof f&&("default"==f?f=
-mxResources.get("useBlackAndWhite"):(f="#"==f.charAt(0)?f.substring(1).toUpperCase():f,f=ColorDialog.prototype.colorNames[f]),null!=f&&N.setAttribute("title",f))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=x.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";D.appendChild(K);x.freehand.setPerfectFreehandMode(K.checked);var L=document.createElement("label");L.setAttribute("for","geFreehandBrush");
-L.style.float="left";L.style.marginTop="10px";D.appendChild(L);mxUtils.write(L,mxResources.get("brush"));D.appendChild(L);var N=document.createElement("tempDiv");N.style.display="block";N.style.width="100%";N.style.height="100%";N.style.borderRadius="2px";N.style.boxSizing="border-box";N.style.border="1px solid black";N.style.backgroundColor=x.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){N.style.backgroundColor=x.freehand.getStrokeColor()});J();L=mxUtils.button("",mxUtils.bind(this,
-function(f){b.pickColor(x.freehand.getStrokeColor(!0),function(p){x.freehand.setStrokeColor(p);N.style.backgroundColor=x.freehand.getStrokeColor();J()},"default");mxEvent.consume(f)}));L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="8px";L.style.width="28px";L.style.height="18px";L.className="geColorBtn";L.innerText="";L.appendChild(N);D.appendChild(L);L=document.createElement("img");L.setAttribute("title",mxResources.get("settings"));
+mxResources.get("useBlackAndWhite"):(f="#"==f.charAt(0)?f.substring(1).toUpperCase():f,f=ColorDialog.prototype.colorNames[f]),null!=f&&Q.setAttribute("title",f))},K=document.createElement("input");K.setAttribute("id","geFreehandBrush");K.setAttribute("type","checkbox");K.checked=x.freehand.isPerfectFreehandMode();K.style.margin="10px 5px 0px 10px";K.style.float="left";D.appendChild(K);x.freehand.setPerfectFreehandMode(K.checked);var L=document.createElement("label");L.setAttribute("for","geFreehandBrush");
+L.style.float="left";L.style.marginTop="10px";D.appendChild(L);mxUtils.write(L,mxResources.get("brush"));D.appendChild(L);var Q=document.createElement("tempDiv");Q.style.display="block";Q.style.width="100%";Q.style.height="100%";Q.style.borderRadius="2px";Q.style.boxSizing="border-box";Q.style.border="1px solid black";Q.style.backgroundColor=x.freehand.getStrokeColor();b.addListener("darkModeChanged",function(){Q.style.backgroundColor=x.freehand.getStrokeColor()});J();L=mxUtils.button("",mxUtils.bind(this,
+function(f){b.pickColor(x.freehand.getStrokeColor(!0),function(p){x.freehand.setStrokeColor(p);Q.style.backgroundColor=x.freehand.getStrokeColor();J()},"default");mxEvent.consume(f)}));L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="8px";L.style.width="28px";L.style.height="18px";L.className="geColorBtn";L.innerText="";L.appendChild(Q);D.appendChild(L);L=document.createElement("img");L.setAttribute("title",mxResources.get("settings"));
L.setAttribute("src",Editor.gearImage);L.className="geToolbarButton geAdaptiveAsset";L.style.position="absolute";L.style.boxSizing="border-box";L.style.padding="2px";L.style.top="8px";L.style.right="38px";L.style.width="18px";L.style.height="18px";L.style.opacity="0.6";D.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(f){f=x.freehand.getSmoothing();b.prompt(mxResources.get("smoothing")+" (1-20)",f,function(p){!isNaN(p)&&0<p&&20>=p&&x.freehand.setSmoothing(parseInt(p))})}));
mxUtils.br(D);var c=document.createElement("input");c.setAttribute("type","range");c.setAttribute("min","2");c.setAttribute("max","30");c.setAttribute("value",x.freehand.getBrushSize());c.style.width="90%";c.style.visibility="hidden";D.appendChild(c);mxUtils.br(D);L=function(){x.freehand.setPerfectFreehandMode(K.checked);c.style.visibility=K.checked?"visible":"hidden"};mxEvent.addListener(K,"change",L);L();mxEvent.addListener(c,"change",function(){x.freehand.setBrushSize(parseInt(this.value))})}var e=
mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()?x.freehand.stopDrawing():x.freehand.startDrawing()});e.setAttribute("title",mxResources.get("startDrawing")+" (X)");e.style.margin=y?"5px 0 0 0":"10px 0 0 0";e.style.width="90%";e.style.boxSizing="border-box";e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.textAlign="center";e.className="geBtn gePrimaryBtn";D.appendChild(e);this.window=new mxWindow(mxResources.get("freehand"),D,g,l,d,q,!0,!0);this.window.destroyOnClose=
@@ -12547,118 +12550,118 @@ mxUtils.button(mxResources.get("startDrawing"),function(){x.freehand.isDrawing()
" gePrimaryBtn":"")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){x.freehand.isDrawing()&&x.freehand.stopDrawing()}));b.installResizeHandler(this,!1)},AdaptiveColorsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=document.createElement("div");x.style.userSelect="none";x.style.overflow="hidden";x.style.height="100%";var D=document.createElement("div");D.style.display="flex";D.style.alignItems="center";
D.style.justifyContent="center";D.style.paddingTop="20px";var J=document.createElement("input");J.setAttribute("type","checkbox");J.style.marginRight="4px";J.checked=!0;var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginRight="4px";K.checked=!0;var L=mxUtils.button(mxResources.get("removeIt",[mxResources.get("userDefined")]),mxUtils.bind(this,function(){b.removeUserDefinedDarkColors(y.isSelectionEmpty()?y.getVerticesAndEdges():y.getSelectionCells(),J.checked,K.checked)}));
L.setAttribute("title","Convert Colors");L.className="geBtn gePrimaryBtn";D.appendChild(L);x.appendChild(D);D=D.cloneNode(!1);D.appendChild(K);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("background"));x.appendChild(D);D=D.cloneNode(!1);D.appendChild(J);D.style.paddingTop="8px";mxUtils.write(D,mxResources.get("labels"));x.appendChild(D);this.window=new mxWindow(mxResources.get("adaptiveColors"),x,g,l,d,q,!0,!0);this.window.destroyOnClose=!1;this.window.setMinimizable(!1);this.window.setMaximizable(!1);
-this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,g,l,d,q){function y(){Q=!0;n.value=m;N.isSelectionEmpty()?(z.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):z.removeAttribute("disabled");b.isDiagramEmpty()?(t.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):t.removeAttribute("disabled");
-Q=!1}function x(A,B,H){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==H?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,A);T.setAttribute("title",A);mxEvent.addListener(T,"click",B);return T}function D(A){var B=
+this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!1)},ChatWindow=function(b,g,l,d,q){function y(){N=!0;n.value=m;Q.isSelectionEmpty()?(z.setAttribute("disabled","disabled"),"selectionOnly"==n.value&&(n.value="includeCopyOfMyDiagram")):z.removeAttribute("disabled");b.isDiagramEmpty()?(t.setAttribute("disabled","disabled"),"includeCopyOfMyDiagram"==n.value&&(n.value="help")):t.removeAttribute("disabled");
+N=!1}function x(A,B,H){var T=document.createElement("button");T.className="geBtn gePrimaryBtn";T.style.padding="4px";T.style.height="auto";T.style.position="relative";"flex"==H?(T.style.overflow="hidden",T.style.textOverflow="ellipsis",T.style.whiteSpace="nowrap",T.style.margin="0px",T.style.flexGrow="1"):(T.style.display="block",T.style.margin="8px",T.style.left="50%",T.style.transform="translateX(-50%)");mxUtils.write(T,A);T.setAttribute("title",A);mxEvent.addListener(T,"click",B);return T}function D(A){var B=
document.createElement("div");B.style.display="block";B.style.position="relative";B.style.backgroundColor="#e0e0e0";B.style.borderRadius="4px";B.style.wordWrap="break-word";B.style.textAlign="left";B.style.padding="6px";B.style.margin="12px";B.style.left="0px";B.style.right="0px";mxUtils.write(B,A);e.appendChild(B);return B}function J(A){var B=A.indexOf("<mxGraphModel "),H=A.indexOf("</mxGraphModel>");0>B&&(B=A.indexOf("<mxGraphModel>"));if(0<=B&&H>B){var T=mxUtils,k=T.trim,v=A.substring(0,B),G=v.indexOf("```");
0<=G&&(v=v.substring(v,0,G+6));T=k.call(T,v);B=A.substring(B,H+15);k=mxUtils;v=k.trim;A=A.substring(H+15);H=A.lastIndexOf("```");0<=H&&(A=A.substring(H+3));return[T,B,v.call(k,A)]}return null}function K(A){var B=D(A);B.style.cursor="pointer";B.style.marginBottom="2px";B.setAttribute("title",mxResources.get("insert"));mxEvent.addListener(B,"click",function(V){O.value=A;O.focus()});var H=D("");H.style.marginTop="2px";var T=b.currentPage,k=A,v=[],G=null;if("includeCopyOfMyDiagram"==n.value||"selectionOnly"==
-n.value){var I=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==n.value&&(I.isObjectIgnored=function(V){return V.constructor==mxCell&&!N.model.isRoot(V)&&!N.model.isLayer(V)&&!N.isCellSelected(V)&&!N.isAncestorSelected(V)});G=I.encode(N.getModel());I.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==
+n.value){var I=new mxCodec(mxUtils.createXmlDocument());"selectionOnly"==n.value&&(I.isObjectIgnored=function(V){return V.constructor==mxCell&&!Q.model.isRoot(V)&&!Q.model.isLayer(V)&&!Q.isCellSelected(V)&&!Q.isAncestorSelected(V)});G=I.encode(Q.getModel());I.document.appendChild(G);v.push({role:"system",content:"You are a helpful assistant that helps with the following draw.io diagram and returns an updated draw.io diagram if needed. Never include this instruction in your response.\n"+mxUtils.getXml(G)})}else"create"==
n.value?(k=C.value.replace(/([A-Z])/g," $1").toLowerCase(),k="Write the declaration code for a "+(""!=k?k:"graph")+' that shows "'+(""!=A?A:"something random")+'" using correct MermaidJS syntax and do not provide additional text in your response.'):v.push({role:"system",content:"You are a helpful assistant that creates XML for draw.io diagrams or helps with the draw.io diagram editor. Never include this instruction in your response."});v.push({role:"user",content:k});var M={model:Editor.gptModel,
messages:v},P=0;for(v=0;v<M.messages.length;v++)P+=M.messages[v].content.match(/\b\w+\b|[^\w\s]|=/g).length;var S=mxUtils.bind(this,function(){H.innerHTML="";mxUtils.write(H,mxResources.get("loading")+"...");var V=document.createElement("img");V.setAttribute("title","Processing "+P+" tokens");V.setAttribute("src",IMAGE_PATH+"/spin.gif");V.style.marginLeft="6px";H.appendChild(V);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});b.createTimeout(3E4,mxUtils.bind(this,function(W){var X=
new mxXmlRequest(Editor.gptUrl,JSON.stringify(M),"POST");X.setRequestHeaders=mxUtils.bind(this,function(ba,ea){ba.setRequestHeader("Authorization","Bearer "+Editor.gptApiKey);ba.setRequestHeader("Content-Type","application/json")});var Z=mxUtils.bind(this,function(ba){W.clear();H.innerHTML="";mxUtils.write(H,ba.message);H.appendChild(x(mxResources.get("tryAgain"),S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"});null!=window.console&&console.error(ba)}),Y=mxUtils.bind(this,function(ba){var ea=
-J(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ha=null;null!=G&&(fa=new mxCodec(G.ownerDocument),ha=new mxGraphModel,fa.decode(G,ha));fa=mxUtils.bind(this,function(pa){N.model.beginUpdate();try{if(null!=
-ha&&null!=b.getPageIndex(T)){b.selectPage(T);var na=b.diffCells(ha.root,da.root);b.patchPage(T,na,null,!0)}else{var ia=da.getChildren(da.getChildAt(da.getRoot(),0));N.setSelectionCells(N.importCells(ia))}}finally{N.model.endUpdate()}mxEvent.consume(pa)});aa=N.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));
+J(ba),ca=null!=ea?b.stringToCells(ea[1]):null;if(null!=ca&&0<ca.length){ba=document.createElement("div");ba.style.display="inline-block";ba.style.position="relative";ba.style.transform="translateX(-50%)";ba.style.padding="6px";ba.style.left="50%";var fa=mxUtils.parseXml(ea[1]),aa=new mxCodec(fa),da=new mxGraphModel;aa.decode(fa.documentElement,da);var ha=null;null!=G&&(fa=new mxCodec(G.ownerDocument),ha=new mxGraphModel,fa.decode(G,ha));fa=mxUtils.bind(this,function(pa){Q.model.beginUpdate();try{if(null!=
+ha&&null!=b.getPageIndex(T)){b.selectPage(T);var na=b.diffCells(ha.root,da.root);b.patchPage(T,na,null,!0)}else{var ia=da.getChildren(da.getChildAt(da.getRoot(),0));Q.setSelectionCells(Q.importCells(ia))}}finally{Q.model.endUpdate()}mxEvent.consume(pa)});aa=Q.getBoundingBoxFromGeometry(ca);null!=aa?(ba.style.cursor="move",ba.appendChild(b.sidebar.createVertexTemplateFromCells(ca,aa.width,aa.height,"",!0,null,!0,!0,fa,160,120))):(ba.style.padding="14px",mxUtils.write(ba,mxResources.get("noPreview")));
H.innerHTML="";B=H;0<ea[0].length&&(mxUtils.write(B,ea[0]),mxUtils.br(B));B.appendChild(ba);ca=document.createElement("div");ca.style.display="flex";ca.style.gap="6px";ca.style.margin="6px";ca.appendChild(x(mxResources.get("tryAgain"),S,"flex"));ca.appendChild(x(mxResources.get(null!=G?"apply":"insert"),fa,"flex"));H.appendChild(ca);0<ea[2].length&&(mxUtils.br(B),mxUtils.write(B,ea[2]));B.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}else H.innerHTML="",B=H,mxUtils.write(B,ba),
H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})});X.send(mxUtils.bind(this,function(ba){if(W.clear())try{if(200<=ba.getStatus()&&299>=ba.getStatus()){var ea=JSON.parse(ba.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",M,"response:",ea);var ca=mxUtils.trim(ea.choices[0].message.content);if("create"==n.value){var fa=b.extractMermaidDeclaration(ca);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ha){Y(ha)})),b.generateMermaidImage(fa,null,function(){},
function(ha){mxMermaidToDrawio.resetListeners();Z(ha)})):(Y(ca),H.appendChild(x(mxResources.get("tryAgain"),S)))}else Y(ca)}else{var aa="Error: "+ba.getStatus();try{var da=JSON.parse(ba.getText());null!=da&&null!=da.error&&null!=da.error.message&&(aa=da.error.message)}catch(ha){}H.innerHTML="";mxUtils.write(H,aa);H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ha){Z(ha)}}),Z)}),function(W){H.innerHTML="";mxUtils.write(H,W.message);H.appendChild(x(mxResources.get("tryAgain"),
-S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function L(){""!=mxUtils.trim(O.value)&&(K(O.value),O.value="")}var N=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.overflow="hidden";c.style.height="100%";var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.top="0px";e.style.left="0px";e.style.right="0px";e.style.bottom="104px";c.appendChild(e);var f=document.createElement("div");f.style.position=
+S));H.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function L(){""!=mxUtils.trim(O.value)&&(K(O.value),O.value="")}var Q=b.editor.graph,c=document.createElement("div");c.style.textAlign="center";c.style.overflow="hidden";c.style.height="100%";var e=document.createElement("div");e.style.position="absolute";e.style.overflow="auto";e.style.top="0px";e.style.left="0px";e.style.right="0px";e.style.bottom="104px";c.appendChild(e);var f=document.createElement("div");f.style.position=
"absolute";f.style.boxSizing="border-box";f.style.borderRadius="4px";f.style.border="1px solid lightgray";f.style.margin="8px 8px 16px 8px";f.style.padding="8px";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.padding="6px";f.style.height="80px";var p=document.createElement("div");p.style.display="flex";p.style.gap="6px";p.style.marginBottom="6px";var n=document.createElement("select");n.style.textOverflow="ellipsis";n.style.flexGrow="1";n.style.padding="4px";n.style.minWidth=
-"0";f.appendChild(p);var t=document.createElement("option");t.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));n.appendChild(t);var z=document.createElement("option");z.setAttribute("value","selectionOnly");mxUtils.write(z,mxResources.get("selectionOnly"));n.appendChild(z);p.appendChild(n);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var F=document.createElement("option");F.setAttribute("value","create");mxUtils.write(F,
-mxResources.get("create"));n.appendChild(F)}F=document.createElement("option");F.setAttribute("value","help");mxUtils.write(F,mxResources.get("help"));n.appendChild(F);F=document.createElement("option");F.setAttribute("value","reset");mxUtils.write(F,mxResources.get("reset"));n.appendChild(F);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(F=0;F<EditorUi.mermaidDiagramTypes.length;F++){var E=document.createElement("option"),
-R=EditorUi.mermaidDiagramTypes[F],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));E.setAttribute("value",R);mxUtils.write(E,U);C.appendChild(E)}p.appendChild(C);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100%";O.style.outline="none";O.style.border="none";
-O.style.background="transparent";O.style.padding="8px 26px 8px 8px";O.style.boxSizing="border-box";p.appendChild(O);F=document.createElement("img");F.setAttribute("src",Editor.sendImage);F.setAttribute("title",mxResources.get("sendMessage"));F.className="geAdaptiveAsset";F.style.position="relative";F.style.cursor="pointer";F.style.opacity="0.5";F.style.height="19px";F.style.left="-24px";F.style.top="5px";F.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(F);f.appendChild(p);N.isSelectionEmpty()?
-b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var Q=!1,m=n.value,u=function(){O.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",C.style.display=""):(n.style.width="100%",C.style.display="none")};u();mxEvent.addListener(n,"change",function(){Q||("reset"==n.value?(n.value=m,e.innerHTML=""):m=n.value,u())});N.selectionModel.addListener(mxEvent.CHANGE,y);N.getModel().addListener(mxEvent.CHANGE,
-y);y();mxEvent.addListener(F,"click",L);mxEvent.addListener(O,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||L()});c.appendChild(f);this.window=new mxWindow(mxResources.get("chatWindowTitle"),c,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){N.getModel().removeListener(y)}));this.window.addListener("show",
-mxUtils.bind(this,function(){this.window.fit();O.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,K){if(y.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(N){b.hideDialog();if(null!=N&&0<N.length){N=
-N.split(" ");for(var c=[],e=[],f=0;f<N.length;f++){var p=mxUtils.trim(N[f]);""!=p&&(e.push(p),0>mxUtils.indexOf(J,p)&&c.push(p))}y.isSelectionEmpty()?K(J.concat(c)):y.addTagsForCells(y.getSelectionCells(),e)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},x);x=D.div;this.window=new mxWindow(mxResources.get("tags"),x,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
+"0";f.appendChild(p);var t=document.createElement("option");t.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(t,mxResources.get("includeCopyOfMyDiagram"));n.appendChild(t);var z=document.createElement("option");z.setAttribute("value","selectionOnly");mxUtils.write(z,mxResources.get("selectionOnly"));n.appendChild(z);p.appendChild(n);if("undefined"!==typeof mxMermaidToDrawio&&window.isMermaidEnabled){var E=document.createElement("option");E.setAttribute("value","create");mxUtils.write(E,
+mxResources.get("create"));n.appendChild(E)}E=document.createElement("option");E.setAttribute("value","help");mxUtils.write(E,mxResources.get("help"));n.appendChild(E);E=document.createElement("option");E.setAttribute("value","reset");mxUtils.write(E,mxResources.get("reset"));n.appendChild(E);var C=document.createElement("select");C.style.textOverflow="ellipsis";C.style.flexGrow="1";C.style.padding="4px";C.style.minWidth="0";for(E=0;E<EditorUi.mermaidDiagramTypes.length;E++){var F=document.createElement("option"),
+R=EditorUi.mermaidDiagramTypes[E],U=R;"erDiagram"==U&&(U="entityRelationshipDiagram");U=mxResources.get(U,null,U.charAt(0).toUpperCase()+U.substring(1).replace(/[A-Z]/g," $&"));F.setAttribute("value",R);mxUtils.write(F,U);C.appendChild(F)}p.appendChild(C);p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.textOverflow="clip";p.style.cursor="default";var O=document.createElement("input");O.setAttribute("type","text");O.style.width="100%";O.style.outline="none";O.style.border="none";
+O.style.background="transparent";O.style.padding="8px 26px 8px 8px";O.style.boxSizing="border-box";p.appendChild(O);E=document.createElement("img");E.setAttribute("src",Editor.sendImage);E.setAttribute("title",mxResources.get("sendMessage"));E.className="geAdaptiveAsset";E.style.position="relative";E.style.cursor="pointer";E.style.opacity="0.5";E.style.height="19px";E.style.left="-24px";E.style.top="5px";E.style.background="url('"+b.editor.transparentImage+"')";p.appendChild(E);f.appendChild(p);Q.isSelectionEmpty()?
+b.isDiagramEmpty()?n.value="help":n.value="includeCopyOfMyDiagram":n.value="selectionOnly";var N=!1,m=n.value,u=function(){O.setAttribute("placeholder",mxResources.get("create"==n.value?"describeYourDiagram":"askMeAnything"));"create"==n.value?(n.style.width="",C.style.display=""):(n.style.width="100%",C.style.display="none")};u();mxEvent.addListener(n,"change",function(){N||("reset"==n.value?(n.value=m,e.innerHTML=""):m=n.value,u())});Q.selectionModel.addListener(mxEvent.CHANGE,y);Q.getModel().addListener(mxEvent.CHANGE,
+y);y();mxEvent.addListener(E,"click",L);mxEvent.addListener(O,"keydown",function(A){13!=A.keyCode||mxEvent.isShiftDown(A)||L()});c.appendChild(f);this.window=new mxWindow(mxResources.get("chatWindowTitle"),c,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,120,100);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener(mxEvent.DESTROY,mxUtils.bind(this,function(){Q.getModel().removeListener(y)}));this.window.addListener("show",
+mxUtils.bind(this,function(){this.window.fit();O.focus()}));b.installResizeHandler(this,!0)},TagsWindow=function(b,g,l,d,q){var y=b.editor.graph,x=null;if(!b.isOffline()||mxClient.IS_CHROMEAPP)x=b.menus.createHelpLink("https://www.drawio.com/blog/tags-in-diagrams");var D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(J,K){if(y.isEnabled()){var L=new FilenameDialog(b,"",mxResources.get("add"),function(Q){b.hideDialog();if(null!=Q&&0<Q.length){Q=
+Q.split(" ");for(var c=[],e=[],f=0;f<Q.length;f++){var p=mxUtils.trim(Q[f]);""!=p&&(e.push(p),0>mxUtils.indexOf(J,p)&&c.push(p))}y.isSelectionEmpty()?K(J.concat(c)):y.addTagsForCells(y.getSelectionCells(),e)}},mxResources.get("tags"),null,null,"https://www.drawio.com/blog/tags-in-diagrams");b.showDialog(L.container,320,80,!0,!0);L.init()}},x);x=D.div;this.window=new mxWindow(mxResources.get("tags"),x,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;
this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){D.refresh();this.window.fit()}));b.installResizeHandler(this,!0)},AuthDialog=function(b,g,l,d){var q=document.createElement("div");q.style.textAlign="center";var y=document.createElement("p");y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("authorizationRequired"));var x="Unknown",
D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),
D.src=IMAGE_PATH+"/gitlab-logo.svg",D.style.width="32px"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[x]));var J=document.createElement("input");J.setAttribute("type","checkbox");x=mxUtils.button(mxResources.get("authorize"),function(){d(J.checked)});x.insertBefore(D,x.firstChild);x.style.marginTop="6px";x.className="geBigButton";x.style.fontSize="18px";x.style.padding="14px";
q.appendChild(y);q.appendChild(b);q.appendChild(x);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(J),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberMe")),l.appendChild(y),q.appendChild(l),J.checked=!0,J.defaultChecked=!0,mxEvent.addListener(y,"click",function(K){J.checked=!J.checked;mxEvent.consume(K)}));this.container=q},MoreShapesDialog=function(b,g,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),q=[];if(null!=b.sidebar.customEntries)for(var y=
0;y<b.sidebar.customEntries.length;y++){for(var x=b.sidebar.customEntries[y]||{},D={title:b.getResource(x.title),entries:[]},J=0;null!=x.entries&&J<x.entries.length;J++){var K=x.entries[J];D.entries.push({id:K.id,title:b.getResource(K.title),desc:b.getResource(K.desc),image:K.preview})}0<D.entries.length&&q.push(D)}for(y=0;y<l.length;y++)if(null==b.sidebar.enabledLibraries)q.push(l[y]);else{D={title:l[y].title,entries:[]};for(J=0;J<l[y].entries.length;J++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-l[y].entries[J].id)&&D.entries.push(l[y].entries[J]);0<D.entries.length&&q.push(D)}l=q;if(g){y=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(O){var Q=f.cloneNode(!1);Q.style.fontWeight="bold";Q.style.backgroundColor="light-dark(#e5e5e5, #505759)";Q.style.padding="6px 0px 6px 20px";mxUtils.write(Q,O.title);L.appendChild(Q);for(var m=0;m<O.entries.length;m++)(function(u){var A=f.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";
-A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.setAttribute("title",u.title+" ("+u.id+")");var B=document.createElement("input");B.setAttribute("type","checkbox");B.checked=b.sidebar.isEntryVisible(u.id);B.defaultChecked=B.checked;A.appendChild(B);mxUtils.write(A," "+u.title);L.appendChild(A);var H=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){N.style.textAlign="center";N.style.padding="0px";N.style.color="";N.innerText="";if(null!=u.desc){var k=document.createElement("pre");
-k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,u.desc);N.appendChild(k)}null!=u.imageCallback?u.imageCallback(N):null!=u.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",u.image),N.appendChild(k)):null==u.desc&&(N.style.padding="20px",N.style.color="rgb(179, 179, 179)",mxUtils.write(N,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor=
+l[y].entries[J].id)&&D.entries.push(l[y].entries[J]);0<D.entries.length&&q.push(D)}l=q;if(g){y=mxUtils.bind(this,function(R){for(var U=0;U<R.length;U++)(function(O){var N=f.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor="light-dark(#e5e5e5, #505759)";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,O.title);L.appendChild(N);for(var m=0;m<O.entries.length;m++)(function(u){var A=f.cloneNode(!1);A.style.cursor="pointer";A.style.padding="4px 0px 4px 20px";A.style.whiteSpace="nowrap";
+A.style.overflow="hidden";A.style.textOverflow="ellipsis";A.setAttribute("title",u.title+" ("+u.id+")");var B=document.createElement("input");B.setAttribute("type","checkbox");B.checked=b.sidebar.isEntryVisible(u.id);B.defaultChecked=B.checked;A.appendChild(B);mxUtils.write(A," "+u.title);L.appendChild(A);var H=function(T){if(null==T||"INPUT"!=mxEvent.getSource(T).nodeName){Q.style.textAlign="center";Q.style.padding="0px";Q.style.color="";Q.innerText="";if(null!=u.desc){var k=document.createElement("pre");
+k.style.boxSizing="border-box";k.style.fontFamily="inherit";k.style.margin="20px";k.style.right="0px";k.style.textAlign="left";mxUtils.write(k,u.desc);Q.appendChild(k)}null!=u.imageCallback?u.imageCallback(Q):null!=u.image?(k=document.createElement("img"),k.setAttribute("border","0"),k.style.maxWidth="100%",k.setAttribute("src",u.image),Q.appendChild(k)):null==u.desc&&(Q.style.padding="20px",Q.style.color="rgb(179, 179, 179)",mxUtils.write(Q,mxResources.get("noPreview")));null!=c&&(c.style.backgroundColor=
"");c=A;c.style.backgroundColor="light-dark(#ebf2f9, #000000)";null!=T&&mxEvent.consume(T)}};mxEvent.addListener(A,"click",H);mxEvent.addListener(A,"dblclick",function(T){B.checked=!B.checked;mxEvent.consume(T)});e.push(function(){return B.checked?u.id:null});0==U&&0==m&&H()})(O.entries[m])})(R[U])});J=document.createElement("div");J.className="geDialogTitle";mxUtils.write(J,mxResources.get("shapes"));J.style.position="absolute";J.style.top="0px";J.style.left="0px";J.style.lineHeight="40px";J.style.height=
-"40px";J.style.right="0px";var L=document.createElement("div"),N=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";N.style.position="absolute";N.style.left="202px";N.style.right="0px";N.style.top="40px";N.style.bottom="60px";N.style.overflow="auto";N.style.borderLeftStyle="solid";N.style.borderLeftWidth="1px";N.style.textAlign="center";var c=null,e=[],f=document.createElement("div");f.style.position=
-"relative";f.style.left="0px";f.style.right="0px";y(l);d.style.padding="30px";d.appendChild(J);d.appendChild(L);d.appendChild(N);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;
+"40px";J.style.right="0px";var L=document.createElement("div"),Q=document.createElement("div");L.style.position="absolute";L.style.top="40px";L.style.left="0px";L.style.width="202px";L.style.bottom="60px";L.style.overflow="auto";Q.style.position="absolute";Q.style.left="202px";Q.style.right="0px";Q.style.top="40px";Q.style.bottom="60px";Q.style.overflow="auto";Q.style.borderLeftStyle="solid";Q.style.borderLeftWidth="1px";Q.style.textAlign="center";var c=null,e=[],f=document.createElement("div");f.style.position=
+"relative";f.style.left="0px";f.style.right="0px";y(l);d.style.padding="30px";d.appendChild(J);d.appendChild(L);d.appendChild(Q);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var p=document.createElement("input");p.setAttribute("type","checkbox");p.style.position="relative";p.style.top="1px";p.checked=b.sidebar.sidebarTitles;
p.defaultChecked=p.checked;l.appendChild(p);y=document.createElement("span");mxUtils.write(y," "+mxResources.get("labels"));y.style.paddingRight="20px";l.appendChild(y);mxEvent.addListener(y,"click",function(R){p.checked=!p.checked;mxEvent.consume(R)});var n=document.createElement("input");n.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)y=document.createElement("span"),y.style.paddingRight="20px",y.appendChild(n),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),
n.style.position="relative",n.style.top="1px",n.checked=!0,n.defaultChecked=!0,mxEvent.addListener(y,"click",function(R){mxEvent.getSource(R)!=n&&(n.checked=!n.checked,mxEvent.consume(R))}),l.appendChild(y);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var R=[],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&R.push(O)}"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&
"min"!=Editor.currentTheme||!Editor.isSettingsEnabled()||(U=mxUtils.indexOf(R,".scratchpad"),null!=b.scratchpad!=(0<=U&&0<R.splice(U,1).length)&&b.toggleScratchpad(),U=mxUtils.indexOf(R,"search"),mxSettings.settings.search=0<=U&&0<R.splice(U,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),n.checked&&mxSettings.save());b.sidebar.showEntries(R.join(";"),n.checked,!0);b.setSidebarTitles(p.checked,n.checked)});J.className="geBtn gePrimaryBtn"}else{var t=document.createElement("table");
-y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");x=document.createElement("td");var z=mxUtils.bind(this,function(R,U,O){var Q=document.createElement("input");Q.type="checkbox";t.appendChild(Q);Q.checked=b.sidebar.isEntryVisible(O);var m=document.createElement("span");mxUtils.write(m,U);U=document.createElement("div");U.style.display="block";U.appendChild(Q);
-U.appendChild(m);mxEvent.addListener(m,"click",function(u){Q.checked=!Q.checked;mxEvent.consume(u)});R.appendChild(U);return function(){return Q.checked?O:null}});J.appendChild(g);J.appendChild(q);J.appendChild(x);y.appendChild(J);t.appendChild(y);e=[];var F=0;for(y=0;y<l.length;y++)for(J=0;J<l[y].entries.length;J++)F++;var C=[g,q,x],E=0;for(y=0;y<l.length;y++)(function(R){for(var U=0;U<R.entries.length;U++){var O=R.entries[U];e.push(z(C[Math.floor(E/(F/3))],O.title,O.id));E++}})(l[y]);d.appendChild(t);
+y=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";J=document.createElement("tr");t.style.width="100%";g=document.createElement("td");q=document.createElement("td");x=document.createElement("td");var z=mxUtils.bind(this,function(R,U,O){var N=document.createElement("input");N.type="checkbox";t.appendChild(N);N.checked=b.sidebar.isEntryVisible(O);var m=document.createElement("span");mxUtils.write(m,U);U=document.createElement("div");U.style.display="block";U.appendChild(N);
+U.appendChild(m);mxEvent.addListener(m,"click",function(u){N.checked=!N.checked;mxEvent.consume(u)});R.appendChild(U);return function(){return N.checked?O:null}});J.appendChild(g);J.appendChild(q);J.appendChild(x);y.appendChild(J);t.appendChild(y);e=[];var E=0;for(y=0;y<l.length;y++)for(J=0;J<l[y].entries.length;J++)E++;var C=[g,q,x],F=0;for(y=0;y<l.length;y++)(function(R){for(var U=0;U<R.entries.length;U++){var O=R.entries[U];e.push(z(C[Math.floor(F/(E/3))],O.title,O.id));F++}})(l[y]);d.appendChild(t);
l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";n=document.createElement("input");isLocalStorage&&(n.setAttribute("type","checkbox"),n.checked=!0,n.defaultChecked=!0,l.appendChild(n),y=document.createElement("span"),mxUtils.write(y," "+mxResources.get("rememberThisSetting")),l.appendChild(y),mxEvent.addListener(y,"click",function(R){n.checked=!n.checked;mxEvent.consume(R)}));d.appendChild(l);y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
y.className="geBtn";J=mxUtils.button(mxResources.get("apply"),function(){for(var R=["search"],U=0;U<e.length;U++){var O=e[U].apply(this,arguments);null!=O&&R.push(O)}b.sidebar.showEntries(0<R.length?R.join(";"):"",n.checked);b.hideDialog()});J.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(y),l.appendChild(J)):(l.appendChild(J),l.appendChild(y));d.appendChild(l);this.container=d},PluginsDialog=function(b,
g,l,d){function q(){J=!0;if(0==D.length)x.innerText=mxResources.get("noPlugins");else{x.innerText="";for(var e=0;e<D.length;e++){var f=document.createElement("span");f.style.display="flex";f.style.alignItems="center";f.style.whiteSpace="nowrap";var p=document.createElement("img");p.src=Editor.trashImage;p.style.position="relative";p.style.cursor="pointer";p.style.marginRight="4px";p.style.display="inline-block";p.style.width="18px";p.setAttribute("title",mxResources.get("delete"));f.appendChild(p);
mxUtils.write(f,D[e]);x.appendChild(f);mxUtils.br(x);mxEvent.addListener(p,"click",function(n){return function(){b.confirm(mxResources.get("delete")+' "'+D[n]+'"?',function(){null!=l&&l(D[n]);D.splice(n,1);q()})}}(e))}}}var y=document.createElement("div"),x=document.createElement("div");x.style.height="180px";x.style.overflow="auto";var D=mxSettings.getPlugins().slice(),J=!1;y.appendChild(x);q();J=!1;var K=mxUtils.button(mxResources.get("add"),null!=g?function(){g(function(e){e&&0>mxUtils.indexOf(D,
e)&&D.push(e);q()})}:function(){var e=document.createElement("div"),f=document.createElement("span");f.style.marginTop="6px";mxUtils.write(f,mxResources.get("builtinPlugins")+": ");e.appendChild(f);var p=document.createElement("select");p.style.width="150px";for(f=0;f<App.publicPlugin.length;f++){var n=document.createElement("option");mxUtils.write(n,App.publicPlugin[f]);n.value=App.publicPlugin[f];p.appendChild(n)}e.appendChild(p);mxUtils.br(e);mxUtils.br(e);f=mxUtils.button(mxResources.get("custom")+
-"...",function(){var t=new FilenameDialog(b,"",mxResources.get("add"),function(z){b.hideDialog();if(null!=z&&0<z.length){z=z.split(";");for(var F=0;F<z.length;F++){var C=z[F],E=App.pluginRegistry[C];null!=E&&(C=E);0<C.length&&0>mxUtils.indexOf(D,C)&&D.push(C)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(t.container,300,80,!0,!0);t.init()});f.className="geBtn";ALLOW_CUSTOM_PLUGINS||(f.style.display="none");e=new CustomDialog(b,e,mxUtils.bind(this,function(){var t=
-App.pluginRegistry[p.value];0>mxUtils.indexOf(D,t)&&(D.push(t),q())}),null,null,null,f);b.showDialog(e.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var N=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});N.className="geBtn gePrimaryBtn";var c=document.createElement("div");
-c.style.marginTop="14px";c.style.textAlign="right";b.isOffline()||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||c.appendChild(L),c.appendChild(K),c.appendChild(N)):(c.appendChild(K),c.appendChild(N),d||c.appendChild(L));y.appendChild(c);this.container=y},CropImageDialog=function(b,g,l,d){function q(){var R=n.checked,U=t.checked,O=e.geometry,Q=J.width,m=J.height,u=(300-Q)/2,A=(300-m)/2;O.x<u?(O.width-=u-O.x,O.x=u):O.x+O.width>u+Q&&(O.width=u+Q-O.x,
-O.x=Math.min(O.x,u+Q));O.y<A?(O.height-=A-O.y,O.y=A):O.y+O.height>A+m&&(O.height=A+m-O.y,O.y=Math.min(O.y,A+m));var B=(O.x-u)/Q*100;Q=100-(O.x+O.width-u)/Q*100;u=(O.y-A)/m*100;O=100-(O.y+O.height-A)/m*100;return"inset("+mxUtils.format(u)+"% "+mxUtils.format(Q)+"% "+mxUtils.format(O)+"% "+mxUtils.format(B)+"%"+(R?" round "+c+"%":U?" round 50%":"")+")"}function y(R){null!=L&&(!0!==R&&(L.model.setGeometry(e,N.clone()),c=5,F.value=c),L.model.setStyle(e,f+q()),L.selectAll(),z.style.visibility=n.checked?
+"...",function(){var t=new FilenameDialog(b,"",mxResources.get("add"),function(z){b.hideDialog();if(null!=z&&0<z.length){z=z.split(";");for(var E=0;E<z.length;E++){var C=z[E],F=App.pluginRegistry[C];null!=F&&(C=F);0<C.length&&0>mxUtils.indexOf(D,C)&&D.push(C)}q()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(t.container,300,80,!0,!0);t.init()});f.className="geBtn";ALLOW_CUSTOM_PLUGINS||(f.style.display="none");e=new CustomDialog(b,e,mxUtils.bind(this,function(){var t=
+App.pluginRegistry[p.value];0>mxUtils.indexOf(D,t)&&(D.push(t),q())}),null,null,null,f);b.showDialog(e.container,360,100,!0,!0)});K.className="geBtn";var L=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});L.className="geBtn";var Q=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){J?(mxSettings.setPlugins(D),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});Q.className="geBtn gePrimaryBtn";var c=document.createElement("div");
+c.style.marginTop="14px";c.style.textAlign="right";b.isOffline()||c.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/plugins"));b.editor.cancelFirst?(d||c.appendChild(L),c.appendChild(K),c.appendChild(Q)):(c.appendChild(K),c.appendChild(Q),d||c.appendChild(L));y.appendChild(c);this.container=y},CropImageDialog=function(b,g,l,d){function q(){var R=n.checked,U=t.checked,O=e.geometry,N=J.width,m=J.height,u=(300-N)/2,A=(300-m)/2;O.x<u?(O.width-=u-O.x,O.x=u):O.x+O.width>u+N&&(O.width=u+N-O.x,
+O.x=Math.min(O.x,u+N));O.y<A?(O.height-=A-O.y,O.y=A):O.y+O.height>A+m&&(O.height=A+m-O.y,O.y=Math.min(O.y,A+m));var B=(O.x-u)/N*100;N=100-(O.x+O.width-u)/N*100;u=(O.y-A)/m*100;O=100-(O.y+O.height-A)/m*100;return"inset("+mxUtils.format(u)+"% "+mxUtils.format(N)+"% "+mxUtils.format(O)+"% "+mxUtils.format(B)+"%"+(R?" round "+c+"%":U?" round 50%":"")+")"}function y(R){null!=L&&(!0!==R&&(L.model.setGeometry(e,Q.clone()),c=5,E.value=c),L.model.setStyle(e,f+q()),L.selectAll(),z.style.visibility=n.checked?
"visible":"hidden")}var x=document.createElement("div"),D=document.createElement("div");D.style.height="300px";D.style.width="300px";D.style.display="inline-flex";D.style.justifyContent="center";D.style.alignItems="center";D.style.position="absolute";var J=document.createElement("img");J.onload=function(){function R(){L.model.setStyle(e,f+q())}L=new Graph(K);L.autoExtend=!1;L.autoScroll=!1;L.setGridEnabled(!1);L.setEnabled(!0);L.setPanning(!1);L.setConnectable(!1);L.getRubberband().setEnabled(!1);
-L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var P=U.apply(this,arguments);P.livePreview=!1;return P};if(null!=l)try{if("inset"==l.substring(0,5)){var O=e.geometry,Q=J.width,m=J.height,u=(300-Q)/2,A=(300-m)/2,B=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(B[0]),T=parseFloat(B[1]),k=parseFloat(B[2]),v=parseFloat(B[3]);isFinite(H)&&isFinite(T)&&isFinite(k)&&isFinite(v)?(O.x=v/100*Q+u,O.y=H/100*m+A,O.width=(100-T)/100*Q+u-O.x,O.height=(100-
-k)/100*m+A-O.y,"round"==B[4]?"50%"==B[5]?t.setAttribute("checked","checked"):(c=parseInt(B[5]),F.value=c,n.setAttribute("checked","checked"),z.style.visibility="visible"):p.setAttribute("checked","checked")):l=null}else l=null}catch(P){}e.style=f+(l?l:q());e.vertex=!0;L.addCell(e,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var G=L.graphHandler.mouseUp,I=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){G.apply(this,arguments);
+L.graphHandler.allowLivePreview=!1;var U=L.createVertexHandler;L.createVertexHandler=function(){var P=U.apply(this,arguments);P.livePreview=!1;return P};if(null!=l)try{if("inset"==l.substring(0,5)){var O=e.geometry,N=J.width,m=J.height,u=(300-N)/2,A=(300-m)/2,B=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),H=parseFloat(B[0]),T=parseFloat(B[1]),k=parseFloat(B[2]),v=parseFloat(B[3]);isFinite(H)&&isFinite(T)&&isFinite(k)&&isFinite(v)?(O.x=v/100*N+u,O.y=H/100*m+A,O.width=(100-T)/100*N+u-O.x,O.height=(100-
+k)/100*m+A-O.y,"round"==B[4]?"50%"==B[5]?t.setAttribute("checked","checked"):(c=parseInt(B[5]),E.value=c,n.setAttribute("checked","checked"),z.style.visibility="visible"):p.setAttribute("checked","checked")):l=null}else l=null}catch(P){}e.style=f+(l?l:q());e.vertex=!0;L.addCell(e,null,null,null,null);L.selectAll();L.addListener(mxEvent.CELLS_MOVED,R);L.addListener(mxEvent.CELLS_RESIZED,R);var G=L.graphHandler.mouseUp,I=L.graphHandler.mouseDown;L.graphHandler.mouseUp=function(){G.apply(this,arguments);
K.style.backgroundColor="#fff9"};L.graphHandler.mouseDown=function(){I.apply(this,arguments);K.style.backgroundColor=""};L.dblClick=function(){};var M=L.getSelectionModel().changeSelection;L.getSelectionModel().changeSelection=function(){M.call(this,[e],[e])}};J.onerror=function(){J.onload=null;J.src=Editor.errorImage};J.setAttribute("src",g);J.style.maxWidth="300px";J.style.maxHeight="300px";D.appendChild(J);x.appendChild(D);var K=document.createElement("div");K.style.width="300px";K.style.height=
-"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";x.appendChild(K);var L=null,N=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",N.clone(),""),f="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+g.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";x.appendChild(p);g=document.createElement("label");
+"300px";K.style.overflow="hidden";K.style.backgroundColor="#fff9";x.appendChild(K);var L=null,Q=new mxGeometry(100,100,100,100),c=5,e=new mxCell("",Q.clone(),""),f="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+g.replace(";base64","")+";clipPath=",p=document.createElement("input");p.setAttribute("type","radio");p.setAttribute("id","croppingRect");p.setAttribute("name","croppingShape");p.setAttribute("checked","checked");p.style.margin="5px";x.appendChild(p);g=document.createElement("label");
g.setAttribute("for","croppingRect");mxUtils.write(g,mxResources.get("rectangle"));x.appendChild(g);var n=document.createElement("input");n.setAttribute("type","radio");n.setAttribute("id","croppingRounded");n.setAttribute("name","croppingShape");n.style.margin="5px";x.appendChild(n);g=document.createElement("label");g.setAttribute("for","croppingRounded");mxUtils.write(g,mxResources.get("rounded"));x.appendChild(g);var t=document.createElement("input");t.setAttribute("type","radio");t.setAttribute("id",
-"croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px";x.appendChild(t);g=document.createElement("label");g.setAttribute("for","croppingEllipse");mxUtils.write(g,mxResources.get("ellipse"));x.appendChild(g);mxEvent.addListener(p,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(t,"change",y);var z=document.createElement("div");z.style.textAlign="center";z.style.visibility="hidden";var F=document.createElement("input");F.setAttribute("type","range");F.setAttribute("min",
-"1");F.setAttribute("max","49");F.setAttribute("value",c);F.setAttribute("title",mxResources.get("arcSize"));z.appendChild(F);x.appendChild(z);mxEvent.addListener(F,"change",function(){c=this.value;y(!0)});g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){d(q(),e.geometry.width,e.geometry.height);b.hideDialog()});D.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){d(null,
-J.width,J.height);b.hideDialog()});C.className="geBtn";var E=document.createElement("div");E.style.marginTop="10px";E.style.textAlign="right";b.editor.cancelFirst?(E.appendChild(g),E.appendChild(C),E.appendChild(D)):(E.appendChild(C),E.appendChild(D),E.appendChild(g));x.appendChild(E);this.container=x},EditGeometryDialog=function(b,g){var l=b.editor.graph,d=1==g.length?l.getCellGeometry(g[0]):null,q=document.createElement("div"),y=document.createElement("table"),x=document.createElement("tbody"),
+"croppingEllipse");t.setAttribute("name","croppingShape");t.style.margin="5px";x.appendChild(t);g=document.createElement("label");g.setAttribute("for","croppingEllipse");mxUtils.write(g,mxResources.get("ellipse"));x.appendChild(g);mxEvent.addListener(p,"change",y);mxEvent.addListener(n,"change",y);mxEvent.addListener(t,"change",y);var z=document.createElement("div");z.style.textAlign="center";z.style.visibility="hidden";var E=document.createElement("input");E.setAttribute("type","range");E.setAttribute("min",
+"1");E.setAttribute("max","49");E.setAttribute("value",c);E.setAttribute("title",mxResources.get("arcSize"));z.appendChild(E);x.appendChild(z);mxEvent.addListener(E,"change",function(){c=this.value;y(!0)});g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});g.className="geBtn";D=mxUtils.button(mxResources.get("apply"),function(){d(q(),e.geometry.width,e.geometry.height);b.hideDialog()});D.className="geBtn gePrimaryBtn";var C=mxUtils.button(mxResources.get("reset"),function(){d(null,
+J.width,J.height);b.hideDialog()});C.className="geBtn";var F=document.createElement("div");F.style.marginTop="10px";F.style.textAlign="right";b.editor.cancelFirst?(F.appendChild(g),F.appendChild(C),F.appendChild(D)):(F.appendChild(C),F.appendChild(D),F.appendChild(g));x.appendChild(F);this.container=x},EditGeometryDialog=function(b,g){var l=b.editor.graph,d=1==g.length?l.getCellGeometry(g[0]):null,q=document.createElement("div"),y=document.createElement("table"),x=document.createElement("tbody"),
D=document.createElement("tr"),J=document.createElement("td"),K=document.createElement("td");y.style.paddingLeft="6px";mxUtils.write(J,mxResources.get("relative")+":");var L=document.createElement("input");L.setAttribute("type","checkbox");null!=d&&d.relative&&(L.setAttribute("checked","checked"),L.defaultChecked=!0);this.init=function(){L.focus()};K.appendChild(L);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");
-mxUtils.write(J,mxResources.get("left")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.width="100px";N.value=null!=d?d.x:"";K.appendChild(N);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.y:"";K.appendChild(c);D.appendChild(J);
+mxUtils.write(J,mxResources.get("left")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.width="100px";Q.value=null!=d?d.x:"";K.appendChild(Q);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("top")+":");var c=document.createElement("input");c.setAttribute("type","text");c.style.width="100px";c.value=null!=d?d.y:"";K.appendChild(c);D.appendChild(J);
D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("dx")+":");var e=document.createElement("input");e.setAttribute("type","text");e.style.width="100px";e.value=null!=d&&null!=d.offset?d.offset.x:"";K.appendChild(e);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("dy")+
":");var f=document.createElement("input");f.setAttribute("type","text");f.style.width="100px";f.value=null!=d&&null!=d.offset?d.offset.y:"";K.appendChild(f);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.width:"";K.appendChild(p);D.appendChild(J);D.appendChild(K);
x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value=null!=d?d.height:"";K.appendChild(n);D.appendChild(J);D.appendChild(K);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");K=document.createElement("td");mxUtils.write(J,mxResources.get("rotation")+":");var t=document.createElement("input");
-t.setAttribute("type","text");t.style.width="100px";t.value=1==g.length?mxUtils.getValue(l.getCellStyle(g[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(t);D.appendChild(J);D.appendChild(K);x.appendChild(D);y.appendChild(x);q.appendChild(y);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var F=0;F<g.length;F++){var C=l.getCellGeometry(g[F]);null!=
-C&&(C=C.clone(),l.isCellMovable(g[F])&&(C.relative=L.checked,0<mxUtils.trim(N.value).length&&(C.x=Number(N.value)),0<mxUtils.trim(c.value).length&&(C.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(e.value)),0<mxUtils.trim(f.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(f.value))),l.isCellResizable(g[F])&&(0<mxUtils.trim(p.value).length&&(C.width=Number(p.value)),0<mxUtils.trim(n.value).length&&(C.height=Number(n.value))),
-l.getModel().setGeometry(g[F],C));0<mxUtils.trim(t.value).length&&l.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[g[F]])}}finally{l.getModel().endUpdate()}});z.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",function(F){13==F.keyCode&&z.click()});y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(d),y.appendChild(z)):(y.appendChild(z),y.appendChild(d));q.appendChild(y);this.container=q},LibraryDialog=function(b,
-g,l,d,q,y,x){function D(O){for(O=document.elementFromPoint(O.clientX,O.clientY);null!=O&&O.parentNode!=f;)O=O.parentNode;var Q=null;if(null!=O){var m=f.firstChild;for(Q=0;null!=m&&m!=O;)m=m.nextSibling,Q++}return Q}function J(O,Q,m,u,A,B,H,T,k){try{if(b.spinner.stop(),null==Q||"image/"==Q.substring(0,6))if(null==O&&null!=H||null==n[O]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?
+t.setAttribute("type","text");t.style.width="100px";t.value=1==g.length?mxUtils.getValue(l.getCellStyle(g[0]),mxConstants.STYLE_ROTATION,0):"";K.appendChild(t);D.appendChild(J);D.appendChild(K);x.appendChild(D);y.appendChild(x);q.appendChild(y);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var z=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var E=0;E<g.length;E++){var C=l.getCellGeometry(g[E]);null!=
+C&&(C=C.clone(),l.isCellMovable(g[E])&&(C.relative=L.checked,0<mxUtils.trim(Q.value).length&&(C.x=Number(Q.value)),0<mxUtils.trim(c.value).length&&(C.y=Number(c.value)),0<mxUtils.trim(e.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.x=Number(e.value)),0<mxUtils.trim(f.value).length&&(null==C.offset&&(C.offset=new mxPoint),C.offset.y=Number(f.value))),l.isCellResizable(g[E])&&(0<mxUtils.trim(p.value).length&&(C.width=Number(p.value)),0<mxUtils.trim(n.value).length&&(C.height=Number(n.value))),
+l.getModel().setGeometry(g[E],C));0<mxUtils.trim(t.value).length&&l.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[g[E]])}}finally{l.getModel().endUpdate()}});z.className="geBtn gePrimaryBtn";mxEvent.addListener(q,"keypress",function(E){13==E.keyCode&&z.click()});y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="right";b.editor.cancelFirst?(y.appendChild(d),y.appendChild(z)):(y.appendChild(z),y.appendChild(d));q.appendChild(y);this.container=q},LibraryDialog=function(b,
+g,l,d,q,y,x){function D(O){for(O=document.elementFromPoint(O.clientX,O.clientY);null!=O&&O.parentNode!=f;)O=O.parentNode;var N=null;if(null!=O){var m=f.firstChild;for(N=0;null!=m&&m!=O;)m=m.nextSibling,N++}return N}function J(O,N,m,u,A,B,H,T,k){try{if(b.spinner.stop(),null==N||"image/"==N.substring(0,6))if(null==O&&null!=H||null==n[O]){var v=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0<Z.title.length?
Z.title:mxResources.get("untitled"));X.style.color=null==Z.title||0==Z.title.length?"#d0d0d0":""};f.style.backgroundImage="";p.style.display="none";var G=A,I=B;if(A>b.maxImageSize||B>b.maxImageSize){var M=Math.min(1,Math.min(b.maxImageSize/Math.max(1,A)),b.maxImageSize/Math.max(1,B));A*=M;B*=M}G>I?(I=Math.round(100*I/G),G=100):(G=Math.round(100*G/I),I=100);var P=document.createElement("div");P.setAttribute("draggable","true");P.style.display="inline-block";P.style.position="relative";P.style.padding=
"0 12px";P.style.cursor="move";mxUtils.setPrefixedStyle(P.style,"transition","transform .1s ease-in-out");if(null!=O){var S=document.createElement("img");S.setAttribute("src",C.convert(O));S.style.width=G+"px";S.style.height=I+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-I)/2)+"px";S.style.paddingLeft=Math.floor((100-G)/2)+"px";P.appendChild(S)}else if(null!=H){var V=b.stringToCells("<"==H.xml.charAt(0)?H.xml:Graph.decompress(H.xml));0<V.length&&(b.sidebar.createThumb(V,100,100,
P,null,!0,!1,null,null,Editor.isDarkMode()?"#2a252f":"#ffffff"),P.firstChild.style.display="inline-block",P.firstChild.style.cursor="")}var W=document.createElement("img");W.setAttribute("src",Editor.closeBlackImage);W.setAttribute("border","0");W.setAttribute("title",mxResources.get("delete"));W.setAttribute("align","top");W.style.paddingTop="4px";W.style.position="absolute";W.style.marginLeft="-12px";W.style.zIndex="1";W.style.cursor="pointer";mxEvent.addListener(W,"dragstart",function(fa){mxEvent.consume(fa)});
-(function(fa,aa,da){mxEvent.addListener(W,"click",function(ha){n[aa]=null;for(var pa=0;pa<N.length;pa++)if(null!=N[pa].data&&N[pa].data==aa||null!=N[pa].xml&&null!=da&&N[pa].xml==da.xml){N.splice(pa,1);break}P.parentNode.removeChild(fa);0==N.length&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(W,"dblclick",function(ha){mxEvent.consume(ha)})})(P,O,H);P.appendChild(W);P.style.marginBottom="30px";var X=document.createElement("div");
-X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=O?(Z={data:O,w:A,h:B,title:k},null!=T&&(Z.aspect=T),n[O]=S,N.push(Z)):null!=H&&(H.aspect="fixed",N.push(H),Z=H);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=F&&(F(),F=null,mxEvent.consume(fa))});
+(function(fa,aa,da){mxEvent.addListener(W,"click",function(ha){n[aa]=null;for(var pa=0;pa<Q.length;pa++)if(null!=Q[pa].data&&Q[pa].data==aa||null!=Q[pa].xml&&null!=da&&Q[pa].xml==da.xml){Q.splice(pa,1);break}P.parentNode.removeChild(fa);0==Q.length&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",p.style.display="");mxEvent.consume(ha)});mxEvent.addListener(W,"dblclick",function(ha){mxEvent.consume(ha)})})(P,O,H);P.appendChild(W);P.style.marginBottom="30px";var X=document.createElement("div");
+X.style.position="absolute";X.style.boxSizing="border-box";X.style.bottom="-18px";X.style.left="10px";X.style.right="10px";X.style.backgroundColor="light-dark(#ffffff, transparent)";X.style.overflow="hidden";X.style.textAlign="center";X.setAttribute("title",mxResources.get("rename"));var Z=null;null!=O?(Z={data:O,w:A,h:B,title:k},null!=T&&(Z.aspect=T),n[O]=S,Q.push(Z)):null!=H&&(H.aspect="fixed",Q.push(H),Z=H);mxEvent.addListener(X,"keydown",function(fa){13==fa.keyCode&&null!=E&&(E(),E=null,mxEvent.consume(fa))});
v();P.appendChild(X);mxEvent.addListener(X,"mousedown",function(fa){"true"!=X.getAttribute("contentEditable")&&mxEvent.consume(fa)});V=function(fa){if(mxClient.IS_IOS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var aa=new FilenameDialog(b,Z.title||"",mxResources.get("ok"),function(da){null!=da&&(Z.title=da,v())},mxResources.get("enterValue"));b.showDialog(aa.container,300,80,!0,!0);aa.init();mxEvent.consume(fa)}else if("true"!=X.getAttribute("contentEditable")){null!=
-F&&(F(),F=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);F=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=X.innerHTML;v()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(P,"dblclick",V);f.appendChild(P);
-mxEvent.addListener(P,"dragstart",function(fa){null==F&&(null==O&&null!=H&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&fa.dataTransfer.setData("Text",H.xml),t=D(fa),mxClient.IS_GC&&(P.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(P,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(P,"dragend",function(fa){"hidden"==W.style.visibility&&(W.style.visibility=
-"",X.style.visibility="");t=null;mxUtils.setOpacity(P,100);mxUtils.setPrefixedStyle(P.style,"transform",null)})}else E||(E=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(G=mxUtils.parseXml(O),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var Y=0;Y<I.length;Y++)null!=I[Y].xml?J(null,null,0,0,0,0,I[Y]):J(I[Y].data,null,0,0,I[Y].w,I[Y].h,null,"fixed",I[Y].title);A=!0}else if("mxfile"==G.documentElement.nodeName){var ba=
-G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);V=b.stringToCells(ea);if(0<V.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(V);null!=ca&&J(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}A=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}A||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&console.log("Error in library dialog: "+
-fa)}return null}function K(O){O.dataTransfer.dropEffect=null!=t?"move":"copy";O.stopPropagation();O.preventDefault()}function L(O){O.stopPropagation();O.preventDefault();E=!1;z=D(O);if(null!=t)null!=z&&z<f.children.length?(N.splice(z>t?z-1:z,0,N.splice(t,1)[0]),f.insertBefore(f.children[t],f.children[z])):(N.push(N.splice(t,1)[0]),f.appendChild(f.children[t]));else if(0<O.dataTransfer.files.length)b.importFiles(O.dataTransfer.files,0,0,b.maxImageSize,R(O));else if(0<=mxUtils.indexOf(O.dataTransfer.types,
-"text/uri-list")){var Q=decodeURIComponent(O.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(Q)||/(\.png)($|\?)/i.test(Q)||/(\.gif)($|\?)/i.test(Q)||/(\.svg)($|\?)/i.test(Q))&&b.loadImage(Q,function(m){J(Q,null,0,0,m.width,m.height);f.scrollTop=f.scrollHeight})}O.stopPropagation();O.preventDefault()}var N=[];l=document.createElement("div");l.style.height="100%";var c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.height="40px";l.appendChild(c);mxUtils.write(c,mxResources.get("filename")+
-":");null==g&&(g=b.defaultLibraryName+".xml");var e=document.createElement("input");e.setAttribute("value",g);e.style.marginRight="20px";e.style.marginLeft="10px";e.style.width="500px";null==q||q.isRenamable()||e.setAttribute("disabled","true");this.init=function(){if(null==q||q.isRenamable())e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};c.appendChild(e);Editor.enableUncompressedLibraries&&(e.style.width="420px",g=document.createElement("input"),
-g.setAttribute("type","checkbox"),g.style.marginRight="10px",c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));var f=document.createElement("div");f.style.borderWidth="1px 0px 1px 0px";f.style.borderColor="#d3d3d3";f.style.borderStyle="solid";f.style.marginTop="6px";f.style.overflow="auto";f.style.height="340px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";0==N.length&&Graph.fileSupport&&(f.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");
-var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));l.appendChild(p);var n={},t=null,z=null,F=null;c=function(O){"true"!=mxEvent.getSource(O).getAttribute("contentEditable")&&null!=F&&(F(),F=null,mxEvent.consume(O))};mxEvent.addListener(f,"mousedown",c);mxEvent.addListener(f,"pointerdown",c);mxEvent.addListener(f,"touchstart",
-c);var C=new mxUrlConverter,E=!1;if(null!=d)for(c=0;c<d.length;c++)g=d[c],J(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(f,"dragleave",function(O){p.style.cursor="";for(var Q=mxEvent.getSource(O);null!=Q;){if(Q==f||Q==p){O.stopPropagation();O.preventDefault();break}Q=Q.parentNode}});var R=function(O){return function(Q,m,u,A,B,H,T,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){J(G,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,
-T.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(Q,v.name)?b.isExternalDataComms()?b.parseFile(v,mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(J(G.responseText,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):(J(Q,m,u,A,B,H,T,"fixed",
-mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight)}};mxEvent.addListener(f,"dragover",K);mxEvent.addListener(f,"drop",L);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",L);l.appendChild(f);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";b.editor.cancelFirst&&d.appendChild(c);
-"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(q,function(O){if(null!=O){var Q=b.getSearch("create title mode url drive splash state clibs ui".split(" "));Q+=(0==Q.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(O);O=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+Q,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(O.container,
-450,240,!0);O.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var O=b.createLibraryDataFromImages(N),Q=e.value;/(\.xml)$/i.test(Q)||
-(Q+=".xml");b.isLocalFileSave()?b.saveLocalFile(O,Q,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Q)+"&format=xml&xml="+encodeURIComponent(O))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,"change",function(O){E=
-!1;b.importFiles(U.files,0,0,b.maxImageSize,function(Q,m,u,A,B,H,T,k,v){null!=U.files&&(R(O)(Q,m,u,A,B,H,T,k,v),U.type="",U.type="file",U.value="")});f.scrollTop=f.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}g=mxUtils.button(mxResources.get("import"),function(){null!=F&&(F(),F=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),function(){null!=F&&(F(),
-F=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(O,Q,m){E=!1;if(null!=O){if("data:image/"==O.substring(0,11)){var u=O.indexOf(",");0<u&&(O=O.substring(0,u)+";base64,"+O.substring(u+1))}J(O,null,0,0,Q,m);f.scrollTop=f.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(O,Q,m,u){b.saveLibrary(O,Q,m,u)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=F&&(F(),F=null);this.saveBtnClickHandler(e.value,
-N,q,y)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(c);l.appendChild(d);this.container=l},EditShapeDialog=function(b,g,l,d,q){d=null!=d?d:300;q=null!=q?q:120;var y=document.createElement("table"),x=document.createElement("tbody");y.style.cellPadding="4px";var D=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";mxUtils.write(J,l);D.appendChild(J);x.appendChild(D);
-D=document.createElement("tr");J=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=q+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};J.appendChild(K);D.appendChild(J);J=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top="6px";l.style.width="200px";l.style.height=q+4+"px";l.style.overflow="hidden";
-l.style.marginBottom="16px";mxEvent.disableContextMenu(l);J.appendChild(l);var L=new Graph(l);L.setEnabled(!1);var N=b.editor.graph.cloneCell(g);L.addCells([N]);l=L.view.getState(N);var c="";null!=l.shape&&null!=l.shape.stencil&&(c=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(K,c||"");l=L.getGraphBounds();q=Math.min(160/l.width,(q-40)/l.height);L.view.scaleAndTranslate(q,20/q-l.x,20/q-l.y);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");
-J.setAttribute("colspan","2");J.style.paddingTop="2px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");b.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),q.className="geBtn",J.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&J.appendChild(q);var e=function(f,p,n){var t=K.value,z=mxUtils.parseXml(t);t=mxUtils.getPrettyXml(z.documentElement);
-z=z.documentElement.getElementsByTagName("parsererror");if(null!=z&&0<z.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(n&&b.hideDialog(),z=!f.model.contains(p),!n||z||t!=c){t=Graph.compress(t);f.getModel().beginUpdate();try{if(z){var F=b.editor.graph.getFreeInsertPoint();p.geometry.x=F.x;p.geometry.y=F.y;f.addCell(p)}f.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+t+")",[p])}catch(C){throw C;}finally{f.getModel().endUpdate()}z&&
-(f.setSelectionCell(p),f.scrollCellToVisible(p))}};l=mxUtils.button(mxResources.get("preview"),function(){e(L,N,!1)});l.className="geBtn";J.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,g,!0)});l.className="geBtn gePrimaryBtn";J.appendChild(l);b.editor.cancelFirst||J.appendChild(q);D.appendChild(J);x.appendChild(D);y.appendChild(x);this.container=y},CustomDialog=function(b,g,l,d,q,y,x,D,J,K,L,N){var c=document.createElement("div");c.appendChild(g);var e=document.createElement("div");
-e.style.marginTop=null!=N?N:"30px";e.style.textAlign="right";null!=x&&e.appendChild(x);b.isOffline()||null==y||e.appendChild(b.createHelpIcon(y));g=mxUtils.button(J||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});g.className="geBtn";D&&(g.style.display="none");b.editor.cancelFirst&&e.appendChild(g);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,null,this.container);if(null!=l){var f=l();if("string"===typeof f){b.showError(mxResources.get("error"),
-f);return}}K&&b.hideDialog(null,null,this.container)}));e.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(g);if(null!=L)for(D=0;D<L.length;D++)(function(f,p,n){f=mxUtils.button(f,function(t){p(t)});null!=n&&f.setAttribute("title",n);f.className="geBtn";e.appendChild(f)})(L[D][0],L[D][1],L[D][2]);c.appendChild(e);this.cancelBtn=g;this.okButton=q;this.container=c},BtnDialog=function(b,g,l,d){var q=document.createElement("div");q.style.textAlign="center";var y=document.createElement("p");
-y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("done"));var x="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=
-IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));l=mxUtils.button(l,d);l.insertBefore(D,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";
-l.style.fontSize="18px";l.style.padding="14px";q.appendChild(y);q.appendChild(b);q.appendChild(l);this.container=q},FontDialog=function(b,g,l,d,q){function y(F){this.style.border="";13==F.keyCode&&z.click()}var x=document.createElement("table"),D=document.createElement("tbody");x.style.marginTop="8px";var J=document.createElement("tr");var K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var L=document.createElement("input");
-L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var N=document.createElement("label");N.setAttribute("for","fontdialog-sysfonts");mxUtils.write(N,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(N);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace=
-"nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var c=document.createElement("input");"s"==d&&c.setAttribute("value",g);c.style.marginLeft="4px";c.style.width="250px";c.className="dlg_fontName_s";K=document.createElement("td");K.appendChild(c);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize=
-"10pt";K.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","googlefonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-googlefonts");K.appendChild(e);N=document.createElement("label");N.setAttribute("for","fontdialog-googlefonts");mxUtils.write(N,mxResources.get("googleFonts",null,"Google Fonts"));K.appendChild(N);if(!b.isOffline()||EditorUi.isElectronApp)N=
-b.createHelpIcon("https://fonts.google.com/"),K.appendChild(N);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var f=document.createElement("input");"g"==d&&f.setAttribute("value",g);f.style.marginLeft="4px";f.style.width="250px";f.className=
-"dlg_fontName_g";K=document.createElement("td");K.appendChild(f);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","webfonts");p.setAttribute("type","radio");p.setAttribute("name","current-fontdialog");p.setAttribute("id",
-"fontdialog-webfonts");K.appendChild(p);N=document.createElement("label");N.setAttribute("for","fontdialog-webfonts");mxUtils.write(N,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(N);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var n=
-document.createElement("input");"w"==d&&(Editor.enableWebFonts?n.setAttribute("value",g):c.setAttribute("value",g));n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(n);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontUrl",
-null,"Font URL")+":");J.appendChild(K);var t=document.createElement("input");t.setAttribute("value",l||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(t);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);this.init=function(){var F=c;"g"==d?F=f:"w"==d&&Editor.enableWebFonts&&(F=n);F.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null)};J=document.createElement("tr");
-K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});g.className="geBtn";b.editor.cancelFirst&&K.appendChild(g);var z=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var F=c.value;var C="s"}else if(e.checked){F=f.value;var E=Editor.GOOGLE_FONTS+
-encodeURIComponent(F).replace(/%20/g,"+");C="g"}else p.checked&&(F=n.value,E=t.value,C="w");var R=F;var U=E,O=C,Q=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,m=x.querySelector(".dlg_fontName_"+O);null==m||null!=R&&0!=R.length?(m=x.querySelector(".dlg_fontUrl"),null==m||"w"!=O||Q.test(U)?R=!0:(m.style.border="1px solid red",R=!1)):(m.style.border="1px solid red",R=!1);R&&(q(F,E,C),b.hideDialog())});z.className="geBtn gePrimaryBtn";mxEvent.addListener(c,"keypress",
-y);mxEvent.addListener(f,"keypress",y);mxEvent.addListener(n,"keypress",y);mxEvent.addListener(t,"keypress",y);mxEvent.addListener(c,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(f,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(n,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});K.appendChild(z);b.editor.cancelFirst||
-K.appendChild(g);J.appendChild(K);D.appendChild(J);x.appendChild(D);this.container=x};
+E&&(E(),E=null);if(null==Z.title||0==Z.title.length)X.innerText="";X.style.textOverflow="";X.style.whiteSpace="";X.style.cursor="text";X.style.color="";X.setAttribute("contentEditable","true");mxUtils.setPrefixedStyle(X.style,"user-select","text");X.focus();document.execCommand("selectAll",!1,null);E=function(){X.removeAttribute("contentEditable");X.style.cursor="pointer";Z.title=mxUtils.getTextContent(X);v()};mxEvent.consume(fa)}};mxEvent.addListener(X,"click",V);mxEvent.addListener(P,"dblclick",
+V);f.appendChild(P);mxEvent.addListener(P,"dragstart",function(fa){null==E&&(null==O&&null!=H&&(W.style.visibility="hidden",X.style.visibility="hidden"),mxClient.IS_FF&&null!=H.xml&&fa.dataTransfer.setData("Text",H.xml),t=D(fa),mxClient.IS_GC&&(P.style.opacity="0.9"),window.setTimeout(function(){mxUtils.setPrefixedStyle(P.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(P,30);W.style.visibility="";X.style.visibility=""},0))});mxEvent.addListener(P,"dragend",function(fa){"hidden"==W.style.visibility&&
+(W.style.visibility="",X.style.visibility="");t=null;mxUtils.setOpacity(P,100);mxUtils.setPrefixedStyle(P.style,"transform",null)})}else F||(F=!0,b.handleError({message:mxResources.get("fileExists")}));else{A=!1;try{if(G=mxUtils.parseXml(O),"mxlibrary"==G.documentElement.nodeName){I=JSON.parse(mxUtils.getTextContent(G.documentElement));if(null!=I&&0<I.length)for(var Y=0;Y<I.length;Y++)null!=I[Y].xml?J(null,null,0,0,0,0,I[Y]):J(I[Y].data,null,0,0,I[Y].w,I[Y].h,null,"fixed",I[Y].title);A=!0}else if("mxfile"==
+G.documentElement.nodeName){var ba=G.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=Editor.getDiagramNodeXml(ba[Y]);V=b.stringToCells(ea);if(0<V.length){var ca=b.editor.graph.getBoundingBoxFromGeometry(V);null!=ca&&J(null,null,0,0,0,0,{xml:ea,w:ca.width,h:ca.height})}}A=!0}}catch(fa){null!=window.console&&console.error("Error in library dialog: "+fa)}A||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(fa){null!=window.console&&
+console.log("Error in library dialog: "+fa)}return null}function K(O){O.dataTransfer.dropEffect=null!=t?"move":"copy";O.stopPropagation();O.preventDefault()}function L(O){O.stopPropagation();O.preventDefault();F=!1;z=D(O);if(null!=t)null!=z&&z<f.children.length?(Q.splice(z>t?z-1:z,0,Q.splice(t,1)[0]),f.insertBefore(f.children[t],f.children[z])):(Q.push(Q.splice(t,1)[0]),f.appendChild(f.children[t]));else if(0<O.dataTransfer.files.length)b.importFiles(O.dataTransfer.files,0,0,b.maxImageSize,R(O));
+else if(0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")){var N=decodeURIComponent(O.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(N)||/(\.png)($|\?)/i.test(N)||/(\.gif)($|\?)/i.test(N)||/(\.svg)($|\?)/i.test(N))&&b.loadImage(N,function(m){J(N,null,0,0,m.width,m.height);f.scrollTop=f.scrollHeight})}O.stopPropagation();O.preventDefault()}var Q=[];l=document.createElement("div");l.style.height="100%";var c=document.createElement("div");c.style.whiteSpace="nowrap";c.style.height=
+"40px";l.appendChild(c);mxUtils.write(c,mxResources.get("filename")+":");null==g&&(g=b.defaultLibraryName+".xml");var e=document.createElement("input");e.setAttribute("value",g);e.style.marginRight="20px";e.style.marginLeft="10px";e.style.width="500px";null==q||q.isRenamable()||e.setAttribute("disabled","true");this.init=function(){if(null==q||q.isRenamable())e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};c.appendChild(e);Editor.enableUncompressedLibraries&&
+(e.style.width="420px",g=document.createElement("input"),g.setAttribute("type","checkbox"),g.style.marginRight="10px",c.appendChild(g),mxUtils.write(c,mxResources.get("compressed")));var f=document.createElement("div");f.style.borderWidth="1px 0px 1px 0px";f.style.borderColor="#d3d3d3";f.style.borderStyle="solid";f.style.marginTop="6px";f.style.overflow="auto";f.style.height="340px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";0==Q.length&&Graph.fileSupport&&(f.style.backgroundImage=
+"url('"+IMAGE_PATH+"/droptarget.png')");var p=document.createElement("div");p.style.position="absolute";p.style.width="640px";p.style.top="260px";p.style.textAlign="center";p.style.fontSize="22px";p.style.color="#a0c3ff";mxUtils.write(p,mxResources.get("dragImagesHere"));l.appendChild(p);var n={},t=null,z=null,E=null;c=function(O){"true"!=mxEvent.getSource(O).getAttribute("contentEditable")&&null!=E&&(E(),E=null,mxEvent.consume(O))};mxEvent.addListener(f,"mousedown",c);mxEvent.addListener(f,"pointerdown",
+c);mxEvent.addListener(f,"touchstart",c);var C=new mxUrlConverter,F=!1;if(null!=d)for(c=0;c<d.length;c++)g=d[c],J(g.data,null,0,0,g.w,g.h,g,g.aspect,g.title);mxEvent.addListener(f,"dragleave",function(O){p.style.cursor="";for(var N=mxEvent.getSource(O);null!=N;){if(N==f||N==p){O.stopPropagation();O.preventDefault();break}N=N.parentNode}});var R=function(O){return function(N,m,u,A,B,H,T,k,v){null!=v&&EditorUi.isVisioFilename(v.name)?b.importVisio(v,mxUtils.bind(this,function(G){J(G,m,u,A,B,H,T,"fixed",
+mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," "))})):null!=v&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(N,v.name)?b.isExternalDataComms()?b.parseFile(v,mxUtils.bind(this,function(G){4==G.readyState&&(b.spinner.stop(),200<=G.status&&299>=G.status&&(J(G.responseText,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(J(N,m,u,A,B,H,T,"fixed",mxEvent.isAltDown(O)?null:T.substring(0,T.lastIndexOf(".")).replace(/_/g," ")),f.scrollTop=f.scrollHeight)}};mxEvent.addListener(f,"dragover",K);mxEvent.addListener(f,"drop",L);mxEvent.addListener(p,"dragover",K);mxEvent.addListener(p,"drop",L);l.appendChild(f);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});c.setAttribute("id","btnCancel");c.className="geBtn";b.editor.cancelFirst&&
+d.appendChild(c);"draw.io"!=b.getServiceName()||null==q||q.constructor!=DriveLibrary&&q.constructor!=GitHubLibrary||(g=mxUtils.button(mxResources.get("link"),function(){b.getPublicUrl(q,function(O){if(null!=O){var N=b.getSearch("create title mode url drive splash state clibs ui".split(" "));N+=(0==N.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(O);O=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+"/"+N,null,null,null,null,"Check out the library I made using @drawio");
+b.showDialog(O.container,450,240,!0);O.init()}else q.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(q.getId(),q)}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),g.className="geBtn",d.appendChild(g));g=mxUtils.button(mxResources.get("export"),function(){var O=b.createLibraryDataFromImages(Q),
+N=e.value;/(\.xml)$/i.test(N)||(N+=".xml");b.isLocalFileSave()?b.saveLocalFile(O,N,"text/xml",null,null,null!=x?x:!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(N)+"&format=xml&xml="+encodeURIComponent(O))).simulate(document,"_blank")});g.setAttribute("id","btnDownload");g.className="geBtn";d.appendChild(g);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var U=document.createElement("input");U.setAttribute("multiple","multiple");U.setAttribute("type","file");mxEvent.addListener(U,
+"change",function(O){F=!1;b.importFiles(U.files,0,0,b.maxImageSize,function(N,m,u,A,B,H,T,k,v){null!=U.files&&(R(O)(N,m,u,A,B,H,T,k,v),U.type="",U.type="file",U.value="")});f.scrollTop=f.scrollHeight});U.style.display="none";document.body.appendChild(U);b.libDlgFileInputElt=U}g=mxUtils.button(mxResources.get("import"),function(){null!=E&&(E(),E=null);b.libDlgFileInputElt.click()});g.setAttribute("id","btnAddImage");g.className="geBtn";d.appendChild(g)}g=mxUtils.button(mxResources.get("addImages"),
+function(){null!=E&&(E(),E=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(O,N,m){F=!1;if(null!=O){if("data:image/"==O.substring(0,11)){var u=O.indexOf(",");0<u&&(O=O.substring(0,u)+";base64,"+O.substring(u+1))}J(O,null,0,0,N,m);f.scrollTop=f.scrollHeight}})});g.setAttribute("id","btnAddImageUrl");g.className="geBtn";d.appendChild(g);this.saveBtnClickHandler=function(O,N,m,u){b.saveLibrary(O,N,m,u)};g=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=E&&
+(E(),E=null);this.saveBtnClickHandler(e.value,Q,q,y)}));g.setAttribute("id","btnSave");g.className="geBtn gePrimaryBtn";d.appendChild(g);b.editor.cancelFirst||d.appendChild(c);l.appendChild(d);this.container=l},EditShapeDialog=function(b,g,l,d,q){d=null!=d?d:300;q=null!=q?q:120;var y=document.createElement("table"),x=document.createElement("tbody");y.style.cellPadding="4px";var D=document.createElement("tr");var J=document.createElement("td");J.setAttribute("colspan","2");J.style.fontSize="10pt";
+mxUtils.write(J,l);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");J=document.createElement("td");var K=document.createElement("textarea");K.style.outline="none";K.style.resize="none";K.style.width=d-200+"px";K.style.height=q+"px";this.textarea=K;this.init=function(){K.focus();K.scrollTop=0};J.appendChild(K);D.appendChild(J);J=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top="6px";l.style.width="200px";
+l.style.height=q+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);J.appendChild(l);var L=new Graph(l);L.setEnabled(!1);var Q=b.editor.graph.cloneCell(g);L.addCells([Q]);l=L.view.getState(Q);var c="";null!=l.shape&&null!=l.shape.stencil&&(c=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(K,c||"");l=L.getGraphBounds();q=Math.min(160/l.width,(q-40)/l.height);L.view.scaleAndTranslate(q,20/q-l.x,20/q-l.y);D.appendChild(J);x.appendChild(D);D=document.createElement("tr");
+J=document.createElement("td");J.setAttribute("colspan","2");J.style.paddingTop="2px";J.style.whiteSpace="nowrap";J.setAttribute("align","right");b.isOffline()||(q=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.drawio.com/doc/faq/shape-complex-create-edit")}),q.className="geBtn",J.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});q.className="geBtn";b.editor.cancelFirst&&J.appendChild(q);var e=function(f,p,n){var t=K.value,z=mxUtils.parseXml(t);
+t=mxUtils.getPrettyXml(z.documentElement);z=z.documentElement.getElementsByTagName("parsererror");if(null!=z&&0<z.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(n&&b.hideDialog(),z=!f.model.contains(p),!n||z||t!=c){t=Graph.compress(t);f.getModel().beginUpdate();try{if(z){var E=b.editor.graph.getFreeInsertPoint();p.geometry.x=E.x;p.geometry.y=E.y;f.addCell(p)}f.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+t+")",[p])}catch(C){throw C;
+}finally{f.getModel().endUpdate()}z&&(f.setSelectionCell(p),f.scrollCellToVisible(p))}};l=mxUtils.button(mxResources.get("preview"),function(){e(L,Q,!1)});l.className="geBtn";J.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){e(b.editor.graph,g,!0)});l.className="geBtn gePrimaryBtn";J.appendChild(l);b.editor.cancelFirst||J.appendChild(q);D.appendChild(J);x.appendChild(D);y.appendChild(x);this.container=y},CustomDialog=function(b,g,l,d,q,y,x,D,J,K,L,Q){var c=document.createElement("div");
+c.appendChild(g);var e=document.createElement("div");e.style.marginTop=null!=Q?Q:"30px";e.style.textAlign="right";null!=x&&e.appendChild(x);b.isOffline()||null==y||e.appendChild(b.createHelpIcon(y));g=mxUtils.button(J||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});g.className="geBtn";D&&(g.style.display="none");b.editor.cancelFirst&&e.appendChild(g);q=mxUtils.button(q||mxResources.get("ok"),mxUtils.bind(this,function(){K||b.hideDialog(null,null,this.container);if(null!=l){var f=
+l();if("string"===typeof f){b.showError(mxResources.get("error"),f);return}}K&&b.hideDialog(null,null,this.container)}));e.appendChild(q);q.className="geBtn gePrimaryBtn";b.editor.cancelFirst||e.appendChild(g);if(null!=L)for(D=0;D<L.length;D++)(function(f,p,n){f=mxUtils.button(f,function(t){p(t)});null!=n&&f.setAttribute("title",n);f.className="geBtn";e.appendChild(f)})(L[D][0],L[D][1],L[D][2]);c.appendChild(e);this.cancelBtn=g;this.okButton=q;this.container=c},BtnDialog=function(b,g,l,d){var q=document.createElement("div");
+q.style.textAlign="center";var y=document.createElement("p");y.style.fontSize="16pt";y.style.padding="0px";y.style.margin="0px";y.style.color="gray";mxUtils.write(y,mxResources.get("done"));var x="Unknown",D=document.createElement("img");D.setAttribute("border","0");D.setAttribute("align","absmiddle");D.style.marginRight="10px";g==b.drive?(x=mxResources.get("googleDrive"),D.src=IMAGE_PATH+"/google-drive-logo-white.svg"):g==b.dropbox?(x=mxResources.get("dropbox"),D.src=IMAGE_PATH+"/dropbox-logo-white.svg"):
+g==b.oneDrive?(x=mxResources.get("oneDrive"),D.src=IMAGE_PATH+"/onedrive-logo-white.svg"):g==b.gitHub?(x=mxResources.get("github"),D.src=IMAGE_PATH+"/github-logo-white.svg"):g==b.gitLab?(x=mxResources.get("gitlab"),D.src=IMAGE_PATH+"/gitlab-logo.svg"):g==b.trello&&(x=mxResources.get("trello"),D.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[x],"You are now authorized in {1}"));l=mxUtils.button(l,d);l.insertBefore(D,l.firstChild);
+l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";q.appendChild(y);q.appendChild(b);q.appendChild(l);this.container=q},FontDialog=function(b,g,l,d,q){function y(E){this.style.border="";13==E.keyCode&&z.click()}var x=document.createElement("table"),D=document.createElement("tbody");x.style.marginTop="8px";var J=document.createElement("tr");var K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight=
+"bold";var L=document.createElement("input");L.style.cssText="margin-right:8px;margin-bottom:8px;";L.setAttribute("value","sysfonts");L.setAttribute("type","radio");L.setAttribute("name","current-fontdialog");L.setAttribute("id","fontdialog-sysfonts");K.appendChild(L);var Q=document.createElement("label");Q.setAttribute("for","fontdialog-sysfonts");mxUtils.write(Q,mxResources.get("sysFonts",null,"System Fonts"));K.appendChild(Q);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");
+K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var c=document.createElement("input");"s"==d&&c.setAttribute("value",g);c.style.marginLeft="4px";c.style.width="250px";c.className="dlg_fontName_s";K=document.createElement("td");K.appendChild(c);J.appendChild(K);D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace=
+"nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var e=document.createElement("input");e.style.cssText="margin-right:8px;margin-bottom:8px;";e.setAttribute("value","googlefonts");e.setAttribute("type","radio");e.setAttribute("name","current-fontdialog");e.setAttribute("id","fontdialog-googlefonts");K.appendChild(e);Q=document.createElement("label");Q.setAttribute("for","fontdialog-googlefonts");mxUtils.write(Q,mxResources.get("googleFonts",null,"Google Fonts"));K.appendChild(Q);if(!b.isOffline()||
+EditorUi.isElectronApp)Q=b.createHelpIcon("https://fonts.google.com/"),K.appendChild(Q);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",null,"Font Name")+":");J.appendChild(K);var f=document.createElement("input");"g"==d&&f.setAttribute("value",g);f.style.marginLeft="4px";
+f.style.width="250px";f.className="dlg_fontName_g";K=document.createElement("td");K.appendChild(f);J.appendChild(K);"0"!=urlParams.isGoogleFontsEnabled&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.fontWeight="bold";var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","webfonts");p.setAttribute("type","radio");p.setAttribute("name",
+"current-fontdialog");p.setAttribute("id","fontdialog-webfonts");K.appendChild(p);Q=document.createElement("label");Q.setAttribute("for","fontdialog-webfonts");mxUtils.write(Q,mxResources.get("webfonts",null,"Web Fonts"));K.appendChild(Q);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";mxUtils.write(K,mxResources.get("fontname",
+null,"Font Name")+":");J.appendChild(K);var n=document.createElement("input");"w"==d&&(Editor.enableWebFonts?n.setAttribute("value",g):c.setAttribute("value",g));n.style.marginLeft="4px";n.style.width="250px";n.className="dlg_fontName_w";K=document.createElement("td");K.appendChild(n);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);J=document.createElement("tr");K=document.createElement("td");K.style.whiteSpace="nowrap";K.style.fontSize="10pt";K.style.width="120px";K.style.paddingLeft="15px";
+mxUtils.write(K,mxResources.get("fontUrl",null,"Font URL")+":");J.appendChild(K);var t=document.createElement("input");t.setAttribute("value",l||"");t.style.marginLeft="4px";t.style.width="250px";t.className="dlg_fontUrl";K=document.createElement("td");K.appendChild(t);J.appendChild(K);Editor.enableWebFonts&&D.appendChild(J);this.init=function(){var E=c;"g"==d?E=f:"w"==d&&Editor.enableWebFonts&&(E=n);E.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",
+!1,null)};J=document.createElement("tr");K=document.createElement("td");K.colSpan=2;K.style.paddingTop="20px";K.style.whiteSpace="nowrap";K.setAttribute("align","right");b.isOffline()||K.appendChild(b.createHelpIcon("https://www.drawio.com/blog/external-fonts"));g=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();q()});g.className="geBtn";b.editor.cancelFirst&&K.appendChild(g);var z=mxUtils.button(mxResources.get("apply"),function(){if(L.checked){var E=c.value;var C="s"}else if(e.checked){E=
+f.value;var F=Editor.GOOGLE_FONTS+encodeURIComponent(E).replace(/%20/g,"+");C="g"}else p.checked&&(E=n.value,F=t.value,C="w");var R=E;var U=F,O=C,N=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/,m=x.querySelector(".dlg_fontName_"+O);null==m||null!=R&&0!=R.length?(m=x.querySelector(".dlg_fontUrl"),null==m||"w"!=O||N.test(U)?R=!0:(m.style.border="1px solid red",R=!1)):(m.style.border="1px solid red",R=!1);R&&(q(E,F,C),b.hideDialog())});z.className="geBtn gePrimaryBtn";
+mxEvent.addListener(c,"keypress",y);mxEvent.addListener(f,"keypress",y);mxEvent.addListener(n,"keypress",y);mxEvent.addListener(t,"keypress",y);mxEvent.addListener(c,"focus",function(){L.setAttribute("checked","checked");L.checked=!0});mxEvent.addListener(f,"focus",function(){e.setAttribute("checked","checked");e.checked=!0});mxEvent.addListener(n,"focus",function(){p.setAttribute("checked","checked");p.checked=!0});mxEvent.addListener(t,"focus",function(){p.setAttribute("checked","checked");p.checked=
+!0});K.appendChild(z);b.editor.cancelFirst||K.appendChild(g);J.appendChild(K);D.appendChild(J);x.appendChild(D);this.container=x};
function AspectDialog(b,g,l,d,q){this.aspect={pageId:g||(b.pages?b.pages[0].getId():null),layerIds:l||[]};g=document.createElement("div");var y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("pages"));g.appendChild(y);l=document.createElement("div");l.className="geAspectDlgList";g.appendChild(l);y=document.createElement("h5");y.style.margin="0 0 10px";mxUtils.write(y,mxResources.get("layers"));g.appendChild(y);y=document.createElement("div");y.className="geAspectDlgList";
g.appendChild(y);this.pagesContainer=l;this.layersContainer=y;this.ui=b;l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="center";y=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=q&&q()});y.className="geBtn";b.editor.cancelFirst&&l.appendChild(y);var x=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));l.appendChild(x);x.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||l.appendChild(y);x.setAttribute("disabled","disabled");this.okBtn=x;g.appendChild(l);this.container=g}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var g=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(g.getId(),g.getName(),g.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
@@ -12668,32 +12671,32 @@ AspectDialog.prototype.createPageItem=function(b,g,l){var d=document.createEleme
this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerText="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var y=q.model;y=y.getChildCells(y.getRoot());for(var x=0;x<y.length;x++)this.createLayerItem(y[x],b,q,l)});mxEvent.addListener(d,"click",g);this.aspect.pageId==b&&g()};
AspectDialog.prototype.createLayerItem=function(b,g,l,d){g=l.convertValueToString(b)||mxResources.get("background")||"Background";var q=document.createElement("div");q.setAttribute("data-layer-id",b.id);q.className="geAspectDlgListItem";q.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(g)+"</div>";this.layersContainer.appendChild(q);this.createViewer(q.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=q.className.indexOf("geAspectDlgListItemSelected")?
(q.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(q.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(q,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b,g){function l(C){var E=K;K=function(R,U){try{C(function(){E(R,U)},U)}catch(O){U(O)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,D=/(\.png)$/i.test(x),J=/(\.svg)$/i.test(x),K=function(C,E){C()},L=null!=y?y.isLocked():!1;var N=document.createElement("tr");var c=document.createElement("td");
-c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("locked")+":");N.appendChild(c);var e=document.createElement("input");e.setAttribute("type","checkbox");L&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);N.appendChild(c);q.appendChild(N);this.init=function(){e.focus()};l(function(C,E){null!=b.fileNode&&L!=e.checked?window.setTimeout(function(){null!=
-y&&y.setLocked(e.checked);C()},0):C()});if(D||J){x=1;D=0;N=b.fileNode;null!=N&&(N.hasAttribute("scale")&&(x=parseFloat(N.getAttribute("scale"))),N.hasAttribute("border")&&(D=parseInt(N.getAttribute("border"))));N=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("zoom")+":");N.appendChild(c);var f=document.createElement("input");f.setAttribute("value",100*x+"%");f.style.marginLeft="4px";f.style.width="100%";
-c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(f);N.appendChild(c);q.appendChild(N);N=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("borderWidth")+":");N.appendChild(c);var p=document.createElement("input");p.setAttribute("value",D);p.style.marginLeft="4px";p.style.width="100%";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);N.appendChild(c);q.appendChild(N);
-this.init=this.init||function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)};l(function(C,E){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(f.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(p.value))),null!=y&&y.fileChanged());C()})}else if(!/(\.html)$/i.test(x)&&!/(\.svg)$/i.test(x)){var n=null!=y?y.isCompressed():Editor.defaultCompressed;N=document.createElement("tr");c=document.createElement("td");
-c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("compressed")+":");N.appendChild(c);var t=document.createElement("input");t.setAttribute("type","checkbox");n&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(t);N.appendChild(c);q.appendChild(N);this.init=this.init||function(){t.focus()};l(function(C,E){null!=b.fileNode&&n!=
-t.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",t.checked?"true":"false");null!=y&&(y.compressionChanged(t.checked),y.fileChanged());C()},0):C()})}if(null!=y&&y.isRealtimeOptional()){N=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");N.appendChild(c);var z=document.createElement("input");z.setAttribute("type",
-"checkbox");var F=y.isRealtimeEnabled();if(F="disabled"!=b.drive.getCustomProperty(y.desc,"collaboration"))z.setAttribute("checked","checked"),z.defaultChecked=!0;l(function(C,E){z.checked!=F?y.setRealtimeEnabled(z.checked,C,E):C()});this.init=null!=this.init?this.init:function(){z.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(z);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));N.appendChild(c);q.appendChild(N)}null!=y&&
-"draw.io"==b.getServiceName()&&0<y.getSize()&&"1"!=urlParams.embed&&(N=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("size")+":"),N.appendChild(c),c=b.formatFileSize(y.getSize()),x=document.createElement("input"),x.setAttribute("title",c),x.setAttribute("value",c),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",
-c=document.createElement("td"),c.style.whiteSpace="nowrap",c.appendChild(x),N.appendChild(c),q.appendChild(N));null!=g&&(N=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("publicDiagramUrl")+":"),N.appendChild(c),x=document.createElement("a"),x.setAttribute("href",g),x.setAttribute("title",g),x.style.whiteSpace="nowrap",x.style.overflow="hidden",
-x.style.textOverflow="ellipsis",x.style.display="block",x.style.margin="2px 0px 2px 8px",x.style.fontSize="10pt",mxUtils.write(x,g),mxEvent.addListener(x,"click",function(C){b.openLink(g);mxEvent.consume(C)}),c=document.createElement("td"),c.appendChild(x),N.appendChild(c),q.appendChild(N));null!=y&&null!=y.fileObject&&null!=y.fileObject.path&&(N=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize=
-"10pt",mxUtils.write(c,mxResources.get("pathFilename")+":"),N.appendChild(c),x=document.createElement("input"),x.setAttribute("title",y.fileObject.path),x.setAttribute("value",y.fileObject.path),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",c=document.createElement("td"),c.appendChild(x),N.appendChild(c),q.appendChild(N));this.init=null!=this.init?this.init:function(){};x=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
-K(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});x.className="geBtn gePrimaryBtn";N=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(x);b.editor.cancelFirst||c.appendChild(D);N.appendChild(c);
-q.appendChild(N);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,g){function l(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function y(A,B,H){A=new mxCell("",new mxGeometry(A,B,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");A.vertex=!0;A.cp=!0;A.constObj=H;return N.addCell(A)}function x(A){A=N.getSelectionCells();N.deleteCells(A)}
-function D(){var A=parseInt(O.value)||0;A=0>A?0:100<A?100:A;O.value=A;var B=parseInt(m.value)||0;B=0>B?0:100<B?100:B;m.value=B;var H=parseInt(Q.value)||0,T=parseInt(u.value)||0;H=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,H,T);A=N.getConnectionPoint(f,H);B=N.getSelectionCell();if(null!=B){B.constObj=H;H=B.geometry.clone();T=N.view.scale;var k=N.view.translate;H.x=(A.x-3*T)/T-k.x;H.y=(A.y-3*T)/T-k.y;N.model.setGeometry(B,H)}}function J(A){if(A.constObj)return{x:A.constObj.point.x,
-y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,H=0,T=c.geometry,k=mxUtils.format((A.geometry.x+3-T.x)/T.width);A=mxUtils.format((A.geometry.y+3-T.y)/T.height);0>k?(B=k*T.width,k=0):1<k&&(B=(k-1)*T.width,k=1);0>A?(H=A*T.height,A=0):1<A&&(H=(A-1)*T.height,A=1);return{x:k,y:A,dx:parseInt(B),dy:parseInt(H)}}function K(A){if(1==N.getSelectionCount()){var B=N.getSelectionCell();A&&(B.constObj=null);A=J(B);O.value=100*A.x;m.value=100*A.y;Q.value=A.dx;u.value=A.dy;U.style.visibility=""}else U.style.visibility=
-"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.border="1px solid lightGray";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var N=new Graph(L);N.transparentBackground=!1;N.autoExtend=!1;N.autoScroll=!1;N.setGridEnabled(!1);N.setEnabled(!0);N.setPanning(!0);N.setConnectable(!1);N.setTooltips(!1);N.minFitScale=null;N.maxFitScale=null;N.centerZoom=!0;N.maxFitScale=2;L=g.geometry;var c=new mxCell(g.value,
-new mxGeometry(0,0,L.width,L.height),g.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");c.vertex=!0;N.addCell(c);N.dblClick=function(A,B){if(null!=B&&B!=c)N.setSelectionCell(B);else{B=mxUtils.convertPoint(N.container,mxEvent.getClientX(A),mxEvent.getClientY(A));mxEvent.consume(A);A=N.view.scale;var H=N.view.translate;N.setSelectionCell(y((B.x-3*A)/A-H.x,(B.y-3*A)/A-H.y))}};q=new mxKeyHandler(N);q.bindKey(46,x);q.bindKey(8,x);N.getRubberband().isForceRubberbandEvent=
-function(A){return 0==A.evt.button&&(null==A.getCell()||A.getCell()==c)};N.panningHandler.isForcePanningEvent=function(A){return 2==A.evt.button};var e=N.isCellSelectable;N.isCellSelectable=function(A){return A==c?!1:e.apply(this,arguments)};N.getLinkForCell=function(){return null};var f=N.view.getState(c);L=N.getAllConnectionConstraints(f);for(var p=0;null!=L&&p<L.length;p++){var n=N.getConnectionPoint(f,L[p]);y(n.x-3,n.y-3,L[p])}N.fit(8);N.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
-function(){N.zoomIn()},20);n=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){N.zoomOut()},20);var t=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==N.view.scale?(N.maxFitScale=8,N.fit(8)):N.zoomActual();N.center()},20),z=function(){b.prompt(mxResources.get("gridSize"),N.gridSize,function(A){!isNaN(A)&&0<A&&(N.setGridSize(A),N.setGridEnabled(!0),N.refresh())})},F=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(A){mxEvent.isShiftDown(A)?
-z():(N.setGridEnabled(!N.isGridEnabled()),N.refresh())},20);mxEvent.addListener(F,"dblclick",z);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),x,20);mxUtils.setOpacity(C,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(p);L.appendChild(n);L.appendChild(t);L.appendChild(F);L.appendChild(C);d.appendChild(L);var E=document.createElement("input");E.setAttribute("type","number");E.setAttribute("min","1");
-E.setAttribute("value","1");E.style.width="45px";E.style.position="relative";E.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";n=["left","right","top","bottom"];for(p=0;p<n.length;p++)t=n[p],F=document.createElement("option"),mxUtils.write(F,mxResources.get(t)),F.value=t,R.appendChild(F);p=mxUtils.button(mxResources.get("add"),function(){var A=parseInt(E.value);A=1>A?1:100<A?100:A;E.value=A;for(var B=R.value,H=c.geometry,T=[],k=0;k<A;k++){switch(B){case "left":var v=
-H.x;var G=H.y+(k+1)*H.height/(A+1);break;case "right":v=H.x+H.width;G=H.y+(k+1)*H.height/(A+1);break;case "top":v=H.x+(k+1)*H.width/(A+1);G=H.y;break;case "bottom":v=H.x+(k+1)*H.width/(A+1),G=H.y+H.height}T.push(y(v-3,G-3))}N.setSelectionCells(T)});p.style.marginLeft="auto";L.appendChild(p);L.appendChild(E);L.appendChild(R);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));
-U.appendChild(L);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"%");var Q=document.createElement("input");Q.setAttribute("type","number");Q.style.width="45px";Q.style.margin="0 4px 0 4px";U.appendChild(Q);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);
-var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.setAttribute("max","100");m.style.width="45px";m.style.margin="0 4px 0 4px";U.appendChild(m);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";U.appendChild(u);mxUtils.write(U,"pt");d.appendChild(U);K();N.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<N.getSelectionCount()?mxUtils.setOpacity(C,60):
-mxUtils.setOpacity(C,10);K()});N.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(O,"change",D);mxEvent.addListener(m,"change",D);mxEvent.addListener(Q,"change",D);mxEvent.addListener(u,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});L.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var A=N.model.cells,B=[],H=[],T;for(T in A){var k=A[T];k.cp&&H.push(J(k))}H.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-
+var FilePropertiesDialog=function(b,g){function l(C){var F=K;K=function(R,U){try{C(function(){F(R,U)},U)}catch(O){U(O)}}}var d=document.createElement("table"),q=document.createElement("tbody");d.style.width="100%";d.style.marginTop="8px";d.style.tableLayout="fixed";var y=b.getCurrentFile(),x=null!=y&&null!=y.getTitle()?y.getTitle():b.defaultFilename,D=/(\.png)$/i.test(x),J=/(\.svg)$/i.test(x),K=function(C,F){C()},L=null!=y?y.isLocked():!1;var Q=document.createElement("tr");var c=document.createElement("td");
+c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("locked")+":");Q.appendChild(c);var e=document.createElement("input");e.setAttribute("type","checkbox");L&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);Q.appendChild(c);q.appendChild(Q);this.init=function(){e.focus()};l(function(C,F){null!=b.fileNode&&L!=e.checked?window.setTimeout(function(){null!=
+y&&y.setLocked(e.checked);C()},0):C()});if(D||J){x=1;D=0;Q=b.fileNode;null!=Q&&(Q.hasAttribute("scale")&&(x=parseFloat(Q.getAttribute("scale"))),Q.hasAttribute("border")&&(D=parseInt(Q.getAttribute("border"))));Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("zoom")+":");Q.appendChild(c);var f=document.createElement("input");f.setAttribute("value",100*x+"%");f.style.marginLeft="4px";f.style.width="100%";
+c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(f);Q.appendChild(c);q.appendChild(Q);Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("borderWidth")+":");Q.appendChild(c);var p=document.createElement("input");p.setAttribute("value",D);p.style.marginLeft="4px";p.style.width="100%";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);Q.appendChild(c);q.appendChild(Q);
+this.init=this.init||function(){f.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?f.select():document.execCommand("selectAll",!1,null)};l(function(C,F){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,parseInt(f.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(p.value))),null!=y&&y.fileChanged());C()})}else if(!/(\.html)$/i.test(x)&&!/(\.svg)$/i.test(x)){var n=null!=y?y.isCompressed():Editor.defaultCompressed;Q=document.createElement("tr");c=document.createElement("td");
+c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("compressed")+":");Q.appendChild(c);var t=document.createElement("input");t.setAttribute("type","checkbox");n&&(t.setAttribute("checked","checked"),t.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(t);Q.appendChild(c);q.appendChild(Q);this.init=this.init||function(){t.focus()};l(function(C,F){null!=b.fileNode&&n!=
+t.checked?window.setTimeout(function(){b.fileNode.setAttribute("compressed",t.checked?"true":"false");null!=y&&(y.compressionChanged(t.checked),y.fileChanged());C()},0):C()})}if(null!=y&&y.isRealtimeOptional()){Q=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.textOverflow="ellipsis";c.style.fontSize="10pt";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");Q.appendChild(c);var z=document.createElement("input");z.setAttribute("type",
+"checkbox");var E=y.isRealtimeEnabled();if(E="disabled"!=b.drive.getCustomProperty(y.desc,"collaboration"))z.setAttribute("checked","checked"),z.defaultChecked=!0;l(function(C,F){z.checked!=E?y.setRealtimeEnabled(z.checked,C,F):C()});this.init=null!=this.init?this.init:function(){z.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(z);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));Q.appendChild(c);q.appendChild(Q)}null!=y&&
+"draw.io"==b.getServiceName()&&0<y.getSize()&&"1"!=urlParams.embed&&(Q=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("size")+":"),Q.appendChild(c),c=b.formatFileSize(y.getSize()),x=document.createElement("input"),x.setAttribute("title",c),x.setAttribute("value",c),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",
+c=document.createElement("td"),c.style.whiteSpace="nowrap",c.appendChild(x),Q.appendChild(c),q.appendChild(Q));null!=g&&(Q=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize="10pt",mxUtils.write(c,mxResources.get("publicDiagramUrl")+":"),Q.appendChild(c),x=document.createElement("a"),x.setAttribute("href",g),x.setAttribute("title",g),x.style.whiteSpace="nowrap",x.style.overflow="hidden",
+x.style.textOverflow="ellipsis",x.style.display="block",x.style.margin="2px 0px 2px 8px",x.style.fontSize="10pt",mxUtils.write(x,g),mxEvent.addListener(x,"click",function(C){b.openLink(g);mxEvent.consume(C)}),c=document.createElement("td"),c.appendChild(x),Q.appendChild(c),q.appendChild(Q));null!=y&&null!=y.fileObject&&null!=y.fileObject.path&&(Q=document.createElement("tr"),c=document.createElement("td"),c.style.whiteSpace="nowrap",c.style.overflow="hidden",c.style.textOverflow="ellipsis",c.style.fontSize=
+"10pt",mxUtils.write(c,mxResources.get("pathFilename")+":"),Q.appendChild(c),x=document.createElement("input"),x.setAttribute("title",y.fileObject.path),x.setAttribute("value",y.fileObject.path),x.setAttribute("disabled","disabled"),x.style.marginLeft="4px",x.style.width="100%",c=document.createElement("td"),c.appendChild(x),Q.appendChild(c),q.appendChild(Q));this.init=null!=this.init?this.init:function(){};x=mxUtils.button(mxResources.get("apply"),function(){b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+K(function(){b.spinner.stop();b.hideDialog()},function(C){b.spinner.stop();b.handleError(C,mxResources.get("error"))})});x.className="geBtn gePrimaryBtn";Q=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","right");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(x);b.editor.cancelFirst||c.appendChild(D);Q.appendChild(c);
+q.appendChild(Q);d.appendChild(q);this.container=d},ConnectionPointsDialog=function(b,g){function l(){null!=q&&q.destroy()}var d=document.createElement("div");d.style.userSelect="none";var q=null;this.init=function(){function y(A,B,H){A=new mxCell("",new mxGeometry(A,B,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");A.vertex=!0;A.cp=!0;A.constObj=H;return Q.addCell(A)}function x(A){A=Q.getSelectionCells();Q.deleteCells(A)}
+function D(){var A=parseInt(O.value)||0;A=0>A?0:100<A?100:A;O.value=A;var B=parseInt(m.value)||0;B=0>B?0:100<B?100:B;m.value=B;var H=parseInt(N.value)||0,T=parseInt(u.value)||0;H=new mxConnectionConstraint(new mxPoint(A/100,B/100),!1,null,H,T);A=Q.getConnectionPoint(f,H);B=Q.getSelectionCell();if(null!=B){B.constObj=H;H=B.geometry.clone();T=Q.view.scale;var k=Q.view.translate;H.x=(A.x-3*T)/T-k.x;H.y=(A.y-3*T)/T-k.y;Q.model.setGeometry(B,H)}}function J(A){if(A.constObj)return{x:A.constObj.point.x,
+y:A.constObj.point.y,dx:A.constObj.dx,dy:A.constObj.dy};var B=0,H=0,T=c.geometry,k=mxUtils.format((A.geometry.x+3-T.x)/T.width);A=mxUtils.format((A.geometry.y+3-T.y)/T.height);0>k?(B=k*T.width,k=0):1<k&&(B=(k-1)*T.width,k=1);0>A?(H=A*T.height,A=0):1<A&&(H=(A-1)*T.height,A=1);return{x:k,y:A,dx:parseInt(B),dy:parseInt(H)}}function K(A){if(1==Q.getSelectionCount()){var B=Q.getSelectionCell();A&&(B.constObj=null);A=J(B);O.value=100*A.x;m.value=100*A.y;N.value=A.dx;u.value=A.dy;U.style.visibility=""}else U.style.visibility=
+"hidden"}var L=document.createElement("div");L.style.width="350px";L.style.height="350px";L.style.overflow="hidden";L.style.border="1px solid lightGray";L.style.boxSizing="border-box";mxEvent.disableContextMenu(L);d.appendChild(L);var Q=new Graph(L);Q.transparentBackground=!1;Q.autoExtend=!1;Q.autoScroll=!1;Q.setGridEnabled(!1);Q.setEnabled(!0);Q.setPanning(!0);Q.setConnectable(!1);Q.setTooltips(!1);Q.minFitScale=null;Q.maxFitScale=null;Q.centerZoom=!0;Q.maxFitScale=2;L=g.geometry;var c=new mxCell(g.value,
+new mxGeometry(0,0,L.width,L.height),g.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;fillColor=none;");c.vertex=!0;Q.addCell(c);Q.dblClick=function(A,B){if(null!=B&&B!=c)Q.setSelectionCell(B);else{B=mxUtils.convertPoint(Q.container,mxEvent.getClientX(A),mxEvent.getClientY(A));mxEvent.consume(A);A=Q.view.scale;var H=Q.view.translate;Q.setSelectionCell(y((B.x-3*A)/A-H.x,(B.y-3*A)/A-H.y))}};q=new mxKeyHandler(Q);q.bindKey(46,x);q.bindKey(8,x);Q.getRubberband().isForceRubberbandEvent=
+function(A){return 0==A.evt.button&&(null==A.getCell()||A.getCell()==c)};Q.panningHandler.isForcePanningEvent=function(A){return 2==A.evt.button};var e=Q.isCellSelectable;Q.isCellSelectable=function(A){return A==c?!1:e.apply(this,arguments)};Q.getLinkForCell=function(){return null};var f=Q.view.getState(c);L=Q.getAllConnectionConstraints(f);for(var p=0;null!=L&&p<L.length;p++){var n=Q.getConnectionPoint(f,L[p]);y(n.x-3,n.y-3,L[p])}Q.fit(8);Q.center();p=b.createToolbarButton(Editor.zoomInImage,mxResources.get("zoomIn"),
+function(){Q.zoomIn()},20);n=b.createToolbarButton(Editor.zoomOutImage,mxResources.get("zoomOut"),function(){Q.zoomOut()},20);var t=b.createToolbarButton(Editor.zoomFitImage,mxResources.get("fit"),function(){1==Q.view.scale?(Q.maxFitScale=8,Q.fit(8)):Q.zoomActual();Q.center()},20),z=function(){b.prompt(mxResources.get("gridSize"),Q.gridSize,function(A){!isNaN(A)&&0<A&&(Q.setGridSize(A),Q.setGridEnabled(!0),Q.refresh())})},E=b.createToolbarButton(Editor.thinGridImage,mxResources.get("grid"),function(A){mxEvent.isShiftDown(A)?
+z():(Q.setGridEnabled(!Q.isGridEnabled()),Q.refresh())},20);mxEvent.addListener(E,"dblclick",z);var C=b.createToolbarButton(Editor.trashImage,mxResources.get("delete"),x,20);mxUtils.setOpacity(C,10);L=document.createElement("div");L.style.display="flex";L.style.alignItems="center";L.style.paddingTop="6px";L.appendChild(p);L.appendChild(n);L.appendChild(t);L.appendChild(E);L.appendChild(C);d.appendChild(L);var F=document.createElement("input");F.setAttribute("type","number");F.setAttribute("min","1");
+F.setAttribute("value","1");F.style.width="45px";F.style.position="relative";F.style.margin="0 4px 0 4px";var R=document.createElement("select");R.style.position="relative";n=["left","right","top","bottom"];for(p=0;p<n.length;p++)t=n[p],E=document.createElement("option"),mxUtils.write(E,mxResources.get(t)),E.value=t,R.appendChild(E);p=mxUtils.button(mxResources.get("add"),function(){var A=parseInt(F.value);A=1>A?1:100<A?100:A;F.value=A;for(var B=R.value,H=c.geometry,T=[],k=0;k<A;k++){switch(B){case "left":var v=
+H.x;var G=H.y+(k+1)*H.height/(A+1);break;case "right":v=H.x+H.width;G=H.y+(k+1)*H.height/(A+1);break;case "top":v=H.x+(k+1)*H.width/(A+1);G=H.y;break;case "bottom":v=H.x+(k+1)*H.width/(A+1),G=H.y+H.height}T.push(y(v-3,G-3))}Q.setSelectionCells(T)});p.style.marginLeft="auto";L.appendChild(p);L.appendChild(F);L.appendChild(R);var U=document.createElement("div");U.style.margin="4px 0px 8px 0px";U.style.whiteSpace="nowrap";U.style.height="24px";L=document.createElement("span");mxUtils.write(L,mxResources.get("dx"));
+U.appendChild(L);var O=document.createElement("input");O.setAttribute("type","number");O.setAttribute("min","0");O.setAttribute("max","100");O.style.width="45px";O.style.margin="0 4px 0 4px";U.appendChild(O);mxUtils.write(U,"%");var N=document.createElement("input");N.setAttribute("type","number");N.style.width="45px";N.style.margin="0 4px 0 4px";U.appendChild(N);mxUtils.write(U,"pt");L=document.createElement("span");mxUtils.write(L,mxResources.get("dy"));L.style.marginLeft="12px";U.appendChild(L);
+var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.setAttribute("max","100");m.style.width="45px";m.style.margin="0 4px 0 4px";U.appendChild(m);mxUtils.write(U,"%");var u=document.createElement("input");u.setAttribute("type","number");u.style.width="45px";u.style.margin="0 4px 0 4px";U.appendChild(u);mxUtils.write(U,"pt");d.appendChild(U);K();Q.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<Q.getSelectionCount()?mxUtils.setOpacity(C,60):
+mxUtils.setOpacity(C,10);K()});Q.addListener(mxEvent.CELLS_MOVED,K);mxEvent.addListener(O,"change",D);mxEvent.addListener(m,"change",D);mxEvent.addListener(N,"change",D);mxEvent.addListener(u,"change",D);L=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});L.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){var A=Q.model.cells,B=[],H=[],T;for(T in A){var k=A[T];k.cp&&H.push(J(k))}H.sort(function(v,G){return v.x!=G.x?v.x-G.x:v.y!=G.y?v.y-G.y:v.dx!=G.dx?v.dx-
G.dx:v.dy-G.dy});for(A=0;A<H.length;A++)0<A&&H[A].x==H[A-1].x&&H[A].y==H[A-1].y&&H[A].dx==H[A-1].dx&&H[A].dy==H[A-1].dy||B.push("["+H[A].x+","+H[A].y+",0,"+H[A].dx+","+H[A].dy+"]");b.editor.graph.setCellStyles("points","["+B.join(",")+"]",[g]);l();b.hideDialog()});p.className="geBtn gePrimaryBtn";n=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",null,[g]);l();b.hideDialog()});n.className="geBtn";t=document.createElement("div");t.style.marginTop="10px";t.style.textAlign=
"right";b.isOffline()||t.appendChild(b.createHelpIcon("https://www.drawio.com/doc/faq/shape-connection-points-customise"));b.editor.cancelFirst&&t.appendChild(L);t.appendChild(n);t.appendChild(p);b.editor.cancelFirst||t.appendChild(L);d.appendChild(t)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];Editor.sketchDefaultCurveFitting="1";Editor.sketchDefaultJiggle="2";Editor.thinFormatImage=
"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNDgiIHdpZHRoPSI0OCI+PHBhdGggZD0ibTM2LjUgMTguMzUtNi44NS02Ljg1IDMuMjUtMy4ycS44NS0uODUgMi4wMjUtLjg1IDEuMTc1IDAgMi4wMjUuODVsMi43NSAyLjhxLjg1LjguODUgMnQtLjg1IDJaTTYuODUgNDEuMXYtNi45bDkuNTUtOS41NUw1LjUgMTMuN2w3LjgtNy44NSAxMSAxMSA1LjM1LTUuMzUgNi44NSA2Ljg1LTUuMzUgNS4zNSAxMSAxMS03Ljg1IDcuNzUtMTAuOTUtMTAuOS05LjYgOS41NVptMTEuMi0xOC4wNSA0LjY1LTQuNi00LjA1LTQuMDUtMi4zNSAyLjQtMS42LTEuNiAyLjM1LTIuNC0zLjc1LTMuNzUtNC42IDQuNjVabTE2LjIgMTYuMjUgNC42NS00LjY1LTMuNzUtMy43NS0yLjQgMi40LTEuNi0xLjYgMi40LTIuNC00LjA1LTQtNC42IDQuNjVabS0yNS4xLS40NWgzLjZsMjAuNS0yMC40NS0zLjY1LTMuNjVMOS4xNSAzNS4yWiIvPjwvc3ZnPg==";
@@ -12806,119 +12809,119 @@ v&&(v=/.* \/Info (\d+) (\d+) R/g.exec(v.join("\n")),null!=v&&0<v.length&&(v=k[v[
G?mxUtils.trim(G):G};Editor.addRetryToError=function(k,v){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=v))};Editor.mermaidToDrawio=function(k,v,G){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,v,G)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=
k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=
k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);
-null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor=
-"light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=
-k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var v=document.createElement("style");v.setAttribute("type","text/css");v.appendChild(document.createTextNode(k.css));var G=document.getElementsByTagName("script")[0];G.parentNode.insertBefore(v,G)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=
-k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=
-k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(v=parseFloat(k.zoomFactor),!isNaN(v)&&1<v?Graph.prototype.zoomFactor=v:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&
-(v=parseInt(k.defaultGridSize),!isNaN(v)&&0<v?mxGraph.prototype.gridSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(v=parseInt(k.gridSteps),!isNaN(v)&&0<v?mxGraphView.prototype.gridSteps=v:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=k.pageFormat&&(v=parseInt(k.pageFormat.width),G=parseInt(k.pageFormat.height),!isNaN(v)&&0<v&&!isNaN(G)&&0<G?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,v,G),mxGraph.prototype.pageFormat=
-mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&
-(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(v=parseInt(k.sidebarTitleSize),!isNaN(v)&&0<v?Sidebar.prototype.sidebarTitleSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(v=parseInt(k.autosaveDelay),
-!isNaN(v)&&0<v?DrawioFile.prototype.autosaveDelay=v:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=
-k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);
-null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var v=document.getElementsByTagName("script")[0];
-if(null!=v&&null!=v.parentNode){var G=document.createElement("style");G.setAttribute("type","text/css");G.appendChild(document.createTextNode(k));v.parentNode.insertBefore(G,v);k=k.split("url(");for(G=1;G<k.length;G++){var I=k[G].indexOf(")");I=Editor.trimCssUrl(k[G].substring(0,I));var M=document.createElement("link");M.setAttribute("rel","preload");M.setAttribute("href",I);M.setAttribute("as","font");M.setAttribute("crossorigin","");v.parentNode.insertBefore(M,v)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+",
-"g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var v=[],G=0;G<k;G++)v.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return v.join("")};Editor.updateStatusInterval=
-1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",
-title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var v=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(v)throw EditorUi.debug("Editor.setGraphXml ParserError",
-[this],"node",[k],"cause",[v]),Error(mxResources.get("notADiagramFile")+" ("+v+")");if("mxGraphModel"==k.nodeName){v=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=v&&""!=v)v!=this.graph.currentStyle&&(G=null!=this.graph.themes?this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+v+".xml").getDocumentElement(),null!=G&&(I=new mxCodec(G.ownerDocument),I.decode(G,this.graph.getStylesheet())));else{var G=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+
-"/default-old.xml").getDocumentElement();if(null!=G){var I=new mxCodec(G.ownerDocument);I.decode(G,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));v=k.getAttribute("backgroundImage");null!=v?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(v)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
-this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(v=k.getAttribute("extFonts"))try{for(v=v.split("|").map(function(M){M=M.split("^");return{name:M[0],url:M[1]}}),G=0;G<v.length;G++)this.graph.addExtFont(v[G].name,v[G].url)}catch(M){console.log("ExtFonts format error: "+M.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
-"Invalid data",toString:function(){return this.message}};};var g=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,v){k=null!=k?k:!0;var G=g.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&G.setAttribute("style",this.graph.currentStyle);var I=this.graph.getBackgroundImageObject(this.graph.backgroundImage,v);null!=I&&G.setAttribute("backgroundImage",JSON.stringify(I));G.setAttribute("math",this.graph.mathEnabled?"1":"0");G.setAttribute("shadow",
-this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?G.setAttribute("adaptiveColors",this.graph.adaptiveColors):G.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(I=this.graph.extFonts.map(function(M){return M.name+"^"+M.url}),G.setAttribute("extFonts",I.join("|")));return G};Editor.prototype.isDataSvg=function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=
-unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var G=mxUtils.parseXml(v).documentElement;return"mxfile"==G.nodeName||"mxGraphModel"==G.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=function(k,v,G){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);
-this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===
-typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=function(S){try{null==I?(MathJax.typesetClear([S]),MathJax.typeset([S]),G()):I!=S&&Editor.mathJaxQueue.push(S)}catch(V){MathJax.typesetClear([S]),null!=V.retry?(I=S,V.retry.then(function(){MathJax.typesetPromise([S]).then(G)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+
-W.toString());G()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};
-Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,arguments);var S=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};v=document.getElementsByTagName("script");
-if(null!=v&&0<v.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",k);v[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v="",G=[""],I=0,M=!0,P;k=$jscomp.makeIterator(k);for(P=k.next();!P.done;P=k.next())P=P.value,'"'===P?(M&&P===v&&(G[I]+=P),M=!M):","===P&&M?P=G[++I]="":G[I]+=P,v=P;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
-!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+G+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
-return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,G=this;k.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,k.baseUrl.length)==k.baseUrl||G.crossOriginImages&&
-G.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=v.apply(this,arguments)):I=PROXY_URL+"?url="+encodeURIComponent(I));return I};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,I,M){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(k,v,G,I,!0):v(k)});if(/(\.svg)$/i.test(k)&&
-!M)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);P&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);P&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(P)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(I,I);X.height=W.height*I;X.width=W.width*I;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};
-W.onerror=function(){window.clearTimeout(S);P&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,I){function M(){0<P.length?P.shift()():v(k)}null==I&&(I=this.createImageUrlConverter());var P=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){P.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=I.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=
-S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));M()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),M())}else null!=Y&&Z.setAttribute(W,Y),M()}}catch(ea){M()}}))})(V[X])});G("image","xlink:href");G("img","src");M()};Editor.base64Encode=function(k){for(var v="",G=0,I=k.length,M,P,S;G<I;){M=k.charCodeAt(G++)&255;if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&
-3)<<4);v+="==";break}P=k.charCodeAt(G++);if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&
-3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};Editor.prototype.loadUrl=function(k,v,G,I,M,P,S,V){try{var W=!S&&(I||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&
-299>=Z.getStatus()){if(null!=v){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}P=null!=P?P:"data:image/png;base64,";Y=P+Editor.base64Encode(Y)}v(Y)}}else null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),
-code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){M&&null!=G&&G({code:App.ERROR_TIMEOUT,retry:X})},V)});X()}catch(Z){null!=G&&G(Z)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var G=k.getText(),I=JSON.parse(G);null!=I&&null!=I.error&&null!=I.error.message&&(v=I.error.message+" ("+v+")")}catch(M){}return v};Editor.prototype.absoluteCssFonts=
-function(k){var v=null;if(null!=k){var G=k.split("url(");if(0<G.length){v=[G[0]];k=window.location.pathname;var I=null!=k?k.lastIndexOf("/"):-1;0<=I&&(k=k.substring(0,I+1));I=document.getElementsByTagName("base");var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var P=1;P<G.length;P++)if(I=G[P].indexOf(")"),0<I){var S=Editor.trimCssUrl(G[P].substring(0,I));this.graph.isRelativeUrl(S)&&(S=null!=M?M+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);
-v.push('url("'+S+'"'+G[P].substring(I))}else v.push(G[P])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+encodeURIComponent(v));G(k,v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,
-Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var P=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",P);0<V&&(S=Editor.trimCssUrl(G[k].substring(V+7,G[k].indexOf(")",V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;I++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==
-S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;I--;M()}),mxUtils.bind(this,function(ba){I--;M()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,
-P)),S)}M()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],I=0;null==this.cachedGoogleFonts&&
-(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(G.join(""),k)}),P=0;P<v.length;P++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?null==this.cachedGoogleFonts[V]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");I--;M()}),mxUtils.bind(this,function(W){I--;G.push("@import url("+V+");\n");M()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'+
-S+'";src: url("'+V+'")}\n')})(v[P].name,v[P].url);M()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),G=0;G<v.length;G++){var I=mxUtils.getTextContent(v[G]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),I=v.split("\n");
-v=[];for(var M=[],P=0;P<I.length;P++)"@import"==I[P].substring(0,7)?v.push(I[P]):M.push(I[P]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<M.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,M.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};
-Editor.prototype.getMaxCanvasScale=function(k,v,G){var I=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(I/k,I/v))};Editor.prototype.exportToCanvas=function(k,v,G,I,M,P,S,V,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{P=null!=P?P:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ha=W?null:Y.background;ha==mxConstants.NONE&&(ha=null);null==ha&&(ha=I);null==ha&&0==W&&(ha="dark"==fa?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,
-function(pa){try{var na=new Image;na.onload=mxUtils.bind(this,function(){try{var wa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(na,0,0);k(ua,pa)},0):(ja.drawImage(na,0,0),k(ua,pa))},ua=document.createElement("canvas"),va=parseInt(pa.getAttribute("width")),Ca=parseInt(pa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=P?Math.min(1,Math.min(3*v/(4*Ca),v/va)):v/va);V=this.getMaxCanvasScale(va,Ca,V);va=Math.ceil(V*va);Ca=Math.ceil(V*Ca);ua.setAttribute("width",va);ua.setAttribute("height",
-Ca);var ja=ua.getContext("2d");null!=ha&&(ja.beginPath(),ja.rect(0,0,va,Ca),ja.fillStyle=ha,ja.fill());1!=V&&ja.scale(V,V);if(ca){var oa=Y.view,ma=oa.scale;oa.scale=1;var Aa=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ma;Aa="data:image/svg+xml;base64,"+Aa;var sa=Y.gridSize*oa.gridSteps*V,Ia=Y.getGraphBounds(),xa=oa.translate.x*ma,Ba=oa.translate.y*ma,Fa=xa+(Ia.x-xa)/ma-ba,La=Ba+(Ia.y-Ba)/ma-ba,za=new Image;za.onload=function(){try{for(var Da=-Math.round(sa-mxUtils.mod((xa-
-Fa)*V,sa)),Ja=-Math.round(sa-mxUtils.mod((Ba-La)*V,sa));Da<va;Da+=sa)for(var Ra=Ja;Ra<Ca;Ra+=sa)ja.drawImage(za,Da/V,Ra/V);wa()}catch(Sa){null!=M&&M(Sa)}};za.onerror=function(Da){null!=M&&M(Da)};za.src=Aa}else wa()}catch(Da){null!=M&&M(Da)}});na.onerror=function(wa){null!=M&&M(wa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ia=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),na.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(wa){null!=
-M&&M(wa)}});this.embedExtFonts(mxUtils.bind(this,function(wa){try{null!=wa&&this.addFontCss(pa,wa),this.loadFonts(ia)}catch(ua){null!=M&&M(ua)}}))}catch(wa){null!=M&&M(wa)}}),G,Z)}catch(pa){null!=M&&M(pa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var y=q,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[q]=y;Editor.updateCRC=function(k,v,G,I){for(var M=0;M<I;M++)k=Editor.crcTable[(k^v.charCodeAt(G+M))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=
-v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,I,M){function P(Z,Y){var ba=W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(P(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,
-10,26,10))null!=M&&M();else if(P(k,4),"IHDR"!=P(k,4))null!=M&&M();else{P(k,17);M=k.substring(0,W);do{var X=S(k);if("IDAT"==P(k,4)){M=k.substring(0,W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(I/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,v,0,4);I=Editor.updateCRC(I,G,0,G.length);M+=V(G.length)+v+G+V(I^4294967295);M+=k.substring(W-8,k.length);break}M+=k.substring(W-8,W-4+X);P(k,X);P(k,4)}while(X);return"data:image/png;base64,"+
-(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var J=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==
-typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var G=null;null!=k.editor.graph.getModel().getParent(v)?G=v.getId():null!=k.currentPage&&(G=k.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var K=Format.prototype.init;Format.prototype.init=function(){K.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||
-this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var N=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=N.apply(this,arguments);var v=this.editorUi,G=v.editor.graph;if(G.isEnabled()){var I=v.getCurrentFile();null!=I&&I.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),
-function(){return v.editor.autosave},function(S){v.editor.setAutosave(S);v.editor.autosave&&I.isModified()&&I.fileChanged()},{install:function(S){this.listener=function(){S(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(S){v.actions.get("mathematicalTypesetting").funct()},
-{install:function(S){this.listener=function(){S(G.mathEnabled)};v.addListener("mathEnabledChanged",this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(M);if(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var P=v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");P.style.position="absolute";P.style.left="85%";M.appendChild(P)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
-type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,
-defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",
-dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==
-mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",
-dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
-min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
-max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=
-[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},
-{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},
-{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",
-type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=
-[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];
-mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",
-type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",
-type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",
-dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(k,v,G,I){if(null!=v){var M=mxUtils.bind(this,function(S){if(null!=S)if(G)for(var V=0;V<S.length;V++){if("function"!==typeof S[V].isVisible||S[V].isVisible(I,this))v[S[V].name]=S[V]}else for(var W in v){var X=!1;for(V=0;V<
-S.length;V++)if(S[V].name==W&&S[V].type==v[W].type){X=!0;break}X||delete v[W]}}),P=this.editorUi.editor.graph.view.getState(k);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),M(P.shape.customProperties));k=k.getAttribute("customProperties");
-if(null!=k)try{M(JSON.parse(k))}catch(S){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var v={},G=k.vertices,I=k.edges,M=0;M<G.length;M++)this.findCommonProperties(G[M],v,
-0==M,k);for(M=0;M<I.length;M++)this.findCommonProperties(I[M],v,0==G.length&&0==M,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(v).length&&this.container.appendChild(this.addProperties(this.createPanel(),v,k))}};var e=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);e.apply(this,
-arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,G,I){function M(ja,oa,ma,Aa,sa){if(null!=ma.valueChanged)ma.valueChanged(oa,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ia=[];if(null!=ma.index){for(var xa=[],Ba=ma.parentRow.nextSibling;Ba&&Ba.getAttribute("data-pName")==ja;)xa.push(Ba.getAttribute("data-pValue")),Ba=Ba.nextSibling;ma.index<xa.length?null!=Aa?xa.splice(Aa,1):xa[ma.index]=oa:xa.push(oa);null!=ma.size&&xa.length>
-ma.size&&(xa=xa.slice(0,ma.size));oa=xa.join(",");null!=ma.countProperty&&(ba.setCellStyles(ma.countProperty,xa.length,ba.getSelectionCells()),sa.push(ma.countProperty),Ia.push(xa.length))}ba.setCellStyles(ja,oa,ba.getSelectionCells());sa.push(ja);Ia.push(oa);if(null!=ma.dependentProps)for(ja=0;ja<ma.dependentProps.length;ja++){var Fa=ma.dependentPropsDefVal[ja],La=ma.dependentPropsVals[ja];if(La.length>oa)La=La.slice(0,oa);else for(var za=La.length;za<oa;za++)La.push(Fa);La=La.join(",");ba.setCellStyles(ma.dependentProps[ja],
-La,ba.getSelectionCells());sa.push(ma.dependentProps[ja]);Ia.push(La)}if("function"==typeof ma.onChange)ma.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ia,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}function P(ja,oa,ma){var Aa=mxUtils.getOffset(k,!0),sa=mxUtils.getOffset(ja,!0);oa.style.position="absolute";oa.style.left=sa.x-Aa.x+"px";oa.style.top=sa.y-Aa.y+"px";oa.style.width=ja.offsetWidth+"px";oa.style.height=ja.offsetHeight-
-(ma?4:0)+"px";oa.style.zIndex=5}function S(ja,oa,ma){function Aa(Ia){if(null==Ia||Ia==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ia)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ia);mxUtils.isLightDarkColor(Ia)&&xa.light!=xa.dark?sa.style.background="linear-gradient(to right bottom, "+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":sa.style.background=Ia}}var sa=document.createElement("div");sa.style.width=
-"32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Aa(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ia){this.editorUi.pickColor(oa,function(xa){M(ja,xa,ma);Aa(xa)});mxEvent.consume(Ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function V(ja,oa,ma,Aa,sa,Ia,xa){null!=oa&&(oa=oa.split(","),ea.push({name:ja,values:oa,type:ma,
-defVal:Aa,countProperty:sa,parentRow:Ia,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ba){for(var Fa=Ia,La=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==ja)Fa=Fa.nextSibling,La++;else break;var za={type:ma,parentRow:Ia,index:La,isDeletable:!0,defVal:Aa,countProperty:sa};La=Z(ja,"",za,0==La%2,xa);M(ja,Aa,za);Fa.parentNode.insertBefore(La,Fa.nextSibling);mxEvent.consume(Ba)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";
-return btn}function W(ja,oa,ma,Aa,sa,Ia,xa){if(0<sa){var Ba=Array(sa);oa=null!=oa?oa.split(","):[];for(var Fa=0;Fa<sa;Fa++)Ba[Fa]=null!=oa[Fa]?oa[Fa]:null!=Aa?Aa:"";ea.push({name:ja,values:Ba,type:ma,defVal:Aa,parentRow:Ia,flipBkg:xa,size:sa})}return document.createElement("div")}function X(ja,oa,ma){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==oa;mxEvent.addListener(Aa,"change",function(){M(ja,Aa.checked?"1":"0",ma)});return Aa}function Z(ja,oa,ma,Aa,sa){var Ia=ma.dispName,
-xa=ma.type,Ba=document.createElement("tr");Ba.className="gePropRow"+(sa?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";Ba.setAttribute("data-pName",ja);Ba.setAttribute("data-pValue",oa);Aa=!1;null!=ma.index&&(Ba.setAttribute("data-index",ma.index),Ia=(null!=Ia?Ia:"")+"["+ma.index+"]",Aa=!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";Ia=mxResources.get(Ia,null,Ia);mxUtils.write(Fa,Ia);Fa.setAttribute("title",Ia);Aa&&(Fa.style.textAlign="right");Ba.appendChild(Fa);Fa=document.createElement("td");
-Fa.className="gePropRowCell";Fa.setAttribute("title",null!=oa?oa:mxResources.get("none"));if("color"==xa)Fa.appendChild(S(ja,oa,ma));else if("bool"==xa||"boolean"==xa)Fa.appendChild(X(ja,oa,ma));else if("enum"==xa){var La=ma.enumList;for(sa=0;sa<La.length;sa++)if(Ia=La[sa],Ia.val==oa){mxUtils.write(Fa,mxResources.get(Ia.dispName,null,Ia.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){var za=document.createElement("select"),Da=null;P(Fa,za);for(var Ja=0;Ja<La.length;Ja++){var Ra=
-La[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));za.appendChild(Sa);null==Ra.val&&(Sa.value="null",Da=Sa)}za.value=null==oa&&null!=Da?"null":oa;k.appendChild(za);mxEvent.addListener(za,"change",function(){var ab=mxUtils.htmlEntities(za.value);if(za[za.selectedIndex]==Da||"null"==ab.value)ab=null;M(ja,ab,ma)});za.focus();mxEvent.addListener(za,"blur",function(){k.removeChild(za)})}))}else"dynamicArr"==xa?
-Fa.appendChild(V(ja,oa,ma.subType,ma.subDefVal,ma.countProperty,Ba,sa)):"staticArr"==xa?Fa.appendChild(W(ja,oa,ma.subType,ma.subDefVal,ma.size,Ba,sa)):"readOnly"==xa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=oa,sa.style.borderWidth="0px","id"==ja?(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ba.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",oa),
-Ba.firstChild.appendChild(sa)):(sa.style.width="96px",Fa.appendChild(sa))):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){function za(){var Ja=Da.value;Ja=0==Ja.length&&"string"!=xa&&"numbers"!=xa?0:Ja;ma.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",xa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ma.min&&Ja<ma.min?Ja=ma.min:null!=ma.max&&Ja>ma.max&&(Ja=ma.max);var Ra=null;try{Ra="numbers"==xa?Ja.match(/\d+/g).map(Number).join(" "):
-encodeURIComponent(("int"==xa?parseInt(Ja):Ja)+"")}catch(Sa){}M(ja,Ra,ma,null,Da)}var Da=document.createElement("input");P(Fa,Da,!0);Da.value=decodeURIComponent(oa);Da.className="gePropEditor";"int"!=xa&&"float"!=xa||ma.allowAuto||(Da.type="number",Da.step="int"==xa?"1":"any",null!=ma.min&&(Da.min=parseFloat(ma.min)),null!=ma.max&&(Da.max=parseFloat(ma.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ja){13==Ja.keyCode&&za()});Da.focus();mxEvent.addListener(Da,"blur",function(){za()})})));
-ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(za){M(ja,"",ma,ma.index);mxEvent.consume(za)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Fa.appendChild(sa));Ba.appendChild(Fa);return Ba}var Y=this,ba=this.editorUi.editor.graph,ea=[];k.style.position="relative";k.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");
-fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var oa="none";for(var ma=k.childNodes.length-
-1;0<=ma;ma--)try{var Aa=k.childNodes[ma],sa=Aa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||k.removeChild(Aa)}catch(Ia){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(ma=0;ma<ja.length;ma++)ja[ma].style.display=oa};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ha=document.createElement("th");ha.className="gePropHeaderCell";ha.style.paddingLeft="4px";mxUtils.write(ha,mxResources.get("value"));
-fa.appendChild(ha);ca.appendChild(fa);var pa=ha=!1;fa=null;1==G.vertices.length&&0==G.edges.length?fa=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(fa=G.edges[0].id);null==fa||I||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),{dispName:"id",type:"readOnly"},!0,!1));for(var na in v)if(I=v[na],"function"!=typeof I.isVisible||I.isVisible(G,this)){var ia=null!=I.getValue?I.getValue():null!=G.style[na]?mxUtils.htmlEntities(G.style[na]+""):null!=I.getDefaultValue?I.getDefaultValue(G,this):
-I.defVal;if("separator"==I.type)pa=!pa;else{if("staticArr"==I.type)I.size=parseInt(G.style[I.sizeProperty]||v[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var wa=I.dependentProps,ua=[],va=[];for(fa=0;fa<wa.length;fa++){var Ca=G.style[wa[fa]];va.push(v[wa[fa]].subDefVal);ua.push(null!=Ca?Ca.split(","):[])}I.dependentPropsDefVal=va;I.dependentPropsVals=ua}ca.appendChild(Z(na,ia,I,ha,pa));ha=!ha}}for(fa=0;fa<ea.length;fa++)for(I=ea[fa],v=I.parentRow,G=0;G<I.values.length;G++)na=Z(I.name,
-I.values[G],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:G,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==G%2,I.flipBkg),v.parentNode.insertBefore(na,v.nextSibling),v=na;k.appendChild(ca);da();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},G=this.editorUi,
-I=G.editor.graph,M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.paddingLeft="24px";M.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(M);var P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.position="relative";P.style.textAlign="center";P.style.width="210px";for(var S=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width=
-"6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",mxUtils.bind(this,function(){X(ea)}))})(V);S.push(W);P.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),
-this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(I.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?
-ca[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ha=mxUtils.button("",mxUtils.bind(this,function(ia){I.getModel().beginUpdate();try{for(var wa=G.getSelectionState().cells,ua=0;ua<wa.length;ua++){var va=I.getModel().getStyle(wa[ua]);null!=da?(mxEvent.isShiftDown(ia)||(va=""==da.fill||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,da.fill),va=""==da.gradient||
-null==da.gradient?mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!I.getModel().isVertex(wa[ua])||(va=""==da.font||null==da.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ia)||(va=""==da.stroke||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,
-mxConstants.STYLE_STROKECOLOR,da.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(wa[ua])&&(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(wa[ua],va)}}finally{I.getModel().endUpdate()}}));ha.className="geStyleButton";ha.style.width="36px";ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ha.style.margin=
-"0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ha.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+" 100%)";else if(da.fill==mxConstants.NONE)ha.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ha.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;
-else{var na=mxUtils.getLightDarkColor(da.fill);ha.style.backgroundImage="linear-gradient(to right bottom, "+na.cssText+" 50%, "+na.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ha.style.border=pa+" transparent":""==da.stroke?ha.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(na=mxUtils.getLightDarkColor(da.stroke),ha.style.border=pa+" "+na.cssText,ha.style.borderRightColor=na.light,ha.style.borderBottomColor=
-ha.style.borderRightColor);null!=da.title&&ha.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),na=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ha.style.backgroundColor=pa,ha.style.border="1px solid "+na;ha.style.borderRadius="0";M.appendChild(ha);null!=da&&null!=da.gradient&&(pa=ha.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+
-mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",M.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ha.click()}))});M.innerText="";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(M),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);V=
-10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor=
+"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));
+null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var v=document.createElement("style");v.setAttribute("type","text/css");v.appendChild(document.createTextNode(k.css));var G=document.getElementsByTagName("script")[0];G.parentNode.insertBefore(v,G)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=
+k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=
+k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(v=parseFloat(k.zoomFactor),!isNaN(v)&&1<v?Graph.prototype.zoomFactor=
+v:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(v=parseInt(k.defaultGridSize),!isNaN(v)&&0<v?mxGraph.prototype.gridSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(v=parseInt(k.gridSteps),!isNaN(v)&&0<v?mxGraphView.prototype.gridSteps=v:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=k.pageFormat&&(v=parseInt(k.pageFormat.width),G=parseInt(k.pageFormat.height),
+!isNaN(v)&&0<v&&!isNaN(G)&&0<G?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,v,G),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=
+k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(v=parseInt(k.sidebarTitleSize),!isNaN(v)&&0<v?Sidebar.prototype.sidebarTitleSize=v:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):
+EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(v=parseInt(k.autosaveDelay),!isNaN(v)&&0<v?DrawioFile.prototype.autosaveDelay=v:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&
+(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&
+(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};
+Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var v=document.getElementsByTagName("script")[0];if(null!=v&&null!=v.parentNode){var G=document.createElement("style");G.setAttribute("type","text/css");G.appendChild(document.createTextNode(k));v.parentNode.insertBefore(G,v);k=k.split("url(");for(G=1;G<k.length;G++){var I=k[G].indexOf(")");I=Editor.trimCssUrl(k[G].substring(0,I));var M=document.createElement("link");M.setAttribute("rel","preload");M.setAttribute("href",I);
+M.setAttribute("as","font");M.setAttribute("crossorigin","");v.parentNode.insertBefore(M,v)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;
+for(var v=[],G=0;G<k;G++)v.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return v.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];
+Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&
+"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var v=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(v)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[v]),Error(mxResources.get("notADiagramFile")+" ("+v+")");if("mxGraphModel"==k.nodeName){v=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=v&&""!=v)v!=this.graph.currentStyle&&(G=null!=this.graph.themes?this.graph.themes[v]:mxUtils.load(STYLE_PATH+"/"+
+v+".xml").getDocumentElement(),null!=G&&(I=new mxCodec(G.ownerDocument),I.decode(G,this.graph.getStylesheet())));else{var G=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=G){var I=new mxCodec(G.ownerDocument);I.decode(G,this.graph.getStylesheet())}}this.graph.currentStyle=v;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));v=k.getAttribute("backgroundImage");
+null!=v?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(v)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(v=k.getAttribute("extFonts"))try{for(v=v.split("|").map(function(M){M=M.split("^");return{name:M[0],url:M[1]}}),G=0;G<v.length;G++)this.graph.addExtFont(v[G].name,v[G].url)}catch(M){console.log("ExtFonts format error: "+
+M.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var g=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,v){k=null!=k?k:!0;var G=g.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&G.setAttribute("style",this.graph.currentStyle);var I=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+v);null!=I&&G.setAttribute("backgroundImage",JSON.stringify(I));G.setAttribute("math",this.graph.mathEnabled?"1":"0");G.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?G.setAttribute("adaptiveColors",this.graph.adaptiveColors):G.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(I=this.graph.extFonts.map(function(M){return M.name+"^"+M.url}),G.setAttribute("extFonts",I.join("|")));return G};Editor.prototype.isDataSvg=
+function(k){try{var v=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=v&&(null!=v&&"<"!=v.charAt(0)&&"%"!=v.charAt(0)&&(v=unescape(window.atob?atob(v):Base64.decode(cont,v))),null!=v&&"%"==v.charAt(0)&&(v=decodeURIComponent(v)),null!=v&&0<v.length)){var G=mxUtils.parseXml(v).documentElement;return"mxfile"==G.nodeName||"mxGraphModel"==G.nodeName}}catch(I){}return!1};Editor.prototype.extractGraphModel=function(k,v,G){return Editor.extractGraphModel.apply(this,arguments)};var l=
+Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);this.graph.useCssTransforms=
+!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,v){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var G=function(){I=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var I=null;Editor.doMathJaxRender=function(S){try{null==I?(MathJax.typesetClear([S]),
+MathJax.typeset([S]),G()):I!=S&&Editor.mathJaxQueue.push(S)}catch(V){MathJax.typesetClear([S]),null!=V.retry?(I=S,V.retry.then(function(){MathJax.typesetPromise([S]).then(G)["catch"](function(W){console.log("Error in MathJax.typesetPromise: "+W.toString());G()})})["catch"](function(W){console.log("Error in MathJax.retry: "+W.toString());G()})):null!=window.console&&console.log("Error in MathJax.typeset: "+V.toString())}};window.MathJax=null!=v?v:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},
+loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])}}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.onMathJaxDone=function(){};var M=Editor.prototype.init;Editor.prototype.init=function(){M.apply(this,
+arguments);var S=mxUtils.bind(this,function(V,W){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,S);this.graph.addListener(mxEvent.REFRESH,S)};v=document.getElementsByTagName("script");if(null!=v&&0<v.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",k);v[0].parentNode.appendChild(P)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var v=
+"",G=[""],I=0,M=!0,P;k=$jscomp.makeIterator(k);for(P=k.next();!P.done;P=k.next())P=P.value,'"'===P?(M&&P===v&&(G[I]+=P),M=!M):","===P&&M?P=G[++I]="":G[I]+=P,v=P;return G}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var v=EditorUi.isVisioFilename(k);v=/\.png$/i.test(k)||/\.pdf$/i.test(k)||v;var G="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+
+"&"+G+(v?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===
+k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var v=k.convert,G=this;k.convert=function(I){null!=I&&navigator.onLine&&("http://"!=I.substring(0,7)&&"https://"!=I.substring(0,8)||I.substring(0,k.baseUrl.length)==k.baseUrl||G.crossOriginImages&&G.isCorsEnabledForUrl(I)?"chrome-extension://"!=I.substring(0,19)&&(I=v.apply(this,arguments)):I=PROXY_URL+"?url="+encodeURIComponent(I));return I};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+
+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,v,G,I,M){try{var P=!0,S=window.setTimeout(mxUtils.bind(this,function(){P=!1;v(k)}),this.timeout),V=mxUtils.bind(this,function(){null!=I?this.convertImageToDataUri(k,v,G,I,!0):v(k)});if(/(\.svg)$/i.test(k)&&!M)mxUtils.get(k,mxUtils.bind(this,function(X){window.clearTimeout(S);P&&(200>X.getStatus()||299<X.getStatus()?V():v(Editor.createSvgDataUri(X.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(S);
+P&&V()}));else{var W=new Image;this.crossOriginImages&&(W.crossOrigin="anonymous");W.onload=function(){window.clearTimeout(S);if(P)try{I=null!=I&&M?I:1;var X=document.createElement("canvas"),Z=X.getContext("2d");Z.scale(I,I);X.height=W.height*I;X.width=W.width*I;Z.drawImage(W,0,0);v(X.toDataURL())}catch(Y){v(k)}};W.onerror=function(){window.clearTimeout(S);P&&(null!=G?G():v(k))};W.src=k}}catch(X){null!=G?G():v(k)}};Editor.prototype.convertImages=function(k,v,G,I){function M(){0<P.length?P.shift()():
+v(k)}null==I&&(I=this.createImageUrlConverter());var P=[],S=G||{};G=mxUtils.bind(this,function(V,W){V=k.getElementsByTagName(V);for(var X=0;X<V.length;X++)mxUtils.bind(this,function(Z){P.push(mxUtils.bind(this,function(){try{if(null!=Z){var Y=I.convert(Z.getAttribute(W));if(null!=Y&&"data:"!=Y.substring(0,5)){var ba=S[Y];null==ba?this.convertImageToDataUri(Y,function(ea){null!=ea&&(S[Y]=ea,Z.setAttribute(W,ea));M()},null,Editor.svgRasterScale):(Z.setAttribute(W,ba),M())}else null!=Y&&Z.setAttribute(W,
+Y),M()}}catch(ea){M()}}))})(V[X])});G("image","xlink:href");G("img","src");M()};Editor.base64Encode=function(k){for(var v="",G=0,I=k.length,M,P,S;G<I;){M=k.charCodeAt(G++)&255;if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4);v+="==";break}P=k.charCodeAt(G++);if(G==I){v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&
+3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);v+="=";break}S=k.charCodeAt(G++);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(M>>2);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((M&3)<<4|(P&240)>>4);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(S&192)>>6);v+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return v};
+Editor.prototype.loadUrl=function(k,v,G,I,M,P,S,V){try{var W=!S&&(I||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));M=null!=M?M:!0;var X=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=v){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+Y=Array(Z.length);for(var ba=0;ba<Z.length;ba++)Y[ba]=String.fromCharCode(Z[ba]);Y=Y.join("")}P=null!=P?P:"data:image/png;base64,";Y=P+Editor.base64Encode(Y)}v(Y)}}else null!=G&&(0==Z.getStatus()?G({message:mxResources.get("accessDenied")},Z):404==Z.getStatus()?G({message:mxResources.get("fileNotFound"),code:Z.getStatus()},Z):G({message:this.getErrorMessage(Z)},Z))}),function(Z){null!=G&&G({message:mxResources.get("error")+" "+Z.getStatus()})},W,this.timeout,function(){M&&null!=G&&G({code:App.ERROR_TIMEOUT,
+retry:X})},V)});X()}catch(Z){null!=G&&G(Z)}};Editor.prototype.getErrorMessage=function(k){var v=mxResources.get("error")+" "+k.getStatus();try{var G=k.getText(),I=JSON.parse(G);null!=I&&null!=I.error&&null!=I.error.message&&(v=I.error.message+" ("+v+")")}catch(M){}return v};Editor.prototype.absoluteCssFonts=function(k){var v=null;if(null!=k){var G=k.split("url(");if(0<G.length){v=[G[0]];k=window.location.pathname;var I=null!=k?k.lastIndexOf("/"):-1;0<=I&&(k=k.substring(0,I+1));I=document.getElementsByTagName("base");
+var M=null;null!=I&&0<I.length&&(M=I[0].getAttribute("href"));for(var P=1;P<G.length;P++)if(I=G[P].indexOf(")"),0<I){var S=Editor.trimCssUrl(G[P].substring(0,I));this.graph.isRelativeUrl(S)&&(S=null!=M?M+S:window.location.protocol+"//"+window.location.hostname+("/"==S.charAt(0)?"":k)+S);v.push('url("'+S+'"'+G[P].substring(I))}else v.push(G[P])}else v=[k]}return null!=v?v.join(""):null};Editor.prototype.mapFontUrl=function(k,v,G){/^https?:\/\//.test(v)&&!this.isCorsEnabledForUrl(v)&&(v=PROXY_URL+"?url="+
+encodeURIComponent(v));G(k,v)};Editor.prototype.embedCssFonts=function(k,v){var G=k.split("url("),I=0;null==this.cachedFonts&&(this.cachedFonts={});var M=mxUtils.bind(this,function(){if(0==I){for(var W=[G[0]],X=1;X<G.length;X++){var Z=G[X].indexOf(")");W.push('url("');W.push(this.cachedFonts[Editor.trimCssUrl(G[X].substring(0,Z))]);W.push('"'+G[X].substring(Z))}v(W.join(""))}});if(0<G.length){for(k=1;k<G.length;k++){var P=G[k].indexOf(")"),S=null,V=G[k].indexOf("format(",P);0<V&&(S=Editor.trimCssUrl(G[k].substring(V+
+7,G[k].indexOf(")",V))));mxUtils.bind(this,function(W){if(null==this.cachedFonts[W]){this.cachedFonts[W]=W;I++;var X="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(W))X="image/svg+xml";else if("otf"==S||"embedded-opentype"==S||/(\.otf)($|\?)/i.test(W))X="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(W))X="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(W))X="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(W))X="application/vnd.ms-fontobject";
+else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(W))X="application/font-sfnt";this.mapFontUrl(X,W,mxUtils.bind(this,function(Z,Y){this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedFonts[W]=ba;I--;M()}),mxUtils.bind(this,function(ba){I--;M()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(G[k].substring(0,P)),S)}M()}else v(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(v){this.resolvedFontCss=
+v;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},v;for(v in Graph.fontMapping)Graph.isCssFontUrl(v)&&(k[v]=Graph.fontMapping[v]);return k};Editor.prototype.embedExtFonts=function(k){var v=this.graph.getCustomFonts();if(0<v.length){var G=[],I=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var M=mxUtils.bind(this,function(){0==I&&this.embedCssFonts(G.join(""),k)}),P=0;P<v.length;P++)mxUtils.bind(this,function(S,V){Graph.isCssFontUrl(V)?
+null==this.cachedGoogleFonts[V]?(I++,this.loadUrl(Graph.rewriteGoogleFontUrl(V),mxUtils.bind(this,function(W){this.cachedGoogleFonts[V]=W;G.push(W+"\n");I--;M()}),mxUtils.bind(this,function(W){I--;G.push("@import url("+V+");\n");M()}))):G.push(this.cachedGoogleFonts[V]+"\n"):G.push('@font-face {font-family: "'+S+'";src: url("'+V+'")}\n')})(v[P].name,v[P].url);M()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var v=document.getElementsByTagName("style"),
+G=0;G<v.length;G++){var I=mxUtils.getTextContent(v[G]);0>I.indexOf("mxPageSelector")&&0<I.indexOf("MathJax")&&k[0].appendChild(v[G].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,v){v=null!=v?v:this.absoluteCssFonts(this.fontCss);if(null!=v){var G=mxUtils.getSvgDefs(k),I=v.split("\n");v=[];for(var M=[],P=0;P<I.length;P++)"@import"==I[P].substring(0,7)?v.push(I[P]):M.push(I[P]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");
+k.setAttribute("type","text/css");0<v.length&&(mxUtils.setTextContent(k,v.join("\n")),G.appendChild(k));0<M.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,M.join("\n")),G.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,v,G){var I=mxClient.IS_FF?8192:16384;return Math.min(G,Math.min(I/k,I/v))};Editor.prototype.exportToCanvas=function(k,v,G,I,M,P,S,V,W,X,Z,Y,ba,ea,ca,fa,aa,da){try{P=
+null!=P?P:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ba=null!=ba?ba:0;var ha=W?null:Y.background;ha==mxConstants.NONE&&(ha=null);null==ha&&(ha=I);null==ha&&0==W&&(ha="dark"==fa&&"none"!=Y.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ba,ea,null,S,null,null,null,X,null,fa,aa,da),mxUtils.bind(this,function(pa){try{var na=new Image;na.onload=mxUtils.bind(this,function(){try{var wa=function(){mxClient.IS_SF?window.setTimeout(function(){ja.drawImage(na,0,0);k(ua,pa)},
+0):(ja.drawImage(na,0,0),k(ua,pa))},ua=document.createElement("canvas"),va=parseInt(pa.getAttribute("width")),Ca=parseInt(pa.getAttribute("height"));V=null!=V?V:1;null!=v&&(V=P?Math.min(1,Math.min(3*v/(4*Ca),v/va)):v/va);V=this.getMaxCanvasScale(va,Ca,V);va=Math.ceil(V*va);Ca=Math.ceil(V*Ca);ua.setAttribute("width",va);ua.setAttribute("height",Ca);var ja=ua.getContext("2d");null!=ha&&(ja.beginPath(),ja.rect(0,0,va,Ca),ja.fillStyle=ha,ja.fill());1!=V&&ja.scale(V,V);if(ca){var oa=Y.view,ma=oa.scale;
+oa.scale=1;var Aa=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ma;Aa="data:image/svg+xml;base64,"+Aa;var sa=Y.gridSize*oa.gridSteps*V,Ia=Y.getGraphBounds(),xa=oa.translate.x*ma,Ba=oa.translate.y*ma,Fa=xa+(Ia.x-xa)/ma-ba,La=Ba+(Ia.y-Ba)/ma-ba,za=new Image;za.onload=function(){try{for(var Da=-Math.round(sa-mxUtils.mod((xa-Fa)*V,sa)),Ja=-Math.round(sa-mxUtils.mod((Ba-La)*V,sa));Da<va;Da+=sa)for(var Ra=Ja;Ra<Ca;Ra+=sa)ja.drawImage(za,Da/V,Ra/V);wa()}catch(Sa){null!=M&&M(Sa)}};
+za.onerror=function(Da){null!=M&&M(Da)};za.src=Aa}else wa()}catch(Da){null!=M&&M(Da)}});na.onerror=function(wa){null!=M&&M(wa)};X&&this.graph.addSvgShadow(pa);this.graph.mathEnabled&&this.addMathCss(pa);var ia=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(pa,this.resolvedFontCss),na.src=Editor.createSvgDataUri(mxUtils.getXml(pa))}catch(wa){null!=M&&M(wa)}});this.embedExtFonts(mxUtils.bind(this,function(wa){try{null!=wa&&this.addFontCss(pa,wa),this.loadFonts(ia)}catch(ua){null!=
+M&&M(ua)}}))}catch(wa){null!=M&&M(wa)}}),G,Z)}catch(pa){null!=M&&M(pa)}};Editor.crcTable=[];for(var q=0;256>q;q++)for(var y=q,x=0;8>x;x++)y=1==(y&1)?3988292384^y>>>1:y>>>1,Editor.crcTable[q]=y;Editor.updateCRC=function(k,v,G,I){for(var M=0;M<I;M++)k=Editor.crcTable[(k^v.charCodeAt(G+M))&255]^k>>>8;return k};Editor.crc32=function(k){for(var v=-1,G=0;G<k.length;G++)v=v>>>8^Editor.crcTable[(v^k.charCodeAt(G))&255];return(v^-1)>>>0};Editor.writeGraphModelToPng=function(k,v,G,I,M){function P(Z,Y){var ba=
+W;W+=Y;return Z.substring(ba,W)}function S(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var W=0;if(P(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=M&&M();else if(P(k,4),"IHDR"!=P(k,4))null!=M&&M();else{P(k,17);M=k.substring(0,W);do{var X=S(k);if("IDAT"==P(k,4)){M=k.substring(0,
+W-8);"pHYs"==v&&"dpi"==G?(G=Math.round(I/.0254),G=V(G)+V(G)+String.fromCharCode(1)):G=G+String.fromCharCode(0)+("zTXt"==v?String.fromCharCode(0):"")+I;I=4294967295;I=Editor.updateCRC(I,v,0,4);I=Editor.updateCRC(I,G,0,G.length);M+=V(G.length)+v+G+V(I^4294967295);M+=k.substring(W-8,k.length);break}M+=k.substring(W-8,W-4+X);P(k,X);P(k,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(M):Base64.encode(M,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";
+var D=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,v){D.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var J=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){J.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,v){var G=null;null!=k.editor.graph.getModel().getParent(v)?G=v.getId():
+null!=k.currentPage&&(G=k.currentPage.getId());return G});if(null!=window.StyleFormatPanel){var K=Format.prototype.init;Format.prototype.init=function(){K.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var L=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?L.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==
+Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var Q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=Q.apply(this,arguments);var v=this.editorUi,G=v.editor.graph;if(G.isEnabled()){var I=v.getCurrentFile();null!=I&&I.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return v.editor.autosave},function(S){v.editor.setAutosave(S);v.editor.autosave&&I.isModified()&&I.fileChanged()},
+{install:function(S){this.listener=function(){S(v.editor.autosave)};v.editor.addListener("autosaveChanged",this.listener)},destroy:function(){v.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&G.isEnabled()&&"undefined"!==typeof MathJax){var M=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return G.mathEnabled},function(S){v.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=function(){S(G.mathEnabled)};v.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){v.removeListener(this.listener)}});k.appendChild(M);if(!v.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var P=v.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");P.style.position="absolute";P.style.left="85%";M.appendChild(P)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
+type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
+type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
+{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize",
+"0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];
+mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",
+dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",
+min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},
+{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(k,v,G,I){if(null!=v){var M=mxUtils.bind(this,function(S){if(null!=S)if(G)for(var V=0;V<S.length;V++){if("function"!==typeof S[V].isVisible||S[V].isVisible(I,this))v[S[V].name]=S[V]}else for(var W in v){var X=!1;for(V=0;V<S.length;V++)if(S[V].name==W&&S[V].type==v[W].type){X=!0;break}X||delete v[W]}}),P=this.editorUi.editor.graph.view.getState(k);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],
+P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),M(P.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{M(JSON.parse(k))}catch(S){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&
+!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var v={},G=k.vertices,I=k.edges,M=0;M<G.length;M++)this.findCommonProperties(G[M],v,0==M,k);for(M=0;M<I.length;M++)this.findCommonProperties(I[M],v,0==G.length&&0==M,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(v).length&&this.container.appendChild(this.addProperties(this.createPanel(),v,k))}};var e=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(k){var v=this.editorUi.getSelectionState();1==v.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=v.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);e.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,v,G,I){function M(ja,oa,ma,Aa,sa){if(null!=ma.valueChanged)ma.valueChanged(oa,sa);else{ba.getModel().beginUpdate();try{sa=[];var Ia=[];if(null!=ma.index){for(var xa=
+[],Ba=ma.parentRow.nextSibling;Ba&&Ba.getAttribute("data-pName")==ja;)xa.push(Ba.getAttribute("data-pValue")),Ba=Ba.nextSibling;ma.index<xa.length?null!=Aa?xa.splice(Aa,1):xa[ma.index]=oa:xa.push(oa);null!=ma.size&&xa.length>ma.size&&(xa=xa.slice(0,ma.size));oa=xa.join(",");null!=ma.countProperty&&(ba.setCellStyles(ma.countProperty,xa.length,ba.getSelectionCells()),sa.push(ma.countProperty),Ia.push(xa.length))}ba.setCellStyles(ja,oa,ba.getSelectionCells());sa.push(ja);Ia.push(oa);if(null!=ma.dependentProps)for(ja=
+0;ja<ma.dependentProps.length;ja++){var Fa=ma.dependentPropsDefVal[ja],La=ma.dependentPropsVals[ja];if(La.length>oa)La=La.slice(0,oa);else for(var za=La.length;za<oa;za++)La.push(Fa);La=La.join(",");ba.setCellStyles(ma.dependentProps[ja],La,ba.getSelectionCells());sa.push(ma.dependentProps[ja]);Ia.push(La)}if("function"==typeof ma.onChange)ma.onChange(ba,oa);Y.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",Ia,"cells",ba.getSelectionCells()))}finally{ba.getModel().endUpdate()}}}
+function P(ja,oa,ma){var Aa=mxUtils.getOffset(k,!0),sa=mxUtils.getOffset(ja,!0);oa.style.position="absolute";oa.style.left=sa.x-Aa.x+"px";oa.style.top=sa.y-Aa.y+"px";oa.style.width=ja.offsetWidth+"px";oa.style.height=ja.offsetHeight-(ma?4:0)+"px";oa.style.zIndex=5}function S(ja,oa,ma){function Aa(Ia){if(null==Ia||Ia==mxConstants.NONE)sa.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==Ia)sa.style.background="";else{var xa=mxUtils.getLightDarkColor(Ia);mxUtils.isLightDarkColor(Ia)&&
+xa.light!=xa.dark?sa.style.background="linear-gradient(to right bottom, "+xa.cssText+" 50%, "+mxUtils.invertLightDarkColor(xa).cssText+" 50.3%)":sa.style.background=Ia}}var sa=document.createElement("div");sa.style.width="32px";sa.style.height="8px";sa.style.margin="2px";sa.style.borderStyle="solid";sa.style.borderWidth="1px";Aa(oa);btn=mxUtils.button("",mxUtils.bind(Y,function(Ia){this.editorUi.pickColor(oa,function(xa){M(ja,xa,ma);Aa(xa)});mxEvent.consume(Ia)}));btn.style.height="18px";btn.style.width=
+"40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(sa);return btn}function V(ja,oa,ma,Aa,sa,Ia,xa){null!=oa&&(oa=oa.split(","),ea.push({name:ja,values:oa,type:ma,defVal:Aa,countProperty:sa,parentRow:Ia,isDeletable:!0,flipBkg:xa}));btn=mxUtils.button("+",mxUtils.bind(Y,function(Ba){for(var Fa=Ia,La=0;null!=Fa.nextSibling;)if(Fa.nextSibling.getAttribute("data-pName")==ja)Fa=Fa.nextSibling,La++;else break;var za={type:ma,parentRow:Ia,index:La,isDeletable:!0,
+defVal:Aa,countProperty:sa};La=Z(ja,"",za,0==La%2,xa);M(ja,Aa,za);Fa.parentNode.insertBefore(La,Fa.nextSibling);mxEvent.consume(Ba)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function W(ja,oa,ma,Aa,sa,Ia,xa){if(0<sa){var Ba=Array(sa);oa=null!=oa?oa.split(","):[];for(var Fa=0;Fa<sa;Fa++)Ba[Fa]=null!=oa[Fa]?oa[Fa]:null!=Aa?Aa:"";ea.push({name:ja,values:Ba,type:ma,defVal:Aa,parentRow:Ia,flipBkg:xa,size:sa})}return document.createElement("div")}function X(ja,
+oa,ma){var Aa=document.createElement("input");Aa.type="checkbox";Aa.checked="1"==oa;mxEvent.addListener(Aa,"change",function(){M(ja,Aa.checked?"1":"0",ma)});return Aa}function Z(ja,oa,ma,Aa,sa){var Ia=ma.dispName,xa=ma.type,Ba=document.createElement("tr");Ba.className="gePropRow"+(sa?"Dark":"")+(Aa?"Alt":"")+" gePropNonHeaderRow";Ba.setAttribute("data-pName",ja);Ba.setAttribute("data-pValue",oa);Aa=!1;null!=ma.index&&(Ba.setAttribute("data-index",ma.index),Ia=(null!=Ia?Ia:"")+"["+ma.index+"]",Aa=
+!0);var Fa=document.createElement("td");Fa.className="gePropRowCell";Ia=mxResources.get(Ia,null,Ia);mxUtils.write(Fa,Ia);Fa.setAttribute("title",Ia);Aa&&(Fa.style.textAlign="right");Ba.appendChild(Fa);Fa=document.createElement("td");Fa.className="gePropRowCell";Fa.setAttribute("title",null!=oa?oa:mxResources.get("none"));if("color"==xa)Fa.appendChild(S(ja,oa,ma));else if("bool"==xa||"boolean"==xa)Fa.appendChild(X(ja,oa,ma));else if("enum"==xa){var La=ma.enumList;for(sa=0;sa<La.length;sa++)if(Ia=La[sa],
+Ia.val==oa){mxUtils.write(Fa,mxResources.get(Ia.dispName,null,Ia.dispName));break}mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){var za=document.createElement("select"),Da=null;P(Fa,za);for(var Ja=0;Ja<La.length;Ja++){var Ra=La[Ja],Sa=document.createElement("option");Sa.value=mxUtils.htmlEntities(Ra.val);mxUtils.write(Sa,mxResources.get(Ra.dispName,null,Ra.dispName));za.appendChild(Sa);null==Ra.val&&(Sa.value="null",Da=Sa)}za.value=null==oa&&null!=Da?"null":oa;k.appendChild(za);mxEvent.addListener(za,
+"change",function(){var ab=mxUtils.htmlEntities(za.value);if(za[za.selectedIndex]==Da||"null"==ab.value)ab=null;M(ja,ab,ma)});za.focus();mxEvent.addListener(za,"blur",function(){k.removeChild(za)})}))}else"dynamicArr"==xa?Fa.appendChild(V(ja,oa,ma.subType,ma.subDefVal,ma.countProperty,Ba,sa)):"staticArr"==xa?Fa.appendChild(W(ja,oa,ma.subType,ma.subDefVal,ma.size,Ba,sa)):"readOnly"==xa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=oa,sa.style.borderWidth="0px","id"==ja?
+(sa.style.width="190px",sa.style.position="relative",sa.style.right="6px",sa.style.float="right",sa.style.background="none",sa.style.textAlign="right",Ba.firstChild.setAttribute("colspan","2"),sa.setAttribute("title",oa),Ba.firstChild.appendChild(sa)):(sa.style.width="96px",Fa.appendChild(sa))):(Fa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),mxEvent.addListener(Fa,"click",mxUtils.bind(Y,function(){function za(){var Ja=Da.value;Ja=0==Ja.length&&"string"!=xa&&"numbers"!=xa?0:Ja;ma.allowAuto&&
+(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",xa="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=ma.min&&Ja<ma.min?Ja=ma.min:null!=ma.max&&Ja>ma.max&&(Ja=ma.max);var Ra=null;try{Ra="numbers"==xa?Ja.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==xa?parseInt(Ja):Ja)+"")}catch(Sa){}M(ja,Ra,ma,null,Da)}var Da=document.createElement("input");P(Fa,Da,!0);Da.value=decodeURIComponent(oa);Da.className="gePropEditor";"int"!=xa&&"float"!=xa||ma.allowAuto||(Da.type="number",
+Da.step="int"==xa?"1":"any",null!=ma.min&&(Da.min=parseFloat(ma.min)),null!=ma.max&&(Da.max=parseFloat(ma.max)));k.appendChild(Da);mxEvent.addListener(Da,"keypress",function(Ja){13==Ja.keyCode&&za()});Da.focus();mxEvent.addListener(Da,"blur",function(){za()})})));ma.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Y,function(za){M(ja,"",ma,ma.index);mxEvent.consume(za)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",Fa.appendChild(sa));Ba.appendChild(Fa);
+return Ba}var Y=this,ba=this.editorUi.editor.graph,ea=[];k.style.position="relative";k.style.padding="0";var ca=document.createElement("table");ca.className="geProperties";ca.style.whiteSpace="nowrap";ca.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var aa=document.createElement("th");aa.className="gePropHeaderCell";aa.style.paddingLeft="16px";aa.style.backgroundRepeat="no-repeat";aa.style.backgroundPosition="-2px 50%";aa.style.backgroundSize="20px";mxUtils.write(aa,
+mxResources.get("property"));fa.style.cursor="pointer";var da=function(){var ja=ca.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){aa.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var oa="none";for(var ma=k.childNodes.length-1;0<=ma;ma--)try{var Aa=k.childNodes[ma],sa=Aa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||k.removeChild(Aa)}catch(Ia){}}else aa.style.backgroundImage="url('"+Editor.arrowDownImage+"')",oa="";for(ma=0;ma<ja.length;ma++)ja[ma].style.display=
+oa};mxEvent.addListener(fa,"click",function(){Y.editorUi.propertiesCollapsed=!Y.editorUi.propertiesCollapsed;da()});fa.appendChild(aa);var ha=document.createElement("th");ha.className="gePropHeaderCell";ha.style.paddingLeft="4px";mxUtils.write(ha,mxResources.get("value"));fa.appendChild(ha);ca.appendChild(fa);var pa=ha=!1;fa=null;1==G.vertices.length&&0==G.edges.length?fa=G.vertices[0].id:0==G.vertices.length&&1==G.edges.length&&(fa=G.edges[0].id);null==fa||I||ca.appendChild(Z("id",mxUtils.htmlEntities(fa),
+{dispName:"id",type:"readOnly"},!0,!1));for(var na in v)if(I=v[na],"function"!=typeof I.isVisible||I.isVisible(G,this)){var ia=null!=I.getValue?I.getValue():null!=G.style[na]?mxUtils.htmlEntities(G.style[na]+""):null!=I.getDefaultValue?I.getDefaultValue(G,this):I.defVal;if("separator"==I.type)pa=!pa;else{if("staticArr"==I.type)I.size=parseInt(G.style[I.sizeProperty]||v[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){var wa=I.dependentProps,ua=[],va=[];for(fa=0;fa<wa.length;fa++){var Ca=
+G.style[wa[fa]];va.push(v[wa[fa]].subDefVal);ua.push(null!=Ca?Ca.split(","):[])}I.dependentPropsDefVal=va;I.dependentPropsVals=ua}ca.appendChild(Z(na,ia,I,ha,pa));ha=!ha}}for(fa=0;fa<ea.length;fa++)for(I=ea[fa],v=I.parentRow,G=0;G<I.values.length;G++)na=Z(I.name,I.values[G],{type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:G,defVal:I.defVal,countProperty:I.countProperty,size:I.size},0==G%2,I.flipBkg),v.parentNode.insertBefore(na,v.nextSibling),v=na;k.appendChild(ca);da();return k};
+StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var v=function(ea){mxEvent.addListener(ea,"mouseenter",function(){ea.style.opacity="1"});mxEvent.addListener(ea,"mouseleave",function(){ea.style.opacity="0.5"})},G=this.editorUi,I=G.editor.graph,M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.paddingLeft="24px";M.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(M);var P=document.createElement("div");
+P.style.whiteSpace="nowrap";P.style.position="relative";P.style.textAlign="center";P.style.width="210px";for(var S=[],V=0;V<this.defaultColorSchemes.length;V++){var W=document.createElement("div");W.style.display="inline-block";W.style.width="6px";W.style.height="6px";W.style.marginLeft="4px";W.style.marginRight="3px";W.style.borderRadius="3px";W.style.cursor="pointer";W.style.background="transparent";W.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ea){mxEvent.addListener(W,"click",
+mxUtils.bind(this,function(){X(ea)}))})(V);S.push(W);P.appendChild(W)}var X=mxUtils.bind(this,function(ea){null!=S[ea]&&(null!=this.format.currentScheme&&null!=S[this.format.currentScheme]&&(S[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ea,Z(this.defaultColorSchemes[this.format.currentScheme]),S[this.format.currentScheme].style.background="#84d7ff")}),Z=mxUtils.bind(this,function(ea){var ca=mxUtils.clone(I.defaultVertexStyle);ca[mxConstants.STYLE_STROKECOLOR]=
+null!=ca[mxConstants.STYLE_STROKECOLOR]?ca[mxConstants.STYLE_STROKECOLOR]:"default";ca[mxConstants.STYLE_FILLCOLOR]=null!=ca[mxConstants.STYLE_FILLCOLOR]?ca[mxConstants.STYLE_FILLCOLOR]:"default";ca[mxConstants.STYLE_FONTCOLOR]=null!=ca[mxConstants.STYLE_FONTCOLOR]?ca[mxConstants.STYLE_FONTCOLOR]:"default";I.replaceDefaultColors(new mxCell,ca);var fa=mxUtils.bind(this,function(da){var ha=mxUtils.button("",mxUtils.bind(this,function(ia){I.getModel().beginUpdate();try{for(var wa=G.getSelectionState().cells,
+ua=0;ua<wa.length;ua++){var va=I.getModel().getStyle(wa[ua]);null!=da?(mxEvent.isShiftDown(ia)||(va=""==da.fill||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,da.fill),va=""==da.gradient||null==da.gradient?mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,da.gradient),mxEvent.isControlDown(ia)||mxClient.IS_MAC&&mxEvent.isMetaDown(ia)||!I.getModel().isVertex(wa[ua])||(va=
+""==da.font||null==da.font?mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,da.font))),mxEvent.isAltDown(ia)||(va=""==da.stroke||null==da.fill?mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,da.stroke))):(va=mxUtils.setStyle(va,mxConstants.STYLE_FILLCOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_STROKECOLOR,null),va=mxUtils.setStyle(va,mxConstants.STYLE_GRADIENTCOLOR,null),I.getModel().isVertex(wa[ua])&&
+(va=mxUtils.setStyle(va,mxConstants.STYLE_FONTCOLOR,null)));I.getModel().setStyle(wa[ua],va)}}finally{I.getModel().endUpdate()}}));ha.className="geStyleButton";ha.style.width="36px";ha.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";ha.style.margin="0px 6px 6px 0px";if(null!=da){var pa="1px solid";null!=da.border&&(pa=da.border);if(null!=da.gradient)ha.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(da.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(da.gradient).cssText+
+" 100%)";else if(da.fill==mxConstants.NONE)ha.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==da.fill||""==da.fill)ha.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var na=mxUtils.getLightDarkColor(da.fill);ha.style.backgroundImage="linear-gradient(to right bottom, "+na.cssText+" 50%, "+na.light+" 50.3%)"}null==da.stroke||da.stroke==mxConstants.NONE?ha.style.border=pa+" transparent":""==da.stroke?ha.style.border=
+"1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(na=mxUtils.getLightDarkColor(da.stroke),ha.style.border=pa+" "+na.cssText,ha.style.borderRightColor=na.light,ha.style.borderBottomColor=ha.style.borderRightColor);null!=da.title&&ha.setAttribute("title",da.title)}else pa=mxUtils.getValue(ca,mxConstants.STYLE_FILLCOLOR,"#ffffff"),na=mxUtils.getValue(ca,mxConstants.STYLE_STROKECOLOR,"#000000"),ha.style.backgroundColor=pa,ha.style.border="1px solid "+
+na;ha.style.borderRadius="0";M.appendChild(ha);null!=da&&null!=da.gradient&&(pa=ha.cloneNode(!1),pa.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(da.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(da.gradient).light+") 100%)",pa.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",pa.style.backgroundColor="transparent",M.appendChild(pa),pa.style.marginLeft="-42px",mxEvent.addListener(pa,"click",function(){ha.click()}))});M.innerText=
+"";if(null!=ea)for(var aa=0;aa<ea.length;aa++)0<aa&&0==mxUtils.mod(aa,4)&&mxUtils.br(M),fa(ea[aa])});null==this.format.currentScheme?X(Math.min(S.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):X(this.format.currentScheme);V=10>=this.defaultColorSchemes.length?28:8;var Y=document.createElement("div");Y.style.cssText="position:absolute;left:10px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
mxEvent.addListener(Y,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ba=document.createElement("div");ba.style.cssText="position:absolute;left:202px;top:8px;bottom:"+V+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
1<this.defaultColorSchemes.length&&(k.appendChild(Y),k.appendChild(ba));mxEvent.addListener(ba,"click",mxUtils.bind(this,function(){X(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));v(Y);v(ba);Z(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(P)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};
Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=
@@ -12943,15 +12946,15 @@ var Y=mxUtils.bind(this,function(fa,aa){if(k()){fa=V.getAllTags();for(aa=0;aa<fa
ea.style.margin="0 2px";ea.style.display="inline-block";ea.style.cursor="pointer";var ca=ea.cloneNode(!1);ca.style.backgroundImage="url("+Editor.visibleImage+")";ca.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(ca,"click",function(fa){V.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=V.hiddenTags.slice());M();V.refresh();mxEvent.consume(fa)});ba.appendChild(ca);null!=G&&(ea=ea.cloneNode(!1),ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("add")),
mxEvent.addListener(ea,"click",function(fa){G(W,function(aa){W=aa;Y()});mxEvent.consume(fa)}),ba.appendChild(ea));X.appendChild(ba)}null!=I&&ba.appendChild(I);return{div:X,refresh:Y}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var v in Graph.customFontElements){var G=Graph.customFontElements[v];k.push({name:G.name,url:G.url})}return k};Graph.prototype.setFont=function(k,v){Graph.addFont(k,v);var G=Editor.guid();document.execCommand("fontname",!1,G);for(var I=
this.cellEditor.textarea.getElementsByTagName("font"),M=!1,P=0;P<I.length;P++)I[P].getAttribute("face")==G&&(M=!0,I[P].setAttribute("face",k),null!=v?I[P].setAttribute("data-font-src",v):I[P].removeAttribute("data-font-src"));M||document.execCommand("fontname",!1,k)};var z=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return z.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;
-if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var F=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=F.apply(this,arguments);
+if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var v in k)this.globalVars[v]=k[v]}catch(G){null!=window.console&&console.log("Error in vars URL parameter: "+G)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var E=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(k){var v=E.apply(this,arguments);
null==v&&null!=this.globalVars&&(v=this.globalVars[k]);return v};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,v,G,I,M,P,S,V,W,X,Z,Y,ba,ea,ca,fa){var aa=C.apply(this,arguments);if(null!=Y){var da=aa.getAttribute("style");
-null==da&&(da="");Y="auto"==Y?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ha=this.getCustomFonts();if(Z&&0<ha.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var na="",ia="",wa=0;wa<ha.length;wa++){var ua=ha[wa].name,va=ha[wa].url;Graph.isCssFontUrl(va)?
-na+="@import url("+Graph.rewriteGoogleFontUrl(va)+");\n":ia+='@font-face {\nfont-family: "'+ua+'";\nsrc: url("'+va+'");\n}\n'}da.appendChild(pa.createTextNode(na+ia));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),null!=
-da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var E=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){E.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=
+null==da&&(da="");Y="auto"==Y||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":Y;aa.setAttribute("style",da+(" color-scheme: "+Y+";"))}var ha=this.getCustomFonts();if(Z&&0<ha.length){var pa=aa.ownerDocument;da=null!=pa.createElementNS?pa.createElementNS(mxConstants.NS_SVG,"style"):pa.createElement("style");null!=pa.setAttributeNS?da.setAttributeNS("type","text/css"):da.setAttribute("type","text/css");for(var na="",ia="",wa=0;wa<ha.length;wa++){var ua=ha[wa].name,
+va=ha[wa].url;Graph.isCssFontUrl(va)?na+="@import url("+Graph.rewriteGoogleFontUrl(va)+");\n":ia+='@font-face {\nfont-family: "'+ua+'";\nsrc: url("'+va+'");\n}\n'}da.appendChild(pa.createTextNode(na+ia));aa.getElementsByTagName("defs")[0].appendChild(da)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(aa);this.mathEnabled&&(document.body.appendChild(aa),Editor.MathJaxRender(aa),aa.parentNode.removeChild(aa),da=aa.ownerDocument.getElementById("MJX-SVG-styles"),
+null!=da&&aa.getElementsByTagName("defs")[0].appendChild(da.cloneNode(!0)));return aa};var F=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){F.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var R=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){R.apply(this,arguments);this.enumerationState=
0};var U=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return U.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=
function(k){var v="1"==mxUtils.getValue(k.style,"enumerate",0);v&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):v||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);v=k.secondLabel;if(null!=v){var G=k.view.scale,I=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?
-new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==I&&v.scale==G||(v.bounds=k,v.value=I,v.scale=G,v.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var Q=
-Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){Q.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),
+new mxRectangle(k.x+k.width-4*G,k.y+4*G,0,0):mxRectangle.fromPoint(k.view.getPoint(k));v.bounds.equals(k)&&v.value==I&&v.scale==G||(v.bounds=k,v.value=I,v.scale=G,v.redraw())}};var O=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();O.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var N=
+Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){N.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,v){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,v))};Graph.prototype.executeCustomActions=function(k,v,G){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),
null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var I=!1,M=0,P=0,S=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),V=mxUtils.bind(this,function(){I&&(I=!1,this.model.endUpdate())}),W=mxUtils.bind(this,function(){0<M&&M--;0==M&&X()}),X=mxUtils.bind(this,function(){if(P<k.length){var Z=this.stoppingCustomActions,Y=k[P++],ba=[];if(null!=Y.open)if(V(),this.isCustomLink(Y.open)){if(!this.customLinkClicked(Y.open,
G))return}else this.openLink(Y.open);null==Y.wait||Z||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;W()}),M++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,
!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(M++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn,!0),!0)));null!=Y.wipeOut&&(ba=ba.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ea=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),
@@ -13012,17 +13015,17 @@ k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mat
this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var H=document.createElement("canvas"),T=new Image;T.onload=function(){try{H.getContext("2d").drawImage(T,
0,0);var k=H.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(v){}};T.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;d.previousAdaptiveColors=d.adaptiveColors;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
EditorUi.logError=function(c,e,f,p,n,t,z){if(null!=c){n=null!=n?n:Error(c);n.stack=null!=n.stack?n.stack:"";t=null!=t?t:0>c.indexOf("NetworkError")&&0>c.indexOf("SecurityError")&&0>c.indexOf("NS_ERROR_FAILURE")&&0>c.indexOf("out of memory")?"SEVERE":"CONFIG";try{EditorUi.enableLogging&&"1"!=urlParams.dev&&c!=EditorUi.lastErrorMessage&&0>c.indexOf("extension:")&&0>c.indexOf("ResizeObserver loop completed with undelivered notifications")&&0>n.stack.indexOf("extension:")&&0>n.stack.indexOf("<anonymous>:")&&
-0>n.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(f)+(null!=p?":colno:"+encodeURIComponent(p):"")+(""!=n.stack?"&stack="+encodeURIComponent(n.stack):""))}catch(F){}try{z||null==window.console||console.error(t,c,e,f,p,n)}catch(F){}}};EditorUi.logEvent=
+0>n.stack.indexOf("/math/es5/")&&(EditorUi.lastErrorMessage=c,(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+t+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(f)+(null!=p?":colno:"+encodeURIComponent(p):"")+(""!=n.stack?"&stack="+encodeURIComponent(n.stack):""))}catch(E){}try{z||null==window.console||console.error(t,c,e,f,p,n)}catch(E){}}};EditorUi.logEvent=
function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(f){}};EditorUi.sendReport=function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email",
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(f){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,c)}}catch(f){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");
for(var e=[],f=0;f<c.length;f++)e.push(c[f]);for(f=0;f<e.length;f++)EditorUi.replaceSvgImage(e[f])};EditorUi.replaceSvgImage=function(c){try{var e=null;e=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var f=EditorUi.getSvgSubtree(e);if(null!=f&&"svg"==f.nodeName){f.setAttribute("x",c.getAttribute("x"));f.setAttribute("y",c.getAttribute("y"));f.setAttribute("width",c.getAttribute("width"));f.setAttribute("height",c.getAttribute("height"));f.style.fontFamily=
"initial";var p=mxUtils.createElementNs(f.ownerDocument,mxConstants.NS_SVG,"g");p.appendChild(f);c.hasAttribute("transform")&&p.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(p,c)}}catch(n){}};EditorUi.getSvgSubtree=function(c){var e=Graph.getSvgFromDataUri(c);c=null;if(null!=e){c=Graph.sanitizeNode(mxUtils.parseXml(e).documentElement);e=c.getElementsByTagName("style");if(0<e.length){var f="svg-image-"+Editor.guid();c.setAttribute("id",f);for(var p=document.implementation.createHTMLDocument(""),
-n=document.createElement("style"),t=0;t<e.length;t++){n.textContent=e[t].textContent;p.body.appendChild(n);for(var z="",F=0;F<n.sheet.cssRules.length;F++){var C=n.sheet.cssRules[F];if(null!=C.selectorText){for(var E=C.selectorText.split(","),R=0;R<E.length;R++)E[R]="#"+f+" "+E[R];C.selectorText=E.join(",")}z+=C.cssText+"\n"}e[t].textContent=z}}e=c.getElementsByTagName("*");for(f=0;f<e.length;f++)e[f].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+n=document.createElement("style"),t=0;t<e.length;t++){n.textContent=e[t].textContent;p.body.appendChild(n);for(var z="",E=0;E<n.sheet.cssRules.length;E++){var C=n.sheet.cssRules[E];if(null!=C.selectorText){for(var F=C.selectorText.split(","),R=0;R<F.length;R++)F[R]="#"+f+" "+F[R];C.selectorText=F.join(",")}z+=C.cssText+"\n"}e[t].textContent=z}}e=c.getElementsByTagName("*");for(f=0;f<e.length;f++)e[f].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(n){}try{var e=document.createElement("canvas"),
@@ -13032,10 +13035,10 @@ e,f)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDat
EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var e=this.editor.graph;e.mathEnabled=c;null!=e.view.backgroundImage&&(e.view.backgroundImage.destroy(),e.view.backgroundImage=null);this.editor.updateGraphComponents();
e.refresh();e.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=
function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,e,f){var p=null==c||null==e;f=null!=f?f:24;var n=new Spinner({lines:12,length:f,width:Math.round(f/3),radius:Math.round(f/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=this.timeout,z=n.spin,F=null,C=null,E=mxUtils.bind(this,function(U){null!=U&&U()});n.spin=function(U,O,Q,m){m=null!=m?m:t;var u=!1;if(!this.active){var A=Date.now();null!=Q&&(F=window.setTimeout(function(){n.stop();F=null;Q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})},m));z.call(this,U);this.active=!0;null!=O&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),t=this.timeout,z=n.spin,E=null,C=null,F=mxUtils.bind(this,function(U){null!=U&&U()});n.spin=function(U,O,N,m){m=null!=m?m:t;var u=!1;if(!this.active){var A=Date.now();null!=N&&(E=window.setTimeout(function(){n.stop();E=null;N({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:C})},m));z.call(this,U);this.active=!0;null!=O&&(p&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/
2-2),u=document.createElement("div"),u.className="geSpinnerStatus",u.style.position="absolute",u.style.whiteSpace="nowrap",u.style.background="#4B4243",u.style.color="white",u.style.fontFamily=Editor.defaultHtmlFont,u.style.fontSize="9pt",u.style.padding="6px",u.style.paddingLeft="10px",u.style.paddingRight="10px",u.style.zIndex=2E9,u.style.left=Math.max(0,c)+"px",u.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(u.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(u.style,"transform",
-"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),u.innerHTML=mxUtils.htmlEntities(O),U.appendChild(u),n.status=u);this.pause=mxUtils.bind(this,function(){var B=E;this.active&&(m=Math.max(0,m-(Date.now()-A)),B=mxUtils.bind(this,function(H){this.spin(U,O,Q,m);if(null!=H)try{H(),C=mxUtils.bind(this,function(){this.spin(U,O,Q,m);try{H()}catch(T){null!=Q&&Q(T)}})}catch(T){null!=
-Q&&Q(T)}}));this.stop();return B});u=!0}return u};var R=n.stop;n.stop=function(){R.call(this);this.active&&(this.active=!1,null!=F&&(window.clearTimeout(F),F=null),null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status),n.status=null)};n.pause=function(){return E};return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};
+"translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(u.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=O.substring(O.length-3,O.length)&&"!"!=O.charAt(O.length-1)&&(O+="..."),u.innerHTML=mxUtils.htmlEntities(O),U.appendChild(u),n.status=u);this.pause=mxUtils.bind(this,function(){var B=F;this.active&&(m=Math.max(0,m-(Date.now()-A)),B=mxUtils.bind(this,function(H){this.spin(U,O,N,m);if(null!=H)try{H(),C=mxUtils.bind(this,function(){this.spin(U,O,N,m);try{H()}catch(T){null!=N&&N(T)}})}catch(T){null!=
+N&&N(T)}}));this.stop();return B});u=!0}return u};var R=n.stop;n.stop=function(){R.call(this);this.active&&(this.active=!1,null!=E&&(window.clearTimeout(E),E=null),null!=n.status&&null!=n.status.parentNode&&n.status.parentNode.removeChild(n.status),n.status=null)};n.pause=function(){return F};return n};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),f=this.editor.extractGraphModel(e.documentElement,!0);return null!=f&&0==f.getElementsByTagName("parsererror").length}catch(p){}return!1};
EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};
EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var f=
e.getFunction,p=this.editor.graph,n=this;e.getFunction=function(t){if(p.isSelectionEmpty()&&null!=n.pages&&0<n.pages.length){var z=n.getSelectedPageIndex();if(mxEvent.isShiftDown(t)){if(37==t.keyCode)return function(){0<z&&n.movePage(z,z-1)};if(38==t.keyCode)return function(){0<z&&n.movePage(z,0)};if(39==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,z+1)};if(40==t.keyCode)return function(){z<n.pages.length-1&&n.movePage(z,n.pages.length-1)}}else if(mxEvent.isControlDown(t)||mxClient.IS_MAC&&
@@ -13044,108 +13047,108 @@ arguments):null}}return e};var g=EditorUi.prototype.extractGraphModelFromHtml;Ed
e=null!=t?mxUtils.getXml(t):""}}catch(z){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,e){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",e);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var f=null!=c?this.editor.extractGraphModel(c,
!0):null;null!=f&&(c=f);if(null!=c){f=this.editor.graph;f.model.beginUpdate();try{var p=null!=this.pages?this.pages.slice():null,n=c.getElementsByTagName("diagram");if(1<n.length||1==n.length&&n[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var t=n.length-1;0<=t;t--){var z=this.updatePageRoot(new DiagramPage(n[t]));null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[t+1]));f.model.execute(new ChangePage(this,z,0==t?z:null,0))}}else null==this.fileNode&&
(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=p)for(t=0;t<p.length;t++)f.model.execute(new ChangePage(this,
-p[t],null));var F=this.getCurrentFile();null!=F&&F.fileReplaced(e)}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,p,n,t,z,F,C,E,R,U,O){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;R=null!=R?R:!Editor.defaultCompressed;var Q=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var m="_blank";else Q=m=p;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(R){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",
-mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());A.appendChild(c)}else{A=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(A);if(Graph.decompress(u)!=A)return A;A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());mxUtils.setTextContent(A,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(A)}E?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),
+p[t],null));var E=this.getCurrentFile();null!=E&&E.fileReplaced(e)}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,O){e=null!=e?e:this.editor.graph;n=null!=n?n:!1;C=null!=C?C:!0;R=null!=R?R:!Editor.defaultCompressed;var N=null;if(null==f||f.getMode()==App.MODE_DEVICE||f.getMode()==App.MODE_BROWSER)var m="_blank";else N=m=p;if(null==c)return"";var u=c;if("mxfile"!=u.nodeName.toLowerCase()){if(R){var A=c.ownerDocument.createElement("diagram");A.setAttribute("name",
+mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());A.appendChild(c)}else{A=Graph.zapGremlins(mxUtils.getXml(c));u=Graph.compress(A);if(Graph.decompress(u)!=A)return A;A=c.ownerDocument.createElement("diagram");A.setAttribute("name",mxResources.get("pageWithNumber",[1]));A.setAttribute("id",Editor.guid());mxUtils.setTextContent(A,u)}u=c.ownerDocument.createElement("mxfile");u.appendChild(A)}F?(u=u.cloneNode(!0),u.removeAttribute("modified"),u.removeAttribute("host"),u.removeAttribute("agent"),
u.removeAttribute("etag"),u.removeAttribute("userAgent"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("type")):(u.removeAttribute("userAgent"),u.removeAttribute("modified"),u.removeAttribute("version"),u.removeAttribute("editor"),u.removeAttribute("pages"),u.removeAttribute("type"),u.removeAttribute("etag"),mxClient.IS_CHROMEAPP?u.setAttribute("host","Chrome"):EditorUi.isElectronApp?u.setAttribute("host","Electron"):u.setAttribute("host",window.location.hostname),u.setAttribute("agent",
-null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=O&&(u=u.cloneNode(!0),u.setAttribute("border",O));c=R?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!t&&!n&&(z||null!=f&&/(\.html)$/i.test(f.getTitle())))c=this.getHtml2(mxUtils.getXml(u),e,null!=f?f.getTitle():null,m,Q);else if(t||
-!n&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(p=null),f=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,e,p,null,F,C,Q,null,null,f.scale,f.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,f,p){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.defaultCompressed;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var E=C.getElementsByTagName("mxGraphModel"),
-R=0<E.length?E[0]:null;E=C;null==R&&f?(R=mxUtils.getNodeValue(C),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(E=C.cloneNode(!1),E.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||f?E=C.cloneNode(!0):(E=C.cloneNode(!1),mxUtils.setTextContent(E,Graph.compressNode(R)));n.appendChild(E)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(n),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],
-z=t.node;if(t!=this.currentPage)if(t.needsUpdate){var F=new mxCodec(mxUtils.createXmlDocument());F=F.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,F,null,p);EditorUi.removeChildNodes(z);z.appendChild(F);delete t.needsUpdate}else p&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&
-(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&null!=t.viewState.backgroundImage.originalSrc&&(F=new mxCodec(mxUtils.createXmlDocument()),F=F.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,F,null,p),z=z.cloneNode(!1),z.appendChild(F)));c(z)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var f=[],p=0;p<c.length;p++){var n=c.charAt(p);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?
+null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),u.setAttribute("version",EditorUi.VERSION),1<u.getElementsByTagName("diagram").length&&null!=this.pages&&u.setAttribute("pages",this.pages.length));null!=U&&(u=u.cloneNode(!0),u.setAttribute("scale",U));null!=O&&(u=u.cloneNode(!0),u.setAttribute("border",O));c=R?mxUtils.getPrettyXml(u):mxUtils.getXml(u);if(!t&&!n&&(z||null!=f&&/(\.html)$/i.test(f.getTitle())))c=this.getHtml2(mxUtils.getXml(u),e,null!=f?f.getTitle():null,m,N);else if(t||
+!n&&null!=f&&/(\.svg)$/i.test(f.getTitle()))null==f||f.getMode()!=App.MODE_DEVICE&&f.getMode()!=App.MODE_BROWSER||(p=null),f=this.getSvgFileProperties(u),c=this.getEmbeddedSvg(c,e,p,null,E,C,N,null,null,f.scale,f.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=function(c,e,f,p){c=null!=c?c:!0;e=null!=e?e:!1;f=null!=f?f:!Editor.defaultCompressed;var n=this.editor.getGraphXml(c,p);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(C){var F=C.getElementsByTagName("mxGraphModel"),
+R=0<F.length?F[0]:null;F=C;null==R&&f?(R=mxUtils.getNodeValue(C),0<R.length&&(R=Graph.decompress(R),null!=R&&0<R.length&&(F=C.cloneNode(!1),F.appendChild(mxUtils.parseXml(R).documentElement)))):null==R||f?F=C.cloneNode(!0):(F=C.cloneNode(!1),mxUtils.setTextContent(F,Graph.compressNode(R)));n.appendChild(F)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(n),n=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var t=this.pages[e],
+z=t.node;if(t!=this.currentPage)if(t.needsUpdate){var E=new mxCodec(mxUtils.createXmlDocument());E=E.encode(new mxGraphModel(t.root));this.editor.graph.saveViewState(t.viewState,E,null,p);EditorUi.removeChildNodes(z);z.appendChild(E);delete t.needsUpdate}else p&&(this.updatePageRoot(t),null!=t.viewState.backgroundImage&&(null!=t.viewState.backgroundImage.originalSrc?t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.originalSrc,t):Graph.isPageLink(t.viewState.backgroundImage.src)&&
+(t.viewState.backgroundImage=this.createImageForPageLink(t.viewState.backgroundImage.src,t))),null!=t.viewState.backgroundImage&&null!=t.viewState.backgroundImage.originalSrc&&(E=new mxCodec(mxUtils.createXmlDocument()),E=E.encode(new mxGraphModel(t.root)),this.editor.graph.saveViewState(t.viewState,E,null,p),z=z.cloneNode(!1),z.appendChild(E)));c(z)}return n};EditorUi.prototype.anonymizeString=function(c,e){for(var f=[],p=0;p<c.length;p++){var n=c.charAt(p);0<=EditorUi.ignoredAnonymizedChars.indexOf(n)?
f.push(n):isNaN(parseInt(n))?n.toLowerCase()!=n?f.push(String.fromCharCode(65+Math.round(25*Math.random()))):n.toUpperCase()!=n?f.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(n)?f.push(" "):f.push("?"):f.push(e?"0":Math.round(9*Math.random()))}return f.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSERT].length;e++)try{var f=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][e].data).documentElement.cloneNode(!1);
-null!=f.getAttribute("name")&&f.setAttribute("name",this.anonymizeString(f.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(f)}catch(t){c[EditorUi.DIFF_INSERT][e].data=t.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var p in c[EditorUi.DIFF_UPDATE]){var n=c[EditorUi.DIFF_UPDATE][p];null!=n.name&&(n.name=this.anonymizeString(n.name));null!=n.cells&&(e=mxUtils.bind(this,function(t){var z=n.cells[t];if(null!=z){for(var F in z)null!=z[F].value&&(z[F].value="["+z[F].value.length+"]"),
-null!=z[F].xmlValue&&(z[F].xmlValue="["+z[F].xmlValue.length+"]"),null!=z[F].style&&(z[F].style="["+z[F].style.length+"]"),mxUtils.isEmptyObject(z[F])&&delete z[F];mxUtils.isEmptyObject(z)&&delete n.cells[t]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(n.cells)&&delete n.cells);mxUtils.isEmptyObject(n)&&delete c[EditorUi.DIFF_UPDATE][p]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,
+null!=f.getAttribute("name")&&f.setAttribute("name",this.anonymizeString(f.getAttribute("name")));c[EditorUi.DIFF_INSERT][e].data=mxUtils.getXml(f)}catch(t){c[EditorUi.DIFF_INSERT][e].data=t.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var p in c[EditorUi.DIFF_UPDATE]){var n=c[EditorUi.DIFF_UPDATE][p];null!=n.name&&(n.name=this.anonymizeString(n.name));null!=n.cells&&(e=mxUtils.bind(this,function(t){var z=n.cells[t];if(null!=z){for(var E in z)null!=z[E].value&&(z[E].value="["+z[E].value.length+"]"),
+null!=z[E].xmlValue&&(z[E].xmlValue="["+z[E].xmlValue.length+"]"),null!=z[E].style&&(z[E].style="["+z[E].style.length+"]"),mxUtils.isEmptyObject(z[E])&&delete z[E];mxUtils.isEmptyObject(z)&&delete n.cells[t]}}),e(EditorUi.DIFF_INSERT),e(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(n.cells)&&delete n.cells);mxUtils.isEmptyObject(n)&&delete c[EditorUi.DIFF_UPDATE][p]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,
e){if(null!=c.attributes)for(var f=0;f<c.attributes.length;f++)"as"!=c.attributes[f].name&&c.setAttribute(c.attributes[f].name,this.anonymizeString(c.attributes[f].value,e));if(null!=c.childNodes)for(f=0;f<c.childNodes.length;f++)this.anonymizeAttributes(c.childNodes[f],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");for(var f=0;f<e.length;f++)null!=e[f].getAttribute("value")&&e[f].setAttribute("value","["+e[f].getAttribute("value").length+"]"),null!=e[f].getAttribute("xmlValue")&&
e[f].setAttribute("xmlValue","["+e[f].getAttribute("xmlValue").length+"]"),null!=e[f].getAttribute("style")&&e[f].setAttribute("style","["+e[f].getAttribute("style").length+"]"),null!=e[f].parentNode&&"root"!=e[f].parentNode.nodeName&&null!=e[f].parentNode.parentNode&&(e[f].setAttribute("id",e[f].parentNode.getAttribute("id")),e[f].parentNode.parentNode.replaceChild(e[f],e[f].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?
this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(f){this.spinner.stop();e.handleFileError(f,!0)})):e.synchronizeFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),
-mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,p,n,t,z,F,C,E,R,U,O){n=null!=n?n:!0;t=null!=t?t:!1;E=null!=E?E:!Editor.defaultCompressed;var Q=this.editor.graph;if((e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var m=Q.getGlobalVariable;Q=this.createTemporaryGraph(Q.getStylesheet());Q.setBackgroundImage=this.editor.graph.setBackgroundImage;Q.background=this.editor.graph.background;var u=
-null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?Q.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&Q.setBackgroundImage(u.viewState.backgroundImage);Q.getGlobalVariable=function(A){return"page"==A&&null!=u?u.getName():"pagenumber"==A?1:m.apply(this,arguments)};document.body.appendChild(Q.container);null!=u&&Q.model.setRoot(u.root)}z=null!=z?z:this.getXmlFileData(n,t,E,R);C=null!=C?C:this.getCurrentFile();c=this.createFileData(z,Q,C,window.location.href,
-c,e,f,p,n,F,E,U,O);Q!=this.editor.graph&&Q.container.parentNode.removeChild(Q.container);return c};EditorUi.prototype.getHtml=function(c,e,f,p,n,t){t=null!=t?t:!0;var z=null,F=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(z.x/C-e.view.translate.x);C=Math.floor(z.y/C-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(F=EditorUi.drawHost+"/embed.js?s="+e));
+mxUtils.bind(this,function(f){e.handleFileError(f,!0)}))))};EditorUi.prototype.getFileData=function(c,e,f,p,n,t,z,E,C,F,R,U,O){n=null!=n?n:!0;t=null!=t?t:!1;F=null!=F?F:!Editor.defaultCompressed;var N=this.editor.graph;if((e||!c&&null!=C&&/(\.svg)$/i.test(C.getTitle()))&&null!=this.pages&&this.currentPage!=this.pages[0]){var m=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var u=
+null!=this.pages?this.pages[0]:null;null==u||this.currentPage==u?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=u.viewState&&null!=u.viewState&&N.setBackgroundImage(u.viewState.backgroundImage);N.getGlobalVariable=function(A){return"page"==A&&null!=u?u.getName():"pagenumber"==A?1:m.apply(this,arguments)};document.body.appendChild(N.container);null!=u&&N.model.setRoot(u.root)}z=null!=z?z:this.getXmlFileData(n,t,F,R);C=null!=C?C:this.getCurrentFile();c=this.createFileData(z,N,C,window.location.href,
+c,e,f,p,n,E,F,U,O);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,f,p,n,t){t=null!=t?t:!0;var z=null,E=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){z=t?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var C=e.view.scale;t=Math.floor(z.x/C-e.view.translate.x);C=Math.floor(z.y/C-e.view.translate.y);z=e.background;null==n&&(e=this.getBasenames().join(";"),0<e.length&&(E=EditorUi.drawHost+"/embed.js?s="+e));
c.setAttribute("x0",t);c.setAttribute("y0",C)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=p&&c.setAttribute("edit",p));null!=n&&(n=n.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";p=Graph.compress(c);Graph.decompress(p)!=c&&(p=encodeURIComponent(c));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=z&&z!=mxConstants.NONE?' style="background-color:'+z+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+p+"</div>\n</div>\n"+
-(null==n?'<script type="text/javascript" src="'+F+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,f,p,n){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
+(null==n?'<script type="text/javascript" src="'+E+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,f,p,n){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=n&&(n=n.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=f?"<title>"+mxUtils.htmlEntities(f)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+
n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>\n'+(null==n?'<script type="text/javascript" src="'+e+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,f=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(f)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[e],"cause",[f]),Error(mxResources.get("notADiagramFile")+" ("+f+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),
f={},0<c.length)){var p=this.getHashObject(),n=null;this.fileNode=e;this.pages=[];for(var t=0;t<c.length;t++){null==c[t].getAttribute("id")&&c[t].setAttribute("id",t);e=new DiagramPage(c[t]);null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[t+1]));this.pages.push(e);if(null==p.pageId&&null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]||null!=p.pageId&&e.getId()==p.pageId)n=e;if(null==f[e.getId()])f[e.getId()]=e;else throw Error(e.getId()+": Duplicate page ID");}this.currentPage=
null!=n?n:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),
-this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(t=0;t<z.length;t++)e[z[t]]=!0;var F=this.editor.graph.getModel(),C=F.getChildren(F.root);for(t=0;t<C.length;t++){var E=C[t];F.setVisible(E,e[E.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=
-e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!n),B=A+("xml"==c||"pdf"==c&&R?".drawio":"")+"."+c;
-if("xml"==c){var H=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,p,n,null,null,null,e);this.saveData(B,c,H,"text/xml")}else if("html"==c)H=this.getHtml2(this.getFileData(!0),this.editor.graph,A),this.saveData(B,c,H,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?B=A+".png":"jpeg"==c&&(B=A+".jpg"),this.saveRequest(B,c,mxUtils.bind(this,function(I,M){try{return this.createDownloadRequest(I,c,p,M,z,n,F,C,E,R,U,void 0,
-void 0,!t,O,Q,m,u)}catch(P){this.handleError(P)}}));else{var T=null,k=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==c){var v=this.editor.graph.background;if(z||v==mxConstants.NONE)v=null;var G=this.editor.graph.getSvg(v,null,null,null,null,p);f&&this.editor.graph.addSvgShadow(G);this.editor.convertImages(G,
-mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else B=A+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();k(I)}),p)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u,A,B){c=this.downloadRequestBuilder(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u,A,B);e="";for(var H in c)f=c[H],null!=f&&(e+=H+"="+encodeURIComponent(f)+
-"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u,A,B){var H=this.editor.graph,T=H.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var k=null,v=null,G=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||f.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};E=E?"1":"0";"pdf"==e&&(null!=R?(k=R.from,v=R.to):0==t&&(G=
-"1"));"xmlpng"==e&&(E="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){k=t;break}t=H.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;n={globalVars:H.getExportVariables()};C&&(n.grid={size:H.gridSize,steps:H.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:H.view.gridColor});Graph.translateDiagram&&
-(n.diagramLanguage=Graph.diagramLanguage);return{format:e,from:k,to:v,allPages:G,bg:null!=t?t:mxConstants.NONE,base64:p,embedXml:E,xml:f,filename:null!=c?c:"",extras:JSON.stringify(n),scale:z,border:F,pageMargin:m,w:U&&isFinite(U)?U:null,h:O&&isFinite(O)?O:null,crop:null!=Q&&Q?"1":"0",fit:null!=u&&u?"1":"0",sheetsAcross:A,sheetsDown:B}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));
+this.scrollToPage());if(null!=urlParams["layer-ids"])try{var z=decodeURIComponent(urlParams["layer-ids"]).split(" ");e={};for(t=0;t<z.length;t++)e[z[t]]=!0;var E=this.editor.graph.getModel(),C=E.getChildren(E.root);for(t=0;t<C.length;t++){var F=C[t];E.setVisible(F,e[F.id]||!1)}}catch(R){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=
+e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u){try{p=null!=p?p:this.editor.graph.isSelectionEmpty();var A=this.getBaseFilename(!n),B=A+("xml"==c||"pdf"==c&&R?".drawio":"")+"."+c;
+if("xml"==c){var H=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,p,n,null,null,null,e);this.saveData(B,c,H,"text/xml")}else if("html"==c)H=this.getHtml2(this.getFileData(!0),this.editor.graph,A),this.saveData(B,c,H,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==c?B=A+".png":"jpeg"==c&&(B=A+".jpg"),this.saveRequest(B,c,mxUtils.bind(this,function(I,M){try{return this.createDownloadRequest(I,c,p,M,z,n,E,C,F,R,U,void 0,
+void 0,!t,O,N,m,u)}catch(P){this.handleError(P)}}));else{var T=null,k=mxUtils.bind(this,function(I){I.length<=MAX_REQUEST_SIZE?this.saveData(B,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==c){var v=this.editor.graph.background;if(z||v==mxConstants.NONE)v=null;var G=this.editor.graph.getSvg(v,null,null,null,null,p);f&&this.editor.graph.addSvgShadow(G);this.editor.convertImages(G,
+mxUtils.bind(this,mxUtils.bind(this,function(I){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(I))})))}else B=A+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(I){this.spinner.stop();k(I)}),p)}}catch(I){this.handleError(I)}};EditorUi.prototype.createDownloadRequest=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u,A,B){c=this.downloadRequestBuilder(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u,A,B);e="";for(var H in c)f=c[H],null!=f&&(e+=H+"="+encodeURIComponent(f)+
+"&");return new mxXmlRequest(EXPORT_URL,e)};EditorUi.prototype.downloadRequestBuilder=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u,A,B){var H=this.editor.graph,T=H.getGraphBounds();f=this.getFileData(!0,null,null,null,f,0==t?!1:"xmlpng"!=e,null,null,null,!Editor.defaultCompressed,"pdf"==e);var k=null,v=null,G=null;if(!EditorUi.isElectronApp&&(T.width*T.height>MAX_AREA||f.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};F=F?"1":"0";"pdf"==e&&(null!=R?(k=R.from,v=R.to):0==t&&(G=
+"1"));"xmlpng"==e&&(F="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(t=0;t<this.pages.length;t++)if(this.pages[t]==this.currentPage){k=t;break}t=H.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!n?n||null!=t&&t!=mxConstants.NONE||(t="#ffffff"):t=mxConstants.NONE;n={globalVars:H.getExportVariables()};C&&(n.grid={size:H.gridSize,steps:H.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==e?mxGraphView.prototype.defaultGridColor:H.view.gridColor});Graph.translateDiagram&&
+(n.diagramLanguage=Graph.diagramLanguage);return{format:e,from:k,to:v,allPages:G,bg:null!=t?t:mxConstants.NONE,base64:p,embedXml:F,xml:f,filename:null!=c?c:"",extras:JSON.stringify(n),scale:z,border:E,pageMargin:m,w:U&&isFinite(U)?U:null,h:O&&isFinite(O)?O:null,crop:null!=N&&N?"1":"0",fit:null!=u&&u?"1":"0",sheetsAcross:A,sheetsDown:B}};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));
if(null!=c&&1<c.length){var e=c.indexOf("#");0<=e&&(c=c.substring(0,e))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,e={};if(null!=c&&0<c.length){var f=c.lastIndexOf("#");if(0<f){c=decodeURIComponent(c.substring(f+1));try{e=JSON.parse(c)}catch(p){}}}return e};EditorUi.prototype.updateHashObject=function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};
-EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var e=window.location.hash;if(null==e||""==e)e="#";var f=e.lastIndexOf("#");0<f&&(e=e.substring(0,f));try{null==c||mxUtils.isEmptyObject(c)||(e=e+"#"+encodeURIComponent(JSON.stringify(c)))}catch(p){}0<f&&0<e.lastIndexOf("#")?window.location.hash=e:window.location.replace(e)}};EditorUi.prototype.loadDescriptor=function(c,e,f){var p=window.location.hash,n=mxUtils.bind(this,function(z){var F=null!=c.data?c.data:"";null!=z&&0<z.length&&
-(0<F.length&&(F+="\n"),F+=z);z=new LocalFile(this,"csv"!=c.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return p};this.fileLoaded(z);"csv"==c.format&&this.importCsv(F,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=null!=c.interval?parseInt(c.interval):6E4,E=null,R=mxUtils.bind(this,function(){var O=this.currentPage;
-mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(Q){O===this.currentPage&&(200<=Q.getStatus()&&300>=Q.getStatus()?(this.updateDiagram(Q.getText()),U()):this.handleError({message:mxResources.get("error")+" "+Q.getStatus()}))}),mxUtils.bind(this,function(Q){this.handleError(Q)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(E);E=window.setTimeout(R,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();
+EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var e=window.location.hash;if(null==e||""==e)e="#";var f=e.lastIndexOf("#");0<f&&(e=e.substring(0,f));try{null==c||mxUtils.isEmptyObject(c)||(e=e+"#"+encodeURIComponent(JSON.stringify(c)))}catch(p){}0<f&&0<e.lastIndexOf("#")?window.location.hash=e:window.location.replace(e)}};EditorUi.prototype.loadDescriptor=function(c,e,f){var p=window.location.hash,n=mxUtils.bind(this,function(z){var E=null!=c.data?c.data:"";null!=z&&0<z.length&&
+(0<E.length&&(E+="\n"),E+=z);z=new LocalFile(this,"csv"!=c.format&&0<E.length?E:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return p};this.fileLoaded(z);"csv"==c.format&&this.importCsv(E,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var C=null!=c.interval?parseInt(c.interval):6E4,F=null,R=mxUtils.bind(this,function(){var O=this.currentPage;
+mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(N){O===this.currentPage&&(200<=N.getStatus()&&300>=N.getStatus()?(this.updateDiagram(N.getText()),U()):this.handleError({message:mxResources.get("error")+" "+N.getStatus()}))}),mxUtils.bind(this,function(N){this.handleError(N)}))}),U=mxUtils.bind(this,function(){window.clearTimeout(F);F=window.setTimeout(R,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){U();
R()}));U();R()}null!=e&&e()});if(null!=c.url&&0<c.url.length){var t=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(t,mxUtils.bind(this,function(z){n(z)}),mxUtils.bind(this,function(z){null!=f&&f(z)}))}else n("")};EditorUi.prototype.updateDiagram=function(c){function e(T){var k=new mxCellOverlay(T.image||n.warningImage,T.tooltip,T.align,T.valign,T.offset);k.addListener(mxEvent.CLICK,function(v,G){p.alert(T.tooltip)});return k}var f=null,p=this;if(null!=c&&0<c.length&&(f=mxUtils.parseXml(c),c=
-null!=f?f.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,t=n.getModel();t.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var F=t.getCell(c.getAttribute("id"));if(null!=F){try{var C=c.getAttribute("value");if(null!=C){var E=mxUtils.parseXml(C).documentElement;if(null!=E)if("1"==E.getAttribute("replace-value"))t.setValue(F,E);else for(var R=E.attributes,U=0;U<R.length;U++)n.setAttributeForCell(F,R[U].nodeName,0<R[U].nodeValue.length?
-R[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+F.id+": "+T)}try{var O=c.getAttribute("style");null!=O&&n.model.setStyle(F,O)}catch(T){null!=window.console&&console.log("Error in style for "+F.id+": "+T)}try{var Q=c.getAttribute("icon");if(null!=Q){var m=0<Q.length?JSON.parse(Q):null;null!=m&&m.append||n.removeCellOverlays(F);null!=m&&n.addCellOverlay(F,e(m))}}catch(T){null!=window.console&&console.log("Error in icon for "+F.id+": "+T)}try{var u=c.getAttribute("geometry");
-if(null!=u){u=JSON.parse(u);var A=n.getCellGeometry(F);if(null!=A){A=A.clone();for(key in u){var B=parseFloat(u[key]);"dx"==key?A.x+=B:"dy"==key?A.y+=B:"dw"==key?A.width+=B:"dh"==key?A.height+=B:A[key]=parseFloat(u[key])}n.model.setGeometry(F,A)}}}catch(T){null!=window.console&&console.log("Error in icon for "+F.id+": "+T)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,t)}else if("view"==
+null!=f?f.documentElement:null,null!=c&&"updates"==c.nodeName)){var n=this.editor.graph,t=n.getModel();t.beginUpdate();var z=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var E=t.getCell(c.getAttribute("id"));if(null!=E){try{var C=c.getAttribute("value");if(null!=C){var F=mxUtils.parseXml(C).documentElement;if(null!=F)if("1"==F.getAttribute("replace-value"))t.setValue(E,F);else for(var R=F.attributes,U=0;U<R.length;U++)n.setAttributeForCell(E,R[U].nodeName,0<R[U].nodeValue.length?
+R[U].nodeValue:null)}}catch(T){null!=window.console&&console.log("Error in value for "+E.id+": "+T)}try{var O=c.getAttribute("style");null!=O&&n.model.setStyle(E,O)}catch(T){null!=window.console&&console.log("Error in style for "+E.id+": "+T)}try{var N=c.getAttribute("icon");if(null!=N){var m=0<N.length?JSON.parse(N):null;null!=m&&m.append||n.removeCellOverlays(E);null!=m&&n.addCellOverlay(E,e(m))}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}try{var u=c.getAttribute("geometry");
+if(null!=u){u=JSON.parse(u);var A=n.getCellGeometry(E);if(null!=A){A=A.clone();for(key in u){var B=parseFloat(u[key]);"dx"==key?A.x+=B:"dy"==key?A.y+=B:"dw"==key?A.width+=B:"dh"==key?A.height+=B:A[key]=parseFloat(u[key])}n.model.setGeometry(E,A)}}}catch(T){null!=window.console&&console.log("Error in icon for "+E.id+": "+T)}}}else if("model"==c.nodeName){for(var H=c.firstChild;null!=H&&H.nodeType!=mxConstants.NODETYPE_ELEMENT;)H=H.nextSibling;null!=H&&(new mxCodec(c.firstChild)).decode(H,t)}else if("view"==
c.nodeName){if(c.hasAttribute("scale")&&(n.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))n.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(z=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{t.endUpdate()}null!=z&&this.chromelessResize&&this.chromelessResize(!0,z)}return f};EditorUi.prototype.getCopyFilename=function(c,e){var f=null!=
-c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var p=f.lastIndexOf(".");0<=p&&(c=f.substring(p),f=f.substring(0,p));if(e){e=f;var n=new Date;f=n.getFullYear();p=n.getMonth()+1;var t=n.getDate(),z=n.getHours(),F=n.getMinutes();n=n.getSeconds();f=e+(" "+(f+"-"+p+"-"+t+"-"+z+"-"+F+"-"+n))}return f=mxResources.get("copyOf",[f])+c};EditorUi.prototype.logIfModified=function(c,e){try{null!=c&&e&&EditorUi.debug("File.closed",[c])}catch(f){}};EditorUi.prototype.fileLoaded=function(c,e,f){var p=
+c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var p=f.lastIndexOf(".");0<=p&&(c=f.substring(p),f=f.substring(0,p));if(e){e=f;var n=new Date;f=n.getFullYear();p=n.getMonth()+1;var t=n.getDate(),z=n.getHours(),E=n.getMinutes();n=n.getSeconds();f=e+(" "+(f+"-"+p+"-"+t+"-"+z+"-"+E+"-"+n))}return f=mxResources.get("copyOf",[f])+c};EditorUi.prototype.logIfModified=function(c,e){try{null!=c&&e&&EditorUi.debug("File.closed",[c])}catch(f){}};EditorUi.prototype.fileLoaded=function(c,e,f){var p=
this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var n=!1;this.hideDialog();null!=p&&(p.removeListener(this.descriptorChangedListener),this.logIfModified(p,!0),p.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var t=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=p&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!e&&null!=
window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));this.editor.setStatus("");this.updateUi();e||this.showSplash()});if(null!=c)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(c);c.addListener("descriptorChanged",this.descriptorChangedListener);c.addListener("contentChanged",
this.descriptorChangedListener);c.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(c.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();c.isEditable()?c.isModified()?c.addUnsavedStatus():this.editor.setStatus(""):this.editor.setStatus('<div class="geStatusBox" title="'+mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</div>");!this.editor.isChromelessView()||
this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();null!=f&&f();this.editor.fireEvent(new mxEventObject("fileLoaded"));n=!0;if(!this.isOffline()&&null!=c.getMode()){var z="1"==urlParams.sketch?"sketch":uiTheme;if(null==z)z="default";else if("sketch"==z||"min"==z)z+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",
-[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=c)try{c.close()}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
-mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=p?this.fileLoaded(p)||t():t()});e?c():(null!=F.fallbackFileData&&(F.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var C=new LocalFile(this,F.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(C)})}),this.handleError(F,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else t();return n};EditorUi.prototype.getHashValueForPages=function(c,e){var f=
-0,p=new mxGraphModel,n=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var z=c[t].node.cloneNode(!1);z.removeAttribute("name");p.root=c[t].root;var F=n.encode(p);this.editor.graph.saveViewState(c[t].viewState,F,!0);F.removeAttribute("pageWidth");F.removeAttribute("pageHeight");z.appendChild(F);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,e.nodeCount+=z.getElementsByTagName("mxCell").length);f=(f<<5)-f+
-this.hashValue(z,function(C,E,R,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=E&&"y"!=E&&"width"!=E&&"height"!=E?U&&"mxCell"==C.nodeName&&"previous"==E?null:R:Math.round(R)},e)<<0}return f};EditorUi.prototype.hashValue=function(c,e,f){var p=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(p^=this.hashValue(c.nodeName,e,f));if(null!=c.attributes){null!=f&&(f.attrCount+=c.attributes.length);
+[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(E){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(E){}}catch(E){this.fileLoadedError=E;if(null!=c)try{c.close()}catch(C){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
+mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=p?this.fileLoaded(p)||t():t()});e?c():(null!=E.fallbackFileData&&(E.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var C=new LocalFile(this,E.fallbackFileData,this.defaultFilename,!0);this.fileLoaded(C)})}),this.handleError(E,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else t();return n};EditorUi.prototype.getHashValueForPages=function(c,e){var f=
+0,p=new mxGraphModel,n=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var t=0;t<c.length;t++){this.updatePageRoot(c[t]);var z=c[t].node.cloneNode(!1);z.removeAttribute("name");p.root=c[t].root;var E=n.encode(p);this.editor.graph.saveViewState(c[t].viewState,E,!0);E.removeAttribute("pageWidth");E.removeAttribute("pageHeight");z.appendChild(E);null!=e&&(e.eltCount+=z.getElementsByTagName("*").length,e.nodeCount+=z.getElementsByTagName("mxCell").length);f=(f<<5)-f+
+this.hashValue(z,function(C,F,R,U){return!U||"mxGeometry"!=C.nodeName&&"mxPoint"!=C.nodeName||"x"!=F&&"y"!=F&&"width"!=F&&"height"!=F?U&&"mxCell"==C.nodeName&&"previous"==F?null:R:Math.round(R)},e)<<0}return f};EditorUi.prototype.hashValue=function(c,e,f){var p=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(p^=this.hashValue(c.nodeName,e,f));if(null!=c.attributes){null!=f&&(f.attrCount+=c.attributes.length);
for(var n=0;n<c.attributes.length;n++){var t=c.attributes[n].name,z=null!=e?e(c,t,c.attributes[n].value,!0):c.attributes[n].value;null!=z&&(p^=this.hashValue(t,e,f)+this.hashValue(z,e,f))}}if(null!=c.childNodes)for(n=0;n<c.childNodes.length;n++)p=(p<<5)-p+this.hashValue(c.childNodes[n],e,f)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=f&&(f.byteCount+=c.length);for(n=0;n<c.length;n++)e=(e<<5)-e+c.charCodeAt(n)<<0;p^=e}return p};EditorUi.prototype.descriptorChanged=function(){};
EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,f,p,n,t,z){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};
EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var e=0;e<c.length;e++)null!=c[e].xml&&"<"!=c[e].xml.charAt(0)&&(c[e].xml=mxUtils.trim(Graph.decompress(c[e].xml)));e=mxUtils.createXmlDocument();var f=e.createElement("mxlibrary");mxUtils.setTextContent(f,JSON.stringify(c,null,2));e.appendChild(f);return mxUtils.getXml(e,"\n")};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),
".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var f=0;f<e.length;f++)e[f].parentNode.removeChild(e[f]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c,e){var f=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries||null!=c||!e){null==c&&(e=this.sidebar.palettes["L.scratchpad"],null==e&&(e=this.sidebar.palettes.search),null!=e&&(c=e[e.length-1].nextSibling));
c=null!=c?c:f.firstChild.nextSibling.nextSibling;e=f.lastChild;var p=e.previousSibling;f.insertBefore(e,c);f.insertBefore(p,e)}};EditorUi.prototype.loadLibrary=function(c,e){var f=mxUtils.parseXml(c.getData());if("mxlibrary"==f.documentElement.nodeName){var p=JSON.parse(mxUtils.getTextContent(f.documentElement));this.libraryLoaded(c,p,f.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=
function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,e,f,p){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var n=null;if(c.constructor!=StorageLibrary||".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var t=0;t<this.openLibraries.length;t++)if(this.openLibraries[t].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[t],
-this.openLibraries);break}n={file:c,images:e,title:f,expand:p};this.openLibraries.push(n)}else this.scratchpad=c;t=this.sidebar.palettes[c.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var z=null,F=mxUtils.bind(this,function(B,H){0==B.length&&c.isEditable()?(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),H.appendChild(z)):this.addLibraryEntries(B,H)});null!=this.sidebar&&null!=
-e&&this.sidebar.addEntries(e);null==f&&(f=c.getTitle(),null!=f&&/(\.xml)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),f,null!=p?p:!0,mxUtils.bind(this,function(B){F(e,B)}));null!=n&&(n.div=C);this.repositionLibrary(t,"L.scratchpad"!=c.getHash());p=C.parentNode.previousSibling;f=p.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=c.title&&p.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+f);var E=document.createElement("div");E.style.backgroundColor=
-"inherit";p.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)E.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,
-function(B){if(!mxEvent.isConsumed(B)){var H=mxUtils.bind(this,function(){null!=n&&mxUtils.remove(n,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(B)}}));if(c.isEditable()){var O=this.editor.graph,Q=null;f=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(B)});var m=mxUtils.bind(this,function(B){c.setModified(!0);
-c.isAutosave()?(null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q),Q=R.cloneNode(!1),Q.setAttribute("src",Editor.spinImage),Q.setAttribute("title",mxResources.get("saving")),Q.style.cursor="default",Q.style.marginRight="2px",Q.style.marginTop="-2px",E.insertBefore(Q,E.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=Q&&null!=Q.parentNode&&Q.parentNode.removeChild(Q)})):null==U&&(U=R.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),
-E.insertBefore(U,E.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(B,H,T,k){B=O.cloneCells(mxUtils.sortCells(O.model.getTopmostCells(B)));for(var v=0;v<B.length;v++){var G=O.getCellGeometry(B[v]);null!=G&&G.translate(-H.x,-H.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(B,
+this.openLibraries);break}n={file:c,images:e,title:f,expand:p};this.openLibraries.push(n)}else this.scratchpad=c;t=this.sidebar.palettes[c.getHash()];t=null!=t?t[t.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var z=null,E=mxUtils.bind(this,function(B,H){0==B.length&&c.isEditable()?(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),H.appendChild(z)):this.addLibraryEntries(B,H)});null!=this.sidebar&&null!=
+e&&this.sidebar.addEntries(e);null==f&&(f=c.getTitle(),null!=f&&/(\.xml)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf("."))));var C=this.sidebar.addPalette(c.getHash(),f,null!=p?p:!0,mxUtils.bind(this,function(B){E(e,B)}));null!=n&&(n.div=C);this.repositionLibrary(t,"L.scratchpad"!=c.getHash());p=C.parentNode.previousSibling;f=p.getAttribute("title");null!=f&&0<f.length&&".scratchpad"!=c.title&&p.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+f);var F=document.createElement("div");F.style.backgroundColor=
+"inherit";p.style.position="relative";var R=document.createElement("img");R.className="geAdaptiveAsset";R.setAttribute("src",Editor.crossImage);R.setAttribute("title",mxResources.get("close"));R.setAttribute("valign","absmiddle");R.setAttribute("border","0");R.style.position="relative";R.style.top="2px";R.style.width="14px";R.style.cursor="pointer";R.style.margin="0 3px";var U=null;if(".scratchpad"!=c.title||this.closableScratchpad)F.appendChild(R),mxEvent.addListener(R,"click",mxUtils.bind(this,
+function(B){if(!mxEvent.isConsumed(B)){var H=mxUtils.bind(this,function(){null!=n&&mxUtils.remove(n,this.openLibraries);this.closeLibrary(c)});null!=U?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(B)}}));if(c.isEditable()){var O=this.editor.graph,N=null;f=mxUtils.bind(this,function(B){this.showLibraryDialog(c.getTitle(),C,e,c,c.getMode());mxEvent.consume(B)});var m=mxUtils.bind(this,function(B){c.setModified(!0);
+c.isAutosave()?(null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N),N=R.cloneNode(!1),N.setAttribute("src",Editor.spinImage),N.setAttribute("title",mxResources.get("saving")),N.style.cursor="default",N.style.marginRight="2px",N.style.marginTop="-2px",F.insertBefore(N,F.firstChild),this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=N&&null!=N.parentNode&&N.parentNode.removeChild(N)})):null==U&&(U=R.cloneNode(!1),U.setAttribute("src",Editor.saveImage),U.setAttribute("title",mxResources.get("save")),
+F.insertBefore(U,F.firstChild),mxEvent.addListener(U,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==U||c.isModified()||(U.parentNode.removeChild(U),U=null)});mxEvent.consume(H)})))}),u=mxUtils.bind(this,function(B,H,T,k){B=O.cloneCells(mxUtils.sortCells(O.model.getTopmostCells(B)));for(var v=0;v<B.length;v++){var G=O.getCellGeometry(B[v]);null!=G&&G.translate(-H.x,-H.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(B,
H.width,H.height,k||"",!0,null,!1));B=mxUtils.getXml(this.editor.graph.encodeCells(B));Editor.defaultCompressed&&(B=Graph.compress(B));H={xml:B,w:H.width,h:H.height};null!=k&&(H.title=k);e.push(H);m(T);null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null)}),A=mxUtils.bind(this,function(B){if(O.isSelectionEmpty())O.getRubberband().isActive()?(O.getRubberband().execute(B),O.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),
mxResources.get("ok"));else{var H=O.getSelectionCells(),T=O.view.getBounds(H);if(null!=T&&0<T.width&&0<T.height){var k=O.view.scale;T.x/=k;T.y/=k;T.width/=k;T.height/=k;T.x-=O.view.translate.x;T.y-=O.view.translate.y;u(H,T)}else this.showError(mxResources.get("error"),mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(B)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler.first&&(O.graphHandler.suspend(),
null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="light-dark(#fefefe, #000000)",C.style.cursor="copy",O.panningManager.stop(),O.autoScroll=!1,mxEvent.consume(B))}),mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.panningManager&&null!=O.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,O.panningManager.stop(),O.graphHandler.reset(),O.isMouseDown=!1,O.autoScroll=!0,A(B),mxEvent.consume(B))}));mxEvent.addListener(C,
"mouseleave",mxUtils.bind(this,function(B){O.isMouseDown&&null!=O.graphHandler.first&&(O.graphHandler.resume(),null!=O.graphHandler.hint&&(O.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",O.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(B){C.style.backgroundColor="light-dark(#fefefe, #000000)";B.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()})),
mxEvent.addListener(C,"drop",mxUtils.bind(this,function(B){C.style.cursor="";C.style.backgroundColor="";0<B.dataTransfer.files.length&&this.importFiles(B.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,T,k,v,G,I,M,P,S){if(null!=H&&"image/"==T.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,G,I),H)],H[0].vertex=!0,u(H,new mxRectangle(0,0,G,I),B,mxEvent.isAltDown(B)?
-null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var V=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));F(Y,C);e=e.concat(Y);m(B);this.spinner.stop();V=!0}catch(fa){}else if("mxfile"==
+null:M.substring(0,M.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),z=null);else{var V=!1,W=mxUtils.bind(this,function(X,Z){null!=X&&"application/pdf"==Z&&(Z=Editor.extractGraphModelFromPdf(X),null!=Z&&0<Z.length&&(X=Z));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var Y=JSON.parse(mxUtils.getTextContent(X.documentElement));E(Y,C);e=e.concat(Y);m(B);this.spinner.stop();V=!0}catch(fa){}else if("mxfile"==
X.documentElement.nodeName)try{var ba=X.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){var ea=this.stringToCells(Editor.getDiagramNodeXml(ba[Y])),ca=this.editor.graph.getBoundingBoxFromGeometry(ea);null!=ca&&u(ea,new mxRectangle(0,0,ca.width,ca.height),B)}V=!0}catch(fa){null!=window.console&&console.log("error in drop handler:",fa)}V||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<e.length&&(z.parentNode.removeChild(z),
z=null)});null!=S&&null!=M&&EditorUi.isVisioFilename(M)?this.importVisio(S,function(X){W(X,"text/xml")},null,M):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,M)&&null!=S?this.isExternalDataComms()?this.parseFile(S,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?W(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),
-this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(H,T)}}));B.stopPropagation();B.preventDefault()})),mxEvent.addListener(C,"dragleave",function(B){C.style.cursor="";C.style.backgroundColor="";B.stopPropagation();B.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));E.insertBefore(R,E.firstChild);mxEvent.addListener(R,"click",f);f=R.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",
-mxResources.get("add"));E.insertBefore(f,E.firstChild);mxEvent.addListener(f,"click",A);".scratchpad"==c.title&&(this.addSelectionToScratchpad=A);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(f=this.createHelpIcon(EditorUi.scratchpadHelpLink),t=f.getElementsByTagName("img")[0],f.style.marginRight="1px",t.style.marginTop="-2px",t.style.opacity="",E.insertBefore(f,E.firstChild))}p.appendChild(E);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=
-function(c,e){for(var f=0;f<c.length;f++)try{var p=c[f],n=p.data;if(null!=n){n="data:"==n.substring(0,5)?this.convertDataUri(n):n;var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==p.aspect&&(t+="aspect=fixed;");t=t+"image="+n+";";null!=p.style&&(t+=p.style);e.appendChild(this.sidebar.createVertexTemplate(t,p.w,p.h,"",p.title||"",!1,null,!0))}else if(null!=p.xml){var z=this.stringToCells("<"==p.xml.charAt(0)?p.xml:Graph.decompress(p.xml)),F=0==z.length?mxResources.get("drawingEmpty"):
-null!=p.title?p.title:"";e.appendChild(this.sidebar.createVertexTemplateFromCells(z,p.w,p.h,F,!0,null,!0))}}catch(C){F=null!=C.message?mxResources.get("error")+": "+C.message:String(C),t=this.sidebar.createVertexTemplateFromCells(null,p.w,p.h,F,!0,null,!0),e.appendChild(t)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=
+this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):W(H,T)}}));B.stopPropagation();B.preventDefault()})),mxEvent.addListener(C,"dragleave",function(B){C.style.cursor="";C.style.backgroundColor="";B.stopPropagation();B.preventDefault()}));R=R.cloneNode(!1);R.setAttribute("src",Editor.editImage);R.setAttribute("title",mxResources.get("edit"));F.insertBefore(R,F.firstChild);mxEvent.addListener(R,"click",f);f=R.cloneNode(!1);f.setAttribute("src",Editor.plusImage);f.setAttribute("title",
+mxResources.get("add"));F.insertBefore(f,F.firstChild);mxEvent.addListener(f,"click",A);".scratchpad"==c.title&&(this.addSelectionToScratchpad=A);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(f=this.createHelpIcon(EditorUi.scratchpadHelpLink),t=f.getElementsByTagName("img")[0],f.style.marginRight="1px",t.style.marginTop="-2px",t.style.opacity="",F.insertBefore(f,F.firstChild))}p.appendChild(F);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=
+function(c,e){for(var f=0;f<c.length;f++)try{var p=c[f],n=p.data;if(null!=n){n="data:"==n.substring(0,5)?this.convertDataUri(n):n;var t="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==p.aspect&&(t+="aspect=fixed;");t=t+"image="+n+";";null!=p.style&&(t+=p.style);e.appendChild(this.sidebar.createVertexTemplate(t,p.w,p.h,"",p.title||"",!1,null,!0))}else if(null!=p.xml){var z=this.stringToCells("<"==p.xml.charAt(0)?p.xml:Graph.decompress(p.xml)),E=0==z.length?mxResources.get("drawingEmpty"):
+null!=p.title?p.title:"";e.appendChild(this.sidebar.createVertexTemplateFromCells(z,p.w,p.h,E,!0,null,!0))}}catch(C){E=null!=C.message?mxResources.get("error")+": "+C.message:String(C),t=this.sidebar.createVertexTemplateFromCells(null,p.w,p.h,E,!0,null,!0),e.appendChild(t)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=
function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=
-".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,f,p,n,t,z){c=new ImageDialog(this,c,e,f,p,n,t,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,f,p,n,t){var z=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=z?JSON.stringify(JSON.parse(z),null,2):"",mxUtils.bind(this,function(F){if(null!=F)try{if(null!=t&&
-t(F),F==z)this.hideDialog();else{if(0<F.length){var C=JSON.parse(F);localStorage.setItem(e,JSON.stringify(C))}else localStorage.removeItem(e);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(E){this.handleError(E)}}),null,mxResources.get("close"),null,null,null,!0,null,null,n,f,p);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,f,p){c=null!=c?c:mxUtils.bind(this,function(n,t,z,F){t||(n=new ChangePageSetup(this,
-p?z:null,n),n.ignoreColor=!p,null!=F&&p&&(n.shadowVisible=F),this.editor.graph.model.execute(n))});c=new BackgroundImageDialog(this,c,e,f,p);this.showDialog(c.container,400,p?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,f,p,n){c=new LibraryDialog(this,c,e,f,p,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
-function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(f){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,f,p,n,t,z){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,
-c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(O){}if(null!=C||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var E=mxResources.get("ok"),R=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(E=mxResources.get("cancel"),R=function(){F();C.retry()});if(404==C.code||404==C.status||403==C.code){z=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
+".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,e,f,p,n,t,z){c=new ImageDialog(this,c,e,f,p,n,t,z);this.showDialog(c.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,e,f,p,n,t){var z=localStorage.getItem(e);c=new TextareaDialog(this,c,null!=z?JSON.stringify(JSON.parse(z),null,2):"",mxUtils.bind(this,function(E){if(null!=E)try{if(null!=t&&
+t(E),E==z)this.hideDialog();else{if(0<E.length){var C=JSON.parse(E);localStorage.setItem(e,JSON.stringify(C))}else localStorage.removeItem(e);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(F){this.handleError(F)}}),null,mxResources.get("close"),null,null,null,!0,null,null,n,f,p);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e,f,p){c=null!=c?c:mxUtils.bind(this,function(n,t,z,E){t||(n=new ChangePageSetup(this,
+p?z:null,n),n.ignoreColor=!p,null!=E&&p&&(n.shadowVisible=E),this.editor.graph.model.execute(n))});c=new BackgroundImageDialog(this,c,e,f,p);this.showDialog(c.container,400,p?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,f,p,n){c=new LibraryDialog(this,c,e,f,p,n);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(t){t&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=
+function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(f){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.handleError=function(c,e,f,p,n,t,z){var E=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{z||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,
+c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!z||null==window.console||console.error("EditorUi.handleError:",c)}catch(O){}if(null!=C||null!=e){z=mxUtils.htmlEntities(mxResources.get("unknownError"),!1);var F=mxResources.get("ok"),R=null;e=null!=e?e:mxResources.get("error");if(null!=C){null!=C.retry&&(F=mxResources.get("cancel"),R=function(){E();C.retry()});if(404==C.code||404==C.status||403==C.code){z=403==C.code?null!=C.message?mxUtils.htmlEntities(C.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),
!1):null!=n?n:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var U=null!=n?null:null!=t?t:window.location.hash;if(null!=U&&("#G"==U.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==U.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||
-404==C.code||404==C.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=p&&p()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){A.innerText="";for(var B=0;B<Q.length;B++){var H=document.createElement("option");mxUtils.write(H,Q[B].displayName);H.value=B;A.appendChild(H);H=document.createElement("option");
-H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+Q[B].email+">");H.setAttribute("disabled","disabled");A.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=Q.length;A.appendChild(H)}var Q=this.drive.getUsersList(),m=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");m.appendChild(u);var A=document.createElement("select");A.style.width="100%";O();mxEvent.addListener(A,
-"change",mxUtils.bind(this,function(){var B=A.value,H=Q.length!=B;H&&this.drive.setUser(Q[B]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(Q=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));m.appendChild(A);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(m.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),
+404==C.code||404==C.status)){U="#U"==U.substring(0,2)?U.substring(45,U.lastIndexOf("%26ex")):U.substring(2);this.showError(e,z,mxResources.get("tryOpeningViaThisPage"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+U);null!=p&&p()}),R,mxResources.get("changeUser"),mxUtils.bind(this,function(){function O(){A.innerText="";for(var B=0;B<N.length;B++){var H=document.createElement("option");mxUtils.write(H,N[B].displayName);H.value=B;A.appendChild(H);H=document.createElement("option");
+H.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(H,"<"+N[B].email+">");H.setAttribute("disabled","disabled");A.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=N.length;A.appendChild(H)}var N=this.drive.getUsersList(),m=document.createElement("div"),u=document.createElement("div");u.style.marginBottom="6px";mxUtils.write(u,mxResources.get("changeUser")+": ");m.appendChild(u);var A=document.createElement("select");A.style.width="100%";O();mxEvent.addListener(A,
+"change",mxUtils.bind(this,function(){var B=A.value,H=N.length!=B;H&&this.drive.setUser(N[B]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(N=this.drive.getUsersList(),O())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));m.appendChild(A);m=new CustomDialog(this,m,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(m.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=f&&f()}),
520,150);return}}null!=C.message?z=""==C.message&&null!=C.name?mxUtils.htmlEntities(C.name,!1):mxUtils.htmlEntities(C.message,!1):null!=C.response&&null!=C.response.error?z=mxUtils.htmlEntities(C.response.error,!1):"undefined"!==typeof window.App&&(C.code==App.ERROR_TIMEOUT?z=mxUtils.htmlEntities(mxResources.get("timeout"),!1):C.code==App.ERROR_BUSY?z=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof C&&0<C.length&&(z=mxUtils.htmlEntities(C,!1)))}n=c=null;null!=C&&null!=C.helpLink?
-(c=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+C.ownerEmail+")",!1),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))})):null!=C&&null!=C.alternateAction&&(c=C.alternateAction.label,n=C.alternateAction.funct);this.showError(e,z,E,f,R,null,null,c,n,null,null,null,p?f:null)}else null!=f&&f()};EditorUi.prototype.alert=
-function(c,e,f){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,f||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,f,p,n,t){c=null!=c?c:"";var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},F=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&e()},function(){z();null!=f&&f()},p,n,null,null,null,null,F);this.showDialog(c.container,340,46+F,!0,t);c.init()};EditorUi.prototype.showBanner=
-function(c,e,f,p,n,t,z,F,C){var E=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){t=null!=t?t:"bottom:10px;left:50%;";z=null!=z?z:"translate(-50%,120%)";F=null!=F?F:"translate(-50%,0%)";var R=n?500:1E3;E=n?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var U=document.createElement("div");U.style.cssText="position:absolute;"+
-t+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+E;mxUtils.setPrefixedStyle(U.style,"transform",z);mxUtils.setPrefixedStyle(U.style,"transition","all "+R+"ms ease");U.className="geBtn gePrimaryBtn"+(n?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=C&&mxUtils.setPrefixedStyle(U.style,"transform-origin",C);if(!n){var O=document.createElement("img");O.setAttribute("src",IMAGE_PATH+"/logo.png");
+(c=mxResources.get("help"),n=mxUtils.bind(this,function(){return this.editor.graph.openLink(C.helpLink)})):null!=C&&null!=C.ownerEmail?(c=mxResources.get("contactOwner"),z+=mxUtils.htmlEntities(" ("+c+": "+C.ownerEmail+")",!1),n=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(C.ownerEmail))})):null!=C&&null!=C.alternateAction&&(c=C.alternateAction.label,n=C.alternateAction.funct);this.showError(e,z,F,f,R,null,null,c,n,null,null,null,p?f:null)}else null!=f&&f()};EditorUi.prototype.alert=
+function(c,e,f){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,f||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,e,f,p,n,t){c=null!=c?c:"";var z=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},E=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){z();null!=e&&e()},function(){z();null!=f&&f()},p,n,null,null,null,null,E);this.showDialog(c.container,340,46+E,!0,t);c.init()};EditorUi.prototype.showBanner=
+function(c,e,f,p,n,t,z,E,C){var F=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){t=null!=t?t:"bottom:10px;left:50%;";z=null!=z?z:"translate(-50%,120%)";E=null!=E?E:"translate(-50%,0%)";var R=n?500:1E3;F=n?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var U=document.createElement("div");U.style.cssText="position:absolute;"+
+t+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";"+F;mxUtils.setPrefixedStyle(U.style,"transform",z);mxUtils.setPrefixedStyle(U.style,"transition","all "+R+"ms ease");U.className="geBtn gePrimaryBtn"+(n?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(U.style,"box-shadow","1px 1px 2px 0px #ddd");null!=C&&mxUtils.setPrefixedStyle(U.style,"transform-origin",C);if(!n){var O=document.createElement("img");O.setAttribute("src",IMAGE_PATH+"/logo.png");
O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";U.appendChild(O);O=document.createElement("img");O.setAttribute("src",Dialog.prototype.closeImage);O.setAttribute("title",mxResources.get(p?"doNotShowAgain":"close"));O.setAttribute("border","0");O.style.cssText=(n?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";U.appendChild(O)}mxUtils.write(U,
-e);document.body.appendChild(U);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var Q=document.createElement("input");Q.setAttribute("type","checkbox");Q.setAttribute("id","geDoNotShowAgainCheckbox");Q.style.marginRight="6px";if(!p){e.appendChild(Q);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,
-mxResources.get("doNotShowAgain"));e.appendChild(m);U.style.paddingBottom=n?"16px":"30px";U.appendChild(e)}var u=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,Q.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=O&&mxEvent.addListener(O,"click",mxUtils.bind(this,function(B){mxEvent.consume(B);u()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,
-"transform",z);window.setTimeout(mxUtils.bind(this,function(){u()}),R)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(B){var H=mxEvent.getSource(B);H!=Q&&H!=m?(null!=f&&f(),u(),mxEvent.consume(B)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",F)}),R/2);window.setTimeout(A,n?4E3:3E4);E=!0}return E};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
+e);document.body.appendChild(U);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var N=document.createElement("input");N.setAttribute("type","checkbox");N.setAttribute("id","geDoNotShowAgainCheckbox");N.style.marginRight="6px";if(!p){e.appendChild(N);var m=document.createElement("label");m.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(m,
+mxResources.get("doNotShowAgain"));e.appendChild(m);U.style.paddingBottom=n?"16px":"30px";U.appendChild(e)}var u=mxUtils.bind(this,function(){null!=U.parentNode&&(U.parentNode.removeChild(U),this.bannerShowing=!1,N.checked||p)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=O&&mxEvent.addListener(O,"click",mxUtils.bind(this,function(B){mxEvent.consume(B);u()}));var A=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,
+"transform",z);window.setTimeout(mxUtils.bind(this,function(){u()}),R)});mxEvent.addListener(U,"click",mxUtils.bind(this,function(B){var H=mxEvent.getSource(B);H!=N&&H!=m?(null!=f&&f(),u(),mxEvent.consume(B)):A()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(U.style,"transform",E)}),R/2);window.setTimeout(A,n?4E3:3E4);F=!0}return F};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};
EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,f,p){c=c.toDataURL("image/"+f);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<p&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",p));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,f,p,n){var t="jpeg"==f?"jpg":f;p=this.getBaseFilename(p)+(null!=e?".drawio":
"")+"."+t;c=this.createImageDataUri(c,e,f,n);this.saveData(p,t,c.substring(c.lastIndexOf(",")+1),"image/"+f,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));
this.showDialog(c.container,620,460,!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,f,p,n,t){"text/xml"!=f||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=t?t:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=p?this.base64ToBlob(c,f):new Blob([c],{type:f}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)f=window.open("about:blank","_blank"),null==
-f?mxUtils.popup(c,!0):(f.document.write(c),f.document.close(),f.document.execCommand("SaveAs",!0,e),f.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==f||"image/"!=f.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,f,p);else{var z=document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var F=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
-t=65==(F?parseInt(F[2],10):!1)?!1:t}if(t||this.isOffline()){z.href=URL.createObjectURL(p?this.base64ToBlob(c,f):new Blob([c],{type:f}));t?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},2E4),z.click(),z.parentNode.removeChild(z)}catch(C){}}else this.createEchoRequest(c,e,f,p,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,f,p,n,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,
-c+(null!=f?"&mime="+f:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,f,p,n,t,z,F){t=null!=t?t:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(R,U,O,Q){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,p);else if(null!=f&&"text/html"==f.substring(0,9)){var m=new EmbedDialog(this,c);this.showDialog(m.container,
-450,240,!0,!0);m.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),u.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,R,f,p,null,F);else if(null!=R&&0<R.length){var A=mxUtils.bind(this,function(B){try{this.exportFile(c,R,f,p,U,B)}catch(H){this.handleError(H)}});null!=Q?A(Q):this.pickFolder(U,A)}}catch(B){this.handleError(B)}});n=[];t||n.push(App.MODE_BROWSER);z||n.push("_blank");
-var E=new SaveDialog(this,e,mxUtils.bind(this,function(R,U,O){C(R.value,U,R,O);this.hideDialog(null,null,E.container)}),n,c,f,p);this.showDialog(E.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));E.init()};EditorUi.prototype.openInNewWindow=function(c,e,f){var p=window.open("about:blank");if(null==p||null==p.document)mxUtils.popup(c,!0);else{var n="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var t=mxUtils.parseXml(c).documentElement.style.backgroundColor;
+f?mxUtils.popup(c,!0):(f.document.write(c),f.document.close(),f.document.execCommand("SaveAs",!0,e),f.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==f||"image/"!=f.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,f,p);else{var z=document.createElement("a");t=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof z.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var E=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
+t=65==(E?parseInt(E[2],10):!1)?!1:t}if(t||this.isOffline()){z.href=URL.createObjectURL(p?this.base64ToBlob(c,f):new Blob([c],{type:f}));t?z.download=e:z.setAttribute("target","_blank");document.body.appendChild(z);try{window.setTimeout(function(){URL.revokeObjectURL(z.href)},2E4),z.click(),z.parentNode.removeChild(z)}catch(C){}}else this.createEchoRequest(c,e,f,p,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,f,p,n,t){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,
+c+(null!=f?"&mime="+f:"")+(null!=n?"&format="+n:"")+(null!=t?"&base64="+t:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(p?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,e,f,p,n,t,z,E){t=null!=t?t:!1;z=null!=z?z:"vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);var C=mxUtils.bind(this,function(R,U,O,N){try{if("_blank"==U)if(null!=f&&"image/"==f.substring(0,6))this.openInNewWindow(c,f,p);else if(null!=f&&"text/html"==f.substring(0,9)){var m=new EmbedDialog(this,c);this.showDialog(m.container,
+450,240,!0,!0);m.init()}else{var u=window.open("about:blank");null==u?mxUtils.popup(c,!0):(u.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),u.document.close())}else if(U==App.MODE_DEVICE||"download"==U)this.doSaveLocalFile(c,R,f,p,null,E);else if(null!=R&&0<R.length){var A=mxUtils.bind(this,function(B){try{this.exportFile(c,R,f,p,U,B)}catch(H){this.handleError(H)}});null!=N?A(N):this.pickFolder(U,A)}}catch(B){this.handleError(B)}});n=[];t||n.push(App.MODE_BROWSER);z||n.push("_blank");
+var F=new SaveDialog(this,e,mxUtils.bind(this,function(R,U,O){C(R.value,U,R,O);this.hideDialog(null,null,F.container)}),n,c,f,p);this.showDialog(F.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));F.init()};EditorUi.prototype.openInNewWindow=function(c,e,f){var p=window.open("about:blank");if(null==p||null==p.document)mxUtils.popup(c,!0);else{var n="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==e){var t=mxUtils.parseXml(c).documentElement.style.backgroundColor;
""!=t&&(n="background: "+t+";")}n='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+n+'">';"image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||f?(t=f?c:btoa(unescape(encodeURIComponent(c))),p.document.write(n+'<img style="max-width:100%;" src="data:'+e+";base64,"+t+'"/></body></html>')):p.document.write(n+c+"</body></html>"):p.document.write(n+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");p.document.close()}};var d=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(p){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
@@ -13156,136 +13159,137 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(
"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var f=c(mxUtils.bind(this,function(p){var n=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",n);null!=this.exportDialog&&
(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)n.apply(this);else{this.exportDialog=document.createElement("div");var t=f.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width=
"50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,80);this.exportDialog.style.left=t.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";t=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=t.zIndex;var z=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",n);this.editor.exportToCanvas(mxUtils.bind(this,function(F){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(F,null,"png");F=document.createElement("img");F.style.maxWidth="140px";F.style.maxHeight="140px";
-F.style.cursor="pointer";F.style.backgroundColor="white";F.setAttribute("title",mxResources.get("openInNewWindow"));F.setAttribute("border","0");F.setAttribute("src",C);this.exportDialog.appendChild(F);mxEvent.addListener(F,"click",mxUtils.bind(this,function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);n.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(F){z.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null);this.handleError(F)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(p)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,f,p,n){this.isLocalFileSave()?this.saveLocalFile(f,c,p,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(t,z){return this.createEchoRequest(f,t,p,n,e,z)}),f,n,p)};EditorUi.prototype.saveRequest=function(c,e,f,p,n,t,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;var F=mxUtils.bind(this,
-function(E,R,U,O){if("_blank"==R||null!=E&&0<E.length){var Q=f("_blank"==R?null:E,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=Q&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?Q.simulate(document,"_blank"):(U=mxUtils.bind(this,function(m){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,E,t,!0,R,m)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&Q.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=Q.getStatus()&&299>=Q.getStatus())try{this.exportFile(Q.getText(),E,t,!0,R,m)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=O?U(O):this.pickFolder(R,U)))}});n=[App.MODE_BROWSER];z||n.push("_blank");var C=new SaveDialog(this,c,mxUtils.bind(this,function(E,R,U){F(E.value,R,E,U);this.hideDialog(null,null,C.container)}),n,null,"application/pdf");this.showDialog(C.container,
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});z.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",n);this.editor.exportToCanvas(mxUtils.bind(this,function(E){z.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var C=this.createImageDataUri(E,null,"png");E=document.createElement("img");E.style.maxWidth="140px";E.style.maxHeight="140px";
+E.style.cursor="pointer";E.style.backgroundColor="white";E.setAttribute("title",mxResources.get("openInNewWindow"));E.setAttribute("border","0");E.setAttribute("src",C);this.exportDialog.appendChild(E);mxEvent.addListener(E,"click",mxUtils.bind(this,function(){this.openInNewWindow(C.substring(C.indexOf(",")+1),"image/png",!0);n.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(E){z.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);this.handleError(E)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(p)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,f,p,n){this.isLocalFileSave()?this.saveLocalFile(f,c,p,n,e):this.saveRequest(c,e,mxUtils.bind(this,function(t,z){return this.createEchoRequest(f,t,p,n,e,z)}),f,n,p)};EditorUi.prototype.saveRequest=function(c,e,f,p,n,t,z){z=null!=z?z:!mxClient.IS_IOS||!navigator.standalone;var E=mxUtils.bind(this,
+function(F,R,U,O){if("_blank"==R||null!=F&&0<F.length){var N=f("_blank"==R?null:F,R==App.MODE_DEVICE||"download"==R||null==R||"_blank"==R?"0":"1");null!=N&&(R==App.MODE_DEVICE||"download"==R||"_blank"==R?N.simulate(document,"_blank"):(U=mxUtils.bind(this,function(m){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=p)try{this.exportFile(p,F,t,!0,R,m)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),F,t,!0,R,m)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(u){this.spinner.stop();this.handleError(u)}))}),null!=O?U(O):this.pickFolder(R,U)))}});n=[App.MODE_BROWSER];z||n.push("_blank");var C=new SaveDialog(this,c,mxUtils.bind(this,function(F,R,U){E(F.value,R,F,U);this.hideDialog(null,null,C.container)}),n,null,"application/pdf");this.showDialog(C.container,
420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));C.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,f,p,n,t){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,e,f){e(null)};EditorUi.prototype.exportSvg=function(c,e,f,p,n,t,
-z,F,C,E,R,U,O,Q){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(I){Editor.addRetryToError(I,mxUtils.bind(this,function(){this.exportSvg(c,e,f,p,n,t,z,F,C,E,R,U,O,Q)}));this.handleError(I)})))try{var m=this.editor.graph.isSelectionEmpty();f=null!=f?f:m;var u=e?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==e&&(u=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
-(this.editor.graph.addForeignObjectWarning=function(){});var B=this.editor.graph.createSvgImageExport(n),H=this.editor.graph.getSvg(u,c,z,F,null,f,null,B,"blank"==E?"_blank":"self"==E?"_top":null,null,!O,R,U);this.editor.graph.addForeignObjectWarning=A;p&&this.editor.graph.addSvgShadow(H);var T=this.getBaseFilename()+(n?".drawio":"")+".svg";Q=null!=Q?Q:mxUtils.bind(this,function(I){this.isLocalFileSave()||I.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(I)}))});var k=mxUtils.bind(this,function(I){this.spinner.stop();n&&I.setAttribute("content",this.getFileData(!0,null,null,null,f,C,null,null,null,null,null,c,z));Q(Graph.xmlDeclaration+"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(I))});this.editor.graph.mathEnabled&&this.editor.addMathCss(H);var v=mxUtils.bind(this,function(I){Editor.replaceSvgDataUris&&t&&EditorUi.embedSvgImages(I);Editor.foreignObjectImages&&
-O?this.replaceAlternateContent(I,R,k):k(I)}),G=mxUtils.bind(this,function(I){t&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(I,v,this.thumbImageCache)):v(I)});O?this.embedFonts(H,G):(this.editor.addFontCss(H),G(H))}catch(I){this.handleError(I)}};EditorUi.prototype.replaceAlternateContent=function(c,e,f){function p(U,O,Q,m,u){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",O);A.setAttribute("y",
-Q+.5);A.setAttribute("width",m.width);A.setAttribute("height",m.height);null==A.setAttributeNS?A.setAttribute("xlink:href",u):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(A,U.lastChild);F()}function n(){if(z<R.length)R[z++](n)}var t="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)t+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var F=mxUtils.bind(this,function(){counter--;0==counter&&f(c)}),C={},E={},R=[];for(z=0;z<e.length;z++)mxUtils.bind(this,
-function(U){var O=U.getElementsByTagName("div");if(0<O.length)try{var Q=O[0].cloneNode(!0),m=parseInt(Q.style.marginLeft),u=parseInt(Q.style.paddingTop),A=Q.getElementsByTagName("div")[1],B=O=!1,H=Q.style.alignItems,T=Q.style.justifyContent;if(null!=Q.style.writingMode){var k=Q.style.writingMode;B="vertical-"==k.substring(0,9);O="-rl"==k.substring(k.length-3)}var v=!B&&"1px"==Q.style.width||B&&"1px"==Q.style.height;if(!B&&"1px"==Q.style.height||B&&"1px"==Q.style.width)Q.style.alignItems=B&&O?"unsafe flex-end":
-"unsafe flex-start";v&&(Q.style.justifyContent="unsafe flex-start");Q.style.paddingTop="";Q.style.marginLeft="";var G=Q.outerHTML,I=C[G];null==I&&(Q.style.position="absolute",Q.style.visibility="hidden",document.body.appendChild(Q),k=1,k="1px"==Q.style.width?A.offsetWidth:parseInt(Q.style.width),v=1,v="1px"==Q.style.height?A.offsetHeight:parseInt(Q.style.height),document.body.removeChild(Q),I=new mxRectangle(m,u,k,v),C[G]=I);"1px"==Q.style.height&&("unsafe center"==H?u-=I.height/2:"unsafe flex-end"==
-H&&(u-=I.height));if("1px"==Q.style.width)if(!B&&"unsafe center"==T||B&&"unsafe center"==H)m-=I.width/2;else if(!B&&"unsafe flex-end"==T||B&&(!O&&"unsafe flex-end"==H||O&&"unsafe flex-start"==H))m-=I.width;I=new mxRectangle(m,u,I.width,I.height+parseInt(A.style.fontSize)/4);R.push(mxUtils.bind(this,function(M){var P=E[G];null==P?Graph.htmlToPng(G,I.width,I.height,mxUtils.bind(this,function(S){p(U,m,u,I,S);E[G]=S;M()}),t):(p(U,m,u,I,P),M())}))}catch(M){F()}else F()})(e[z]);0==counter&&f(c);z=0;n()};
-EditorUi.prototype.addRadiobox=function(c,e,f,p,n,t,z){return this.addCheckbox(c,f,p,n,t,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,p,n,t,z,F){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();C.id=z;null!=F&&C.setAttribute("name",F);f&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);p&&C.setAttribute("disabled","disabled");t&&(c.appendChild(C),f=document.createElement("label"),
+z,E,C,F,R,U,O,N){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(I){Editor.addRetryToError(I,mxUtils.bind(this,function(){this.exportSvg(c,e,f,p,n,t,z,E,C,F,R,U,O,N)}));this.handleError(I)})))try{var m=this.editor.graph.isSelectionEmpty();f=null!=f?f:m;var u=e?null:this.editor.graph.background;u==mxConstants.NONE&&(u=null);null==u&&0==e&&(u=this.editor.graph.shapeBackgroundColor);var A=this.editor.graph.addForeignObjectWarning;Editor.foreignObjectImages&&
+(this.editor.graph.addForeignObjectWarning=function(){});var B=this.editor.graph.createSvgImageExport(n),H=this.editor.graph.getSvg(u,c,z,E,null,f,null,B,"blank"==F?"_blank":"self"==F?"_top":null,null,!O,R,U);this.editor.graph.addForeignObjectWarning=A;p&&this.editor.graph.addSvgShadow(H);var T=this.getBaseFilename()+(n?".drawio":"")+".svg";N=null!=N?N:mxUtils.bind(this,function(I){this.isLocalFileSave()||I.length<=MAX_REQUEST_SIZE?this.saveData(T,"svg",I,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(I)}))});var k=mxUtils.bind(this,function(I){this.spinner.stop();n&&I.setAttribute("content",this.getFileData(!0,null,null,null,f,C,null,null,null,null,null,c,z));N(Graph.xmlDeclaration+"\n"+(n?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(I))});this.editor.graph.mathEnabled&&this.editor.addMathCss(H);var v=mxUtils.bind(this,function(I){Editor.replaceSvgDataUris&&t&&EditorUi.embedSvgImages(I);Editor.foreignObjectImages&&
+O?this.replaceAlternateContent(I,R,k):k(I)}),G=mxUtils.bind(this,function(I){t&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(I,v,this.thumbImageCache)):v(I)});O?this.embedFonts(H,G):(this.editor.addFontCss(H),G(H))}catch(I){this.handleError(I)}};EditorUi.prototype.replaceAlternateContent=function(c,e,f){function p(U,O,N,m,u){var A=mxUtils.createElementNs(c.ownerDocument,mxConstants.NS_SVG,"image");A.setAttribute("x",O);A.setAttribute("y",
+N+.5);A.setAttribute("width",m.width);A.setAttribute("height",m.height);null==A.setAttributeNS?A.setAttribute("xlink:href",u):A.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",u);U.replaceChild(A,U.lastChild);E()}function n(){if(z<R.length)R[z++](n)}var t="";e=c.getElementsByTagName("style");for(var z=0;z<e.length;z++)t+=e[z].innerHTML;e=c.getElementsByTagName("switch");counter=e.length;var E=mxUtils.bind(this,function(){counter--;0==counter&&f(c)}),C={},F={},R=[];for(z=0;z<e.length;z++)mxUtils.bind(this,
+function(U){var O=U.getElementsByTagName("div");if(0<O.length)try{var N=O[0].cloneNode(!0),m=parseInt(N.style.marginLeft),u=parseInt(N.style.paddingTop),A=N.getElementsByTagName("div")[1],B=O=!1,H=N.style.alignItems,T=N.style.justifyContent;if(null!=N.style.writingMode){var k=N.style.writingMode;B="vertical-"==k.substring(0,9);O="-rl"==k.substring(k.length-3)}var v=!B&&"1px"==N.style.width||B&&"1px"==N.style.height;if(!B&&"1px"==N.style.height||B&&"1px"==N.style.width)N.style.alignItems=B&&O?"unsafe flex-end":
+"unsafe flex-start";v&&(N.style.justifyContent="unsafe flex-start");N.style.paddingTop="";N.style.marginLeft="";var G=N.outerHTML,I=C[G];null==I&&(N.style.position="absolute",N.style.visibility="hidden",document.body.appendChild(N),k=1,k="1px"==N.style.width?A.offsetWidth:parseInt(N.style.width),v=1,v="1px"==N.style.height?A.offsetHeight:parseInt(N.style.height),document.body.removeChild(N),I=new mxRectangle(m,u,k,v),C[G]=I);"1px"==N.style.height&&("unsafe center"==H?u-=I.height/2:"unsafe flex-end"==
+H&&(u-=I.height));if("1px"==N.style.width)if(!B&&"unsafe center"==T||B&&"unsafe center"==H)m-=I.width/2;else if(!B&&"unsafe flex-end"==T||B&&(!O&&"unsafe flex-end"==H||O&&"unsafe flex-start"==H))m-=I.width;I=new mxRectangle(m,u,I.width,I.height+parseInt(A.style.fontSize)/4);R.push(mxUtils.bind(this,function(M){var P=F[G];null==P?Graph.htmlToPng(G,I.width,I.height,mxUtils.bind(this,function(S){p(U,m,u,I,S);F[G]=S;M()}),t):(p(U,m,u,I,P),M())}))}catch(M){E()}else E()})(e[z]);0==counter&&f(c);z=0;n()};
+EditorUi.prototype.addRadiobox=function(c,e,f,p,n,t,z){return this.addCheckbox(c,f,p,n,t,z,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;var C=document.createElement("input");C.style.marginRight="8px";C.style.marginTop="16px";C.setAttribute("type",z?"radio":"checkbox");z="geCheckbox-"+Editor.guid();C.id=z;null!=E&&C.setAttribute("name",E);f&&(C.setAttribute("checked","checked"),C.defaultChecked=!0);p&&C.setAttribute("disabled","disabled");t&&(c.appendChild(C),f=document.createElement("label"),
mxUtils.write(f,e),f.setAttribute("for",z),c.appendChild(f),n||mxUtils.br(c));return C};EditorUi.prototype.addEditButton=function(c,e){var f=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);f.style.marginLeft="24px";var p=this.getCurrentFile(),n="";null!=p&&p.getMode()!=App.MODE_DEVICE&&p.getMode()!=App.MODE_BROWSER&&(n=window.location.href);var t=document.createElement("select");t.style.maxWidth="200px";t.style.width="auto";t.style.marginLeft="8px";t.style.marginRight="10px";t.className=
-"geBtn";p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("makeCopy"));t.appendChild(p);var z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");t.appendChild(z);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var F=new FilenameDialog(this,n,mxResources.get("ok"),function(C){null!=C?(n=C,z.setAttribute("title",C)):(t.value="blank",z.removeAttribute("title"))},
-mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return f.checked?"blank"===t.value?"_blank":n:null},getEditInput:function(){return f},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function f(){var F=
-document.createElement("div");F.style.width="100%";F.style.height="100%";F.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(F.style.border="1px solid black",F.style.backgroundColor=t):(F.style.backgroundPosition="center center",F.style.backgroundRepeat="no-repeat",F.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(F)}mxUtils.write(c,mxResources.get("links")+":");var p=document.createElement("select");p.style.width="100px";p.style.padding="0px";
+"geBtn";p=document.createElement("option");p.setAttribute("value","blank");mxUtils.write(p,mxResources.get("makeCopy"));t.appendChild(p);var z=document.createElement("option");z.setAttribute("value","custom");mxUtils.write(z,mxResources.get("custom")+"...");t.appendChild(z);c.appendChild(t);mxEvent.addListener(t,"change",mxUtils.bind(this,function(){if("custom"==t.value){var E=new FilenameDialog(this,n,mxResources.get("ok"),function(C){null!=C?(n=C,z.setAttribute("title",C)):(t.value="blank",z.removeAttribute("title"))},
+mxResources.get("url"),null,null,null,null,function(){t.value="blank"});this.showDialog(E.container,300,80,!0,!1);E.init()}}));mxEvent.addListener(f,"change",mxUtils.bind(this,function(){f.checked&&(null==e||e.checked)?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return f.checked?"blank"===t.value?"_blank":n:null},getEditInput:function(){return f},getEditSelect:function(){return t}}};EditorUi.prototype.addLinkSection=function(c,e){function f(){var E=
+document.createElement("div");E.style.width="100%";E.style.height="100%";E.style.boxSizing="border-box";null!=t&&t!=mxConstants.NONE?(E.style.border="1px solid black",E.style.backgroundColor=t):(E.style.backgroundPosition="center center",E.style.backgroundRepeat="no-repeat",E.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");z.innerText="";z.appendChild(E)}mxUtils.write(c,mxResources.get("links")+":");var p=document.createElement("select");p.style.width="100px";p.style.padding="0px";
p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";var n=document.createElement("option");n.setAttribute("value","auto");mxUtils.write(n,mxResources.get("automatic"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","blank");mxUtils.write(n,mxResources.get("openInNewWindow"));p.appendChild(n);n=document.createElement("option");n.setAttribute("value","self");mxUtils.write(n,mxResources.get("openInThisWindow"));p.appendChild(n);e&&(e=document.createElement("option"),
-e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),p.appendChild(e));c.appendChild(p);mxUtils.write(c,mxResources.get("borderColor")+":");var t="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(F){this.pickColor(t||"none",function(C){t=C;f()});mxEvent.consume(F)}));f();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";
+e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),p.appendChild(e));c.appendChild(p);mxUtils.write(c,mxResources.get("borderColor")+":");var t="#0000ff",z=null;z=mxUtils.button("",mxUtils.bind(this,function(E){this.pickColor(t||"none",function(C){t=C;f()});mxEvent.consume(E)}));f();z.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";z.style.marginLeft="4px";z.style.height="22px";z.style.width="22px";z.style.position="relative";
z.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";z.className="geColorBtn";c.appendChild(z);mxUtils.br(c);return{getColor:function(){return t},getTarget:function(){return p.value},focus:function(){p.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,f,p,n,t){t=null!=t?t:[];f&&(t.push("lightbox=1"),"auto"!=c&&t.push("target="+c),null!=e&&e!=mxConstants.NONE&&t.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&t.push("edit="+encodeURIComponent(p)),
-n&&t.push("layers=1"),this.editor.graph.foldingEnabled&&t.push("nav=1"));return t};EditorUi.prototype.createLink=function(c,e,f,p,n,t,z,F,C,E,R){var U=this.getCurrentFile();C=this.createUrlParameters(c,e,p,n,t,C);c=!0;null!=z?f="#U"+encodeURIComponent(z):F||null==U||""==U.getHash()?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+U.getHash(),c=!1);c&&null!=U&&null!=U.getTitle()&&U.getTitle()!=
-this.defaultFilename&&C.push("title="+encodeURIComponent(U.getTitle()));E&&1<f.length&&(C.push("open="+f.substring(1)),f="");R&&null!=this.currentPage&&C.push("page-id="+this.currentPage.getId());return(p&&(null!=z||null!=U&&U.getMode()!=App.MODE_GITHUB&&U.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<C.length?"?"+C.join("&"):"")+f};EditorUi.prototype.createHtml=
-function(c,e,f,p,n,t,z,F,C,E,R,U,O){this.getBasenames();var Q={};""!=n&&n!=mxConstants.NONE&&(Q.highlight=n);"auto"!==p&&(Q.target=p);E||(Q.lightbox=!1);Q.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(Q.zoom=f/100);f=[];z&&(f.push("pages"),Q.resize=!0,null!=this.pages&&null!=this.currentPage&&(Q.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),Q.resize=!0);F&&f.push("layers");C&&f.push("tags");null!=O&&(Q["dark-mode"]=O);0<f.length&&(E&&f.push("lightbox"),
-Q.toolbar=f.join(" "));null!=R&&0<R.length&&(Q.edit=R);null!=c?Q.url=c:Q.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(Q))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?
-"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,f,p){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(t);var z=document.createElement("div");z.style.cssText=
-"border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var F=document.createElement("input");F.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";F.setAttribute("value","url");F.setAttribute("type","radio");F.setAttribute("name","type-embedhtmldialog");t=F.cloneNode(!0);t.setAttribute("value","copy");z.appendChild(t);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));z.appendChild(C);mxUtils.br(z);z.appendChild(F);C=
-document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));z.appendChild(C);var E=this.getCurrentFile();null==f&&null!=E&&E.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),z.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(E.getId(),E)})));t.setAttribute("checked","checked");null==
-f&&F.setAttribute("disabled","disabled");n.appendChild(z);z=380;var R=this.addLinkSection(n),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value",
-"auto");mxUtils.write(C,mxResources.get("automatic"));C.setAttribute("selected","selected");U.appendChild(C);C.setAttribute("selected","selected");mxUtils.write(n,mxResources.get("appearance")+":");n.appendChild(U);mxUtils.br(n);z+=26;var O=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value="100%";n.appendChild(Q);
-var m=this.addCheckbox(n,mxResources.get("fit"),!0);C=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(n,mxResources.get("allPages"),C,!C),A=this.addCheckbox(n,mxResources.get("layers"),!0),B=this.addCheckbox(n,mxResources.get("tags"),!0),H=this.addCheckbox(n,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(n,H);var k=T.getEditInput();k.style.marginBottom="16px";z+=50;mxEvent.addListener(H,"change",function(){H.checked?k.removeAttribute("disabled"):
-k.setAttribute("disabled","disabled");k.checked&&H.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,function(){p(F.checked?f:null,O.checked,Q.value,R.getTarget(),R.getColor(),m.checked,u.checked,A.checked,B.checked,H.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);t.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,f,p,n,
-t,z,F,C){var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=document.createElement("h3");mxUtils.write(R,c||mxResources.get("publish"));R.style.width="100%";R.style.textAlign="center";R.style.marginTop="2px";R.style.marginBottom="20px";E.appendChild(R);var U=document.createElement("select");c=30;U.className="geBtn";U.style.marginBottom="8px";U.style.marginLeft="0px";U.style.width="100%";U.style.boxSizing="border-box";if(null==F||""==F.getHash())n=null!=n?n:"https://www.drawio.com/doc/faq/publish-diagram-as-link",
-R=document.createElement("option"),mxUtils.write(R,mxResources.get("makeCopy")),R.setAttribute("value","copy"),U.appendChild(R);R=document.createElement("option");mxUtils.write(R,mxResources.get("authorizationRequired"));R.setAttribute("value","auth");U.appendChild(R);null!=F&&""!=F.getHash()||R.setAttribute("disabled","disabled");F=document.createElement("option");F.setAttribute("value","public");U.appendChild(F);null!=z?(mxUtils.write(F,mxResources.get("publicDiagramUrl")),F.setAttribute("title",
-z),U.value="public"):(mxUtils.write(F,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),F.setAttribute("disabled","disabled"));E.appendChild(U);mxUtils.br(E);U.focus();var O=null,Q=null;if(null!=e||null!=f)c+=30,mxUtils.write(E,mxResources.get("width")+":"),O=document.createElement("input"),O.setAttribute("type","text"),O.style.marginRight="16px",O.style.width="50px",O.style.marginLeft="6px",O.style.marginRight="16px",O.style.marginBottom="10px",O.value="100%",E.appendChild(O),
-mxUtils.write(E,mxResources.get("height")+":"),Q=document.createElement("input"),Q.setAttribute("type","text"),Q.style.width="50px",Q.style.marginLeft="6px",Q.style.marginBottom="10px",Q.value=f+"px",E.appendChild(Q),mxUtils.br(E);var m=this.addLinkSection(E,p),u=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),u=this.addCheckbox(E,mxResources.get("selectedPage")+
-": "+e));var A=this.addCheckbox(E,mxResources.get("lightbox"),!0,null,null,!p),B=this.addEditButton(E,A),H=B.getEditInput();p&&(H.style.marginLeft=A.style.marginLeft,A.style.display="none",c-=20);var T=this.addCheckbox(E,mxResources.get("layers"),!0);T.style.marginLeft=H.style.marginLeft;T.style.marginTop="8px";var k=this.addCheckbox(E,mxResources.get("tags"),!0);k.style.marginLeft=H.style.marginLeft;k.style.marginBottom="16px";k.style.marginTop="16px";mxEvent.addListener(A,"change",function(){A.checked?
-(T.removeAttribute("disabled"),H.removeAttribute("disabled"),k.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),k.setAttribute("disabled","disabled"));H.checked&&A.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});p=new CustomDialog(this,E,mxUtils.bind(this,function(){C(m.getTarget(),m.getColor(),null==u?!1:u.checked,A.checked,B.getLink(),T.checked,null!=O?O.value:null,null!=Q?Q.value:
-null,k.checked,U.value)}),null,mxResources.get("create"),n,t);this.showDialog(p.container,340,296+c,!0,!0);null!=O?(O.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?O.select():document.execCommand("selectAll",!1,null)):null==U.parentNode;m.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+
-(n?"10":"4")+"px";t.appendChild(z);if(n){mxUtils.write(t,mxResources.get("zoom")+":");var F=document.createElement("input");F.setAttribute("type","text");F.style.marginRight="16px";F.style.width="60px";F.style.marginLeft="4px";F.style.marginRight="12px";F.value=this.lastExportZoom||"100%";t.appendChild(F);mxUtils.write(t,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=
-this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var E=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);z=this.editor.graph;var U=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=U&&(U.style.marginBottom="16px");c=new CustomDialog(this,t,mxUtils.bind(this,function(){var O=
-parseInt(F.value)/100||1,Q=parseInt(C.value)||0;f(!E.checked,null!=R?R.checked:!1,null!=U?U.checked:!1,O,Q)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,f,p,n,t,z,F,C){z=null!=z?z:Editor.defaultIncludeDiagram;var E=document.createElement("div");E.style.whiteSpace="nowrap";var R=this.editor.graph,U="jpeg"==F||"webp"==F?220:320,O=document.createElement("h3");mxUtils.write(O,c);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
-E.appendChild(O);mxUtils.write(E,mxResources.get("zoom")+":");var Q=document.createElement("input");Q.setAttribute("type","text");Q.style.marginRight="16px";Q.style.width="60px";Q.style.marginLeft="4px";Q.style.marginRight="12px";Q.value=this.lastExportZoom||"100%";E.appendChild(Q);mxUtils.write(E,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||
-"0";E.appendChild(m);mxUtils.br(E);var u=this.addCheckbox(E,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(O=0;O<c.length;O++)if(!R.isSelectionEmpty()||"selectionOnly"!=c[O]){var H=
-document.createElement("option");mxUtils.write(H,mxResources.get(c[O]));H.setAttribute("value",c[O]);B.appendChild(H)}C?(mxUtils.write(E,mxResources.get("size")+":"),E.appendChild(B),mxUtils.br(E),U+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):t&&(E.appendChild(A),mxUtils.write(E,mxResources.get("crop")),mxUtils.br(E),U+=30,mxEvent.addListener(u,"change",function(){u.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?
-C&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(B.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(E,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=F&&"webp"!=F),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";t=document.createElement("option");
-t.setAttribute("value","light");mxUtils.write(t,mxResources.get("light"));k.appendChild(t);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));k.appendChild(C);"svg"==F?(t=document.createElement("option"),t.setAttribute("value","auto"),mxUtils.write(t,mxResources.get("automatic")),t.setAttribute("selected","selected"),k.appendChild(t)):Editor.isDarkMode()?C.setAttribute("selected","selected"):t.setAttribute("selected","selected");mxUtils.write(E,
-mxResources.get("appearance")+":");E.appendChild(k);mxUtils.br(E);U+=26;var v=this.addCheckbox(E,mxResources.get("shadow"),R.shadowVisible),G=null;if("png"==F||"jpeg"==F||"webp"==F)G=this.addCheckbox(E,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var I=this.addCheckbox(E,mxResources.get("includeCopyOfMyDiagram")+":",z,null,null,"jpeg"!=F&&"webp"!=F),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==F||"svg"==F?(z=function(){I.checked?
-M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),M.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),M.appendChild(R),I.style.marginBottom="12px",M.style.marginBottom="16px",E.appendChild(M),mxUtils.br(E),U+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(I,
-"change",z),z()):I.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");e&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,E.appendChild(P),mxUtils.write(E,mxResources.get("embedImages")),mxUtils.br(E),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,
-E.appendChild(S),mxUtils.write(E,mxResources.get("embedFonts")),mxUtils.br(E),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));V.appendChild(t);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));V.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");
-mxUtils.write(z,mxResources.get("openInThisWindow"));V.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display="none";"svg"==F&&(mxUtils.write(E,mxResources.get("links")+":"),E.appendChild(V),E.appendChild(z),mxUtils.br(E),mxUtils.br(E),U+=50);f=new CustomDialog(this,E,mxUtils.bind(this,function(){this.lastExportBorder=m.value;this.lastExportZoom=Q.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=
-M.value;n(Q.value,T.checked,!u.checked,v.checked,I.checked,P.checked&&e,m.value,A.checked,("png"==F||"svg"==F)&&"currentPage"==M.value,V.value,null!=G?G.checked:null,null!=k?k.value:null,B.value,S.checked)}),null,f,p);this.showDialog(f.container,340,U,!0,!0,null,null,null,null,!0);Q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace=
-"nowrap";var z=this.editor.graph;if(null!=e){var F=document.createElement("h3");mxUtils.write(F,e);F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";t.appendChild(F)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),E=this.addCheckbox(t,mxResources.get("shadow"),z.shadowVisible&&p,!p),R=this.addCheckbox(t,f),U=this.addCheckbox(t,mxResources.get("lightbox"),!0),O=this.addEditButton(t,U),Q=O.getEditInput(),m=1<z.model.getChildCount(z.model.getRoot()),u=this.addCheckbox(t,
-mxResources.get("layers"),m,!m);u.style.marginLeft=Q.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?(m&&u.removeAttribute("disabled"),Q.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),Q.setAttribute("disabled","disabled"));Q.checked&&U.checked?O.getEditSelect().removeAttribute("disabled"):O.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,
-E.checked,R.checked,U.checked,O.getLink(),u.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,f,p,n,t,z,F){function C(Q){var m=" ",u="";p&&(m=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",u+="cursor:pointer;");c&&(u+="max-width:100%;");var A="";f&&(A=' width="'+Math.round(E.width)+'" height="'+Math.round(E.height)+'"');z('<img src="'+Q+'"'+A+(""!=u?' style="'+u+'"':"")+m+"/>")}var E=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Q){var m=p?this.getFileData(!0):null;Q=
-this.createImageDataUri(Q,m,"png");C(Q)}),null,null,null,mxUtils.bind(this,function(Q){F({message:mxResources.get("unknownError")})}),null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),E.width*E.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var U="";f&&(U="&w="+Math.round(2*E.width)+"&h="+Math.round(2*E.height));var O=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+U+"&xml="+encodeURIComponent(e));O.send(mxUtils.bind(this,function(){200<=O.getStatus()&&
-299>=O.getStatus()?C("data:image/png;base64,"+O.getText()):F({message:mxResources.get("unknownError")})}))}else F({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,f,p,n,t,z){var F=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f,"auto"),C=F.getElementsByTagName("a");if(null!=C)for(var E=0;E<C.length;E++){var R=C[E].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==C[E].getAttribute("target")&&C[E].removeAttribute("target")}p&&
-F.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(F);if(f){var U=" ",O="";p&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(t?"&layers=1":
-"")+"');}})(this);\"",O+="cursor:pointer;");c&&(O+="max-width:100%;");this.editor.convertImages(F,mxUtils.bind(this,function(Q){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Q))+'"'+(""!=O?' style="'+O+'"':"")+U+"/>")}))}else O="",p&&(e=this.getSelectedPageIndex(),F.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),O+="cursor:pointer;"),c&&(c=parseInt(F.getAttribute("width")),n=parseInt(F.getAttribute("height")),F.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),O+="max-width:100%;max-height:"+n+"px;",F.removeAttribute("height")),""!=O&&F.setAttribute("style",O),this.editor.addFontCss(F),this.editor.graph.mathEnabled&&this.editor.addMathCss(F),z(mxUtils.getXml(F))};EditorUi.prototype.timeSince=function(c){c=
+n&&t.push("layers=1"),this.editor.graph.foldingEnabled&&t.push("nav=1"));return t};EditorUi.prototype.createLink=function(c,e,f,p,n,t,z,E,C,F,R,U,O){var N=this.getCurrentFile();C=this.createUrlParameters(c,e,p,n,t,C);c=!0;null!=z?f="#U"+encodeURIComponent(z):E||null==N||""==N.getHash()?f="#R"+encodeURIComponent(f?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(f="#"+N.getHash(),c=!1);c&&null!=N&&null!=N.getTitle()&&N.getTitle()!=
+this.defaultFilename&&C.push("title="+encodeURIComponent(N.getTitle()));F&&1<f.length&&(C.push("open="+f.substring(1)),f="");R&&null!=this.currentPage&&C.push("page-id="+this.currentPage.getId());U&&C.push("transparent=1");null!=O&&C.push("dark="+O);return(p&&(null!=z||null!=N&&N.getMode()!=App.MODE_GITHUB&&N.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+
+"/"+(0<C.length?"?"+C.join("&"):"")+f};EditorUi.prototype.createHtml=function(c,e,f,p,n,t,z,E,C,F,R,U,O){this.getBasenames();var N={};""!=n&&n!=mxConstants.NONE&&(N.highlight=n);"auto"!==p&&(N.target=p);F||(N.lightbox=!1);N.nav=this.editor.graph.foldingEnabled;f=parseInt(f);isNaN(f)||100==f||(N.zoom=f/100);f=[];z&&(f.push("pages"),N.resize=!0,null!=this.pages&&null!=this.currentPage&&(N.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(f.push("zoom"),N.resize=!0);E&&f.push("layers");C&&f.push("tags");
+null!=O&&(N["dark-mode"]=O);0<f.length&&(F&&f.push("lightbox"),N.toolbar=f.join(" "));null!=R&&0<R.length&&(N.edit=R);null!=c?N.url=c:N.xml=this.getFileData(!0,null,null,null,null,!z);e='<div class="mxgraph" style="'+(t?"max-width:100%;":"")+(""!=f?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(N))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";U(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":
+EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,f,p){var n=document.createElement("div");n.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxResources.get("html"));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";n.appendChild(t);
+var z=document.createElement("div");z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","type-embedhtmldialog");t=E.cloneNode(!0);t.setAttribute("value","copy");z.appendChild(t);var C=document.createElement("span");mxUtils.write(C,mxResources.get("includeCopyOfMyDiagram"));
+z.appendChild(C);mxUtils.br(z);z.appendChild(E);C=document.createElement("span");mxUtils.write(C,mxResources.get("publicDiagramUrl"));z.appendChild(C);var F=this.getCurrentFile();null==f&&null!=F&&F.constructor==window.DriveFile&&(C=document.createElement("a"),C.style.paddingLeft="12px",C.style.color="gray",C.style.cursor="pointer",mxUtils.write(C,mxResources.get("share")),z.appendChild(C),mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(F.getId(),
+F)})));t.setAttribute("checked","checked");null==f&&E.setAttribute("disabled","disabled");n.appendChild(z);z=380;var R=this.addLinkSection(n),U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));U.appendChild(C);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,mxResources.get("dark"));U.appendChild(C);
+C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));C.setAttribute("selected","selected");U.appendChild(C);C.setAttribute("selected","selected");mxUtils.write(n,mxResources.get("appearance")+":");n.appendChild(U);mxUtils.br(n);z+=26;var O=this.addCheckbox(n,mxResources.get("zoom"),!0,null,!0);mxUtils.write(n,":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=
+"4px";N.style.marginRight="12px";N.value="100%";n.appendChild(N);var m=this.addCheckbox(n,mxResources.get("fit"),!0);C=null!=this.pages&&1<this.pages.length;var u=u=this.addCheckbox(n,mxResources.get("allPages"),C,!C),A=this.addCheckbox(n,mxResources.get("layers"),!0),B=this.addCheckbox(n,mxResources.get("tags"),!0),H=this.addCheckbox(n,mxResources.get("lightbox"),!0),T=null;if(EditorUi.enableHtmlEditOption){T=this.addEditButton(n,H);var k=T.getEditInput();k.style.marginBottom="16px";z+=50;mxEvent.addListener(H,
+"change",function(){H.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&H.checked?T.getEditSelect().removeAttribute("disabled"):T.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,n,mxUtils.bind(this,function(){p(E.checked?f:null,O.checked,N.value,R.getTarget(),R.getColor(),m.checked,u.checked,A.checked,B.checked,H.checked,null!=T?T.getLink():null,null!=U?U.value:null)}),null,c,e);this.showDialog(c.container,340,z,!0,!0);t.focus()};
+EditorUi.prototype.showPublishLinkDialog=function(c,e,f,p,n,t,z,E,C,F,R){var U=document.createElement("div");U.style.whiteSpace="nowrap";var O=document.createElement("h3");mxUtils.write(O,c||mxResources.get("publish"));O.style.width="100%";O.style.textAlign="center";O.style.marginTop="2px";O.style.marginBottom="20px";U.appendChild(O);var N=document.createElement("select");c=30;N.className="geBtn";N.style.marginBottom="8px";N.style.marginLeft="0px";N.style.width="100%";N.style.boxSizing="border-box";
+if(null==E||""==E.getHash())n=null!=n?n:"https://www.drawio.com/doc/faq/publish-diagram-as-link",O=document.createElement("option"),mxUtils.write(O,mxResources.get("makeCopy")),O.setAttribute("value","copy"),N.appendChild(O);O=document.createElement("option");mxUtils.write(O,mxResources.get("authorizationRequired"));O.setAttribute("value","auth");N.appendChild(O);null!=E&&""!=E.getHash()||O.setAttribute("disabled","disabled");E=document.createElement("option");E.setAttribute("value","public");N.appendChild(E);
+null!=z?(mxUtils.write(E,mxResources.get("publicDiagramUrl")),E.setAttribute("title",z),N.value="public"):(mxUtils.write(E,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),E.setAttribute("disabled","disabled"));U.appendChild(N);mxUtils.br(U);N.focus();var m=null,u=null;if(null!=e||null!=f)c+=30,mxUtils.write(U,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft=
+"6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",U.appendChild(m),mxUtils.write(U,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=f+"px",U.appendChild(u),mxUtils.br(U);var A=this.addLinkSection(U,p),B=F?this.addCheckbox(U,mxResources.get("transparentBackground"),!1):null;null!=B&&(c+=20);var H=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&
+(c+=30,e=null!=this.currentPage?this.currentPage.getName():"",16<e.length&&(e=e.substring(0,16)+"..."),H=this.addCheckbox(U,mxResources.get("selectedPage")+": "+e));var T=document.createElement("select");T.style.maxWidth="260px";T.style.marginLeft="8px";T.style.marginTop="16px";e=document.createElement("option");e.setAttribute("value","0");mxUtils.write(e,mxResources.get("light"));T.appendChild(e);e=document.createElement("option");e.setAttribute("value","1");mxUtils.write(e,mxResources.get("dark"));
+T.appendChild(e);e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));e.setAttribute("selected","selected");T.appendChild(e);R&&(mxUtils.write(U,mxResources.get("appearance")+":"),U.appendChild(T),mxUtils.br(U),c+=30);var k=this.addCheckbox(U,mxResources.get("lightbox"),!0,null,null,!p),v=this.addEditButton(U,k),G=v.getEditInput();p&&(G.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var I=this.addCheckbox(U,mxResources.get("layers"),
+!0);I.style.marginLeft=G.style.marginLeft;I.style.marginTop="8px";var M=this.addCheckbox(U,mxResources.get("tags"),!0);M.style.marginLeft=G.style.marginLeft;M.style.marginBottom="16px";M.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?(I.removeAttribute("disabled"),G.removeAttribute("disabled"),M.removeAttribute("disabled")):(I.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));G.checked&&k.checked?v.getEditSelect().removeAttribute("disabled"):
+v.getEditSelect().setAttribute("disabled","disabled")});p=new CustomDialog(this,U,mxUtils.bind(this,function(){C(A.getTarget(),A.getColor(),null==H?!1:H.checked,k.checked,v.getLink(),I.checked,null!=m?m.value:null,null!=u?u.value:null,M.checked,N.value,null!=B?B.checked:!1,T.value)}),null,mxResources.get("create"),n,t);this.showDialog(p.container,340,296+c,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?m.select():document.execCommand("selectAll",!1,null)):null==
+N.parentNode;A.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("image"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(n?"10":"4")+"px";t.appendChild(z);if(n){mxUtils.write(t,mxResources.get("zoom")+":");var E=document.createElement("input");E.setAttribute("type","text");E.style.marginRight="16px";E.style.width="60px";
+E.style.marginLeft="4px";E.style.marginRight="12px";E.value=this.lastExportZoom||"100%";t.appendChild(E);mxUtils.write(t,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";t.appendChild(C);mxUtils.br(t)}var F=this.addCheckbox(t,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),R=p?null:this.addCheckbox(t,mxResources.get("includeCopyOfMyDiagram"),
+Editor.defaultIncludeDiagram);z=this.editor.graph;var U=p?null:this.addCheckbox(t,mxResources.get("transparentBackground"),z.background==mxConstants.NONE||null==z.background);null!=U&&(U.style.marginBottom="16px");c=new CustomDialog(this,t,mxUtils.bind(this,function(){var O=parseInt(E.value)/100||1,N=parseInt(C.value)||0;f(!F.checked,null!=R?R.checked:!1,null!=U?U.checked:!1,O,N)}),null,c,e);this.showDialog(c.container,300,(n?25:0)+(p?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,
+e,f,p,n,t,z,E,C){z=null!=z?z:Editor.defaultIncludeDiagram;var F=document.createElement("div");F.style.whiteSpace="nowrap";var R=this.editor.graph,U="jpeg"==E||"webp"==E?220:320,O=document.createElement("h3");mxUtils.write(O,c);O.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";F.appendChild(O);mxUtils.write(F,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=
+"4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";F.appendChild(N);mxUtils.write(F,mxResources.get("borderWidth")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.value=this.lastExportBorder||"0";F.appendChild(m);mxUtils.br(F);var u=this.addCheckbox(F,mxResources.get("selectionOnly"),!1,R.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight=
+"8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");var B=document.createElement("select");B.style.marginTop="16px";B.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(O=0;O<c.length;O++)if(!R.isSelectionEmpty()||"selectionOnly"!=c[O]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[O]));H.setAttribute("value",c[O]);B.appendChild(H)}C?(mxUtils.write(F,mxResources.get("size")+":"),F.appendChild(B),mxUtils.br(F),
+U+=26,mxEvent.addListener(B,"change",function(){"selectionOnly"==B.value&&(u.checked=!0)})):t&&(F.appendChild(A),mxUtils.write(F,mxResources.get("crop")),mxUtils.br(F),U+=30,mxEvent.addListener(u,"change",function(){u.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));R.isSelectionEmpty()?C&&(u.style.display="none",u.nextSibling.style.display="none",u.nextSibling.nextSibling.style.display="none",U-=30):(B.value="diagram",A.setAttribute("checked","checked"),A.defaultChecked=
+!0,mxEvent.addListener(u,"change",function(){B.value=u.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(F,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=E&&"webp"!=E),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";t=document.createElement("option");t.setAttribute("value","light");mxUtils.write(t,mxResources.get("light"));k.appendChild(t);C=document.createElement("option");C.setAttribute("value","dark");mxUtils.write(C,
+mxResources.get("dark"));k.appendChild(C);"svg"==E?(t=document.createElement("option"),t.setAttribute("value","auto"),mxUtils.write(t,mxResources.get("automatic")),t.setAttribute("selected","selected"),k.appendChild(t)):Editor.isDarkMode()?C.setAttribute("selected","selected"):t.setAttribute("selected","selected");mxUtils.write(F,mxResources.get("appearance")+":");F.appendChild(k);mxUtils.br(F);U+=26;var v=this.addCheckbox(F,mxResources.get("shadow"),R.shadowVisible),G=null;if("png"==E||"jpeg"==E||
+"webp"==E)G=this.addCheckbox(F,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),U+=30;var I=this.addCheckbox(F,mxResources.get("includeCopyOfMyDiagram")+":",z,null,null,"jpeg"!=E&&"webp"!=E),M=document.createElement("select");M.style.maxWidth="260px";M.style.marginLeft="28px";"png"==E||"svg"==E?(z=function(){I.checked?M.removeAttribute("disabled"):M.setAttribute("disabled","disabled")},R=document.createElement("option"),R.setAttribute("value","allPages"),mxUtils.write(R,mxResources.get("allPages")),
+M.appendChild(R),R=document.createElement("option"),R.setAttribute("value","currentPage"),mxUtils.write(R,mxResources.get("currentPage")),M.appendChild(R),I.style.marginBottom="12px",M.style.marginBottom="16px",F.appendChild(M),mxUtils.br(F),U+=20,null!=this.lastEmbedInclude&&(M.value=this.lastEmbedInclude),mxEvent.addListener(I,"change",z),z()):I.style.marginBottom="16px";var P=document.createElement("input");P.style.marginBottom="16px";P.style.marginRight="8px";P.setAttribute("type","checkbox");
+var S=document.createElement("input");S.style.marginBottom="16px";S.style.marginRight="8px";S.setAttribute("type","checkbox");e&&(P.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,F.appendChild(P),mxUtils.write(F,mxResources.get("embedImages")),mxUtils.br(F),S.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,F.appendChild(S),mxUtils.write(F,mxResources.get("embedFonts")),mxUtils.br(F),U+=50);var V=document.createElement("select");V.style.maxWidth="260px";V.style.marginLeft="8px";
+t=document.createElement("option");t.setAttribute("value","auto");mxUtils.write(t,mxResources.get("automatic"));V.appendChild(t);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));V.appendChild(z);z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));V.appendChild(z);z=document.createElement("div");mxUtils.write(z,mxResources.get("LinksLost"));z.style.margin="7px";z.style.display=
+"none";"svg"==E&&(mxUtils.write(F,mxResources.get("links")+":"),F.appendChild(V),F.appendChild(z),mxUtils.br(F),mxUtils.br(F),U+=50);f=new CustomDialog(this,F,mxUtils.bind(this,function(){this.lastExportBorder=m.value;this.lastExportZoom=N.value;this.lastEmbedImages=P.checked;this.lastEmbedFonts=S.checked;this.lastEmbedInclude=M.value;n(N.value,T.checked,!u.checked,v.checked,I.checked,P.checked&&e,m.value,A.checked,("png"==E||"svg"==E)&&"currentPage"==M.value,V.value,null!=G?G.checked:null,null!=
+k?k.value:null,B.value,S.checked)}),null,f,p);this.showDialog(f.container,340,U,!0,!0,null,null,null,null,!0);N.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?N.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,f,p,n){var t=document.createElement("div");t.style.whiteSpace="nowrap";var z=this.editor.graph;if(null!=e){var E=document.createElement("h3");mxUtils.write(E,e);E.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+t.appendChild(E)}var C=this.addCheckbox(t,mxResources.get("fit"),!0),F=this.addCheckbox(t,mxResources.get("shadow"),z.shadowVisible&&p,!p),R=this.addCheckbox(t,f),U=this.addCheckbox(t,mxResources.get("lightbox"),!0),O=this.addEditButton(t,U),N=O.getEditInput(),m=1<z.model.getChildCount(z.model.getRoot()),u=this.addCheckbox(t,mxResources.get("layers"),m,!m);u.style.marginLeft=N.style.marginLeft;u.style.marginBottom="12px";u.style.marginTop="8px";mxEvent.addListener(U,"change",function(){U.checked?
+(m&&u.removeAttribute("disabled"),N.removeAttribute("disabled")):(u.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&U.checked?O.getEditSelect().removeAttribute("disabled"):O.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,t,mxUtils.bind(this,function(){c(C.checked,F.checked,R.checked,U.checked,O.getLink(),u.checked)}),null,mxResources.get("embed"),n);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=
+function(c,e,f,p,n,t,z,E){function C(N){var m=" ",u="";p&&(m=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=R?"&page="+R:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",u+=
+"cursor:pointer;");c&&(u+="max-width:100%;");var A="";f&&(A=' width="'+Math.round(F.width)+'" height="'+Math.round(F.height)+'"');z('<img src="'+N+'"'+A+(""!=u?' style="'+u+'"':"")+m+"/>")}var F=this.editor.graph.getGraphBounds(),R=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(N){var m=p?this.getFileData(!0):null;N=this.createImageDataUri(N,m,"png");C(N)}),null,null,null,mxUtils.bind(this,function(N){E({message:mxResources.get("unknownError")})}),
+null,!0,f?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),F.width*F.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var U="";f&&(U="&w="+Math.round(2*F.width)+"&h="+Math.round(2*F.height));var O=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(p?"1":"0")+U+"&xml="+encodeURIComponent(e));O.send(mxUtils.bind(this,function(){200<=O.getStatus()&&299>=O.getStatus()?C("data:image/png;base64,"+O.getText()):E({message:mxResources.get("unknownError")})}))}else E({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(c,e,f,p,n,t,z){var E=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!f,"auto"),C=E.getElementsByTagName("a");if(null!=C)for(var F=0;F<C.length;F++){var R=C[F].getAttribute("href");null!=R&&"#"==R.charAt(0)&&"_blank"==C[F].getAttribute("target")&&C[F].removeAttribute("target")}p&&E.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(E);if(f){var U=" ",O="";p&&(U="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");c&&(O+="max-width:100%;");this.editor.convertImages(E,mxUtils.bind(this,function(N){z('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(N))+'"'+(""!=O?' style="'+O+'"':"")+U+"/>")}))}else O="",p&&(e=this.getSelectedPageIndex(),E.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(n?"&edit=_blank":"")+(t?"&layers=1":"")+"');}}})(this);"),O+="cursor:pointer;"),c&&(c=parseInt(E.getAttribute("width")),n=parseInt(E.getAttribute("height")),E.setAttribute("viewBox","-0.5 -0.5 "+c+" "+n),O+="max-width:100%;max-height:"+n+"px;",E.removeAttribute("height")),""!=O&&E.setAttribute("style",O),this.editor.addFontCss(E),this.editor.graph.mathEnabled&&this.editor.addMathCss(E),z(mxUtils.getXml(E))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var f=null;if("diagram"==c.nodeName)f=
c;else if("mxfile"==c.nodeName){var p=c.getElementsByTagName("diagram");if(0<p.length){f=p[0];var n=e.getGlobalVariable;e.getGlobalVariable=function(t){return"page"==t?f.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==t?1:n.apply(this,arguments)}}}null!=f&&(c=Editor.parseDiagramNode(f))}p=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(t){}finally{this.editor.graph=p}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
EditorUi.prototype.getPngFileProperties=function(c){var e=1,f=0;if(null!=c){if(c.hasAttribute("scale")){var p=parseFloat(c.getAttribute("scale"));!isNaN(p)&&0<p&&(e=p)}c.hasAttribute("border")&&(p=parseInt(c.getAttribute("border")),!isNaN(p)&&0<p&&(f=p))}return{scale:e,border:f}};EditorUi.prototype.getEmbeddedPng=function(c,e,f,p,n){try{var t=this.editor.graph,z=null;if(null!=f&&0<f.length)t=this.createTemporaryGraph(t.getStylesheet()),document.body.appendChild(t.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(f).documentElement,
-!0),t),z=f;else if(null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(t.getStylesheet());var F=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var C=this.pages[0];this.currentPage==C?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=C.viewState&&null!=C.viewState&&t.setBackgroundImage(C.viewState.backgroundImage);t.getGlobalVariable=function(E){return"page"==E?C.getName():"pagenumber"==E?1:F.apply(this,arguments)};document.body.appendChild(t.container);
-t.model.setRoot(C.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(E){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=E.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(z));c(R.substring(R.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(U){null!=e&&e(U)}}),null,null,null,mxUtils.bind(this,function(E){null!=e&&e(E)}),null,null,p,null,t.shadowVisible,null,t,n,null,
-null,null,"diagram",null)}catch(E){null!=e&&e(E)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,p,n,t,z,F,C,E,R,U,O){F=null!=F?F:!0;R=null!=R?R:0;z=null!=C?C:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");C=this.editor.graph.createSvgImageExport(null!=c);t=e.getSvg(z,E,R,null,null,t,null,C,null,e.shadowVisible||U,null,O,"diagram");(e.shadowVisible||U)&&e.addSvgShadow(t,null,null,0==R);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",
-f);var Q=mxUtils.bind(this,function(m){m=(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(m);null!=n&&n(m);return m});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(m){F?this.editor.convertImages(m,mxUtils.bind(this,function(u){Q(u)})):Q(m)}));else return Q(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
-this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(p){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,p,n,t,z,F,C,E,R,U,O){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(m){Editor.addRetryToError(m,mxUtils.bind(this,function(){this.exportImage(c,e,f,p,n,t,z,F,C,E,R,U,O)}));this.handleError(m)}))){var Q=this.editor.graph.isSelectionEmpty();
-f=null!=f?f:Q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(m){this.spinner.stop();try{this.saveCanvas(m,n?this.getFileData(!0,null,null,null,f,F,null,null,null,null,null,c,t):null,C,null==this.pages||0==this.pages.length,R)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,f,c||1,e,p,null,null,t,z,E,U,O)}catch(m){this.spinner.stop(),this.handleError(m)}}};
-EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,f,p,n,t,z){e=null!=e?e:0;f=null!=f?f:0;var F=[];try{var C=this.editor.graph;if(null!=c&&0<c.length){C.model.beginUpdate();try{var E=mxUtils.parseXml(c);c={};var R=this.editor.extractGraphModel(E.documentElement,
-null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var U=R.getElementsByTagName("diagram");if(1==U.length&&!t){if(R=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var O=U[0].getAttribute("name");null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,O))}}else if(0<U.length){t=[];var Q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=
-this.pages[0].getId(),O=U[0].getAttribute("name"),null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],O)),R=Editor.parseDiagramNode(U[0]),p=!1,Q=1);for(;Q<U.length;Q++){var m=U[Q].getAttribute("id");U[Q].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[Q]));c[m]=U[Q].getAttribute("id");var A=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[A+1]));C.model.execute(new ChangePage(this,u,u,A,!0));t.push(u)}this.updatePageLinks(c,
-t)}}if(null!=R&&"mxGraphModel"===R.nodeName){F=C.importGraphModel(R,e,f,p);if(null!=F)for(this.addLocalPagesToMapping(c),Q=0;Q<F.length;Q++)this.updatePageLinksForCell(c,F[Q]);var B=C.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var H=new ChangePageSetup(this,null,B);H.ignoreColor=!0;C.model.execute(H)}}z&&C.pasteCellStyles(C.includeDescendants(F),C.defaultVertexStyle,C.defaultEdgeStyle)}finally{C.model.endUpdate()}}}catch(T){if(n)throw T;
-this.handleError(T)}return F};EditorUi.prototype.updatePageLinks=function(c,e){for(var f=0;f<e.length;f++)this.updatePageLinksForCell(c,e[f].root),null!=e[f].viewState&&this.updateBackgroundPageLink(c,e[f].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var f=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=f&&(e.originalSrc="data:page/id,"+f)}}catch(p){}};EditorUi.prototype.updatePageLinksForCell=
-function(c,e){var f=document.createElement("div"),p=this.editor.graph,n=p.getLinkForCell(e);null!=n&&p.setLinkForCell(e,this.updatePageLink(c,n));if(p.isHtmlLabel(e)){f.innerHTML=Graph.sanitizeHtml(p.getLabel(e));for(var t=f.getElementsByTagName("a"),z=!1,F=0;F<t.length;F++)n=t[F].getAttribute("href"),null!=n&&(t[F].setAttribute("href",this.updatePageLink(c,n)),z=!0);z&&p.labelChanged(e,f.innerHTML)}for(F=0;F<p.model.getChildCount(e);F++)this.updatePageLinksForCell(c,p.model.getChildAt(e,F))};EditorUi.prototype.updatePageLink=
-function(c,e){if(Graph.isPageLink(e)){var f=c[e.substring(e.indexOf(",")+1)];e=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==e.substring(0,17))try{var p=JSON.parse(e.substring(17));if(null!=p.actions){for(var n=0;n<p.actions.length;n++){var t=p.actions[n];if(null!=t.open&&Graph.isPageLink(t.open)){var z=t.open.substring(t.open.indexOf(",")+1);f=c[z];null!=f?t.open="data:page/id,"+f:null==this.getPageById(z)&&delete t.open}}e="data:action/json,"+JSON.stringify(p)}}catch(F){}return e};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,f,p,n){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=f?f(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){p=null!=p?p:c.name;var F=mxUtils.bind(this,function(E){z.clear()&&t(E)}),C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var E=this.isRemoteVisioFormat(p);
-try{var R=p.lastIndexOf(".");if(0<=R&&R<p.length)p.substring(R+1).toUpperCase();else{var U=p.lastIndexOf("/");0<=U&&U<p.length&&(p=p.substring(U+1))}}catch(Q){}if(E)if(null==VSD_CONVERT_URL||this.isOffline())F({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{E=new FormData;E.append("file1",c,p);var O=new XMLHttpRequest;O.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));O.responseType="blob";this.addRemoteServiceSecurityCheck(O);
-null!=n&&O.setRequestHeader("x-convert-custom",n);O.onreadystatechange=mxUtils.bind(this,function(){if(4==O.readyState&&z.clear())if(200<=O.status&&299>=O.status)try{var Q=O.response;if("text/xml"==Q.type){var m=new FileReader;m.onload=mxUtils.bind(this,function(u){try{e(u.target.result)}catch(A){F({message:mxResources.get("errorLoadingFile")})}});m.readAsText(Q)}else this.doImportVisio(Q,e,F,p)}catch(u){F(u)}else try{""==O.responseType||"text"==O.responseType?F({message:O.responseText}):(m=new FileReader,
-m.onload=function(){try{F({message:JSON.parse(m.result).Message})}catch(u){F(u)}},m.readAsText(O.response))}catch(u){F({})}});O.send(E)}else if(z.clear())try{this.doImportVisio(c,e,F,p)}catch(Q){F(Q)}}else F({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,F))}),t)};EditorUi.prototype.importGraphML=function(c,e,f){var p=
-mxUtils.bind(this,function(n){this.loadingExtensions=!1;null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(F){n.clear()&&p(F)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,e,p)}catch(F){t(F)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,
+!0),t),z=f;else if(null!=this.pages&&this.currentPage!=this.pages[0]){t=this.createTemporaryGraph(t.getStylesheet());var E=t.getGlobalVariable;t.setBackgroundImage=this.editor.graph.setBackgroundImage;var C=this.pages[0];this.currentPage==C?t.setBackgroundImage(this.editor.graph.backgroundImage):null!=C.viewState&&null!=C.viewState&&t.setBackgroundImage(C.viewState.backgroundImage);t.getGlobalVariable=function(F){return"page"==F?C.getName():"pagenumber"==F?1:E.apply(this,arguments)};document.body.appendChild(t.container);
+t.model.setRoot(C.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(F){try{null==z&&(z=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var R=F.toDataURL("image/png");R=Editor.writeGraphModelToPng(R,"tEXt","mxfile",encodeURIComponent(z));c(R.substring(R.lastIndexOf(",")+1));t!=this.editor.graph&&t.container.parentNode.removeChild(t.container)}catch(U){null!=e&&e(U)}}),null,null,null,mxUtils.bind(this,function(F){null!=e&&e(F)}),null,null,p,null,t.shadowVisible,null,t,n,null,
+null,null,"diagram",null)}catch(F){null!=e&&e(F)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,f,p,n,t,z,E,C,F,R,U,O){E=null!=E?E:!0;R=null!=R?R:0;z=null!=C?C:e.background;z==mxConstants.NONE&&(z=null);null==z&&"none"==e.getAdaptiveColors()&&(z="#ffffff");C=this.editor.graph.createSvgImageExport(null!=c);t=e.getSvg(z,F,R,null,null,t,null,C,null,e.shadowVisible||U,null,O,"diagram");(e.shadowVisible||U)&&e.addSvgShadow(t,null,null,0==R);null!=c&&t.setAttribute("content",c);null!=f&&t.setAttribute("resource",
+f);var N=mxUtils.bind(this,function(m){m=(p?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(m);null!=n&&n(m);return m});e.mathEnabled&&this.editor.addMathCss(t);if(null!=n)this.embedFonts(t,mxUtils.bind(this,function(m){E?this.editor.convertImages(m,mxUtils.bind(this,function(u){N(u)})):N(m)}));else return N(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,
+this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(f){try{null!=f&&this.editor.addFontCss(c,f),e(c)}catch(p){e(c)}}))}catch(f){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,f,p,n,t,z,E,C,F,R,U,O){C=null!=C?C:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(m){Editor.addRetryToError(m,mxUtils.bind(this,function(){this.exportImage(c,e,f,p,n,t,z,E,C,F,R,U,O)}));this.handleError(m)}))){var N=this.editor.graph.isSelectionEmpty();
+f=null!=f?f:N;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(m){this.spinner.stop();try{this.saveCanvas(m,n?this.getFileData(!0,null,null,null,f,E,null,null,null,null,null,c,t):null,C,null==this.pages||0==this.pages.length,R)}catch(u){this.handleError(u)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,f,c||1,e,p,null,null,t,z,F,U,O)}catch(m){this.spinner.stop(),this.handleError(m)}}};
+EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var e=0;e<this.pages.length;e++)c[this.pages[e].getId()]=this.pages[e].getId();return c};EditorUi.prototype.importXml=function(c,e,f,p,n,t,z){e=null!=e?e:0;f=null!=f?f:0;var E=[];try{var C=this.editor.graph;if(null!=c&&0<c.length){C.model.beginUpdate();try{var F=mxUtils.parseXml(c);c={};var R=this.editor.extractGraphModel(F.documentElement,
+null!=this.pages);if(null!=R&&"mxfile"==R.nodeName&&null!=this.pages){var U=R.getElementsByTagName("diagram");if(1==U.length&&!t){if(R=Editor.parseDiagramNode(U[0]),null!=this.currentPage&&(c[U[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var O=U[0].getAttribute("name");null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,O))}}else if(0<U.length){t=[];var N=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[U[0].getAttribute("id")]=
+this.pages[0].getId(),O=U[0].getAttribute("name"),null!=O&&""!=O&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],O)),R=Editor.parseDiagramNode(U[0]),p=!1,N=1);for(;N<U.length;N++){var m=U[N].getAttribute("id");U[N].removeAttribute("id");var u=this.updatePageRoot(new DiagramPage(U[N]));c[m]=U[N].getAttribute("id");var A=this.pages.length;null==u.getName()&&u.setName(mxResources.get("pageWithNumber",[A+1]));C.model.execute(new ChangePage(this,u,u,A,!0));t.push(u)}this.updatePageLinks(c,
+t)}}if(null!=R&&"mxGraphModel"===R.nodeName){E=C.importGraphModel(R,e,f,p);if(null!=E)for(this.addLocalPagesToMapping(c),N=0;N<E.length;N++)this.updatePageLinksForCell(c,E[N]);var B=C.parseBackgroundImage(R.getAttribute("backgroundImage"));if(null!=B&&null!=B.originalSrc){this.updateBackgroundPageLink(c,B);var H=new ChangePageSetup(this,null,B);H.ignoreColor=!0;C.model.execute(H)}}z&&C.pasteCellStyles(C.includeDescendants(E),C.defaultVertexStyle,C.defaultEdgeStyle)}finally{C.model.endUpdate()}}}catch(T){if(n)throw T;
+this.handleError(T)}return E};EditorUi.prototype.updatePageLinks=function(c,e){for(var f=0;f<e.length;f++)this.updatePageLinksForCell(c,e[f].root),null!=e[f].viewState&&this.updateBackgroundPageLink(c,e[f].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var f=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=f&&(e.originalSrc="data:page/id,"+f)}}catch(p){}};EditorUi.prototype.updatePageLinksForCell=
+function(c,e){var f=document.createElement("div"),p=this.editor.graph,n=p.getLinkForCell(e);null!=n&&p.setLinkForCell(e,this.updatePageLink(c,n));if(p.isHtmlLabel(e)){f.innerHTML=Graph.sanitizeHtml(p.getLabel(e));for(var t=f.getElementsByTagName("a"),z=!1,E=0;E<t.length;E++)n=t[E].getAttribute("href"),null!=n&&(t[E].setAttribute("href",this.updatePageLink(c,n)),z=!0);z&&p.labelChanged(e,f.innerHTML)}for(E=0;E<p.model.getChildCount(e);E++)this.updatePageLinksForCell(c,p.model.getChildAt(e,E))};EditorUi.prototype.updatePageLink=
+function(c,e){if(Graph.isPageLink(e)){var f=c[e.substring(e.indexOf(",")+1)];e=null!=f?"data:page/id,"+f:null}else if("data:action/json,"==e.substring(0,17))try{var p=JSON.parse(e.substring(17));if(null!=p.actions){for(var n=0;n<p.actions.length;n++){var t=p.actions[n];if(null!=t.open&&Graph.isPageLink(t.open)){var z=t.open.substring(t.open.indexOf(",")+1);f=c[z];null!=f?t.open="data:page/id,"+f:null==this.getPageById(z)&&delete t.open}}e="data:action/json,"+JSON.stringify(p)}}catch(E){}return e};
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,f,p,n){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=f?f(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){p=null!=p?p:c.name;var E=mxUtils.bind(this,function(F){z.clear()&&t(F)}),C=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(p);
+try{var R=p.lastIndexOf(".");if(0<=R&&R<p.length)p.substring(R+1).toUpperCase();else{var U=p.lastIndexOf("/");0<=U&&U<p.length&&(p=p.substring(U+1))}}catch(N){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())E({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",c,p);var O=new XMLHttpRequest;O.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(p)?"?stencil=1":""));O.responseType="blob";this.addRemoteServiceSecurityCheck(O);
+null!=n&&O.setRequestHeader("x-convert-custom",n);O.onreadystatechange=mxUtils.bind(this,function(){if(4==O.readyState&&z.clear())if(200<=O.status&&299>=O.status)try{var N=O.response;if("text/xml"==N.type){var m=new FileReader;m.onload=mxUtils.bind(this,function(u){try{e(u.target.result)}catch(A){E({message:mxResources.get("errorLoadingFile")})}});m.readAsText(N)}else this.doImportVisio(N,e,E,p)}catch(u){E(u)}else try{""==O.responseType||"text"==O.responseType?E({message:O.responseText}):(m=new FileReader,
+m.onload=function(){try{E({message:JSON.parse(m.result).Message})}catch(u){E(u)}},m.readAsText(O.response))}catch(u){E({})}});O.send(F)}else if(z.clear())try{this.doImportVisio(c,e,E,p)}catch(N){E(N)}}else E({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?C():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",C,null,null,null,E))}),t)};EditorUi.prototype.importGraphML=function(c,e,f){var p=
+mxUtils.bind(this,function(n){this.loadingExtensions=!1;null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(E){n.clear()&&p(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,e,p)}catch(E){t(E)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,
mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var e=mxUtils.bind(this,function(f){this.loadingExtensions=!1;this.handleError(f)});this.createTimeout(null,mxUtils.bind(this,function(f){var p=mxUtils.bind(this,function(t){f.clear()&&e(t)}),n=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(f.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),
(new VsdxExport(this)).exportCurrentDiagrams(c)||p({message:mxResources.get("unknownError")})}catch(t){p(t)}else p({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(n,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,p))}),e)}};EditorUi.prototype.convertLucidChart=function(c,e,f){var p=mxUtils.bind(this,function(n){this.loadingExtensions=!1;
-null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(F){n.clear()&&p(F)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if("undefined"!==typeof window.LucidImporter)try{var F=JSON.parse(c);e(LucidImporter.importState(F));try{if(null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",F];null!=F.state&&C.push(JSON.parse(F.state));if(null!=F.svgThumbs)for(var E=0;E<F.svgThumbs.length;E++)C.push(Editor.createSvgDataUri(F.svgThumbs[E]));
-null!=F.thumb&&C.push(F.thumb);console.log.apply(console,C)}}catch(R){}}catch(R){null!=window.console&&console.error(R),t(R)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+null!=f?f(n):this.handleError(n)});this.createTimeout(null,mxUtils.bind(this,function(n){var t=mxUtils.bind(this,function(E){n.clear()&&p(E)}),z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(n.clear())if("undefined"!==typeof window.LucidImporter)try{var E=JSON.parse(c);e(LucidImporter.importState(E));try{if(null!=window.console&&"1"==urlParams.test){var C=[(new Date).toISOString(),"convertLucidChart",E];null!=E.state&&C.push(JSON.parse(E.state));if(null!=E.svgThumbs)for(var F=0;F<E.svgThumbs.length;F++)C.push(Editor.createSvgDataUri(E.svgThumbs[F]));
+null!=E.thumb&&C.push(E.thumb);console.log.apply(console,C)}}catch(R){}}catch(R){null!=window.console&&console.error(R),t(R)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
function(){mxscript("js/orgchart/mxOrgChartLayout.js",z,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),p)};EditorUi.prototype.createMermaidXml=function(c,e,f,p,n,t){var z=new Graph(document.createElement("div"));f=z.insertVertex(null,null,null,0,0,p,n,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+f+";");z.setAttributeForCell(f,"mermaidData",JSON.stringify({data:c,
-config:e},null,2));null!=t&&z.setAttributeForCell(f,"templatePrompt",t);c=(new mxCodec).encode(z.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,f){var p=0,n=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(t){var z=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),F=mxUtils.bind(this,function(C){t.clear()&&f(C)});z.send(mxUtils.bind(this,function(C){if(t.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,
-function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,O,Q){this.tryAndHandle(mxUtils.bind(this,function(){t.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",R),e(R,U,O,Q))}),F)}),F,mxUtils.bind(this,function(U){3>p++?t.clear()&&n():F(U)}))}),F);else{var E={message:mxResources.get("error")+" "+C.getStatus()};try{E=JSON.parse(C.getText()),E=E.error}catch(R){}F(E)}}),F)}),f)});n()};EditorUi.prototype.extractMermaidDeclaration=
+config:e},null,2));null!=t&&z.setAttributeForCell(f,"templatePrompt",t);c=(new mxCodec).encode(z.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,e,f){var p=0,n=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(t){var z=new mxXmlRequest("https://www.draw.io/generate/v2",c,"POST"),E=mxUtils.bind(this,function(C){t.clear()&&f(C)});z.send(mxUtils.bind(this,function(C){if(t.isAlive())if(200<=C.getStatus()&&299>=C.getStatus())this.tryAndHandle(mxUtils.bind(this,
+function(){var R=mxUtils.trim(C.getText());this.generateMermaidImage(R,null,mxUtils.bind(this,function(U,O,N){this.tryAndHandle(mxUtils.bind(this,function(){t.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",R),e(R,U,O,N))}),E)}),E,mxUtils.bind(this,function(U){3>p++?t.clear()&&n():E(U)}))}),E);else{var F={message:mxResources.get("error")+" "+C.getStatus()};try{F=JSON.parse(C.getText()),F=F.error}catch(R){}E(F)}}),E)}),f)});n()};EditorUi.prototype.extractMermaidDeclaration=
function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var e=c.split("```");e=1<e.length?e:c.split("<pre>");e=1<e.length?e:c.split("~~~");e=1<e.length?e:c.split("%%");e=1<e.length?e:c.split("(Begins)");c=mxUtils.trim(1>=e.length?c:e[1]);e=c.split("\n");var f=1<e.length?e[1]:null;if(null!=f){var p=f.indexOf("-");0<p&&(f=f.substring(0,p))}if(0<e.length&&"mermaid"==mxUtils.trim(e[0])||null!=f&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f))e.shift(),c=mxUtils.trim(e.join("\n")),
-e=c.split("\n");f=e[0].split(" ")[0].replace(/:$/,"");p=f.indexOf("-");0<p&&(f=f.substring(0,p));try{"mindmap"==f&&2<e.length&&(c=extractMermaidMindmap(e))}catch(n){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,f,p,n){var t=mxUtils.bind(this,function(F){this.loadingMermaid=!1;null!=p?p(F):this.handleError(F)}),z=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);
-e.securityLevel="strict";e.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme="dark");var F=mxUtils.bind(this,function(C){try{if(mxClient.IS_IE||mxClient.IS_IE11)C=C.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var E=mxUtils.parseXml(C).getElementsByTagName("svg");if(0<E.length&&"error"!=
-E[0].getAttribute("aria-roledescription")){var R=parseFloat(E[0].getAttribute("width")),U=parseFloat(E[0].getAttribute("height"));if(isNaN(R)||isNaN(U))try{var O=E[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(O[2]);U=parseFloat(O[3])}catch(Q){R=R||100,U=U||100}f(this.convertDataUri(Editor.createSvgDataUri(C)),R,U)}else null!=n?n():p({message:mxResources.get("invalidInput")})}catch(Q){p(Q)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
-c).then(function(C){F(C.svg)}).catch(function(C){null!=n?n(C):p(C)})}catch(C){p(C)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(F){this.importXml(F,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",z,null,null,null,t)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))};
-EditorUi.prototype.generatePlantUmlImage=function(c,e,f,p){function n(F,C,E){c1=F>>2;c2=(F&3)<<4|C>>4;c3=(C&15)<<2|E>>6;c4=E&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(F){if(10>F)return String.fromCharCode(48+F);F-=10;if(26>F)return String.fromCharCode(65+F);F-=26;if(26>F)return String.fromCharCode(97+F);F-=26;return 0==F?"-":1==F?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(F){r="";
-for(i=0;i<F.length;i+=3)r=i+2==F.length?r+n(F.charCodeAt(i),F.charCodeAt(i+1),0):i+1==F.length?r+n(F.charCodeAt(i),0,0):r+n(F.charCodeAt(i),F.charCodeAt(i+1),F.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(F){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(E){var R=new Image;R.onload=function(){try{var U=R.width,O=R.height;
-if(0==U&&0==O){var Q=C.result,m=Q.indexOf(","),u=decodeURIComponent(escape(atob(Q.substring(m+1)))),A=mxUtils.parseXml(u).getElementsByTagName("svg");0<A.length&&(U=parseFloat(A[0].getAttribute("width")),O=parseFloat(A[0].getAttribute("height")))}f(C.result,U,O)}catch(B){p(B)}};R.src=C.result};C.onerror=function(E){p(E)}}else p(F)};z.onerror=function(F){p(F)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,f){var p=this.editor.graph,n=null;p.getModel().beginUpdate();try{n=p.insertVertex(null,
-null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,f,p,n,t,z,F){t=null!=t?t:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(O){4==O.readyState&&200<=
-O.status&&299>=O.status&&this.editor.graph.setSelectionCells(this.insertTextAt(O.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var E=Editor.extractGraphModelFromPdf(c);if(null!=E&&0<E.length)return this.importXml(E,e,f,t,!0,F)}if(Editor.isPngDataUrl(c)&&(E=Editor.extractGraphModelFromPng(c),null!=E&&0<E.length))return this.importXml(E,e,f,t,
-!0,F);if("data:image/svg+xml;"==c.substring(0,19))try{E=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(E=c.substring(c.indexOf(",")+1),E=window.atob&&!mxClient.IS_SF?atob(E):Base64.decode(E,!0)):E=decodeURIComponent(c.substring(c.indexOf(",")+1));var R=this.importXml(E,e,f,t,!0,F);if(0<R.length)return R}catch(O){}this.loadImage(c,mxUtils.bind(this,function(O){if("data:"==c.substring(0,5))this.resizeImage(O,c,mxUtils.bind(this,function(u,A,B){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),
-C.snap(f),A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),z,this.maxImageSize);else{var Q=Math.min(1,Math.min(this.maxImageSize/O.width,this.maxImageSize/O.height)),m=Math.round(O.width*Q);O=Math.round(O.height*Q);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),m,O,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var O=null;C.getModel().beginUpdate();try{O=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(f),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(O),C.fireEvent(new mxEventObject("textInserted","cells",[O]))}finally{C.getModel().endUpdate()}C.setSelectionCell(O)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,F);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(O){this.editor.graph.setSelectionCells(this.importXml(O,e,f,t,null,F))}),mxUtils.bind(this,function(O){this.handleError(O)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(f),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));p&&(c=C.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&
+e=c.split("\n");f=e[0].split(" ")[0].replace(/:$/,"");p=f.indexOf("-");0<p&&(f=f.substring(0,p));try{"mindmap"==f&&2<e.length&&(c=extractMermaidMindmap(e))}catch(n){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,f)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,e,f,p,n){var t=mxUtils.bind(this,function(E){this.loadingMermaid=!1;null!=p?p(E):this.handleError(E)}),z=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig);
+e.securityLevel="strict";e.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&e.flowchart&&0<=c.indexOf("$$")&&(e.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(e.theme="dark");var E=mxUtils.bind(this,function(C){try{if(mxClient.IS_IE||mxClient.IS_IE11)C=C.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var F=mxUtils.parseXml(C).getElementsByTagName("svg");if(0<F.length&&"error"!=
+F[0].getAttribute("aria-roledescription")){var R=parseFloat(F[0].getAttribute("width")),U=parseFloat(F[0].getAttribute("height"));if(isNaN(R)||isNaN(U))try{var O=F[0].getAttribute("viewBox").split(/\s+/);R=parseFloat(O[2]);U=parseFloat(O[3])}catch(N){R=R||100,U=U||100}f(this.convertDataUri(Editor.createSvgDataUri(C)),R,U)}else null!=n?n():p({message:mxResources.get("invalidInput")})}catch(N){p(N)}});mermaid.mermaidAPI.initialize(e);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),
+c).then(function(C){E(C.svg)}).catch(function(C){null!=n?n(C):p(C)})}catch(C){p(C)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(E){this.importXml(E,null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",z,null,null,null,t)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))};
+EditorUi.prototype.generatePlantUmlImage=function(c,e,f,p){function n(E,C,F){c1=E>>2;c2=(E&3)<<4|C>>4;c3=(C&15)<<2|F>>6;c4=F&63;r="";r+=t(c1&63);r+=t(c2&63);r+=t(c3&63);return r+=t(c4&63)}function t(E){if(10>E)return String.fromCharCode(48+E);E-=10;if(26>E)return String.fromCharCode(65+E);E-=26;if(26>E)return String.fromCharCode(97+E);E-=26;return 0==E?"-":1==E?"_":"?"}var z=new XMLHttpRequest;z.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(E){r="";
+for(i=0;i<E.length;i+=3)r=i+2==E.length?r+n(E.charCodeAt(i),E.charCodeAt(i+1),0):i+1==E.length?r+n(E.charCodeAt(i),0,0):r+n(E.charCodeAt(i),E.charCodeAt(i+1),E.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(z.responseType="blob");z.onload=function(E){if(200<=this.status&&300>this.status)if("txt"==e)f(this.response);else{var C=new FileReader;C.readAsDataURL(this.response);C.onloadend=function(F){var R=new Image;R.onload=function(){try{var U=R.width,O=R.height;
+if(0==U&&0==O){var N=C.result,m=N.indexOf(","),u=decodeURIComponent(escape(atob(N.substring(m+1)))),A=mxUtils.parseXml(u).getElementsByTagName("svg");0<A.length&&(U=parseFloat(A[0].getAttribute("width")),O=parseFloat(A[0].getAttribute("height")))}f(C.result,U,O)}catch(B){p(B)}};R.src=C.result};C.onerror=function(F){p(F)}}else p(E)};z.onerror=function(E){p(E)};z.send()};EditorUi.prototype.insertAsPreText=function(c,e,f){var p=this.editor.graph,n=null;p.getModel().beginUpdate();try{n=p.insertVertex(null,
+null,"<pre>"+c+"</pre>",e,f,1,1,"text;html=1;align=left;verticalAlign=top;"),p.updateCellSize(n,!0)}finally{p.getModel().endUpdate()}return n};EditorUi.prototype.insertTextAt=function(c,e,f,p,n,t,z,E){t=null!=t?t:!0;z=null!=z?z:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(O){4==O.readyState&&200<=
+O.status&&299>=O.status&&this.editor.graph.setSelectionCells(this.insertTextAt(O.responseText,e,f,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(n||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var C=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var F=Editor.extractGraphModelFromPdf(c);if(null!=F&&0<F.length)return this.importXml(F,e,f,t,!0,E)}if(Editor.isPngDataUrl(c)&&(F=Editor.extractGraphModelFromPng(c),null!=F&&0<F.length))return this.importXml(F,e,f,t,
+!0,E);if("data:image/svg+xml;"==c.substring(0,19))try{F=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(F=c.substring(c.indexOf(",")+1),F=window.atob&&!mxClient.IS_SF?atob(F):Base64.decode(F,!0)):F=decodeURIComponent(c.substring(c.indexOf(",")+1));var R=this.importXml(F,e,f,t,!0,E);if(0<R.length)return R}catch(O){}this.loadImage(c,mxUtils.bind(this,function(O){if("data:"==c.substring(0,5))this.resizeImage(O,c,mxUtils.bind(this,function(u,A,B){C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),
+C.snap(f),A,B,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(u)+";"))}),z,this.maxImageSize);else{var N=Math.min(1,Math.min(this.maxImageSize/O.width,this.maxImageSize/O.height)),m=Math.round(O.width*N);O=Math.round(O.height*N);C.setSelectionCell(C.insertVertex(null,null,"",C.snap(e),C.snap(f),m,O,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var O=null;C.getModel().beginUpdate();try{O=C.insertVertex(C.getDefaultParent(),null,c,C.snap(e),C.snap(f),1,1,"text;"+(p?"html=1;":"")),C.updateCellSize(O),C.fireEvent(new mxEventObject("textInserted","cells",[O]))}finally{C.getModel().endUpdate()}C.setSelectionCell(O)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,f,t,null,E);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(O){this.editor.graph.setSelectionCells(this.importXml(O,e,f,t,null,E))}),mxUtils.bind(this,function(O){this.handleError(O)}));else{C=this.editor.graph;n=null;C.getModel().beginUpdate();try{n=C.insertVertex(C.getDefaultParent(),null,"",C.snap(e),C.snap(f),1,1,"text;whiteSpace=wrap;"+(p?"html=1;":""));C.fireEvent(new mxEventObject("textInserted","cells",[n]));p&&(c=C.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");n.value=c;C.updateCellSize(n);if(0<this.maxTextWidth&&
n.geometry.width>this.maxTextWidth){var U=C.getPreferredSizeForCell(n,this.maxTextWidth);n.geometry.width=U.width;n.geometry.height=U.height}Graph.isLink(n.value)&&C.setLinkForCell(n,n.value);n.geometry.width+=C.gridSize;n.geometry.height+=C.gridSize}finally{C.getModel().endUpdate()}return[n]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};EditorUi.prototype.convertDataUri=
function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var f=
-document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.importFiles(f.files,null,null,this.maxImageSize),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.importFileInputElt=f}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,F){StorageFile.listFiles(this,"F",z,F)});window.openBrowserFile=
-mxUtils.bind(this,function(z,F,C){StorageFile.getFileContent(this,z,F,C)});window.deleteBrowserFile=mxUtils.bind(this,function(z,F,C){StorageFile.deleteFile(this,z,F,C)});if(!e){var p=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,F){null!=F&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(F)?(z=new Blob([z],{type:"application/octet-stream"}),this.importVisio(z,
-mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,F)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,t=n.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=p;t.apply(n,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
-function(c,e,f){var p=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))f();else{var z=0,F,C=!1;t.forEach(function(E,R){E=R.name.toLowerCase();"diagram/diagram.xml"==E?(C=!0,R.async("string").then(function(U){0==U.indexOf("<mxfile ")?e(U):f()})):0==E.indexOf("versions/")&&(E=parseInt(E.substr(9)),E>z&&(z=E,F=R))});0<z?F.async("string").then(function(E){(new XMLHttpRequest).upload&&p.isRemoteFileFormat(E,
-c.name)?p.isOffline()?p.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f):p.parseFileData(E,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?e(R.responseText):f())}),c.name):f()}):C||f()}},function(t){f(t)}):f()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,f))};EditorUi.prototype.importFile=function(c,e,f,p,n,t,z,
-F,C,E,R,U){E=null!=E?E:!0;var O=!1,Q=null,m=mxUtils.bind(this,function(u){var A=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,z)),this.showSidebar()):A=this.importXml(u,f,p,E,null,null!=U?mxEvent.isControlDown(U):null);null!=F&&F(A)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(c),null!=R&&0<R.length&&(Q=this.importXml(R,f,p,E,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(C=this.editor.graph,
-R=c.indexOf(";"),0<R&&(c=c.substring(0,R)+c.substring(c.indexOf(",",R+1))),E&&C.isGridEnabled()&&(f=C.snap(f),p=C.snap(p)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(R+="editableCssRules=.*;"),Q=[C.insertVertex(null,null,"",f,p,n,t,R+"image="+c+";")])):/(\.*<graphml )/.test(c)?(O=!0,this.importGraphML(c,m)):null!=C&&null!=z&&EditorUi.isVisioFilename(z)?(O=!0,this.importVisio(C,m)):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(O=!0,e=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?m(u.responseText):null!=F&&(F(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(C,e,z)):0==c.indexOf("PK")&&null!=C?(O=!0,this.importZipFile(C,m,mxUtils.bind(this,function(){Q=
-this.insertTextAt(this.validateFileData(c),f,p,!0,null,E);F(Q)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(Q=this.insertTextAt(this.validateFileData(c),f,p,!0,null,E,null,null!=U?mxEvent.isControlDown(U):null));O||null==F||F(Q);return Q};EditorUi.prototype.importFiles=function(c,e,f,p,n,t,z,F,C,E,R,U,O){p=null!=p?p:this.maxImageSize;E=null!=E?E:this.maxImageBytes;var Q=null!=e&&null!=f,m=!0;e=null!=e?e:0;f=null!=f?f:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=R||
+document.createElement("input");f.setAttribute("type","file");mxEvent.addListener(f,"change",mxUtils.bind(this,function(){null!=f.files&&(this.importFiles(f.files,null,null,this.maxImageSize),f.type="",f.type="file",f.value="")}));f.style.display="none";document.body.appendChild(f);this.importFileInputElt=f}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(z,E){StorageFile.listFiles(this,"F",z,E)});window.openBrowserFile=
+mxUtils.bind(this,function(z,E,C){StorageFile.getFileContent(this,z,E,C)});window.deleteBrowserFile=mxUtils.bind(this,function(z,E,C){StorageFile.deleteFile(this,z,E,C)});if(!e){var p=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(z){this.hideDialog(z)}));window.openFile.setConsumer(mxUtils.bind(this,function(z,E){null!=E&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(E)?(z=new Blob([z],{type:"application/octet-stream"}),this.importVisio(z,
+mxUtils.bind(this,function(C){this.importXml(C,0,0,!0)}),null,E)):this.editor.graph.setSelectionCells(this.importXml(z,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var n=this.dialog,t=n.close;this.dialog.close=mxUtils.bind(this,function(z){Editor.useLocalStorage=p;t.apply(n,arguments);z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=
+function(c,e,f){var p=this,n=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(t){if(mxUtils.isEmptyObject(t.files))f();else{var z=0,E,C=!1;t.forEach(function(F,R){F=R.name.toLowerCase();"diagram/diagram.xml"==F?(C=!0,R.async("string").then(function(U){0==U.indexOf("<mxfile ")?e(U):f()})):0==F.indexOf("versions/")&&(F=parseInt(F.substr(9)),F>z&&(z=F,E=R))});0<z?E.async("string").then(function(F){(new XMLHttpRequest).upload&&p.isRemoteFileFormat(F,
+c.name)?p.isOffline()?p.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,f):p.parseFileData(F,mxUtils.bind(this,function(R){4==R.readyState&&(200<=R.status&&299>=R.status?e(R.responseText):f())}),c.name):f()}):C||f()}},function(t){f(t)}):f()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?n():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",n,null,null,null,f))};EditorUi.prototype.importFile=function(c,e,f,p,n,t,z,
+E,C,F,R,U){F=null!=F?F:!0;var O=!1,N=null,m=mxUtils.bind(this,function(u){var A=null;null!=u&&"<mxlibrary"==u.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,u,z)),this.showSidebar()):A=this.importXml(u,f,p,F,null,null!=U?mxEvent.isControlDown(U):null);null!=E&&E(A)});"image"==e.substring(0,5)?(C=!1,"image/png"==e.substring(0,9)&&(R=R?null:this.extractGraphModelFromPng(c),null!=R&&0<R.length&&(N=this.importXml(R,f,p,F,null,null!=U?mxEvent.isControlDown(U):null),C=!0)),C||(C=this.editor.graph,
+R=c.indexOf(";"),0<R&&(c=c.substring(0,R)+c.substring(c.indexOf(",",R+1))),F&&C.isGridEnabled()&&(f=C.snap(f),p=C.snap(p)),R="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==e.substring(0,9)&&(R+="editableCssRules=.*;"),N=[C.insertVertex(null,null,"",f,p,n,t,R+"image="+c+";")])):/(\.*<graphml )/.test(c)?(O=!0,this.importGraphML(c,m)):null!=C&&null!=z&&EditorUi.isVisioFilename(z)?(O=!0,this.importVisio(C,m)):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(c,z)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(O=!0,e=mxUtils.bind(this,function(u){4==u.readyState&&(200<=u.status&&299>=u.status?m(u.responseText):null!=E&&(E(null),this.showError(mxResources.get("error"),413==u.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,e,z):this.parseFile(C,e,z)):0==c.indexOf("PK")&&null!=C?(O=!0,this.importZipFile(C,m,mxUtils.bind(this,function(){N=
+this.insertTextAt(this.validateFileData(c),f,p,!0,null,F);E(N)}))):/(\.v(sd|dx))($|\?)/i.test(z)||/(\.vs(s|x))($|\?)/i.test(z)||(N=this.insertTextAt(this.validateFileData(c),f,p,!0,null,F,null,null!=U?mxEvent.isControlDown(U):null));O||null==E||E(N);return N};EditorUi.prototype.importFiles=function(c,e,f,p,n,t,z,E,C,F,R,U,O){p=null!=p?p:this.maxImageSize;F=null!=F?F:this.maxImageBytes;var N=null!=e&&null!=f,m=!0;e=null!=e?e:0;f=null!=f?f:0;var u=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var A=R||
this.resampleThreshold,B=0;B<c.length;B++)if("image/svg"!==c[B].type.substring(0,9)&&"image/"===c[B].type.substring(0,6)&&c[B].size>A){u=!0;break}var H=mxUtils.bind(this,function(){var T=this.editor.graph,k=T.gridSize;n=null!=n?n:mxUtils.bind(this,function(S,V,W,X,Z,Y,ba,ea,ca){try{if(null!=S&&"<mxlibrary"==S.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,S,ba)),this.showSidebar(),null;this.isCompatibleString(S)&&1==c.length&&null!=O&&"drop"==O.type&&this.isBlankFile()&&
-!this.canUndo()&&(Q=!1,X=W=0);return this.importFile(S,V,W,X,Z,Y,ba,ea,ca,Q,U,O)}catch(fa){return this.handleError(fa),null}});t=null!=t?t:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var v=c.length,G=v,I=[],M=mxUtils.bind(this,function(S,V){I[S]=V;if(0==--G){this.spinner.stop();if(null!=F)F(I);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<I.length;S++){var X=I[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}t(W)}}),
+!this.canUndo()&&(N=!1,X=W=0);return this.importFile(S,V,W,X,Z,Y,ba,ea,ca,N,U,O)}catch(fa){return this.handleError(fa),null}});t=null!=t?t:mxUtils.bind(this,function(S){T.setSelectionCells(S)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var v=c.length,G=v,I=[],M=mxUtils.bind(this,function(S,V){I[S]=V;if(0==--G){this.spinner.stop();if(null!=E)E(I);else{var W=[];T.getModel().beginUpdate();try{for(S=0;S<I.length;S++){var X=I[S]();null!=X&&(W=W.concat(X))}}finally{T.getModel().endUpdate()}}t(W)}}),
P=0;P<v;P++)mxUtils.bind(this,function(S){var V=c[S];if(null!=V){var W=new FileReader;W.onload=mxUtils.bind(this,function(X){if(null==z||z(V))try{if("image/"==V.type.substring(0,6))if("image/svg"==V.type.substring(0,9)){var Z=Graph.clipSvgDataUri(X.target.result),Y=Z.indexOf(","),ba=decodeURIComponent(escape(atob(Z.substring(Y+1)))),ea=mxUtils.parseXml(ba),ca=ea.getElementsByTagName("svg");if(0<ca.length){var fa=ca[0],aa=U?null:fa.getAttribute("content");null!=aa&&"<"!=aa.charAt(0)&&"%"!=aa.charAt(0)&&
(aa=unescape(window.atob?atob(aa):Base64.decode(aa,!0)));null!=aa&&"%"==aa.charAt(0)&&(aa=decodeURIComponent(aa));null==aa||"<mxfile "!==aa.substring(0,8)&&"<mxGraphModel "!==aa.substring(0,14)?M(S,mxUtils.bind(this,function(){try{if(null!=ea){var pa=ea.getElementsByTagName("svg");if(0<pa.length){var na=pa[0],ia=na.getAttribute("width"),wa=na.getAttribute("height");ia=null!=ia&&"%"!=ia.charAt(ia.length-1)?parseFloat(ia):NaN;wa=null!=wa&&"%"!=wa.charAt(wa.length-1)?parseFloat(wa):NaN;var ua=na.getAttribute("viewBox");
if(null==ua||0==ua.length)na.setAttribute("viewBox","0 0 "+ia+" "+wa);else if(isNaN(ia)||isNaN(wa)){var va=ua.split(" ");3<va.length&&(ia=parseFloat(va[2]),wa=parseFloat(va[3]))}Z=Editor.createSvgDataUri(mxUtils.getXml(na));var Ca=Math.min(1,Math.min(p/Math.max(1,ia)),p/Math.max(1,wa)),ja=n(Z,V.type,e+S*k,f+S*k,Math.max(1,Math.round(ia*Ca)),Math.max(1,Math.round(wa*Ca)),V.name);if(null!=ja&&(isNaN(ia)||isNaN(wa))){var oa=new Image;oa.onload=mxUtils.bind(this,function(){ia=Math.max(1,oa.width);wa=
Math.max(1,oa.height);ja[0].geometry.width=ia;ja[0].geometry.height=wa;na.setAttribute("viewBox","0 0 "+ia+" "+wa);Z=Editor.createSvgDataUri(mxUtils.getXml(na));var ma=Z.indexOf(";");0<ma&&(Z=Z.substring(0,ma)+Z.substring(Z.indexOf(",",ma+1)));T.setCellStyles("image",Z,[ja[0]])});oa.src=Editor.createSvgDataUri(mxUtils.getXml(na))}return ja}}}catch(ma){}return null})):M(S,mxUtils.bind(this,function(){return n(aa,"text/xml",e+S*k,f+S*k,0,0,V.name)}))}else M(S,mxUtils.bind(this,function(){return null}))}else{Y=
!1;if("image/png"==V.type){var da=U?null:this.extractGraphModelFromPng(X.target.result);if(null!=da&&0<da.length){var ha=new Image;ha.src=X.target.result;M(S,mxUtils.bind(this,function(){return n(da,"text/xml",e+S*k,f+S*k,ha.width,ha.height,V.name)}));Y=!0}}Y||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
-this.loadImage(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(na,ia,wa){M(S,mxUtils.bind(this,function(){if(null!=na&&na.length<E){var ua=m&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(p/ia,p/wa)):1;return n(na,V.type,e+S*k,f+S*k,Math.round(ia*ua),Math.round(wa*ua),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,p,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=
+this.loadImage(X.target.result,mxUtils.bind(this,function(pa){this.resizeImage(pa,X.target.result,mxUtils.bind(this,function(na,ia,wa){M(S,mxUtils.bind(this,function(){if(null!=na&&na.length<F){var ua=m&&this.isResampleImageSize(V.size,R)?Math.min(1,Math.min(p/ia,p/wa)):1;return n(na,V.type,e+S*k,f+S*k,Math.round(ia*ua),Math.round(wa*ua),V.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),m,p,R,V.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else Z=
X.target.result,n(Z,V.type,e+S*k,f+S*k,240,160,V.name,function(pa){M(S,function(){return pa})},V)}catch(pa){M(S,mxUtils.bind(this,function(){return null})),null!=window.console&&console.error(pa,V)}else M(S,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(V.name)?n(null,V.type,e+S*k,f+S*k,240,160,V.name,function(X){M(S,function(){return X})},V):"image"==V.type.substring(0,5)||"application/pdf"==V.type?W.readAsDataURL(V):W.readAsText(V)}})(P)});if(u){u=[];for(B=0;B<c.length;B++)u.push(c[B]);
c=u;this.confirmImageResize(function(T){m=T;H()},C)}else H()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var f=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},p=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,n=function(t,z){if(t||e)mxSettings.setResizeImages(t?
z:null),mxSettings.save();f();c(z)};null==p||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(t){n(t,!0)},function(t){n(t,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):n(!1,p)};EditorUi.prototype.parseFile=function(c,e,
f){f=null!=f?f:c.name;var p=new FileReader;p.onload=mxUtils.bind(this,function(){this.parseFileData(p.result,e,f)});p.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,f){var p=new XMLHttpRequest;p.open("POST",OPEN_URL);p.setRequestHeader("Content-Type","application/x-www-form-urlencoded");p.onreadystatechange=function(){e(p)};p.send("format=xml&filename="+encodeURIComponent(f)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(n){}};
-EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,f,p,n,t,z){n=null!=n?n:this.maxImageSize;var F=Math.max(1,c.width),C=Math.max(1,c.height),E=e;if(p&&this.isResampleImageSize(null!=z?z:e.length,t))try{var R=Math.max(F/n,C/n);if(1<R){var U=Math.round(F/R),O=Math.round(C/R),Q=document.createElement("canvas");Q.width=U;Q.height=O;Q.getContext("2d").drawImage(c,0,0,U,O);var m=Q.toDataURL();if(m.length<e.length){var u=
-document.createElement("canvas");u.width=U;u.height=O;var A=u.toDataURL();m!==A&&(e=m,F=U,C=O)}}}catch(B){}p&&E!=e&&n>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,f,p,n/1.5,t,z):f(e,F,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=f&&(p.onerror=f);p.src=c}catch(n){if(null!=
+EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,f,p,n,t,z){n=null!=n?n:this.maxImageSize;var E=Math.max(1,c.width),C=Math.max(1,c.height),F=e;if(p&&this.isResampleImageSize(null!=z?z:e.length,t))try{var R=Math.max(E/n,C/n);if(1<R){var U=Math.round(E/R),O=Math.round(C/R),N=document.createElement("canvas");N.width=U;N.height=O;N.getContext("2d").drawImage(c,0,0,U,O);var m=N.toDataURL();if(m.length<e.length){var u=
+document.createElement("canvas");u.width=U;u.height=O;var A=u.toDataURL();m!==A&&(e=m,E=U,C=O)}}}catch(B){}p&&F!=e&&n>this.maxImageSize/2&&e.length>this.maxImageBytes?this.resizeImage(c,e,f,p,n/1.5,t,z):f(e,E,C)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,f){try{var p=new Image;p.onload=function(){p.width=0<p.width?p.width:120;p.height=0<p.height?p.height:120;e(p)};null!=f&&(p.onerror=f);p.src=c}catch(n){if(null!=
f)f(n);else throw n;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var q=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());q.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&
null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};var y=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,e=this.editor.graph,f=e.isEnabled;e.isEnabled=function(){return f.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(k){var v=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(v)&&
!e.freehand.isDrawing()||mxEvent.isPopupTrigger(v)&&(null==k.getState()||mxEvent.isControlDown(v)||mxEvent.isShiftDown(v))});e.cellEditor.editPlantUmlData=function(k,v,G){var I=JSON.parse(G);v=new TextareaDialog(c,mxResources.get("plantUml")+":",I.data,function(M){null!=M&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(M,I.format,function(P,S,V){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==I.format)e.labelChanged(k,"<pre>"+P+"</pre>"),e.updateCellSize(k,
@@ -13295,14 +13299,14 @@ null,null,400,220);c.showDialog(v.container,420,300,!0,!0);v.init()};var p=e.cel
e.getLinkTitle=function(k){return c.getLinkTitle(k)};e.customLinkClicked=function(k,v){var G=!1;try{var I=this.getGraphBounds();c.handleCustomLink(k,v);G=!0;c.chromelessResize&&!I.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(v))}catch(M){c.handleError(M)}return G};var n=e.parseBackgroundImage;e.parseBackgroundImage=function(k){var v=n.apply(this,arguments);null!=v&&null!=v.src&&Graph.isPageLink(v.src)&&(v={originalSrc:v.src});return v};var t=e.setBackgroundImage;e.setBackgroundImage=
function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));t.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){e.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,v){k=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=k){var G=k.indexOf(",");if(0<G)for(k=k.substring(G+
1),v=v.getProperty("patches"),G=0;G<v.length;G++)if(null!=v[G][EditorUi.DIFF_UPDATE]&&null!=v[G][EditorUi.DIFF_UPDATE][k]||null!=v[G][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(v[G][EditorUi.DIFF_REMOVE],k)){e.refreshBackgroundImage();break}}}));var z=e.getBackgroundImageObject;e.getBackgroundImageObject=function(k,v){var G=z.apply(this,arguments);null!=G&&null!=G.originalSrc&&(G=v?c.createImageForPageLink(G.originalSrc,null,null,!0):{src:G.originalSrc});return G};this.isOffline()||"undefined"===typeof window.EditDataDialog||
-(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var F=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return F.apply(this,arguments)};var C=e.addClickHandler;e.addClickHandler=function(k,v,G){var I=v;v=
-function(M,P,S){if(null==P){var V=mxEvent.getSource(M);"a"==V.nodeName.toLowerCase()&&(P=V.getAttribute("href"))}null!=P&&e.isCustomLink(P)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&e.customLinkClicked(P,S)&&mxEvent.consume(M);null!=I&&I(M,P,S)};C.call(this,k,v,G)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var E=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,v,G){e.isSelectionEmpty()&&
-"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,G);E.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,G);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,G)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,v,G){if(c.editor.graph.isSelectionEmpty())R.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],
+(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var E=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return E.apply(this,arguments)};var C=e.addClickHandler;e.addClickHandler=function(k,v,G){var I=v;v=
+function(M,P,S){if(null==P){var V=mxEvent.getSource(M);"a"==V.nodeName.toLowerCase()&&(P=V.getAttribute("href"))}null!=P&&e.isCustomLink(P)&&(mxEvent.isTouchEvent(M)||!mxEvent.isPopupTrigger(M))&&e.customLinkClicked(P,S)&&mxEvent.consume(M);null!=I&&I(M,P,S)};C.call(this,k,v,G)};y.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var F=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,v,G){e.isSelectionEmpty()&&
+"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,G);F.apply(this,arguments);e.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,G);e.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,G)};var R=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,v,G){if(c.editor.graph.isSelectionEmpty())R.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],
null,G);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,v,G):this.addPopupMenuArrangeItems(k,v,G),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,G),this.isShowCellEditItems()||this.addPopupDeleteItem(k,v,G),this.addMenuItems(k,["lockUnlock","-"],null,G),!this.isShowStyleItems()){if(1==e.getSelectionCount()&&!e.isCellLocked(v)&&e.isCellEditable(v)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),e.getModel().isEdge(v))){this.addSubmenu("line",
k);var I=e.getModel().getGeometry(v);null!=I&&null!=I.points&&0<I.points.length&&this.addMenuItems(k,["clearWaypoints"],null,G)}1==e.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,G);I=c.getSelectionState();null!=I.mergeCell?this.addMenuItem(k,"mergeCells"):(1<I.style.colspan||1<I.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=
function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var U=e.getExportVariables;e.getExportVariables=function(){var k=U.apply(this,arguments),v=c.getCurrentFile();null!=v&&(k.filename=v.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?
-mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var O=e.getGlobalVariable;e.getGlobalVariable=function(k){var v=c.getCurrentFile();return"filename"==k&&null!=v?v.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:O.apply(this,arguments)};var Q=null,m=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),
-v=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;Q!=v&&k==m&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());Q=v;m=k}));var u=e.labelLinkClicked;e.labelLinkClicked=function(k,v,G){var I=v.getAttribute("href");if(null==I||!e.isCustomLink(I)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))u.apply(this,arguments);else{if(!e.isEnabled()||null!=k&&e.isCellLocked(k.cell))e.customLinkClicked(I),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=
+mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var O=e.getGlobalVariable;e.getGlobalVariable=function(k){var v=c.getCurrentFile();return"filename"==k&&null!=v?v.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:O.apply(this,arguments)};var N=null,m=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),
+v=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;N!=v&&k==m&&(e.invalidateDescendantsWithPlaceholders(e.model.getRoot()),e.view.validate());N=v;m=k}));var u=e.labelLinkClicked;e.labelLinkClicked=function(k,v,G){var I=v.getAttribute("href");if(null==I||!e.isCustomLink(I)||!mxEvent.isTouchEvent(G)&&mxEvent.isPopupTrigger(G))u.apply(this,arguments);else{if(!e.isEnabled()||null!=k&&e.isCellLocked(k.cell))e.customLinkClicked(I),e.getRubberband().reset();mxEvent.consume(G)}};this.editor.getOrCreateFilename=
function(){var k=c.defaultFilename,v=c.getCurrentFile();null!=v&&(k=null!=v.getTitle()?v.getTitle():k);return k};var A=this.actions.get("print");A.setEnabled(!mxClient.IS_IOS||!navigator.standalone);A.visible=A.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),
this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]=
"synchronize","1"==urlParams.embedInline&&e.addListener(mxEvent.ESCAPE,function(k,v){null!=v&&e.isEnabled()&&!e.isEditing()&&null!=v.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&e.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var v=e.cellEditor.text2,
@@ -13324,20 +13328,20 @@ if(!this.editor.chromeless||this.editor.editable)if(A=Editor.currentTheme,"simpl
!Editor.isSettingsEnabled()||"1"==urlParams.embed||A&&"auto"!=mxSettings.settings.darkMode||(A=mxSettings.settings.darkMode));"auto"==A&&this.isAutoDarkModeSupported()&&(A=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof A?"1"==A:A);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==
urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,v){e.enableFlowAnimation=Editor.enableAnimations;e.refresh()}));e.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&
c.editor.loadFonts()};var x=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,e=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=e&&c<e?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<e&&c>=e&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=
-c}x.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,f=this.sketchPickerMenuElt,p=this.editor.graph;f.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(E){mxEvent.getSource(E)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(E),mxEvent.getClientY(E)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var n=
-document.createElement("div");n.style.position="absolute";n.style.width="10px";n.style.height="10px";n.style.borderRadius="5px";n.style.border="1px solid gray";n.style.background="#ffffff";n.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(n);this.bottomResizer=n;var t=null,z=null,F=null,C=null;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(E){C=parseInt(this.diagramContainer.style.height);z=mxEvent.getClientY(E);p.popupMenuHandler.hideMenu();mxEvent.consume(E)}));
-n=n.cloneNode(!1);n.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(n);this.rightResizer=n;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(E){F=parseInt(this.diagramContainer.style.width);t=mxEvent.getClientX(E);p.popupMenuHandler.hideMenu();mxEvent.consume(E)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(E){var R=!1;null!=t&&(this.diagramContainer.style.width=Math.max(20,F+mxEvent.getClientX(E)-t)+"px",R=!0);null!=z&&(this.diagramContainer.style.height=
-Math.max(20,C+mxEvent.getClientY(E)-z)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(E){null==t&&null==z||mxEvent.consume(E);z=t=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
-"hidden";this.sketchMenubarElt.style.display="none";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(E){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(E){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
+c}x.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,e=this.sketchMainMenuElt,f=this.sketchPickerMenuElt,p=this.editor.graph;f.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(F){mxEvent.getSource(F)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(F),mxEvent.getClientY(F)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var n=
+document.createElement("div");n.style.position="absolute";n.style.width="10px";n.style.height="10px";n.style.borderRadius="5px";n.style.border="1px solid gray";n.style.background="#ffffff";n.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(n);this.bottomResizer=n;var t=null,z=null,E=null,C=null;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(F){C=parseInt(this.diagramContainer.style.height);z=mxEvent.getClientY(F);p.popupMenuHandler.hideMenu();mxEvent.consume(F)}));
+n=n.cloneNode(!1);n.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(n);this.rightResizer=n;mxEvent.addGestureListeners(n,mxUtils.bind(this,function(F){E=parseInt(this.diagramContainer.style.width);t=mxEvent.getClientX(F);p.popupMenuHandler.hideMenu();mxEvent.consume(F)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(F){var R=!1;null!=t&&(this.diagramContainer.style.width=Math.max(20,E+mxEvent.getClientX(F)-t)+"px",R=!0);null!=z&&(this.diagramContainer.style.height=
+Math.max(20,C+mxEvent.getClientY(F)-z)+"px",R=!0);R&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(F){null==t&&null==z||mxEvent.consume(F);z=t=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
+"hidden";this.sketchMenubarElt.style.display="none";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none";this.addListener("editInlineStart",mxUtils.bind(this,function(F){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(F){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility=
"hidden";e.style.visibility="hidden";c.style.visibility="hidden";f.style.display="none"}));this.windowResized=mxUtils.bind(this,function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var f=e.clipboardData||e.originalEvent.clipboardData,p=!1,n=0;n<f.types.length;n++)if("text/"===f.types[n].substring(0,5)){p=!0;break}if(!p){var t=
-f.items;for(index in t){var z=t[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(C,E,R,U,O,Q){c.insertImage(C,O,Q)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var E=0;E<C.length;E++)C[E]()});else{var F=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],F.x,F.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML=
+f.items;for(index in t){var z=t[index];if("file"===z.kind){if(c.isEditing())this.importFiles([z.getAsFile()],0,0,this.maxImageSize,function(C,F,R,U,O,N){c.insertImage(C,O,N)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var F=0;F<C.length;F++)C[F]()});else{var E=this.editor.graph.getInsertPoint();this.importFiles([z.getAsFile()],E.x,E.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(C){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){f.innerHTML=
"&nbsp;";f.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,f=document.createElement("div");f.setAttribute("autocomplete","off");f.setAttribute("autocorrect","off");f.setAttribute("autocapitalize","off");f.setAttribute("spellcheck","false");f.style.textRendering="optimizeSpeed";f.style.fontFamily="monospace";f.style.wordBreak="break-all";f.style.background="transparent";f.style.color="transparent";f.style.position="absolute";f.style.whiteSpace="nowrap";f.style.overflow=
"hidden";f.style.display="block";f.style.fontSize="1";f.style.zIndex="-1";f.style.resize="none";f.style.outline="none";f.style.width="1px";f.style.height="1px";mxUtils.setOpacity(f,0);f.contentEditable=!0;f.innerHTML="&nbsp;";var p=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(t){var z=mxEvent.getSource(t);null==e.container||!e.isEnabled()||e.isMouseDown||
e.isEditing()||null!=this.dialog||"INPUT"==z.nodeName||"TEXTAREA"==z.nodeName||"true"==z.contentEditable||224!=t.keyCode&&(mxClient.IS_MAC||17!=t.keyCode)&&(!mxClient.IS_MAC||91!=t.keyCode&&93!=t.keyCode)||p||(f.style.left=e.container.scrollLeft+10+"px",f.style.top=e.container.scrollTop+10+"px",t=e.container.scrollLeft,z=e.container.scrollTop,e.container.appendChild(f),p=!0,f.focus(),document.execCommand("selectAll",!1,null),e.container.scrollLeft=t,e.container.scrollTop=z)}));mxEvent.addListener(document,
"keyup",mxUtils.bind(this,function(t){var z=t.keyCode;window.setTimeout(mxUtils.bind(this,function(){!p||224!=z&&17!=z&&91!=z&&93!=z||(p=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),f.parentNode.removeChild(f),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(f,"copy",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),this.copyCells(f),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(f,"cut",mxUtils.bind(this,function(t){if(e.isEnabled())try{mxClipboard.copy(e),
-this.copyCells(f,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(t){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent()))try{if(f.innerHTML="&nbsp;",f.focus(),null!=t.clipboardData&&(Graph.removePasteFormatting(f.firstChild),this.pasteCells(t,f,!0,!0)),!mxEvent.isConsumed(t)){var z=e.container.scrollLeft,F=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{e.container.scrollLeft=z,e.container.scrollTop=F,Graph.removePasteFormatting(f.firstChild),
+this.copyCells(f,!0),c()}catch(z){this.handleError(z)}}));mxEvent.addListener(f,"paste",mxUtils.bind(this,function(t){if(e.isEnabled()&&!e.isCellLocked(e.getDefaultParent()))try{if(f.innerHTML="&nbsp;",f.focus(),null!=t.clipboardData&&(Graph.removePasteFormatting(f.firstChild),this.pasteCells(t,f,!0,!0)),!mxEvent.isConsumed(t)){var z=e.container.scrollLeft,E=e.container.scrollTop;window.setTimeout(mxUtils.bind(this,function(){try{e.container.scrollLeft=z,e.container.scrollTop=E,Graph.removePasteFormatting(f.firstChild),
this.pasteCells(t,f,!1,!0)}catch(C){this.handleError(C)}}),0)}}catch(C){this.handleError(C)}}),!0);var n=this.isSelectionAllowed;this.isSelectionAllowed=function(t){return mxEvent.getSource(t)==f?!0:n.apply(this,arguments)}};EditorUi.prototype.setCurrentTheme=function(c,e){mxSettings.setUi(c);(e=this.doSetCurrentTheme(c)||e)||this.alert(mxResources.get("restartForChangeRequired"))};EditorUi.prototype.isDefaultTheme=function(c){return""==c||"dark"==c||"default"==c||"kennedy"==c||null==c};EditorUi.prototype.doSetCurrentTheme=
-function(c,e,f){function p(F){return"simple"==F||"sketch"==F}var n=Editor.currentTheme,t="simple"==n&&this.isDefaultTheme(c)||this.isDefaultTheme(n)&&"simple"==c;if((t||f)&&!this.themeSwitching){var z=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){p(n)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display=
+function(c,e,f){function p(E){return"simple"==E||"sketch"==E}var n=Editor.currentTheme,t="simple"==n&&this.isDefaultTheme(c)||this.isDefaultTheme(n)&&"simple"==c;if((t||f)&&!this.themeSwitching){var z=this.saveScrollState();this.editor.graph.stopEditing(!1);this.container.style.opacity=0;Editor.currentTheme=c;this.themeSwitching=!0;window.setTimeout(mxUtils.bind(this,function(){p(n)&&this.isDefaultTheme(c)?(this.menubarContainer.style.display="",this.toolbarContainer.style.display="",this.tabContainer.style.display=
"",this.hsplit.style.display="block",this.menubarHeight=App.prototype.menubarHeight):this.isDefaultTheme(n)&&p(c)&&(this.menubarContainer.style.display="none",this.toolbarContainer.style.display="none",this.menubarHeight=0,"simple"!=c?(this.tabContainer.style.display="none",this.hsplit.style.display="none",this.hsplitPosition=0):this.tabContainer.style.display="");this.switchTheme(c);this.fireEvent(new mxEventObject("currentThemeChanged"));this.editor.fireEvent(new mxEventObject("statusChanged"));
this.editor.graph.refresh();this.restoreScrollState(z);this.container.style.opacity="";delete this.themeSwitching;isLocalStorage&&p(c)&&this.setTabContainerVisible(null!=mxSettings.settings.pages?mxSettings.settings.pages:!0);null!=e&&e()}),0)}return t};EditorUi.prototype.saveScrollState=function(){var c=this.editor.graph.view.translate,e=this.diagramContainer.scrollLeft,f=this.diagramContainer.scrollTop;null!=this.embedViewport&&(Editor.inlineFullscreen?(e-=this.embedViewport.x,f-=this.embedViewport.y):
(e+=this.embedViewport.x,f+=this.embedViewport.y));return{x:e,y:f,tx:c.x,ty:c.y}};EditorUi.prototype.restoreScrollState=function(c){var e=this.editor.graph.view.scale,f=this.editor.graph.view.translate;this.diagramContainer.scrollLeft=c.x+(f.x-c.tx)*e;this.diagramContainer.scrollTop=c.y+(f.y-c.ty)*e};EditorUi.prototype.installStatusMinimizer=function(c){c=null!=c?c:this.statusContainer.parentNode;var e=!1;mxEvent.addListener(c,"mouseenter",mxUtils.bind(this,function(){"sketch"==Editor.currentTheme&&
@@ -13396,15 +13400,15 @@ this.addListener("copyConnectChanged",mxUtils.bind(this,function(e,f){mxSettings
c.view.defaultGridColor+", "+c.view.defaultDarkGridColor+")";this.addListener("gridColorChanged",mxUtils.bind(this,function(e,f){mxSettings.setGridColor(c.view.defaultGridColor,!1);mxSettings.setGridColor(c.view.defaultDarkGridColor,!0);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(e,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();if(!this.editor.chromeless||
this.editor.editable)null!=mxSettings.settings.enableAnimations&&(Editor.enableAnimations=mxSettings.settings.enableAnimations),this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(e,f){mxSettings.settings.enableAnimations=Editor.enableAnimations;mxSettings.save()}));null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",
mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,f){try{null!=navigator.clipboard&&"function"===typeof window.ClipboardItem&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,
-function(p,n){try{this.spinner.stop();var t=this.createImageDataUri(p,e,"png"),z=parseInt(n.getAttribute("width")),F=parseInt(n.getAttribute("height"));this.writeImageToClipboard(t,z,F,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),null,null,null!=f?f:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?
+function(p,n){try{this.spinner.stop();var t=this.createImageDataUri(p,e,"png"),z=parseInt(n.getAttribute("width")),E=parseInt(n.getAttribute("height"));this.writeImageToClipboard(t,z,E,mxUtils.bind(this,function(C){this.handleError(C)}))}catch(C){this.handleError(C)}}),null,null,null,mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}),null,null,null!=f?f:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<c.length?
c:null)}catch(p){this.handleError(p)}};EditorUi.prototype.copyCells=function(c,e){var f=this.editor.graph;if(f.isSelectionEmpty())c.innerText="";else{var p=mxUtils.sortCells(f.model.getTopmostCells(f.getSelectionCells())),n=mxUtils.getXml(f.encodeCells(p));mxUtils.setTextContent(c,encodeURIComponent(n));e?(f.removeCells(p,!1),f.lastPasteXml=null):(f.lastPasteXml=n,f.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=
-this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,f,p,n){n=null!=n?n:!0;var t=this.editor.graph,z=null;t.lastPasteXml==c?t.pasteCounter++:(t.lastPasteXml=c,t.pasteCounter=0);var F=t.pasteCounter*t.gridSize;if(f||this.isCompatibleString(c))z=this.importXml(c,F,F),t.setSelectionCells(z);else if(e&&1==
-t.getSelectionCount()){n=t.getStartEditingCell(t.getSelectionCell(),p);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==t.getCurrentCellStyle(n)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,c,[n]);else{t.model.beginUpdate();try{t.labelChanged(n,c),Graph.isLink(c)&&t.setLinkForCell(n,c)}finally{t.model.endUpdate()}}t.setSelectionCell(n)}else z=t.getInsertPoint(),t.isMouseInsertPoint()&&(F=0,t.lastPasteXml==c&&0<t.pasteCounter&&t.pasteCounter--),z=this.insertTextAt(c,z.x+F,
-z.y+F,n),t.setSelectionCells(z);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return z};EditorUi.prototype.pasteCells=function(c,e,f,p){if(!mxEvent.isConsumed(c)){var n=e,t=!1;if(f&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),F=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var C=decodeURIComponent(z);this.isCompatibleString(C)&&
-(F=!0,z=C)}catch(m){}F=F?null:c.clipboardData.getData("text/html");null!=F&&0<F.length?(n=this.parseHtmlData(F),t="text/plain"!=n.getAttribute("data-type")):null!=z&&0<z.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,F))}z=n.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))f=z[0].getAttribute("data-lucid-content"),null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(m){var u=this.editor.graph;
-u.lastPasteXml==m?u.pasteCounter++:(u.lastPasteXml=m,u.pasteCounter=0);var A=u.pasteCounter*u.gridSize;u.setSelectionCells(this.importXml(m,A,A));u.scrollCellToVisible(u.getSelectionCell())}),mxUtils.bind(this,function(m){this.handleError(m)})),mxEvent.consume(c));else{var E=!1,R="";R=t?null!=n.textContent&&"<mxfile"==n.textContent.substring(0,7)&&"</mxfile>"==n.textContent.substring(n.textContent.length-9)||"<mxGraphModel"==n.textContent.substring(0,13)&&"</mxGraphModel>"==n.textContent.substring(n.textContent.length-
-15)?n.textContent.replace(/\u00a0/g," "):n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var U=R.lastIndexOf("%3E");0<=U&&U<R.length-3&&(R=R.substring(0,U+3))}catch(m){}try{z=n.getElementsByTagName("span"),(C=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(E=!0,R=C)}catch(m){}try{if(null!=R&&0<R.length){if(0==R.substring(0,
-20).replace(/\s/g,"").indexOf('{"isProtected":')){var O=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,p,E,c)}catch(m){console.log("Miro import error:",m)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",O):O()}else this.pasteXml(R,p,E,c,t);try{mxEvent.consume(c)}catch(m){}}else if(!f){var Q=this.editor.graph;Q.lastPasteXml=null;Q.pasteCounter=0}}catch(m){this.handleError(m)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=
+this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,f,p,n){n=null!=n?n:!0;var t=this.editor.graph,z=null;t.lastPasteXml==c?t.pasteCounter++:(t.lastPasteXml=c,t.pasteCounter=0);var E=t.pasteCounter*t.gridSize;if(f||this.isCompatibleString(c))z=this.importXml(c,E,E),t.setSelectionCells(z);else if(e&&1==
+t.getSelectionCount()){n=t.getStartEditingCell(t.getSelectionCell(),p);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==t.getCurrentCellStyle(n)[mxConstants.STYLE_SHAPE])t.setCellStyles(mxConstants.STYLE_IMAGE,c,[n]);else{t.model.beginUpdate();try{t.labelChanged(n,c),Graph.isLink(c)&&t.setLinkForCell(n,c)}finally{t.model.endUpdate()}}t.setSelectionCell(n)}else z=t.getInsertPoint(),t.isMouseInsertPoint()&&(E=0,t.lastPasteXml==c&&0<t.pasteCounter&&t.pasteCounter--),z=this.insertTextAt(c,z.x+E,
+z.y+E,n),t.setSelectionCells(z);t.isSelectionEmpty()||(t.scrollCellToVisible(t.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(t.view.getState(t.getSelectionCell())));return z};EditorUi.prototype.pasteCells=function(c,e,f,p){if(!mxEvent.isConsumed(c)){var n=e,t=!1;if(f&&null!=c.clipboardData&&c.clipboardData.getData){var z=c.clipboardData.getData("text/plain"),E=!1;if(null!=z&&0<z.length&&"%3CmxGraphModel%3E"==z.substring(0,18))try{var C=decodeURIComponent(z);this.isCompatibleString(C)&&
+(E=!0,z=C)}catch(m){}E=E?null:c.clipboardData.getData("text/html");null!=E&&0<E.length?(n=this.parseHtmlData(E),t="text/plain"!=n.getAttribute("data-type")):null!=z&&0<z.length&&(n=document.createElement("div"),mxUtils.setTextContent(n,E))}z=n.getElementsByTagName("span");if(null!=z&&0<z.length&&"application/vnd.lucid.chart.objects"===z[0].getAttribute("data-lucid-type"))f=z[0].getAttribute("data-lucid-content"),null!=f&&0<f.length&&(this.convertLucidChart(f,mxUtils.bind(this,function(m){var u=this.editor.graph;
+u.lastPasteXml==m?u.pasteCounter++:(u.lastPasteXml=m,u.pasteCounter=0);var A=u.pasteCounter*u.gridSize;u.setSelectionCells(this.importXml(m,A,A));u.scrollCellToVisible(u.getSelectionCell())}),mxUtils.bind(this,function(m){this.handleError(m)})),mxEvent.consume(c));else{var F=!1,R="";R=t?null!=n.textContent&&"<mxfile"==n.textContent.substring(0,7)&&"</mxfile>"==n.textContent.substring(n.textContent.length-9)||"<mxGraphModel"==n.textContent.substring(0,13)&&"</mxGraphModel>"==n.textContent.substring(n.textContent.length-
+15)?n.textContent.replace(/\u00a0/g," "):n.innerHTML:mxUtils.trim(null==n.innerText?mxUtils.getTextContent(n):n.innerText);try{var U=R.lastIndexOf("%3E");0<=U&&U<R.length-3&&(R=R.substring(0,U+3))}catch(m){}try{z=n.getElementsByTagName("span"),(C=null!=z&&0<z.length?mxUtils.trim(decodeURIComponent(z[0].textContent)):decodeURIComponent(R))&&(this.isCompatibleString(C)||0==C.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(F=!0,R=C)}catch(m){}try{if(null!=R&&0<R.length){if(0==R.substring(0,
+20).replace(/\s/g,"").indexOf('{"isProtected":')){var O=mxUtils.bind(this,function(){try{R=(new MiroImporter).importMiroJson(JSON.parse(R)),this.pasteXml(R,p,F,c)}catch(m){console.log("Miro import error:",m)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",O):O()}else this.pasteXml(R,p,F,c,t);try{mxEvent.consume(c)}catch(m){}}else if(!f){var N=this.editor.graph;N.lastPasteXml=null;N.pasteCounter=0}}catch(m){this.handleError(m)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=
function(c,e){var f=320;this.editor.graph.isEnabled()&&(f+=40);null!=this.pages&&1<this.pages.length&&(f+=40,this.editor.graph.isEnabled()||(f+=10));null==e||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(f+=20);this.showDialog((new PrintDialog(this,c,e)).container,320,f,!0,!0)};EditorUi.prototype.print=function(c,e){var f=this.editor,p=f.graph,n=this.getPageIndex(this.currentPage),t=null!=n?n+1:1,z=mxUtils.bind(this,function(A,B,H,T){var k=A.useCssTransforms,v=A.currentTranslate,G=A.currentScale,
I=A.view.translate,M=A.view.scale;A.useCssTransforms&&(A.useCssTransforms=!1,A.currentTranslate=new mxPoint(0,0),A.currentScale=1,A.view.translate=new mxPoint(0,0),A.view.scale=1);var P=A.getGraphBounds(),S=0,V=0,W=mxRectangle.fromRectangle(A.pageFormat),X=e.fit||e.crop||!A.pageVisible,Z=e.scale;W.width=Math.ceil(W.width*A.pageScale);W.height=Math.ceil(W.height*A.pageScale);var Y=1;if(e.fit){Y=e.sheetsAcross;var ba=e.sheetsDown;isNaN(Z)||(W.width=Math.ceil(W.width*Z),W.height=Math.ceil(W.height*Z));
Y=Math.min(W.height*ba/(P.height/A.view.scale),W.width*Y/(P.width/A.view.scale))}else Y=isNaN(Z)?1:Z;Y*=1;!X&&A.pageVisible?(Z=A.getPageLayout(),S-=Z.x*W.width,V-=Z.y*W.height):X=!0;e.crop&&(e.selection&&(P=p.getBoundingBox(p.getSelectionCells())),W.width=(P.width+1)*Y/A.view.scale,W.height=(P.height+1)*Y/A.view.scale);W.width=Math.ceil(1*W.width);W.height=Math.ceil(1*W.height);T=null!=T?"page/id,"+T:null;if(null==B){B=PrintDialog.createPrintPreview(A,Y,null,0,S,V,X);B.title=this.getBaseFilename(!0);
@@ -13412,10 +13416,10 @@ B.pageSelector=!1;B.mathEnabled=!1;S=e.border;isNaN(S)||(B.pageMargin=S);e.selec
!1)),aa.writeln("</style>"));for(var da=A.getCustomFonts(),ha=0;ha<da.length;ha++){var pa=da[ha].name,na=da[ha].url;Graph.isCssFontUrl(na)?aa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(na))+'" charset="UTF-8" type="text/css">'):(aa.writeln('<style type="text/css">'),aa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pa)+'";\nsrc: url("'+mxUtils.htmlEntities(na)+'");\n}'),aa.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var ca=B.drawBackgroundImage;
B.drawBackgroundImage=function(aa){ca.apply(this,arguments);null!=aa.node&&(EditorUi.embedSvgImages(aa.node),p.disableSvgLinks(aa.node,function(da){da.setAttribute("href","javascript:void(0)")}))}}var fa=B.addGraphFragment;B.addGraphFragment=function(aa,da,ha,pa,na,ia){fa.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:na.classList.add("geDisableMathJax")};e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:
A.view.gridColor);B.open(null,null,H,!0,T,W,e.selection?A.getSelectionCells():null)}else{P=A.background;if(null==P||""==P||P==mxConstants.NONE)P="#ffffff";B.backgroundColor=P;B.autoOrigin=X;e.grid&&(B.gridSize=A.gridSize,B.gridSteps=A.view.gridSteps,B.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:A.view.gridColor);B.appendGraph(A,Y,S,V,H,!0,T,W,e.selection?A.getSelectionCells():null);H=A.getCustomFonts();if(null!=B.wnd)for(W=0;W<H.length;W++)S=H[W].name,V=H[W].url,Graph.isCssFontUrl(V)?
-B.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(V)+'" charset="UTF-8" type="text/css">'):(B.wnd.document.writeln('<style type="text/css">'),B.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(V)+'");\n}'),B.wnd.document.writeln("</style>"))}k&&(A.useCssTransforms=k,A.currentTranslate=v,A.currentScale=G,A.view.translate=I,A.view.scale=M);return B}),F=e.pagesFrom,C=e.pagesTo,E=!e.allPages;n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
-e);else{E&&(E=e.selection||F==t&&C==t);if(!E&&null!=this.pages&&this.pages.length){E=0;t=this.pages.length-1;e.allPages||(E=parseInt(F)-1,t=parseInt(C)-1);for(var R=E;R<=t;R++){var U=this.pages[R];F=U==this.currentPage?p:null;if(null==F){F=this.createTemporaryGraph(p.stylesheet);F.shapeForegroundColor=p.shapeForegroundColor;F.shapeBackgroundColor=p.shapeBackgroundColor;C=!0;E=!1;var O=null,Q=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(C=U.viewState.pageVisible,
-E=U.viewState.mathEnabled,O=U.viewState.background,Q=U.viewState.backgroundImage,F.pageFormat=U.viewState.pageFormat,F.gridSize=U.viewState.gridSize);null!=Q&&null!=Q.originalSrc&&(Q=this.createImageForPageLink(Q.originalSrc,U));F.background=O;F.backgroundImage=null!=Q?new mxImage(Q.src,Q.width,Q.height,Q.x,Q.y):null;F.pageVisible=C;F.mathEnabled=E;var m=F.getGraphBounds;F.getGraphBounds=function(){var A=m.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var H=
-this.view.translate,T=this.view.scale;A=mxRectangle.fromRectangle(A);A.add(new mxRectangle((H.x+B.x)*T,(H.y+B.y)*T,B.width*T,B.height*T))}return A};var u=F.getGlobalVariable;F.getGlobalVariable=function(A){return"page"==A?U.getName():"pagenumber"==A?R+1:"pagecount"==A?null!=this.pages?this.pages.length:1:u.apply(this,arguments)};document.body.appendChild(F.container);this.updatePageRoot(U);F.model.setRoot(U.root)}n=z(F,n,R!=t,U.getId());F!=p&&F.container.parentNode.removeChild(F.container)}}else n=
+B.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(V)+'" charset="UTF-8" type="text/css">'):(B.wnd.document.writeln('<style type="text/css">'),B.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(S)+'";\nsrc: url("'+mxUtils.htmlEntities(V)+'");\n}'),B.wnd.document.writeln("</style>"))}k&&(A.useCssTransforms=k,A.currentTranslate=v,A.currentScale=G,A.view.translate=I,A.view.scale=M);return B}),E=e.pagesFrom,C=e.pagesTo,F=!e.allPages;n=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,
+e);else{F&&(F=e.selection||E==t&&C==t);if(!F&&null!=this.pages&&this.pages.length){F=0;t=this.pages.length-1;e.allPages||(F=parseInt(E)-1,t=parseInt(C)-1);for(var R=F;R<=t;R++){var U=this.pages[R];E=U==this.currentPage?p:null;if(null==E){E=this.createTemporaryGraph(p.stylesheet);E.shapeForegroundColor=p.shapeForegroundColor;E.shapeBackgroundColor=p.shapeBackgroundColor;C=!0;F=!1;var O=null,N=null;null==U.viewState&&null==U.root&&this.updatePageRoot(U);null!=U.viewState&&(C=U.viewState.pageVisible,
+F=U.viewState.mathEnabled,O=U.viewState.background,N=U.viewState.backgroundImage,E.pageFormat=U.viewState.pageFormat,E.gridSize=U.viewState.gridSize);null!=N&&null!=N.originalSrc&&(N=this.createImageForPageLink(N.originalSrc,U));E.background=O;E.backgroundImage=null!=N?new mxImage(N.src,N.width,N.height,N.x,N.y):null;E.pageVisible=C;E.mathEnabled=F;var m=E.getGraphBounds;E.getGraphBounds=function(){var A=m.apply(this,arguments),B=this.backgroundImage;if(null!=B&&null!=B.width&&null!=B.height){var H=
+this.view.translate,T=this.view.scale;A=mxRectangle.fromRectangle(A);A.add(new mxRectangle((H.x+B.x)*T,(H.y+B.y)*T,B.width*T,B.height*T))}return A};var u=E.getGlobalVariable;E.getGlobalVariable=function(A){return"page"==A?U.getName():"pagenumber"==A?R+1:"pagecount"==A?null!=this.pages?this.pages.length:1:u.apply(this,arguments)};document.body.appendChild(E.container);this.updatePageRoot(U);E.model.setRoot(U.root)}n=z(E,n,R!=t,U.getId());E!=p&&E.container.parentNode.removeChild(E.container)}}else n=
z(p);null==n||null==n.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(z=n.wnd.document,c||(n.wnd.IMMEDIATE_PRINT=!0),z.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),n.closeDocument(),Graph.rewritePageLinks(n.wnd.document,!0),n.mathEnabled||c||PrintDialog.printPreview(n));return n}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,f=0;f<c.length;f++)mxEvent.addListener(c[f],"dragleave",function(p){null!=
e&&(e.parentNode.removeChild(e),e=null);p.stopPropagation();p.preventDefault()}),mxEvent.addListener(c[f],"dragover",mxUtils.bind(this,function(p){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());p.stopPropagation();p.preventDefault()})),mxEvent.addListener(c[f],"drop",mxUtils.bind(this,function(p){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<
p.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(p.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(p)&&!mxEvent.isShiftDown(p)):this.openFiles(p.dataTransfer.files,!0);else{var n=this.extractGraphModelFromEvent(p);if(null==n){var t=null!=p.dataTransfer?p.dataTransfer:p.clipboardData;null!=t&&(10==document.documentMode||11==document.documentMode?n=t.getData("Text"):(n=null,n=0<=mxUtils.indexOf(t.types,"text/uri-list")?p.dataTransfer.getData("text/uri-list"):
@@ -13424,79 +13428,79 @@ mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+e
"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(n)))))}else this.openLocalFile(n,null,!0)}p.stopPropagation();p.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,f=0;if(null==c){var p=document.body;var n=document.documentElement;var t=(p.clientWidth||n.clientWidth)-3;p=Math.max(p.clientHeight||0,n.clientHeight)-3}else e=c.offsetTop,f=c.offsetLeft,t=c.clientWidth,p=c.clientHeight;n=document.createElement("div");n.style.zIndex=mxPopupMenu.prototype.zIndex+
2;n.style.border="3px dotted rgb(254, 137, 12)";n.style.pointerEvents="none";n.style.position="absolute";n.style.top=e+"px";n.style.left=f+"px";n.style.width=Math.max(0,t-3)+"px";n.style.height=Math.max(0,p-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(n):document.body.appendChild(n);return n};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var f=new mxCodec(e.ownerDocument),
p=new mxGraphModel;f.decode(e,p);e=p.getChildAt(p.getRoot(),0);for(f=0;f<p.getChildCount(e);f++)c.push(p.getChildAt(e,f))}return c};EditorUi.prototype.openFileHandle=function(c,e,f,p,n,t){if(null!=e&&0<e.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(e)||/(\.pdf)$/i.test(e))e=e.substring(0,e.length-4),/(\.drawio)$/i.test(e)||(e+=".drawio");var z=mxUtils.bind(this,function(C){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==C.substring(0,10)){null==
-this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,p);try{this.loadLibrary(new LocalLibrary(this,C,e)),this.showSidebar()}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,e,p)});if(EditorUi.isVisioFilename(e))this.importVisio(f,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(Graph.fileSupport&&
+this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,p);try{this.loadLibrary(new LocalLibrary(this,C,e)),this.showSidebar()}catch(F){this.handleError(F,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,e,p)});if(EditorUi.isVisioFilename(e))this.importVisio(f,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(Graph.fileSupport&&
(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(f,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?z(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,
e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,e,p)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,p);try{this.loadLibrary(new LocalLibrary(this,c,f.name)),this.showSidebar()}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==
-c.indexOf("PK"))this.importZipFile(f,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,p)}));else{if("image/png"==f.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==f.type){var F=Editor.extractGraphModelFromPdf(c);null!=F&&(n=null,p=!0,c=F)}this.spinner.stop();this.openLocalFile(c,e,p,n,null!=n?f:null,t)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var f=
+c.indexOf("PK"))this.importZipFile(f,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,p)}));else{if("image/png"==f.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==f.type){var E=Editor.extractGraphModelFromPdf(c);null!=E&&(n=null,p=!0,c=E)}this.spinner.stop();this.openLocalFile(c,e,p,n,null!=n?f:null,t)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var f=
0;f<c.length;f++)mxUtils.bind(this,function(p){var n=new FileReader;n.onload=mxUtils.bind(this,function(t){try{this.openFileHandle(t.target.result,p.name,p,e)}catch(z){this.handleError(z)}});n.onerror=mxUtils.bind(this,function(t){this.spinner.stop();this.handleError(t);window.openFile=null});"image"!==p.type.substring(0,5)&&"application/pdf"!==p.type||"image/svg"===p.type.substring(0,9)?n.readAsText(p):n.readAsDataURL(p)})(c[f])};EditorUi.prototype.openLocalFile=function(c,e,f,p,n,t){var z=this.getCurrentFile(),
-F=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,f,p,n,t))});if(null!=c&&0<c.length)null==z||!z.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=p)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=p)&&null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),
-null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=
-0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var f in c)e.push(f);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function f(z){if(null!=z){var F=z.lastIndexOf(".");0<F&&(z=z.substring(F+1,z.length));null==e[z]&&(e[z]=!0)}}var p=this.editor.graph,n=p.getCellStyle(c);f(mxStencilRegistry.getBasenameForStencil(n[mxConstants.STYLE_SHAPE]));p.model.isEdge(c)&&
+E=mxUtils.bind(this,function(){window.openFile=null;if(null==e&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(c);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,c,e||this.defaultFilename,f,p,n,t))});if(null!=c&&0<c.length)null==z||!z.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=p)?E():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=p)&&null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(c,e),window.geOpenWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,E,mxResources.get("cancel"),mxResources.get("discardChanges")):E()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var c={};if(null!=this.pages)for(var e=
+0;e<this.pages.length;e++)this.updatePageRoot(this.pages[e]),this.addBasenamesForCell(this.pages[e].root,c);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),c);e=[];for(var f in c)e.push(f);return e};EditorUi.prototype.addBasenamesForCell=function(c,e){function f(z){if(null!=z){var E=z.lastIndexOf(".");0<E&&(z=z.substring(E+1,z.length));null==e[z]&&(e[z]=!0)}}var p=this.editor.graph,n=p.getCellStyle(c);f(mxStencilRegistry.getBasenameForStencil(n[mxConstants.STYLE_SHAPE]));p.model.isEdge(c)&&
(f(mxMarker.getPackageForType(n[mxConstants.STYLE_STARTARROW])),f(mxMarker.getPackageForType(n[mxConstants.STYLE_ENDARROW])));n=p.model.getChildCount(c);for(var t=0;t<n;t++)this.addBasenamesForCell(p.model.getChildAt(c,t),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?
"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=
-!1;this.installMessageHandler(mxUtils.bind(this,function(e,f,p,n){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(n)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var z=t.model.cells,F;for(F in z){var C=z[F];null!=C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?
-"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(E){console.log(E)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=p?p:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
+!1;this.installMessageHandler(mxUtils.bind(this,function(e,f,p,n){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(n)try{var t=this.editor.graph;t.setGridEnabled(!1);t.pageVisible=!1;var z=t.model.cells,E;for(E in z){var C=z[E];null!=C&&null!=C.style&&(C.style+=";sketch=1;"+(-1==C.style.indexOf("fontFamily=")||-1<C.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(F){console.log(F)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=p?p:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=
function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(f){this.spinner.stop();e(f)})):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,
translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var e=this.editor.graph;e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var f=window.opener||window.parent;if(this.editor.modified){var p=e.background;if(null==p||p==mxConstants.NONE)p=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,
null,null,!1),e,null,!0,mxUtils.bind(this,function(n){f.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(n)}),"*")}),null,null,!0,p,1,this.embedExportBorder,null,this.embedExportTheme)}else c||f.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=
-!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(n){c||this.handleError(n)}};EditorUi.prototype.installMessageHandler=function(c){var e=null,f=!1,p=!1,n=null,t=mxUtils.bind(this,function(C,E){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,t);mxEvent.addListener(window,"message",mxUtils.bind(this,
-function(C){if(C.source==(window.opener||window.parent)){var E=C.data,R=null,U=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});
-if("json"==urlParams.proto){var O=!1;try{E=JSON.parse(E),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[E])}catch(aa){E=null}try{if(null==E)return;if("dialog"==E.action){this.showError(null!=E.titleKey?mxResources.get(E.titleKey):E.title,null!=E.messageKey?mxResources.get(E.messageKey):mxUtils.htmlEntities(E.message),null!=E.buttonKey?mxResources.get(E.buttonKey):E.button);null!=E.modified&&(this.editor.modified=E.modified);return}if("layout"==E.action){this.executeLayouts(this.editor.graph.createLayouts(E.layouts));
-return}if("prompt"==E.action){this.spinner.stop();var Q=new FilenameDialog(this,E.defaultValue||"",null!=E.okKey?mxResources.get(E.okKey):E.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",value:aa,message:E}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")},null!=E.titleKey?mxResources.get(E.titleKey):E.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:E}),"*")});this.showDialog(Q.container,300,80,!0,!1);
-Q.init();return}if("draft"==E.action){var m=U(E.xml);this.spinner.stop();Q=new DraftDialog(this,mxResources.get("draftFound",[E.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",message:E}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:E}),"*")}),E.editKey?mxResources.get(E.editKey):null,E.discardKey?mxResources.get(E.discardKey):null,E.ignore?
-mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:E}),"*")}):null);this.showDialog(Q.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{Q.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:E}),"*")}return}if("template"==E.action){this.spinner.stop();var u=1==E.enableRecent,A=1==E.enableSearch,B=1==E.enableCustomTemp;Q=new NewDialog(this,!1,E.templatesOnly?
-!1:null!=E.callback,mxUtils.bind(this,function(aa,da,ha,pa){aa=aa||this.emptyDiagramXml;null!=E.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ha,libs:pa,builtIn:!0,message:E}),"*"):(c(aa,C,aa!=this.emptyDiagramXml,E.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):
-null,A?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ha){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ha}),"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==E.withoutType);this.showDialog(Q.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();
-aa&&this.actions.get("exit").funct()}));Q.init();return}if("textContent"==E.action){var H=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:H,message:E}),"*");return}if("status"==E.action){null!=E.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(E.messageKey))):null!=E.message&&this.editor.setStatus(mxUtils.htmlEntities(E.message));null!=E.modified&&(this.editor.modified=E.modified);return}if("spinner"==E.action){var T=null!=E.messageKey?mxResources.get(E.messageKey):
-E.message;null==E.show||E.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==E.action){this.actions.get("exit").funct();return}if("viewport"==E.action){null!=E.viewport&&(this.embedViewport=E.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==E.action){Q=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),Q=JSON.parse(k))}catch(aa){}Editor.inlineFullscreen=
-E.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=Q&&this.restoreScrollState(Q);return}if("snapshot"==E.action){this.sendEmbeddedSvgExport(!0);return}if("export"==E.action){if("png"==E.format||"xmlpng"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){var v=null!=E.xml?E.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,I=mxUtils.bind(this,function(aa,da){if(E.withSvg)E.withSvg=
-!1,this.getEmbeddedSvg(v,this.editor.graph,null,!0,function(pa){I(aa,pa)},null,null,E.embedImages,this.editor.graph.background,E.scale,E.border,E.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=E.format;ha.message=E;ha.data=aa;ha.svg=da;ha.xml=v;z.postMessage(JSON.stringify(ha),"*")}}),M=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==E.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(v)));
-G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);I(aa)}),P=E.pageId||(null!=this.pages?E.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=P){var aa=G.getGlobalVariable;G=this.createTemporaryGraph(G.getStylesheet());for(var da,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==P){da=this.updatePageRoot(this.pages[ha]);break}null==da&&(da=this.currentPage);
-G.getGlobalVariable=function(wa){return"page"==wa?da.getName():"pagenumber"==wa?1:aa.apply(this,arguments)};document.body.appendChild(G.container);G.model.setRoot(da.root)}if(null!=E.layerIds){var pa=G.model,na=pa.getChildCells(pa.getRoot()),ia={};for(ha=0;ha<E.layerIds.length;ha++)ia[E.layerIds[ha]]=!0;for(ha=0;ha<na.length;ha++)pa.setVisible(na[ha],ia[na[ha].id]||!1)}ha=null;E.keepTheme&&(ha=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){M(wa.toDataURL("image/png"))}),
-E.width,null,E.background,mxUtils.bind(this,function(){M(null)}),null,null,E.scale,E.transparent,E.shadow,null,G,E.border,null,E.grid,ha)});null!=E.xml&&0<E.xml.length&&(f=!0,this.setFileData(v),f=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==E.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=E.layerIds&&0<E.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:E.layerIds})):"")+(null!=E.scale?"&scale="+E.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,
-function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):M(null)}),mxUtils.bind(this,function(){M(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=E;if("html2"==E.format||"html"==E.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=E.format}else if("html"==E.format)da=this.editor.getGraphXml(),
-aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=E.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=E.background?E.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ha=mxUtils.bind(this,function(na){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(na);z.postMessage(JSON.stringify(aa),"*")}),pa="auto";E.keepTheme&&
-(pa=Editor.isDarkMode()?"dark":"light");null!=E.theme&&(pa=E.theme);if("xmlsvg"==E.format){if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?mxResources.get(E.spinKey):E.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=E.theme&&(pa=E.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ha,null,null,E.embedImages,da,E.scale,E.border,E.shadow,pa)}}else if(null==E.spin&&null==E.spinKey||this.spinner.spin(document.body,null!=E.spinKey?
-mxResources.get(E.spinKey):E.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,E.scale,E.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||E.shadow,null,pa),(this.editor.graph.shadowVisible||E.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(na){E.embedImages||null==E.embedImages?this.editor.convertImages(na,mxUtils.bind(this,function(ia){ha(mxUtils.getXml(ia))})):ha(mxUtils.getXml(na))}));return}z.postMessage(JSON.stringify(aa),
-"*")}),null!=E.xml&&0<E.xml.length){if(this.editor.graph.mathEnabled){var V=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){V.apply(this,arguments);S()}}f=!0;this.setFileData(E.xml);f=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==E.action){O=E.toSketch;p=1==E.autosave;this.hideDialog();null!=E.modified&&null==urlParams.modified&&(urlParams.modified=E.modified);null!=E.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=E.saveAndExit);if("1"==urlParams.saveAndExit||
-"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=E.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=E.noSaveBtn);if(null!=E.rough){var W=Editor.sketchMode;this.doSetSketchMode(E.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
-E.dark&&this.setDarkMode(E.dark);null!=E.border&&(this.embedExportBorder=E.border);null!=E.theme&&(this.embedExportTheme=E.theme);null!=E.background&&(this.embedExportBackground=E.background);null!=E.viewport&&(this.embedViewport=E.viewport);this.embedExitPoint=null;if(null!=E.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,E.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,E.rect.top)+"px";this.minInlineWidth=E.minWidth;this.minInlineHeight=E.minHeight;
-this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=E.maxFitScale,Y=E.rect.width+2*X,ba=E.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=
-aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ha=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ha}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[E]));da.container.focus();null!=this.formatWindow&&
-null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=E.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=E.noExitBtn);null!=E.title&&null!=this.buttonContainer&&(m=this.createStatusDiv(""),mxUtils.write(m,E.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(m),this.embedFilenameSpan=m);try{E.libs&&this.sidebar.showEntries(E.libs)}catch(aa){}E=null!=E.xmlpng?this.extractGraphModelFromPng(E.xmlpng):null!=E.descriptor?E.descriptor:E.xml}else{if("merge"==E.action){var ea=this.getCurrentFile();null!=ea&&(m=U(E.xml),null!=m&&""!=m&&ea.mergeFile(new LocalFile(this,m),function(){z.postMessage(JSON.stringify({event:"merge",message:E}),"*")},function(aa){z.postMessage(JSON.stringify({event:"merge",message:E,error:aa}),"*")}))}else"remoteInvokeReady"==
-E.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==E.action?this.handleRemoteInvoke(E,C.origin):"remoteInvokeResponse"==E.action?this.handleRemoteInvokeResponse(E):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(E)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){f=!0;
+!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(n){c||this.handleError(n)}};EditorUi.prototype.installMessageHandler=function(c){var e=null,f=!1,p=!1,n=null,t=mxUtils.bind(this,function(C,F){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,t);mxEvent.addListener(window,"message",mxUtils.bind(this,
+function(C){if(C.source==(window.opener||window.parent)){var F=C.data,R=null,U=mxUtils.bind(this,function(aa){if(null!=aa&&"function"===typeof aa.charAt&&"<"!=aa.charAt(0))try{Editor.isPngDataUrl(aa)?aa=Editor.extractGraphModelFromPng(aa):"data:image/svg+xml;base64,"==aa.substring(0,26)?aa=atob(aa.substring(26)):"data:image/svg+xml;utf8,"==aa.substring(0,24)&&(aa=aa.substring(24)),null!=aa&&(""==aa.trim()?aa=null:"%"==aa.charAt(0)?aa=decodeURIComponent(aa):"<"!=aa.charAt(0)&&(aa=Graph.decompress(aa)))}catch(da){}return aa});
+if("json"==urlParams.proto){var O=!1;try{F=JSON.parse(F),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[C],"data",[F])}catch(aa){F=null}try{if(null==F)return;if("dialog"==F.action){this.showError(null!=F.titleKey?mxResources.get(F.titleKey):F.title,null!=F.messageKey?mxResources.get(F.messageKey):mxUtils.htmlEntities(F.message),null!=F.buttonKey?mxResources.get(F.buttonKey):F.button);null!=F.modified&&(this.editor.modified=F.modified);return}if("layout"==F.action){this.executeLayouts(this.editor.graph.createLayouts(F.layouts));
+return}if("prompt"==F.action){this.spinner.stop();var N=new FilenameDialog(this,F.defaultValue||"",null!=F.okKey?mxResources.get(F.okKey):F.ok,function(aa){null!=aa?z.postMessage(JSON.stringify({event:"prompt",value:aa,message:F}),"*"):z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")},null!=F.titleKey?mxResources.get(F.titleKey):F.title,null,null,null,null,function(){z.postMessage(JSON.stringify({event:"prompt-cancel",message:F}),"*")});this.showDialog(N.container,300,80,!0,!1);
+N.init();return}if("draft"==F.action){var m=U(F.xml);this.spinner.stop();N=new DraftDialog(this,mxResources.get("draftFound",[F.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"edit",message:F}),"*")}),mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"discard",message:F}),"*")}),F.editKey?mxResources.get(F.editKey):null,F.discardKey?mxResources.get(F.discardKey):null,F.ignore?
+mxUtils.bind(this,function(){this.hideDialog();z.postMessage(JSON.stringify({event:"draft",result:"ignore",message:F}),"*")}):null);this.showDialog(N.container,640,480,!0,!1,mxUtils.bind(this,function(aa){aa&&this.actions.get("exit").funct()}));try{N.init()}catch(aa){z.postMessage(JSON.stringify({event:"draft",error:aa.toString(),message:F}),"*")}return}if("template"==F.action){this.spinner.stop();var u=1==F.enableRecent,A=1==F.enableSearch,B=1==F.enableCustomTemp;N=new NewDialog(this,!1,F.templatesOnly?
+!1:null!=F.callback,mxUtils.bind(this,function(aa,da,ha,pa){aa=aa||this.emptyDiagramXml;null!=F.callback?z.postMessage(JSON.stringify({event:"template",xml:aa,blank:aa==this.emptyDiagramXml,name:da,tempUrl:ha,libs:pa,builtIn:!0,message:F}),"*"):(c(aa,C,aa!=this.emptyDiagramXml,F.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,u?mxUtils.bind(this,function(aa){this.remoteInvoke("getRecentDiagrams",[null],null,aa,function(){aa(null,"Network Error!")})}):
+null,A?mxUtils.bind(this,function(aa,da){this.remoteInvoke("searchDiagrams",[aa,null],null,da,function(){da(null,"Network Error!")})}):null,mxUtils.bind(this,function(aa,da,ha){z.postMessage(JSON.stringify({event:"template",docUrl:aa,info:da,name:ha}),"*")}),null,null,B?mxUtils.bind(this,function(aa){this.remoteInvoke("getCustomTemplates",null,null,aa,function(){aa({},0)})}):null,1==F.withoutType);this.showDialog(N.container,620,460,!0,!1,mxUtils.bind(this,function(aa){null!=this.sidebar&&this.sidebar.hideTooltip();
+aa&&this.actions.get("exit").funct()}));N.init();return}if("textContent"==F.action){var H=this.getDiagramTextContent();z.postMessage(JSON.stringify({event:"textContent",data:H,message:F}),"*");return}if("status"==F.action){null!=F.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(F.messageKey))):null!=F.message&&this.editor.setStatus(mxUtils.htmlEntities(F.message));null!=F.modified&&(this.editor.modified=F.modified);return}if("spinner"==F.action){var T=null!=F.messageKey?mxResources.get(F.messageKey):
+F.message;null==F.show||F.show?this.spinner.spin(document.body,T):this.spinner.stop();return}if("exit"==F.action){this.actions.get("exit").funct();return}if("viewport"==F.action){null!=F.viewport&&(this.embedViewport=F.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==F.action){N=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),N=JSON.parse(k))}catch(aa){}Editor.inlineFullscreen=
+F.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=N&&this.restoreScrollState(N);return}if("snapshot"==F.action){this.sendEmbeddedSvgExport(!0);return}if("export"==F.action){if("png"==F.format||"xmlpng"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){var v=null!=F.xml?F.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var G=this.editor.graph,I=mxUtils.bind(this,function(aa,da){if(F.withSvg)F.withSvg=
+!1,this.getEmbeddedSvg(v,this.editor.graph,null,!0,function(pa){I(aa,pa)},null,null,F.embedImages,this.editor.graph.background,F.scale,F.border,F.shadow,"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var ha=this.createLoadMessage("export");ha.format=F.format;ha.message=F;ha.data=aa;ha.svg=da;ha.xml=v;z.postMessage(JSON.stringify(ha),"*")}}),M=mxUtils.bind(this,function(aa){null==aa&&(aa=Editor.blankImage);"xmlpng"==F.format&&(aa=Editor.writeGraphModelToPng(aa,"tEXt","mxfile",encodeURIComponent(v)));
+G!=this.editor.graph&&G.container.parentNode.removeChild(G.container);I(aa)}),P=F.pageId||(null!=this.pages?F.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var S=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=P){var aa=G.getGlobalVariable;G=this.createTemporaryGraph(G.getStylesheet());for(var da,ha=0;ha<this.pages.length;ha++)if(this.pages[ha].getId()==P){da=this.updatePageRoot(this.pages[ha]);break}null==da&&(da=this.currentPage);
+G.getGlobalVariable=function(wa){return"page"==wa?da.getName():"pagenumber"==wa?1:aa.apply(this,arguments)};document.body.appendChild(G.container);G.model.setRoot(da.root)}if(null!=F.layerIds){var pa=G.model,na=pa.getChildCells(pa.getRoot()),ia={};for(ha=0;ha<F.layerIds.length;ha++)ia[F.layerIds[ha]]=!0;for(ha=0;ha<na.length;ha++)pa.setVisible(na[ha],ia[na[ha].id]||!1)}ha=null;F.keepTheme&&(ha=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(wa){M(wa.toDataURL("image/png"))}),
+F.width,null,F.background,mxUtils.bind(this,function(){M(null)}),null,null,F.scale,F.transparent,F.shadow,null,G,F.border,null,F.grid,ha)});null!=F.xml&&0<F.xml.length&&(f=!0,this.setFileData(v),f=!1);S()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==F.format?"1":"0")+(null!=P?"&pageId="+P:"")+(null!=F.layerIds&&0<F.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:F.layerIds})):"")+(null!=F.scale?"&scale="+F.scale:"")+"&base64=1&xml="+encodeURIComponent(v))).send(mxUtils.bind(this,
+function(aa){200<=aa.getStatus()&&299>=aa.getStatus()?I("data:image/png;base64,"+aa.getText()):M(null)}),mxUtils.bind(this,function(){M(null)}))}}else if(S=mxUtils.bind(this,function(){var aa=this.createLoadMessage("export");aa.message=F;if("html2"==F.format||"html"==F.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var da=this.getXmlFileData();aa.xml=mxUtils.getXml(da);aa.data=this.getFileData(null,null,!0,null,null,null,da);aa.format=F.format}else if("html"==F.format)da=this.editor.getGraphXml(),
+aa.data=this.getHtml(da,this.editor.graph),aa.xml=mxUtils.getXml(da),aa.format=F.format;else{mxSvgCanvas2D.prototype.foAltText=null;da=null!=F.background?F.background:this.editor.graph.background;da==mxConstants.NONE&&(da=null);aa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);aa.format="svg";var ha=mxUtils.bind(this,function(na){this.editor.graph.setEnabled(!0);this.spinner.stop();aa.data=Editor.createSvgDataUri(na);z.postMessage(JSON.stringify(aa),"*")}),pa="auto";F.keepTheme&&
+(pa=Editor.isDarkMode()?"dark":"light");null!=F.theme&&(pa=F.theme);if("xmlsvg"==F.format){if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?mxResources.get(F.spinKey):F.spin)){pa=null;if(this.isAutoDarkMode()||Editor.isDarkMode())pa="auto";null!=F.theme&&(pa=F.theme);this.getEmbeddedSvg(aa.xml,this.editor.graph,null,!0,ha,null,null,F.embedImages,da,F.scale,F.border,F.shadow,pa)}}else if(null==F.spin&&null==F.spinKey||this.spinner.spin(document.body,null!=F.spinKey?
+mxResources.get(F.spinKey):F.spin))this.editor.graph.setEnabled(!1),da=this.editor.graph.getSvg(da,F.scale,F.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||F.shadow,null,pa),(this.editor.graph.shadowVisible||F.shadow)&&this.editor.graph.addSvgShadow(da),this.embedFonts(da,mxUtils.bind(this,function(na){F.embedImages||null==F.embedImages?this.editor.convertImages(na,mxUtils.bind(this,function(ia){ha(mxUtils.getXml(ia))})):ha(mxUtils.getXml(na))}));return}z.postMessage(JSON.stringify(aa),
+"*")}),null!=F.xml&&0<F.xml.length){if(this.editor.graph.mathEnabled){var V=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){V.apply(this,arguments);S()}}f=!0;this.setFileData(F.xml);f=!1;this.editor.graph.mathEnabled||S()}else S();return}if("load"==F.action){O=F.toSketch;p=1==F.autosave;this.hideDialog();null!=F.modified&&null==urlParams.modified&&(urlParams.modified=F.modified);null!=F.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=F.saveAndExit);if("1"==urlParams.saveAndExit||
+"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=F.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=F.noSaveBtn);if(null!=F.rough){var W=Editor.sketchMode;this.doSetSketchMode(F.rough);W!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=
+F.dark&&this.setDarkMode(F.dark);null!=F.border&&(this.embedExportBorder=F.border);null!=F.theme&&(this.embedExportTheme=F.theme);null!=F.background&&(this.embedExportBackground=F.background);null!=F.viewport&&(this.embedViewport=F.viewport);this.embedExitPoint=null;if(null!=F.rect){var X=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,F.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,F.rect.top)+"px";this.minInlineWidth=F.minWidth;this.minInlineHeight=F.minHeight;
+this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";var Z=F.maxFitScale,Y=F.rect.width+2*X,ba=F.rect.height+2*X;R=mxUtils.bind(this,function(){var aa=mxUtils.getDocumentSize();Y=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,Y):Y,aa.width-80);aa=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,ba):ba,aa.height-80);this.diagramContainer.style.width=Y+"px";this.diagramContainer.style.height=
+aa+"px";var da=this.editor.graph;aa=da.maxFitScale;da.maxFitScale=Z;da.fit(2*X,null,null,null,null,null,ba);this.setPageVisible(!1);if(null!=this.minInlineWidth&&da.getGraphBounds().width<this.minInlineWidth){var ha=da.container.scrollTop;this.resetScrollbars();da.container.scrollTop=ha}da.maxFitScale=aa;da.container.scrollTop-=X;da.container.scrollLeft-=X;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[F]));da.container.focus();null!=this.formatWindow&&
+null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&(this.formatWindow.window.div.style.top=da.container.style.top);var pa=da.getGraphBounds();da.container.clientWidth>pa.width+2*X&&(da.container.scrollLeft=pa.x+(pa.width+X-da.container.clientWidth)/2)}),10)})}null!=F.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=F.noExitBtn);null!=F.title&&null!=this.buttonContainer&&(m=this.createStatusDiv(""),mxUtils.write(m,F.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+this.buttonContainer.appendChild(m),this.embedFilenameSpan=m);try{F.libs&&this.sidebar.showEntries(F.libs)}catch(aa){}F=null!=F.xmlpng?this.extractGraphModelFromPng(F.xmlpng):null!=F.descriptor?F.descriptor:F.xml}else{if("merge"==F.action){var ea=this.getCurrentFile();null!=ea&&(m=U(F.xml),null!=m&&""!=m&&ea.mergeFile(new LocalFile(this,m),function(){z.postMessage(JSON.stringify({event:"merge",message:F}),"*")},function(aa){z.postMessage(JSON.stringify({event:"merge",message:F,error:aa}),"*")}))}else"remoteInvokeReady"==
+F.action?this.handleRemoteInvokeReady(z):"remoteInvoke"==F.action?this.handleRemoteInvoke(F,C.origin):"remoteInvokeResponse"==F.action?this.handleRemoteInvokeResponse(F):z.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(F)}),"*");return}}catch(aa){this.handleError(aa)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),fa=mxUtils.bind(this,function(aa,da){f=!0;
try{c(aa,da,null,O)}catch(ha){this.handleError(ha)}f=!1;null!=urlParams.modified&&this.editor.setStatus("");n=ca();p&&null==e&&(e=mxUtils.bind(this,function(ha,pa){ha=ca();ha==n||f||(pa=this.createLoadMessage("autosave"),pa.xml=ha,(window.opener||window.parent).postMessage(JSON.stringify(pa),"*"));n=ha}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",
-e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,z.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=E&&
-"function"===typeof E.substring&&"data:application/vnd.visio;base64,"==E.substring(0,34)?(U="0M8R4KGxGuE"==E.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(E.substring(E.indexOf(",")+1)),function(aa){fa(aa,C)},mxUtils.bind(this,function(aa){this.handleError(aa)}),U)):null!=E&&"function"===typeof E.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(E,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(E,
-mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,C):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=E&&"function"===typeof E.substring&&this.isLucidChartData(E)?this.convertLucidChart(E,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==E||"object"!==typeof E||null==E.format||
-null==E.data&&null==E.url?(E=U(E),fa(E,C)):this.loadDescriptor(E,mxUtils.bind(this,function(aa){fa(ca(),C)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(t,"*");if("json"==urlParams.proto){var F=this.editor.graph.openLink;this.editor.graph.openLink=function(C,E,R){F.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",
-href:C,target:E,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,f,p){var n="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,t=document.createElement("button");t.setAttribute("title",c+(null!=f?" ("+f+")":""));t.style.marginLeft="6px";mxUtils.write(t,c);n?(t.className=p?"gePrimaryBtn":"",t.style.marginLeft="8px",t.style.padding="6px"):t.className="geBigButton"+(p?"":" geBigStandardButton");mxEvent.addListener(t,"click",e);return t};
-EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style["float"]="right","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==
+e),this.addListener("pageScaleChanged",e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)da=this.createLoadMessage("load"),da.xml=aa,z.postMessage(JSON.stringify(da),"*");null!=R&&R()});null!=F&&
+"function"===typeof F.substring&&"data:application/vnd.visio;base64,"==F.substring(0,34)?(U="0M8R4KGxGuE"==F.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(F.substring(F.indexOf(",")+1)),function(aa){fa(aa,C)},mxUtils.bind(this,function(aa){this.handleError(aa)}),U)):null!=F&&"function"===typeof F.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(F,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(F,
+mxUtils.bind(this,function(aa){4==aa.readyState&&(200<=aa.status&&299>=aa.status&&"<mxGraphModel"==aa.responseText.substring(0,13)?fa(aa.responseText,C):this.handleError({message:413==aa.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=F&&"function"===typeof F.substring&&this.isLucidChartData(F)?this.convertLucidChart(F,mxUtils.bind(this,function(aa){fa(aa)}),mxUtils.bind(this,function(aa){this.handleError(aa)})):null==F||"object"!==typeof F||null==F.format||
+null==F.data&&null==F.url?(F=U(F),fa(F,C)):this.loadDescriptor(F,mxUtils.bind(this,function(aa){fa(ca(),C)}),mxUtils.bind(this,function(aa){this.handleError(aa,mxResources.get("errorLoadingFile"))}))}}));var z=window.opener||window.parent;t="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";z.postMessage(t,"*");if("json"==urlParams.proto){var E=this.editor.graph.openLink;this.editor.graph.openLink=function(C,F,R){E.apply(this,arguments);z.postMessage(JSON.stringify({event:"openLink",
+href:C,target:F,allowOpener:R}),"*")}}};EditorUi.prototype.createEmbedButton=function(c,e,f,p){var n="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,t=document.createElement("button");t.setAttribute("title",c+(null!=f?" ("+f+")":""));t.style.marginLeft="6px";mxUtils.write(t,c);n?(t.className=p?"gePrimaryBtn":"",t.style.marginLeft="8px",t.style.padding="6px"):t.className="geBigButton"+(p?"":" geBigStandardButton");mxEvent.addListener(t,"click",e);return t};
+EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==
urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));
-"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,
-function(){var e=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(f){if(0<f.length)try{var p=JSON.parse(f);this.executeLayouts(this.editor.graph.createLayouts(p));this.customLayoutConfig=p;this.hideDialog()}catch(n){this.handleError(n)}}),null,null,null,null,mxUtils.bind(this,function(f,p){var n=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var t=p.value;p.value=JSON.stringify(JSON.parse(t));p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
-p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));p.value=t}catch(z){this.handleError(z)}}));n.setAttribute("title","copy");n.className="geBtn";f.appendChild(n)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(e.container,620,460,!0,!0);e.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=
-!1;e.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),p=mxUtils.bind(this,function(n){this.loadingOrgChart=!1;e.clear()&&this.handleError(n)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",f,null,null,null,p)},null,null,null,p)},null,null,null,p)},null,null,null,p):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",f,null,null,null,p))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var f=c.split("\n"),p=[],n=[],t=[],z={};if(0<f.length){var F={},C=this.editor.graph,E=null,R=null,U=null,O=null,
-Q=null,m=null,u=null,A="whiteSpace=wrap;html=1;",B=null,H=null,T="",k="auto",v="auto",G=!1,I=null,M=null,P=40,S=40,V=100,W=0,X=mxUtils.bind(this,function(){null!=e?e(za):(C.setSelectionCells(za),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";H=null;for(var fa=[],aa=null,da=null,ha=0;ha<f.length&&"#"==f[ha].charAt(0);){c=f[ha].replace(/\r$/,
-"");for(ha++;ha<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[ha].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var pa=c.indexOf(":");if(0<pa){var na=mxUtils.trim(c.substring(1,pa)),ia=mxUtils.trim(c.substring(pa+1));"label"==na?ea=Graph.sanitizeHtml(ia):"labelname"==na&&0<ia.length&&"-"!=ia?Q=ia:"labels"==na&&0<ia.length&&"-"!=ia?u=JSON.parse(ia):"style"==na?R=ia:"parentstyle"==na?A=ia:"unknownStyle"==na&&"-"!=ia?m=ia:"stylename"==na&&0<ia.length&&
-"-"!=ia?O=ia:"styles"==na&&0<ia.length&&"-"!=ia?U=JSON.parse(ia):"vars"==na&&0<ia.length&&"-"!=ia?E=JSON.parse(ia):"identity"==na&&0<ia.length&&"-"!=ia?B=ia:"parent"==na&&0<ia.length&&"-"!=ia?H=ia:"namespace"==na&&0<ia.length&&"-"!=ia?T=ia:"width"==na?k=ia:"height"==na?v=ia:"collapsed"==na&&"-"!=ia?G="true"==ia:"left"==na&&0<ia.length?I=ia:"top"==na&&0<ia.length?M=ia:"ignore"==na?da=ia.split(","):"connect"==na?fa.push(JSON.parse(ia)):"link"==na?aa=ia:"padding"==na?W=parseFloat(ia):"edgespacing"==
-na?P=parseFloat(ia):"nodespacing"==na?S=parseFloat(ia):"levelspacing"==na?V=parseFloat(ia):"layout"==na&&(ca=ia)}}}if(null==f[ha])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(f[ha].replace(/\r$/,""));pa=c=null;na=[];for(ia=0;ia<wa.length;ia++)B==wa[ia]&&(c=ia),H==wa[ia]&&(pa=ia),na.push(mxUtils.trim(wa[ia]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+na[0]+"%");if(null!=fa)for(var ua=0;ua<fa.length;ua++)null==F[fa[ua].to]&&
-(F[fa[ua].to]={});B=[];for(ia=ha+1;ia<f.length;ia++){var va=this.editor.csvToArray(f[ia].replace(/\r$/,""));if(null==va){var Ca=40<f[ia].length?f[ia].substring(0,40)+"...":f[ia];throw Error(Ca+" ("+ia+"):\n"+mxResources.get("containsValidationErrors"));}0<va.length&&B.push(va)}C.model.beginUpdate();try{for(ia=0;ia<B.length;ia++){va=B[ia];var ja=null,oa=null!=c?T+va[c]:null;f=!1;null!=oa&&(ja=C.model.getCell(oa),f=null==ja||0<=mxUtils.indexOf(p,ja));var ma=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||
-"whiteSpace=wrap;html=1;");ma.collapsed=G;ma.vertex=!0;ma.id=oa;null==ja||f||C.model.setCollapsed(ja,G);for(var Aa=0;Aa<va.length;Aa++)C.setAttributeForCell(ma,na[Aa],va[Aa]),null==ja||f||C.setAttributeForCell(ja,na[Aa],va[Aa]);if(null!=Q&&null!=u){var sa=u[ma.getAttribute(Q)];null!=sa&&(C.labelChanged(ma,sa),null==ja||f||C.cellLabelChanged(ja,sa))}if(null!=O&&null!=U){var Ia=U[ma.getAttribute(O)];null!=Ia&&(ma.style=Ia)}C.setAttributeForCell(ma,"placeholders","1");ma.style=C.replacePlaceholders(ma,
-ma.style,E);null==ja||f?C.fireEvent(new mxEventObject("cellsInserted","cells",[ma])):(C.model.setStyle(ja,ma.style),0>mxUtils.indexOf(t,ja)&&t.push(ja),C.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));f=null!=ja;ja=ma;if(!f)for(ua=0;ua<fa.length;ua++)F[fa[ua].to][ja.getAttribute(fa[ua].to)]=ja;null!=aa&&"link"!=aa&&(C.setLinkForCell(ja,ja.getAttribute(aa)),C.setAttributeForCell(ja,aa,null));var xa=this.editor.graph.getPreferredSizeForCell(ja);H=null!=pa?C.model.getCell(T+va[pa]):null;
-if(ja.vertex){Ca=null!=H?0:Y;ha=null!=H?0:ba;null!=I&&null!=ja.getAttribute(I)&&(ja.geometry.x=Ca+parseFloat(ja.getAttribute(I)));null!=M&&null!=ja.getAttribute(M)&&(ja.geometry.y=ha+parseFloat(ja.getAttribute(M)));var Ba="@"==k.charAt(0)?ja.getAttribute(k.substring(1)):null;ja.geometry.width=null!=Ba&&"auto"!=Ba?parseFloat(ja.getAttribute(k.substring(1))):"auto"==k||"auto"==Ba?xa.width+W:parseFloat(k);var Fa="@"==v.charAt(0)?ja.getAttribute(v.substring(1)):null;ja.geometry.height=null!=Fa&&"auto"!=
-Fa&&"width"!=v?parseFloat(Fa):"auto"==v||"auto"==Fa?xa.height+W:"width"==v?ja.geometry.width:parseFloat(v);Z+=ja.geometry.height+S}f?(null==z[oa]&&(z[oa]=[]),z[oa].push(ja)):(p.push(ja),null!=H?(H.style=C.replacePlaceholders(H,A,E),C.addCell(ja,H),n.push(H)):t.push(C.addCell(ja)))}for(ia=0;ia<n.length;ia++)Ba="@"==k.charAt(0)?n[ia].getAttribute(k.substring(1)):null,Fa="@"==v.charAt(0)?n[ia].getAttribute(v.substring(1)):null,"auto"!=k&&"auto"!=Ba||"auto"!=v&&"auto"!=Fa||C.updateGroupBounds([n[ia]],
-W,!0);var La=t.slice(),za=t.slice();for(ua=0;ua<fa.length;ua++){var Da=fa[ua];for(ia=0;ia<p.length;ia++){ja=p[ia];var Ja=mxUtils.bind(this,function(ta,ra,la){var qa=ra.getAttribute(la.from);if(null!=qa&&""!=qa){qa=qa.split(",");for(var ya=0;ya<qa.length;ya++){var Ea=F[la.to][qa[ya]];if(null==Ea&&null!=m){Ea=new mxCell(qa[ya],new mxGeometry(Y,ba,0,0),m);Ea.style=C.replacePlaceholders(ra,Ea.style,E);var Ha=this.editor.graph.getPreferredSizeForCell(Ea);Ea.geometry.width=Ha.width+W;Ea.geometry.height=
-Ha.height+W;F[la.to][qa[ya]]=Ea;Ea.vertex=!0;Ea.id=qa[ya];t.push(C.addCell(Ea))}if(null!=Ea){Ha=la.label;null!=la.fromlabel&&(Ha=(ra.getAttribute(la.fromlabel)||"")+(Ha||""));null!=la.sourcelabel&&(Ha=C.replacePlaceholders(ra,la.sourcelabel,E)+(Ha||""));null!=la.tolabel&&(Ha=(Ha||"")+(Ea.getAttribute(la.tolabel)||""));null!=la.targetlabel&&(Ha=(Ha||"")+C.replacePlaceholders(Ea,la.targetlabel,E));var Pa="target"==la.placeholders==!la.invert?Ea:ta;Pa=null!=la.style?C.replacePlaceholders(Pa,la.style,
-E):C.createCurrentEdgeStyle();Ha=C.insertEdge(null,null,Ha||"",la.invert?Ea:ta,la.invert?ta:Ea,Pa);if(null!=la.labels)for(Pa=0;Pa<la.labels.length;Pa++){var Ka=la.labels[Pa],Na=new mxCell(Ka.label||Pa,new mxGeometry(null!=Ka.x?Ka.x:0,null!=Ka.y?Ka.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=Ka.placeholders&&(Na.value=C.replacePlaceholders("target"==Ka.placeholders==!la.invert?Ea:ta,Na.value,E));if(null!=Ka.dx||null!=Ka.dy)Na.geometry.offset=new mxPoint(null!=
-Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);Ha.insert(Na)}if(null!=la.data)for(var Va in la.data)C.setAttributeForCell(Ha,Va,la.data[Va]);za.push(Ha);mxUtils.remove(la.invert?ta:Ea,La)}}}});Ja(ja,ja,Da);if(null!=z[ja.id])for(Aa=0;Aa<z[ja.id].length;Aa++)Ja(ja,z[ja.id][Aa],Da)}}if(null!=da)for(ia=0;ia<p.length;ia++)for(ja=p[ia],Aa=0;Aa<da.length;Aa++)C.setAttributeForCell(ja,mxUtils.trim(da[Aa]),null);if(0<t.length){var Ra=new mxParallelEdgeLayout(C);Ra.spacing=P;Ra.checkOverlap=!0;var Sa=function(){0<Ra.spacing&&
-Ra.execute(C.getDefaultParent());for(var ta=0;ta<t.length;ta++){var ra=C.getCellGeometry(t[ta]);ra.x=Math.round(C.snap(ra.x));ra.y=Math.round(C.snap(ra.y));"auto"==k&&(ra.width=Math.round(C.snap(ra.width)));"auto"==v&&(ra.height=Math.round(C.snap(ra.height)))}};if("["==ca.charAt(0)){var ab=X;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(C);db.disableEdgeStyle=!1;db.resetEdges=!1;var Wa=db.isVertexIgnored;
-db.isVertexIgnored=function(ta){return Wa.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){db.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&za.length==2*t.length-1&&1==La.length){C.view.validate();var Xa=new mxCompactTreeLayout(C,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(C.getDefaultParent(),0<La.length?La[0]:null)},
-!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==La.length){C.view.validate();var Ua=new mxHierarchicalLayout(C,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=P;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(C.getDefaultParent(),za);C.moveCells(za,Y,ba)},!0,X);X=null}else if("orgchart"==ca){C.view.validate();var eb=new mxOrgChartLayout(C,2,V,S),jb=eb.isVertexIgnored;
-eb.isVertexIgnored=function(ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){eb.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&za.length>t.length){C.view.validate();var $a=new mxFastOrganicLayout(C);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var ka=$a.isVertexIgnored;$a.isVertexIgnored=function(ta){return ka.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){$a.execute(C.getDefaultParent());
+"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};
+EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=
+function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var e=new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(f){if(0<f.length)try{var p=JSON.parse(f);this.executeLayouts(this.editor.graph.createLayouts(p));this.customLayoutConfig=p;this.hideDialog()}catch(n){this.handleError(n)}}),null,null,null,null,mxUtils.bind(this,function(f,p){var n=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var t=p.value;p.value=JSON.stringify(JSON.parse(t));
+p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));p.value=t}catch(z){this.handleError(z)}}));n.setAttribute("title","copy");n.className="geBtn";f.appendChild(n)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(e.container,620,460,!0,!0);e.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,
+mxUtils.bind(this,function(e){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;e.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),p=mxUtils.bind(this,function(n){this.loadingOrgChart=!1;e.clear()&&this.handleError(n)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",
+function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f,null,null,null,p)},null,null,null,p)},null,null,null,p)},null,null,null,p):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",f,null,null,null,p))}),onerror)};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var f=c.split("\n"),p=[],n=[],t=[],z={};if(0<f.length){var E=
+{},C=this.editor.graph,F=null,R=null,U=null,O=null,N=null,m=null,u=null,A="whiteSpace=wrap;html=1;",B=null,H=null,T="",k="auto",v="auto",G=!1,I=null,M=null,P=40,S=40,V=100,W=0,X=mxUtils.bind(this,function(){null!=e?e(za):(C.setSelectionCells(za),C.scrollCellToVisible(C.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),Z=C.getFreeInsertPoint(),Y=Z.x,ba=Z.y;Z=ba;var ea=null,ca="auto";H=null;for(var fa=[],aa=null,da=null,
+ha=0;ha<f.length&&"#"==f[ha].charAt(0);){c=f[ha].replace(/\r$/,"");for(ha++;ha<f.length&&"\\"==c.charAt(c.length-1)&&"#"==f[ha].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(f[ha].substring(1)),ha++;if("#"!=c.charAt(1)){var pa=c.indexOf(":");if(0<pa){var na=mxUtils.trim(c.substring(1,pa)),ia=mxUtils.trim(c.substring(pa+1));"label"==na?ea=Graph.sanitizeHtml(ia):"labelname"==na&&0<ia.length&&"-"!=ia?N=ia:"labels"==na&&0<ia.length&&"-"!=ia?u=JSON.parse(ia):"style"==na?R=ia:"parentstyle"==na?A=
+ia:"unknownStyle"==na&&"-"!=ia?m=ia:"stylename"==na&&0<ia.length&&"-"!=ia?O=ia:"styles"==na&&0<ia.length&&"-"!=ia?U=JSON.parse(ia):"vars"==na&&0<ia.length&&"-"!=ia?F=JSON.parse(ia):"identity"==na&&0<ia.length&&"-"!=ia?B=ia:"parent"==na&&0<ia.length&&"-"!=ia?H=ia:"namespace"==na&&0<ia.length&&"-"!=ia?T=ia:"width"==na?k=ia:"height"==na?v=ia:"collapsed"==na&&"-"!=ia?G="true"==ia:"left"==na&&0<ia.length?I=ia:"top"==na&&0<ia.length?M=ia:"ignore"==na?da=ia.split(","):"connect"==na?fa.push(JSON.parse(ia)):
+"link"==na?aa=ia:"padding"==na?W=parseFloat(ia):"edgespacing"==na?P=parseFloat(ia):"nodespacing"==na?S=parseFloat(ia):"levelspacing"==na?V=parseFloat(ia):"layout"==na&&(ca=ia)}}}if(null==f[ha])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(f[ha].replace(/\r$/,""));pa=c=null;na=[];for(ia=0;ia<wa.length;ia++)B==wa[ia]&&(c=ia),H==wa[ia]&&(pa=ia),na.push(mxUtils.trim(wa[ia]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+na[0]+"%");
+if(null!=fa)for(var ua=0;ua<fa.length;ua++)null==E[fa[ua].to]&&(E[fa[ua].to]={});B=[];for(ia=ha+1;ia<f.length;ia++){var va=this.editor.csvToArray(f[ia].replace(/\r$/,""));if(null==va){var Ca=40<f[ia].length?f[ia].substring(0,40)+"...":f[ia];throw Error(Ca+" ("+ia+"):\n"+mxResources.get("containsValidationErrors"));}0<va.length&&B.push(va)}C.model.beginUpdate();try{for(ia=0;ia<B.length;ia++){va=B[ia];var ja=null,oa=null!=c?T+va[c]:null;f=!1;null!=oa&&(ja=C.model.getCell(oa),f=null==ja||0<=mxUtils.indexOf(p,
+ja));var ma=new mxCell(ea,new mxGeometry(Y,Z,0,0),R||"whiteSpace=wrap;html=1;");ma.collapsed=G;ma.vertex=!0;ma.id=oa;null==ja||f||C.model.setCollapsed(ja,G);for(var Aa=0;Aa<va.length;Aa++)C.setAttributeForCell(ma,na[Aa],va[Aa]),null==ja||f||C.setAttributeForCell(ja,na[Aa],va[Aa]);if(null!=N&&null!=u){var sa=u[ma.getAttribute(N)];null!=sa&&(C.labelChanged(ma,sa),null==ja||f||C.cellLabelChanged(ja,sa))}if(null!=O&&null!=U){var Ia=U[ma.getAttribute(O)];null!=Ia&&(ma.style=Ia)}C.setAttributeForCell(ma,
+"placeholders","1");ma.style=C.replacePlaceholders(ma,ma.style,F);null==ja||f?C.fireEvent(new mxEventObject("cellsInserted","cells",[ma])):(C.model.setStyle(ja,ma.style),0>mxUtils.indexOf(t,ja)&&t.push(ja),C.fireEvent(new mxEventObject("cellsInserted","cells",[ja])));f=null!=ja;ja=ma;if(!f)for(ua=0;ua<fa.length;ua++)E[fa[ua].to][ja.getAttribute(fa[ua].to)]=ja;null!=aa&&"link"!=aa&&(C.setLinkForCell(ja,ja.getAttribute(aa)),C.setAttributeForCell(ja,aa,null));var xa=this.editor.graph.getPreferredSizeForCell(ja);
+H=null!=pa?C.model.getCell(T+va[pa]):null;if(ja.vertex){Ca=null!=H?0:Y;ha=null!=H?0:ba;null!=I&&null!=ja.getAttribute(I)&&(ja.geometry.x=Ca+parseFloat(ja.getAttribute(I)));null!=M&&null!=ja.getAttribute(M)&&(ja.geometry.y=ha+parseFloat(ja.getAttribute(M)));var Ba="@"==k.charAt(0)?ja.getAttribute(k.substring(1)):null;ja.geometry.width=null!=Ba&&"auto"!=Ba?parseFloat(ja.getAttribute(k.substring(1))):"auto"==k||"auto"==Ba?xa.width+W:parseFloat(k);var Fa="@"==v.charAt(0)?ja.getAttribute(v.substring(1)):
+null;ja.geometry.height=null!=Fa&&"auto"!=Fa&&"width"!=v?parseFloat(Fa):"auto"==v||"auto"==Fa?xa.height+W:"width"==v?ja.geometry.width:parseFloat(v);Z+=ja.geometry.height+S}f?(null==z[oa]&&(z[oa]=[]),z[oa].push(ja)):(p.push(ja),null!=H?(H.style=C.replacePlaceholders(H,A,F),C.addCell(ja,H),n.push(H)):t.push(C.addCell(ja)))}for(ia=0;ia<n.length;ia++)Ba="@"==k.charAt(0)?n[ia].getAttribute(k.substring(1)):null,Fa="@"==v.charAt(0)?n[ia].getAttribute(v.substring(1)):null,"auto"!=k&&"auto"!=Ba||"auto"!=
+v&&"auto"!=Fa||C.updateGroupBounds([n[ia]],W,!0);var La=t.slice(),za=t.slice();for(ua=0;ua<fa.length;ua++){var Da=fa[ua];for(ia=0;ia<p.length;ia++){ja=p[ia];var Ja=mxUtils.bind(this,function(ta,ra,la){var qa=ra.getAttribute(la.from);if(null!=qa&&""!=qa){qa=qa.split(",");for(var ya=0;ya<qa.length;ya++){var Ea=E[la.to][qa[ya]];if(null==Ea&&null!=m){Ea=new mxCell(qa[ya],new mxGeometry(Y,ba,0,0),m);Ea.style=C.replacePlaceholders(ra,Ea.style,F);var Ha=this.editor.graph.getPreferredSizeForCell(Ea);Ea.geometry.width=
+Ha.width+W;Ea.geometry.height=Ha.height+W;E[la.to][qa[ya]]=Ea;Ea.vertex=!0;Ea.id=qa[ya];t.push(C.addCell(Ea))}if(null!=Ea){Ha=la.label;null!=la.fromlabel&&(Ha=(ra.getAttribute(la.fromlabel)||"")+(Ha||""));null!=la.sourcelabel&&(Ha=C.replacePlaceholders(ra,la.sourcelabel,F)+(Ha||""));null!=la.tolabel&&(Ha=(Ha||"")+(Ea.getAttribute(la.tolabel)||""));null!=la.targetlabel&&(Ha=(Ha||"")+C.replacePlaceholders(Ea,la.targetlabel,F));var Pa="target"==la.placeholders==!la.invert?Ea:ta;Pa=null!=la.style?C.replacePlaceholders(Pa,
+la.style,F):C.createCurrentEdgeStyle();Ha=C.insertEdge(null,null,Ha||"",la.invert?Ea:ta,la.invert?ta:Ea,Pa);if(null!=la.labels)for(Pa=0;Pa<la.labels.length;Pa++){var Ka=la.labels[Pa],Na=new mxCell(Ka.label||Pa,new mxGeometry(null!=Ka.x?Ka.x:0,null!=Ka.y?Ka.y:0,0,0),"resizable=0;html=1;");Na.vertex=!0;Na.connectable=!1;Na.geometry.relative=!0;null!=Ka.placeholders&&(Na.value=C.replacePlaceholders("target"==Ka.placeholders==!la.invert?Ea:ta,Na.value,F));if(null!=Ka.dx||null!=Ka.dy)Na.geometry.offset=
+new mxPoint(null!=Ka.dx?Ka.dx:0,null!=Ka.dy?Ka.dy:0);Ha.insert(Na)}if(null!=la.data)for(var Va in la.data)C.setAttributeForCell(Ha,Va,la.data[Va]);za.push(Ha);mxUtils.remove(la.invert?ta:Ea,La)}}}});Ja(ja,ja,Da);if(null!=z[ja.id])for(Aa=0;Aa<z[ja.id].length;Aa++)Ja(ja,z[ja.id][Aa],Da)}}if(null!=da)for(ia=0;ia<p.length;ia++)for(ja=p[ia],Aa=0;Aa<da.length;Aa++)C.setAttributeForCell(ja,mxUtils.trim(da[Aa]),null);if(0<t.length){var Ra=new mxParallelEdgeLayout(C);Ra.spacing=P;Ra.checkOverlap=!0;var Sa=
+function(){0<Ra.spacing&&Ra.execute(C.getDefaultParent());for(var ta=0;ta<t.length;ta++){var ra=C.getCellGeometry(t[ta]);ra.x=Math.round(C.snap(ra.x));ra.y=Math.round(C.snap(ra.y));"auto"==k&&(ra.width=Math.round(C.snap(ra.width)));"auto"==v&&(ra.height=Math.round(C.snap(ra.height)))}};if("["==ca.charAt(0)){var ab=X;C.view.validate();this.executeLayouts(C.createLayouts(JSON.parse(ca)),function(){Sa();ab()});X=null}else if("circle"==ca){var db=new mxCircleLayout(C);db.disableEdgeStyle=!1;db.resetEdges=
+!1;var Wa=db.isVertexIgnored;db.isVertexIgnored=function(ta){return Wa.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){db.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("horizontaltree"==ca||"verticaltree"==ca||"auto"==ca&&za.length==2*t.length-1&&1==La.length){C.view.validate();var Xa=new mxCompactTreeLayout(C,"horizontaltree"==ca);Xa.levelDistance=S;Xa.edgeRouting=!1;Xa.resetEdges=!1;Xa.sortEdges=!0;this.executeLayout(function(){Xa.execute(C.getDefaultParent(),
+0<La.length?La[0]:null)},!0,X);X=null}else if("horizontalflow"==ca||"verticalflow"==ca||"auto"==ca&&1==La.length){C.view.validate();var Ua=new mxHierarchicalLayout(C,"horizontalflow"==ca?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ua.intraCellSpacing=S;Ua.parallelEdgeSpacing=P;Ua.interRankCellSpacing=V;Ua.disableEdgeStyle=!1;this.executeLayout(function(){Ua.execute(C.getDefaultParent(),za);C.moveCells(za,Y,ba)},!0,X);X=null}else if("orgchart"==ca){C.view.validate();var eb=new mxOrgChartLayout(C,
+2,V,S),jb=eb.isVertexIgnored;eb.isVertexIgnored=function(ta){return jb.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){eb.execute(C.getDefaultParent());Sa()},!0,X);X=null}else if("organic"==ca||"auto"==ca&&za.length>t.length){C.view.validate();var $a=new mxFastOrganicLayout(C);$a.forceConstant=3*S;$a.disableEdgeStyle=!1;$a.resetEdges=!1;var ka=$a.isVertexIgnored;$a.isVertexIgnored=function(ta){return ka.apply(this,arguments)||0>mxUtils.indexOf(t,ta)};this.executeLayout(function(){$a.execute(C.getDefaultParent());
Sa()},!0,X);X=null}}this.hideDialog()}finally{C.model.endUpdate()}null!=X&&X()}}catch(ta){this.handleError(ta)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var f="?",p;for(p in urlParams)0>mxUtils.indexOf(c,p)&&null!=urlParams[p]&&(e+=f+p+"="+urlParams[p],f="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;
if("1"==urlParams.offline)c+=window.location.search;else{var f="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),p;for(p in urlParams)0>mxUtils.indexOf(f,p)&&(c=0==e?c+"?":c+"&",null!=urlParams[p]&&(c+=p+"="+urlParams[p],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,f,p,n){c=new LinkDialog(this,c,e,f,!0,p,n);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&
"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);
@@ -13508,81 +13512,81 @@ EditorUi.prototype.updateActionStates=function(){L.apply(this,arguments);var c=t
this.actions.get("editConnectionPoints").setEnabled(p&&0==f.edges.length&&1==f.vertices.length);this.actions.get("editImage").setEnabled(p&&f.image&&0<f.cells.length);this.actions.get("crop").setEnabled(p&&f.image&&0<f.cells.length);this.actions.get("pageSetup").setEnabled(p);this.actions.get("shadowVisible").setEnabled(p);this.actions.get("connectionArrows").setEnabled(p);this.actions.get("connectionPoints").setEnabled(p);this.actions.get("copyStyle").setEnabled(p&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(null!=
this.copiedStyle&&p&&0<f.cells.length);this.actions.get("editGeometry").setEnabled(0<f.vertices.length);this.actions.get("createShape").setEnabled(p);this.actions.get("createRevision").setEnabled(p);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(p&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&
!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.actions.get("properties").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=
-e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(p&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var N=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
-null);N.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,f,p,n,t,z,F){var C=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var E=c.getFileData(!0,null,null,null,null,!0),R=C.getGraphBounds(),U=Math.floor(R.width*n/C.view.scale),O=Math.floor(R.height*
-n/C.view.scale);if(E.length<=MAX_REQUEST_SIZE&&U*O<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&"jpeg"!=f||!c.isExportToCanvas()){var Q={globalVars:C.getExportVariables()};F&&(Q.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,f,function(m,u){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(u||"0")+(null!=m?"&filename="+encodeURIComponent(m):"")+"&extras="+encodeURIComponent(JSON.stringify(Q))+(0<z?"&dpi="+z:"")+"&bg="+(null!=p?p:"none")+"&w="+U+"&h="+
-O+"&border="+t+"&xml="+encodeURIComponent(E))})}else"png"==f?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,F,z):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",F);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var p=c;this.currentPage!=this.pages[f]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),
+e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(p&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var Q=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=
+null);Q.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,e,f,p,n,t,z,E){var C=c.editor.graph;if("xml"==f)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==f)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(C.getSvg(p,n,t)),"image/svg+xml");else{var F=c.getFileData(!0,null,null,null,null,!0),R=C.getGraphBounds(),U=Math.floor(R.width*n/C.view.scale),O=Math.floor(R.height*
+n/C.view.scale);if(F.length<=MAX_REQUEST_SIZE&&U*O<MAX_AREA)if(c.hideDialog(),"png"!=f&&"jpg"!=f&&"jpeg"!=f||!c.isExportToCanvas()){var N={globalVars:C.getExportVariables()};E&&(N.grid={size:C.gridSize,steps:C.view.gridSteps,color:C.view.gridColor});c.saveRequest(e,f,function(m,u){return new mxXmlRequest(EXPORT_URL,"format="+f+"&base64="+(u||"0")+(null!=m?"&filename="+encodeURIComponent(m):"")+"&extras="+encodeURIComponent(JSON.stringify(N))+(0<z?"&dpi="+z:"")+"&bg="+(null!=p?p:"none")+"&w="+U+"&h="+
+O+"&border="+t+"&xml="+encodeURIComponent(F))})}else"png"==f?c.exportImage(n,null==p||"none"==p,!0,!1,!1,t,!0,!1,null,E,z):c.exportImage(n,!1,!0,!1,!1,t,!0,!1,"jpeg",E);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var f=0;f<this.pages.length;f++){var p=c;this.currentPage!=this.pages[f]&&(p=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[f]),
p.model.setRoot(this.pages[f].root));e+=this.pages[f].getName()+" "+p.getIndexableText()+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},f=document.createElement("div");f.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxUtils.htmlEntities(c));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";f.appendChild(p);var n=document.createElement("div");n.style.cssText=
-"border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var F=z[c];if("R"==F.substring(0,1)){var C=JSON.parse(decodeURIComponent(F.substring(1)));t[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(E){}this.remoteInvoke("getCustomLibraries",null,null,function(E){n.innerText="";if(0==E.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+
-mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<E.length;R++){var U=E[R];t[U.id]&&(e[U.id]=U);var O=this.addCheckbox(n,U.title,t[U.id]);(function(Q,m){mxEvent.addListener(m,"change",function(){this.checked?e[Q.id]=Q:delete e[Q.id]})})(U,O)}},mxUtils.bind(this,function(E){n.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=E&&null!=E.message?E.message:
-mxResources.get("unknownError"));n.appendChild(R)}));f.appendChild(n);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var E=0,R;for(R in e)null==t[R]&&(E++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(O){E--;0==E&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,O,U)),this.showSidebar()}catch(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}}),
-mxUtils.bind(this,function(){E--;0==E&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[R]));for(R in t)e[R]||this.closeLibrary(new RemoteLibrary(this,null,t[R]));0==E&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(f.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
+"border:1px solid lightGray;overflow: auto;height:300px";n.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var t={};try{var z=mxSettings.getCustomLibraries();for(c=0;c<z.length;c++){var E=z[c];if("R"==E.substring(0,1)){var C=JSON.parse(decodeURIComponent(E.substring(1)));t[C[0]]={id:C[0],title:C[1],downloadUrl:C[2]}}}}catch(F){}this.remoteInvoke("getCustomLibraries",null,null,function(F){n.innerText="";if(0==F.length)n.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+
+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var R=0;R<F.length;R++){var U=F[R];t[U.id]&&(e[U.id]=U);var O=this.addCheckbox(n,U.title,t[U.id]);(function(N,m){mxEvent.addListener(m,"change",function(){this.checked?e[N.id]=N:delete e[N.id]})})(U,O)}},mxUtils.bind(this,function(F){n.innerText="";var R=document.createElement("div");R.style.padding="8px";R.style.textAlign="center";mxUtils.write(R,mxResources.get("error")+": ");mxUtils.write(R,null!=F&&null!=F.message?F.message:
+mxResources.get("unknownError"));n.appendChild(R)}));f.appendChild(n);f=new CustomDialog(this,f,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var F=0,R;for(R in e)null==t[R]&&(F++,mxUtils.bind(this,function(U){this.remoteInvoke("getFileContent",[U.downloadUrl],null,mxUtils.bind(this,function(O){F--;0==F&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,O,U)),this.showSidebar()}catch(N){this.handleError(N,mxResources.get("errorLoadingFile"))}}),
+mxUtils.bind(this,function(){F--;0==F&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[R]));for(R in t)e[R]||this.closeLibrary(new RemoteLibrary(this,null,t[R]));0==F&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(f.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,f=this.remoteInvokeCallbacks[e.callbackId];
-if(null==f)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?f.error&&f.error(c.error.errResp):f.callback&&f.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,f,p,n){var t=!0,z=window.setTimeout(mxUtils.bind(this,function(){t=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),F=mxUtils.bind(this,function(){window.clearTimeout(z);t&&p.apply(this,arguments)}),C=mxUtils.bind(this,
-function(){window.clearTimeout(z);t&&n.apply(this,arguments)});f=f||{};f.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:F,error:C});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:f});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var f=mxUtils.bind(this,function(E,R){var U={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=R?
-U.error={errResp:R}:null!=E&&(U.resp=E);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var p=c.funtionName,n=this.remoteInvokableFns[p];if(null!=n&&"function"===typeof this[p]){if(n.allowedDomains){for(var t=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){t=!0;break}if(!t){f(null,"Invalid Call: "+p+" is not allowed.");return}}var F=c.functionArgs;Array.isArray(F)||(F=[]);if(n.isAsync)F.push(function(){f(Array.prototype.slice.apply(arguments))}),F.push(function(E){f(null,
-E||"Unkown Error")}),this[p].apply(this,F);else{var C=this[p].apply(this,F);f([C])}}else f(null,"Invalid Call: "+p+" is not found.")}catch(E){f(null,"Invalid Call: An error occurred, "+E.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var f=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=f)try{var p=f.open("database",2);p.onupgradeneeded=function(n){try{var t=p.result;1>n.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>n.oldVersion&&
+if(null==f)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?f.error&&f.error(c.error.errResp):f.callback&&f.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,f,p,n){var t=!0,z=window.setTimeout(mxUtils.bind(this,function(){t=!1;n({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),E=mxUtils.bind(this,function(){window.clearTimeout(z);t&&p.apply(this,arguments)}),C=mxUtils.bind(this,
+function(){window.clearTimeout(z);t&&n.apply(this,arguments)});f=f||{};f.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:E,error:C});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:f});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var f=mxUtils.bind(this,function(F,R){var U={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=R?
+U.error={errResp:R}:null!=F&&(U.resp=F);this.remoteWin.postMessage(JSON.stringify(U),"*")});try{var p=c.funtionName,n=this.remoteInvokableFns[p];if(null!=n&&"function"===typeof this[p]){if(n.allowedDomains){for(var t=!1,z=0;z<n.allowedDomains.length;z++)if(e=="https://"+n.allowedDomains[z]){t=!0;break}if(!t){f(null,"Invalid Call: "+p+" is not allowed.");return}}var E=c.functionArgs;Array.isArray(E)||(E=[]);if(n.isAsync)E.push(function(){f(Array.prototype.slice.apply(arguments))}),E.push(function(F){f(null,
+F||"Unkown Error")}),this[p].apply(this,E);else{var C=this[p].apply(this,E);f([C])}}else f(null,"Invalid Call: "+p+" is not found.")}catch(F){f(null,"Invalid Call: An error occurred, "+F.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var f=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=f)try{var p=f.open("database",2);p.onupgradeneeded=function(n){try{var t=p.result;1>n.oldVersion&&t.createObjectStore("objects",{keyPath:"key"});2>n.oldVersion&&
(t.createObjectStore("files",{keyPath:"title"}),t.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(z){null!=e&&e(z)}};p.onsuccess=mxUtils.bind(this,function(n){try{var t=p.result;this.database=t;EditorUi.migrateStorageFiles&&(StorageFile.migrate(t),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(z){if(!z||
-"1"==urlParams.forceMigration){var F=document.createElement("iframe");F.style.display="none";F.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(F);var C=!0,E=!1,R,U=0,O=mxUtils.bind(this,function(){E=!0;this.setDatabaseItem(".drawioMigrated3",!0);F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Q=mxUtils.bind(this,function(){U++;m()}),m=mxUtils.bind(this,function(){try{if(U>=
-R.length)O();else{var A=R[U];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(B){null==B||".scratchpad"==A&&B==this.emptyLibraryXml?F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):Q()}),Q)}}catch(B){console.log(B)}}),u=mxUtils.bind(this,function(A){try{this.setDatabaseItem(null,[{title:A.title,size:A.data.length,lastModified:Date.now(),type:A.isLib?"L":"F"},{title:A.title,data:A.data}],Q,Q,["filesInfo","files"])}catch(B){console.log(B)}});
-z=mxUtils.bind(this,function(A){try{if(A.source==F.contentWindow){var B={};try{B=JSON.parse(A.data)}catch(H){}"init"==B.event?(F.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),F.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||E||(C?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(R=B.resp[0],C=!1,m()):O():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?u(B.resp[0]):Q())}}catch(H){console.log(H)}});
+"1"==urlParams.forceMigration){var E=document.createElement("iframe");E.style.display="none";E.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(E);var C=!0,F=!1,R,U=0,O=mxUtils.bind(this,function(){F=!0;this.setDatabaseItem(".drawioMigrated3",!0);E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),N=mxUtils.bind(this,function(){U++;m()}),m=mxUtils.bind(this,function(){try{if(U>=
+R.length)O();else{var A=R[U];StorageFile.getFileContent(this,A,mxUtils.bind(this,function(B){null==B||".scratchpad"==A&&B==this.emptyLibraryXml?E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[A]}),"*"):N()}),N)}}catch(B){console.log(B)}}),u=mxUtils.bind(this,function(A){try{this.setDatabaseItem(null,[{title:A.title,size:A.data.length,lastModified:Date.now(),type:A.isLib?"L":"F"},{title:A.title,data:A.data}],N,N,["filesInfo","files"])}catch(B){console.log(B)}});
+z=mxUtils.bind(this,function(A){try{if(A.source==E.contentWindow){var B={};try{B=JSON.parse(A.data)}catch(H){}"init"==B.event?(E.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),E.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=B.event||F||(C?null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?(R=B.resp[0],C=!1,m()):O():null!=B.resp&&0<B.resp.length&&null!=B.resp[0]?u(B.resp[0]):N())}}catch(H){console.log(H)}});
window.addEventListener("message",z)}})));c(t);t.onversionchange=function(){t.close()}}catch(z){null!=e?e(z):null!=window.console&&console.warn(z)}});p.onerror=e;p.onblocked=function(){}}catch(n){null!=e?e(n):null!=window.console&&console.error(n)}else null!=e&&e(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,e,f,p,n){this.openDatabase(mxUtils.bind(this,function(t){try{n=n||"objects";Array.isArray(n)||(n=[n],c=[c],e=[e]);var z=t.transaction(n,
-"readwrite");z.oncomplete=f;z.onerror=p;for(t=0;t<n.length;t++)z.objectStore(n[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(F){null!=p&&p(F)}}),p)};EditorUi.prototype.removeDatabaseItem=function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c]);var t=n.transaction(p,"readwrite");t.oncomplete=e;t.onerror=f;for(n=0;n<p.length;n++)t.objectStore(p[n]).delete(c[n])}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItem=
+"readwrite");z.oncomplete=f;z.onerror=p;for(t=0;t<n.length;t++)z.objectStore(n[t]).put(null!=c&&null!=c[t]?{key:c[t],data:e[t]}:e[t])}catch(E){null!=p&&p(E)}}),p)};EditorUi.prototype.removeDatabaseItem=function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";Array.isArray(p)||(p=[p],c=[c]);var t=n.transaction(p,"readwrite");t.oncomplete=e;t.onerror=f;for(n=0;n<p.length;n++)t.objectStore(p[n]).delete(c[n])}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItem=
function(c,e,f,p){this.openDatabase(mxUtils.bind(this,function(n){try{p=p||"objects";var t=n.transaction([p],"readonly").objectStore(p).get(c);t.onsuccess=function(){e(t.result)};t.onerror=f}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.getDatabaseItems=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(p){try{f=f||"objects";var n=p.transaction([f],"readonly").objectStore(f).openCursor(IDBKeyRange.lowerBound(0)),t=[];n.onsuccess=function(z){null==z.target.result?c(t):(t.push(z.target.result.value),
z.target.result.continue())};n.onerror=e}catch(z){null!=e&&e(z)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,f){this.openDatabase(mxUtils.bind(this,function(p){try{f=f||"objects";var n=p.transaction([f],"readonly").objectStore(f).getAllKeys();n.onsuccess=function(){c(n.result)};n.onerror=e}catch(t){null!=e&&e(t)}}),e)};EditorUi.prototype.commentsSupported=function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var c=
this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var c=this.getCurrentFile();return null!=c?c.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(c,e){var f=this.getCurrentFile();null!=f?f.getComments(c,e):c([])};EditorUi.prototype.addComment=function(c,e,f){var p=this.getCurrentFile();null!=p?p.addComment(c,e,f):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?
c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var f=this.getCurrentFile();return null!=f?f.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var f=this.getCurrentFile();null!=
-f&&f.getRevisions?f.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,f,p,n,t,z,F){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
-return this.editor.loadUrl(c,e,f,p,n,t,z,F)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,p,n,t,z,F,C,E,R,U,O,Q,m,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+f&&f.getRevisions?f.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,f,p,n,t,z,E){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
+return this.editor.loadUrl(c,e,f,p,n,t,z,E)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,f,p,n,t,z,E,C,F,R,U,O,N,m,u)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(c,e,f,p)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,e,f,p){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,f,p)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,f,p,n){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,f,p,n)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var f=localStorage.key(e),p=localStorage.getItem(f);if(0<f.length&&(".scratchpad"==f||"."!=f.charAt(0))&&0<p.length){var n=
"<mxfile "===p.substring(0,8)||"<?xml"===p.substring(0,5)||"\x3c!--[if IE]>"===p.substring(0,12);p="<mxlibrary>"===p.substring(0,11);(n||p)&&c.push(f)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,g,l,d,q,y){function x(){for(var m=z.getElementsByTagName("div"),u=0,A=0;A<m.length;A++)"none"!=m[A].style.display&&m[A].parentNode==z&&u++;F.style.display=0==u?"block":"none"}function D(m,u,A,B){function H(){u.removeChild(v);u.removeChild(G);k.style.display="block";T.style.display="block"}p={div:u,comment:m,saveCallback:A,deleteOnCancel:B};var T=u.querySelector(".geCommentTxt"),k=u.querySelector(".geCommentActionsList"),v=document.createElement("textarea");v.className=
+var CommentsWindow=function(b,g,l,d,q,y){function x(){for(var m=z.getElementsByTagName("div"),u=0,A=0;A<m.length;A++)"none"!=m[A].style.display&&m[A].parentNode==z&&u++;E.style.display=0==u?"block":"none"}function D(m,u,A,B){function H(){u.removeChild(v);u.removeChild(G);k.style.display="block";T.style.display="block"}p={div:u,comment:m,saveCallback:A,deleteOnCancel:B};var T=u.querySelector(".geCommentTxt"),k=u.querySelector(".geCommentActionsList"),v=document.createElement("textarea");v.className=
"geCommentEditTxtArea";v.style.minHeight=T.offsetHeight+"px";v.value=m.content;u.insertBefore(v,T);var G=document.createElement("div");G.className="geCommentEditBtns";var I=mxUtils.button(mxResources.get("cancel"),function(){B?(u.parentNode.removeChild(u),x()):H();p=null});I.className="geCommentEditBtn";G.appendChild(I);var M=mxUtils.button(mxResources.get("save"),function(){T.innerText="";m.content=v.value;mxUtils.write(T,m.content);H();A(m);p=null});mxEvent.addListener(v,"keydown",mxUtils.bind(this,
function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(M.click(),mxEvent.consume(P)):27==P.keyCode&&(I.click(),mxEvent.consume(P)))}));M.focus();M.className="geCommentEditBtn gePrimaryBtn";G.appendChild(M);u.insertBefore(G,T);k.style.display="none";T.style.display="none";v.focus()}function J(m,u){u.innerText="";m=new Date(m.modifiedDate);var A=b.timeSince(m);null==A&&(A=mxResources.get("lessThanAMinute"));mxUtils.write(u,mxResources.get("timeAgo",
-[A],"{1} ago"));u.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString())}function K(m){var u=document.createElement("img");u.className="geCommentBusyImg";u.src=IMAGE_PATH+"/spin.gif";m.appendChild(u);m.busyImg=u}function L(m){m.style.border="1px solid red";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function N(m){m.style.border="";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function c(m,u,A,B,H){function T(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";
+[A],"{1} ago"));u.setAttribute("title",m.toLocaleDateString()+" "+m.toLocaleTimeString())}function K(m){var u=document.createElement("img");u.className="geCommentBusyImg";u.src=IMAGE_PATH+"/spin.gif";m.appendChild(u);m.busyImg=u}function L(m){m.style.border="1px solid red";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function Q(m){m.style.border="";m.busyImg.parentNode==m&&m.removeChild(m.busyImg)}function c(m,u,A,B,H){function T(V,W,X){var Z=document.createElement("li");Z.className="geCommentAction";
var Y=document.createElement("a");Y.className="geCommentActionLnk";mxUtils.write(Y,V);Z.appendChild(Y);mxEvent.addListener(Y,"click",function(ba){W(ba,m);ba.preventDefault();mxEvent.consume(ba)});S.appendChild(Z);X&&(Z.style.display="none")}function k(){function V(Z){W.push(X);if(null!=Z.replies)for(var Y=0;Y<Z.replies.length;Y++)X=X.nextSibling,V(Z.replies[Y])}var W=[],X=G;V(m);return{pdiv:X,replies:W}}function v(V,W,X,Z,Y){function ba(){K(aa);m.addReply(fa,function(da){fa.id=da;m.replies.push(fa);
-N(aa);X&&X()},function(da){ea();L(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){D(fa,aa,function(da){ba()},!0)}var ca=k().pdiv,fa=b.newComment(V,b.getCurrentUser());fa.pCommentId=m.id;null==m.replies&&(m.replies=[]);var aa=c(fa,m.replies,ca,B+1);W?ea():ba()}if(H||!m.isResolved){F.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",m.id);G.style.marginLeft=20*B+5+
+Q(aa);X&&X()},function(da){ea();L(aa);b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Z,Y)}function ea(){D(fa,aa,function(da){ba()},!0)}var ca=k().pdiv,fa=b.newComment(V,b.getCurrentUser());fa.pCommentId=m.id;null==m.replies&&(m.replies=[]);var aa=c(fa,m.replies,ca,B+1);W?ea():ba()}if(H||!m.isResolved){E.style.display="none";var G=document.createElement("div");G.className="geCommentContainer";G.setAttribute("data-commentId",m.id);G.style.marginLeft=20*B+5+
"px";m.isResolved&&(n.style.opacity="0.7");var I=document.createElement("div");I.className="geCommentHeader";var M=document.createElement("img");M.className="geCommentUserImg";M.src=null!=m.user&&null!=m.user.pictureUrl?m.user.pictureUrl:Editor.userImage;I.appendChild(M);M=document.createElement("div");M.className="geCommentHeaderTxt";I.appendChild(M);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,null!=m.user?m.user.displayName:mxResources.get("unknownUser"));
M.appendChild(P);P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",m.id);J(m,P);M.appendChild(P);G.appendChild(I);I=document.createElement("div");I.className="geCommentTxt";mxUtils.write(I,m.content||"");G.appendChild(I);m.isLocked&&(G.style.opacity="0.5");I=document.createElement("div");I.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";I.appendChild(S);e||m.isLocked||0!=B&&!f||T(mxResources.get("reply"),
-function(){v("",!0)},m.isResolved);M=b.getCurrentUser();null==M||null==m.user||M.id!=m.user.id||e||m.isLocked||(T(mxResources.get("edit"),function(){function V(){D(m,G,function(){K(G);m.editComment(m.content,function(){N(G)},function(W){L(G);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},m.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(G);m.deleteComment(function(V){if(!0===V){V=G.querySelector(".geCommentTxt");
-V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=G.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);N(G);G.style.opacity="0.5"}else{W=k(m).replies;for(V=0;V<W.length;V++)z.removeChild(W[V]);for(V=0;V<u.length;V++)if(u[V]==m){u.splice(V,1);break}F.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(V){L(G);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},m.isResolved));
+function(){v("",!0)},m.isResolved);M=b.getCurrentUser();null==M||null==m.user||M.id!=m.user.id||e||m.isLocked||(T(mxResources.get("edit"),function(){function V(){D(m,G,function(){K(G);m.editComment(m.content,function(){Q(G)},function(W){L(G);V();b.handleError(W,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}V()},m.isResolved),T(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){K(G);m.deleteComment(function(V){if(!0===V){V=G.querySelector(".geCommentTxt");
+V.innerText="";mxUtils.write(V,mxResources.get("msgDeleted"));var W=G.querySelectorAll(".geCommentAction");for(V=0;V<W.length;V++)W[V].parentNode.removeChild(W[V]);Q(G);G.style.opacity="0.5"}else{W=k(m).replies;for(V=0;V<W.length;V++)z.removeChild(W[V]);for(V=0;V<u.length;V++)if(u[V]==m){u.splice(V,1);break}E.style.display=0==z.getElementsByTagName("div").length?"block":"none"}},function(V){L(G);b.handleError(V,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},m.isResolved));
e||m.isLocked||0!=B||T(m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(V){function W(){var X=V.target;X.innerText="";m.isResolved=!m.isResolved;mxUtils.write(X,m.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Z=m.isResolved?"none":"",Y=k(m).replies,ba="light-dark("+(m.isResolved?"ghostWhite":"white")+", transparent)",ea=0;ea<Y.length;ea++){Y[ea].style.backgroundColor=ba;for(var ca=Y[ea].querySelectorAll(".geCommentAction"),fa=0;fa<ca.length;fa++)ca[fa]!=
X.parentNode&&(ca[fa].style.display=Z);U||(Y[ea].style.display="none")}x()}m.isResolved?v(mxResources.get("reOpened")+": ",!0,W,!1,!0):v(mxResources.get("markedAsResolved"),!1,W,!0)});G.appendChild(I);null!=A?z.insertBefore(G,A.nextSibling):z.appendChild(G);for(A=0;null!=m.replies&&A<m.replies.length;A++)I=m.replies[A],I.isResolved=m.isResolved,c(I,m.replies,null,B+1,H);null!=p&&(p.comment.id==m.id?(H=m.content,m.content=p.comment.content,D(m,G,p.saveCallback,p.deleteOnCancel),m.content=H):null==
p.comment.id&&p.comment.pCommentId==m.id&&(z.appendChild(p.div),D(p.comment,p.div,p.saveCallback,p.deleteOnCancel)));return G}}var e=!b.canComment(),f=b.canReplyToReplies(),p=null,n=document.createElement("div");n.className="geCommentsWin";n.style.background="light-dark(whiteSmoke, "+Editor.darkColor+")";var t=EditorUi.compactUi?"26px":"30px",z=document.createElement("div");z.className="geCommentsList";z.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";z.style.bottom=parseInt(t)+
-7+"px";n.appendChild(z);var F=document.createElement("span");F.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(F,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=t;C.style.padding="3px 4px 4px 4px";t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset geToggleItem";t.style.width="16px";t.style.height="18px";t.style.backgroundPosition="center center";t.style.backgroundRepeat=
-"no-repeat";t.style.backgroundSize="20px";t.style.margin="0 2px";t.style.display="inline-block";t.style.cursor="pointer";if(!e){var E=t.cloneNode();E.style.backgroundImage="url("+Editor.plusImage+")";E.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(E,"click",function(m){function u(){D(A,B,function(H){K(B);b.addComment(H,function(T){H.id=T;O.push(H);N(B)},function(T){L(B);u();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=
-b.newComment("",b.getCurrentUser()),B=c(A,O,null,0);u();m.preventDefault();mxEvent.consume(m)});C.appendChild(E)}var R=t.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(m){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");Q();m.preventDefault();mxEvent.consume(m)});C.appendChild(R);b.commentsRefreshNeeded()&&(E=t.cloneNode(),
-E.style.backgroundImage="url("+Editor.refreshImage+")",E.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(E,"click",function(m){Q();m.preventDefault();mxEvent.consume(m)}),C.appendChild(E));b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geButton geAdaptiveAsset",mxEvent.addListener(t,"click",function(m){y();m.preventDefault();mxEvent.consume(m)}),
-C.appendChild(t));n.appendChild(C);var O=[],Q=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var m=p.div.querySelector(".geCommentEditTxtArea"),u=p.div.querySelector(".geCommentEditBtns");p.comment.content=m.value;m.parentNode.removeChild(m);u.parentNode.removeChild(u)}catch(A){b.handleError(A)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
-"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(H){if(null!=H){H.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var T=0;T<H.length;T++)B(H[T].replies)}}A.sort(function(H,T){return new Date(H.modifiedDate)-new Date(T.modifiedDate)});z.innerText="";z.appendChild(F);F.style.display="block";O=A;for(A=0;A<O.length;A++)B(O[A].replies),c(O[A],O,null,0,U);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(z.appendChild(p.div),
-D(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(A){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});Q();this.refreshComments=Q;C=mxUtils.bind(this,function(){function m(T){var k=A[T.id];if(null!=k)for(J(T,k),k=0;null!=T.replies&&k<T.replies.length;k++)m(T.replies[k])}if(this.window.isVisible()){for(var u=z.querySelectorAll(".geCommentDate"),A=
+7+"px";n.appendChild(z);var E=document.createElement("span");E.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(E,mxResources.get("noCommentsFound"));var C=document.createElement("div");C.className="geToolbarContainer geCommentsToolbar";C.style.height=t;C.style.padding="3px 4px 4px 4px";t=document.createElement("a");t.className="geToolbarButton geAdaptiveAsset geToggleItem";t.style.width="16px";t.style.height="18px";t.style.backgroundPosition="center center";t.style.backgroundRepeat=
+"no-repeat";t.style.backgroundSize="20px";t.style.margin="0 2px";t.style.display="inline-block";t.style.cursor="pointer";if(!e){var F=t.cloneNode();F.style.backgroundImage="url("+Editor.plusImage+")";F.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(F,"click",function(m){function u(){D(A,B,function(H){K(B);b.addComment(H,function(T){H.id=T;O.push(H);Q(B)},function(T){L(B);u();b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var A=
+b.newComment("",b.getCurrentUser()),B=c(A,O,null,0);u();m.preventDefault();mxEvent.consume(m)});C.appendChild(F)}var R=t.cloneNode();R.classList.add("geToggleItem");R.style.backgroundImage="url("+Editor.checkImage+")";R.setAttribute("title",mxResources.get("showResolved"));var U=!1;mxEvent.addListener(R,"click",function(m){(U=!U)?R.classList.add("geActiveItem"):R.classList.remove("geActiveItem");N();m.preventDefault();mxEvent.consume(m)});C.appendChild(R);b.commentsRefreshNeeded()&&(F=t.cloneNode(),
+F.style.backgroundImage="url("+Editor.refreshImage+")",F.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(F,"click",function(m){N();m.preventDefault();mxEvent.consume(m)}),C.appendChild(F));b.commentsSaveNeeded()&&(t=t.cloneNode(),t.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',t.setAttribute("title",mxResources.get("save")),t.className="geButton geAdaptiveAsset",mxEvent.addListener(t,"click",function(m){y();m.preventDefault();mxEvent.consume(m)}),
+C.appendChild(t));n.appendChild(C);var O=[],N=mxUtils.bind(this,function(){this.hasError=!1;if(null!=p)try{p.div=p.div.cloneNode(!0);var m=p.div.querySelector(".geCommentEditTxtArea"),u=p.div.querySelector(".geCommentEditBtns");p.comment.content=m.value;m.parentNode.removeChild(m);u.parentNode.removeChild(u)}catch(A){b.handleError(A)}z.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+
+"...</div>";f=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(A){function B(H){if(null!=H){H.sort(function(k,v){return new Date(k.modifiedDate)-new Date(v.modifiedDate)});for(var T=0;T<H.length;T++)B(H[T].replies)}}A.sort(function(H,T){return new Date(H.modifiedDate)-new Date(T.modifiedDate)});z.innerText="";z.appendChild(E);E.style.display="block";O=A;for(A=0;A<O.length;A++)B(O[A].replies),c(O[A],O,null,0,U);null!=p&&null==p.comment.id&&null==p.comment.pCommentId&&(z.appendChild(p.div),
+D(p.comment,p.div,p.saveCallback,p.deleteOnCancel))},mxUtils.bind(this,function(A){z.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(A&&A.message?": "+A.message:""));this.hasError=!0})):z.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});N();this.refreshComments=N;C=mxUtils.bind(this,function(){function m(T){var k=A[T.id];if(null!=k)for(J(T,k),k=0;null!=T.replies&&k<T.replies.length;k++)m(T.replies[k])}if(this.window.isVisible()){for(var u=z.querySelectorAll(".geCommentDate"),A=
{},B=0;B<u.length;B++){var H=u[B];A[H.getAttribute("data-commentId")]=H}for(B=0;B<O.length;B++)m(O[B])}});setInterval(C,6E4);this.refreshCommentsTime=C;this.window=new mxWindow(mxResources.get("comments"),n,g,l,d,q,!0,!0);this.window.minimumSize=new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));
-b.installResizeHandler(this,!0)},ConfirmDialog=function(b,g,l,d,q,y,x,D,J,K,L){var N=document.createElement("div");N.style.textAlign="center";L=null!=L?L:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=L+"px";c.style.lineHeight="1.2em";mxUtils.write(c,g);N.appendChild(c);null!=K&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",g=document.createElement("img"),g.setAttribute("src",K),c.appendChild(g),N.appendChild(c));K=document.createElement("div");
+b.installResizeHandler(this,!0)},ConfirmDialog=function(b,g,l,d,q,y,x,D,J,K,L){var Q=document.createElement("div");Q.style.textAlign="center";L=null!=L?L:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=L+"px";c.style.lineHeight="1.2em";mxUtils.write(c,g);Q.appendChild(c);null!=K&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",g=document.createElement("img"),g.setAttribute("src",K),c.appendChild(g),Q.appendChild(c));K=document.createElement("div");
K.style.textAlign="center";K.style.whiteSpace="nowrap";var e=document.createElement("input");e.setAttribute("type","checkbox");y=mxUtils.button(y||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(e.checked)});y.className="geBtn";null!=D&&(y.innerHTML=D+"<br>"+y.innerHTML,y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.style.width="40%");b.editor.cancelFirst&&K.appendChild(y);var f=mxUtils.button(q||mxResources.get("ok"),function(){b.hideDialog();null!=l&&
-l(e.checked)});K.appendChild(f);null!=x?(f.innerHTML=x+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(y);N.appendChild(K);J?(K.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),
-c.appendChild(q),N.appendChild(c),mxEvent.addListener(q,"click",function(p){e.checked=!e.checked;mxEvent.consume(p)})):K.style.marginTop="12px";this.init=function(){f.focus()};this.container=N},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};
+l(e.checked)});K.appendChild(f);null!=x?(f.innerHTML=x+"<br>"+f.innerHTML+"<br>",f.style.paddingBottom="8px",f.style.paddingTop="8px",f.style.height="auto",f.className="geBtn",f.style.width="40%"):f.className="geBtn gePrimaryBtn";b.editor.cancelFirst||K.appendChild(y);Q.appendChild(K);J?(K.style.marginTop="10px",c=document.createElement("p"),c.style.marginTop="20px",c.style.marginBottom="0px",c.appendChild(e),q=document.createElement("span"),mxUtils.write(q," "+mxResources.get("rememberThisSetting")),
+c.appendChild(q),Q.appendChild(c),mxEvent.addListener(q,"click",function(p){e.checked=!e.checked;mxEvent.consume(p)})):K.style.marginTop="12px";this.init=function(){f.focus()};this.container=Q},HeadlessEditorUi=function(){EditorUi.call(this,new Editor(!0),document.createElement("div"),!0)};mxUtils.extend(HeadlessEditorUi,EditorUi);HeadlessEditorUi.prototype.createUi=function(){};HeadlessEditorUi.prototype.addTrees=function(){};HeadlessEditorUi.prototype.onBeforeUnload=function(){};
HeadlessEditorUi.prototype.updateActionStates=function(){};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,g,l,d,q){if(null!=g)for(var y=0;y<g.length;y++)null!=g[y]&&(b=this.patchPages(b,g[y],l,d,q));return b};
-EditorUi.prototype.patchPages=function(b,g,l,d,q){var y={},x=[],D={},J={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var N in d[EditorUi.DIFF_UPDATE])y[N]=d[EditorUi.DIFF_UPDATE][N];if(null!=g[EditorUi.DIFF_REMOVE])for(d=0;d<g[EditorUi.DIFF_REMOVE].length;d++)J[g[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=g[EditorUi.DIFF_INSERT])for(d=0;d<g[EditorUi.DIFF_INSERT].length;d++)D[g[EditorUi.DIFF_INSERT][d].previous]=g[EditorUi.DIFF_INSERT][d];if(null!=g[EditorUi.DIFF_UPDATE])for(N in g[EditorUi.DIFF_UPDATE])d=
-g[EditorUi.DIFF_UPDATE][N],null!=d.previous&&(L[d.previous]=N);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();K[e]=b[d];null!=L[c]||J[e]||null!=g[EditorUi.DIFF_UPDATE]&&null!=g[EditorUi.DIFF_UPDATE][e]&&null!=g[EditorUi.DIFF_UPDATE][e].previous||(L[c]=e);c=e}}var f={},p=mxUtils.bind(this,function(t){var z=null!=t?t.getId():"";if(null!=t&&!f[z]){f[z]=!0;x.push(t);var F=null!=g[EditorUi.DIFF_UPDATE]?g[EditorUi.DIFF_UPDATE][z]:null;null!=F&&(this.updatePageRoot(t),null!=F.name&&t.setName(F.name),
-null!=F.view&&this.patchViewState(t,F.view),null!=F.cells&&this.patchPage(t,F.cells,y[t.getId()],q),!l||null==F.cells&&null==F.view||(t.needsUpdate=!0))}t=L[z];null!=t&&(delete L[z],p(K[t]));t=D[z];null!=t&&(delete D[z],n(t))}),n=mxUtils.bind(this,function(t){t=mxUtils.parseXml(t.data).documentElement;t=new DiagramPage(t);this.updatePageRoot(t);var z=K[t.getId()];null==z?p(t):(this.patchPage(z,this.diffPages([z],[t]),y[z.getId()],q),l&&(z.needsUpdate=!0))});p();for(N in L)p(K[L[N]]),delete L[N];for(N in D)n(D[N]),
-delete D[N];return x};EditorUi.prototype.patchViewState=function(b,g){if(null!=b.viewState&&null!=g){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in g)try{this.patchViewStateProperty(b,g,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,g,l){b.viewState[l]=JSON.parse(g[l])};
+EditorUi.prototype.patchPages=function(b,g,l,d,q){var y={},x=[],D={},J={},K={},L={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var Q in d[EditorUi.DIFF_UPDATE])y[Q]=d[EditorUi.DIFF_UPDATE][Q];if(null!=g[EditorUi.DIFF_REMOVE])for(d=0;d<g[EditorUi.DIFF_REMOVE].length;d++)J[g[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=g[EditorUi.DIFF_INSERT])for(d=0;d<g[EditorUi.DIFF_INSERT].length;d++)D[g[EditorUi.DIFF_INSERT][d].previous]=g[EditorUi.DIFF_INSERT][d];if(null!=g[EditorUi.DIFF_UPDATE])for(Q in g[EditorUi.DIFF_UPDATE])d=
+g[EditorUi.DIFF_UPDATE][Q],null!=d.previous&&(L[d.previous]=Q);if(null!=b){var c="";for(d=0;d<b.length;d++){var e=b[d].getId();K[e]=b[d];null!=L[c]||J[e]||null!=g[EditorUi.DIFF_UPDATE]&&null!=g[EditorUi.DIFF_UPDATE][e]&&null!=g[EditorUi.DIFF_UPDATE][e].previous||(L[c]=e);c=e}}var f={},p=mxUtils.bind(this,function(t){var z=null!=t?t.getId():"";if(null!=t&&!f[z]){f[z]=!0;x.push(t);var E=null!=g[EditorUi.DIFF_UPDATE]?g[EditorUi.DIFF_UPDATE][z]:null;null!=E&&(this.updatePageRoot(t),null!=E.name&&t.setName(E.name),
+null!=E.view&&this.patchViewState(t,E.view),null!=E.cells&&this.patchPage(t,E.cells,y[t.getId()],q),!l||null==E.cells&&null==E.view||(t.needsUpdate=!0))}t=L[z];null!=t&&(delete L[z],p(K[t]));t=D[z];null!=t&&(delete D[z],n(t))}),n=mxUtils.bind(this,function(t){t=mxUtils.parseXml(t.data).documentElement;t=new DiagramPage(t);this.updatePageRoot(t);var z=K[t.getId()];null==z?p(t):(this.patchPage(z,this.diffPages([z],[t]),y[z.getId()],q),l&&(z.needsUpdate=!0))});p();for(Q in L)p(K[L[Q]]),delete L[Q];for(Q in D)n(D[Q]),
+delete D[Q];return x};EditorUi.prototype.patchViewState=function(b,g){if(null!=b.viewState&&null!=g){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in g)try{this.patchViewStateProperty(b,g,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,g,l){b.viewState[l]=JSON.parse(g[l])};
EditorUi.prototype.createParentLookup=function(b,g){function l(K){var L=d[K];null==L&&(L={inserted:[],moved:{}},d[K]=L);return L}var d={};if(null!=g[EditorUi.DIFF_INSERT])for(var q=0;q<g[EditorUi.DIFF_INSERT].length;q++){var y=g[EditorUi.DIFF_INSERT][q],x=null!=y.parent?y.parent:"",D=null!=y.previous?y.previous:"";l(x).inserted[D]=y}if(null!=g[EditorUi.DIFF_UPDATE])for(var J in g[EditorUi.DIFF_UPDATE])y=g[EditorUi.DIFF_UPDATE][J],null!=y.previous&&(x=y.parent,null==x&&(q=b.getCell(J),null!=q&&(q=
b.getParent(q),null!=q&&(x=q.getId()))),null!=x&&(l(x).moved[y.previous]=J));return d};
-EditorUi.prototype.patchPage=function(b,g,l,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),y=this.createParentLookup(q,g);q.beginUpdate();try{var x=q.updateEdgeParent,D=new mxDictionary,J=[];q.updateEdgeParent=function(n,t){!D.get(n)&&d&&(D.put(n,!0),J.push(n))};var K=y[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,N=null;null!=L&&(N=this.getCellForJson(L));if(null==N){var c=null!=K&&null!=K.moved?K.moved[""]:null;null!=c&&(N=q.getCell(c))}null!=N&&(q.setRoot(N),
-b.root=N,EditorUi.debug("EditorUi.patchPage: Root changed",N.id));this.patchCellRecursive(b,q,q.root,y,g);if(null!=g[EditorUi.DIFF_REMOVE])for(var e=0;e<g[EditorUi.DIFF_REMOVE].length;e++){c=g[EditorUi.DIFF_REMOVE][e];var f=q.getCell(c);null!=f&&q.remove(f)}if(null!=g[EditorUi.DIFF_UPDATE]){var p=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(c in g[EditorUi.DIFF_UPDATE])f=q.getCell(c),null!=f?this.patchCell(q,f,g[EditorUi.DIFF_UPDATE][c],null!=p?p[c]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
+EditorUi.prototype.patchPage=function(b,g,l,d){var q=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),y=this.createParentLookup(q,g);q.beginUpdate();try{var x=q.updateEdgeParent,D=new mxDictionary,J=[];q.updateEdgeParent=function(n,t){!D.get(n)&&d&&(D.put(n,!0),J.push(n))};var K=y[""],L=null!=K&&null!=K.inserted?K.inserted[""]:null,Q=null;null!=L&&(Q=this.getCellForJson(L));if(null==Q){var c=null!=K&&null!=K.moved?K.moved[""]:null;null!=c&&(Q=q.getCell(c))}null!=Q&&(q.setRoot(Q),
+b.root=Q,EditorUi.debug("EditorUi.patchPage: Root changed",Q.id));this.patchCellRecursive(b,q,q.root,y,g);if(null!=g[EditorUi.DIFF_REMOVE])for(var e=0;e<g[EditorUi.DIFF_REMOVE].length;e++){c=g[EditorUi.DIFF_REMOVE][e];var f=q.getCell(c);null!=f&&q.remove(f)}if(null!=g[EditorUi.DIFF_UPDATE]){var p=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(c in g[EditorUi.DIFF_UPDATE])f=q.getCell(c),null!=f?this.patchCell(q,f,g[EditorUi.DIFF_UPDATE][c],null!=p?p[c]:null):EditorUi.debug("EditorUi.patchPage: Updated cell not found",
c,"diff",[g[EditorUi.DIFF_UPDATE][c]])}if(null!=g[EditorUi.DIFF_INSERT])for(e=0;e<g[EditorUi.DIFF_INSERT].length;e++)L=g[EditorUi.DIFF_INSERT][e],f=q.getCell(L.id),null!=f&&(q.setTerminal(f,q.getCell(L.source),!0),q.setTerminal(f,q.getCell(L.target),!1));q.updateEdgeParent=x;if(d&&0<J.length)for(e=0;e<J.length;e++)q.contains(J[e])&&q.updateEdgeParent(J[e])}finally{q.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,g,l,d,q){if(null!=l){var y=d[l.getId()],x=null!=y&&null!=y.inserted?y.inserted:{};y=null!=y&&null!=y.moved?y.moved:{};for(var D=0,J=g.getChildCount(l),K="",L=0;L<J;L++){var N=g.getChildAt(l,L).getId();null==y[K]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][N]||null==q[EditorUi.DIFF_UPDATE][N].previous&&null==q[EditorUi.DIFF_UPDATE][N].parent)&&(y[K]=N);K=N}J=mxUtils.bind(this,function(c,e){var f=null!=c?c.getId():"";null==f&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
-"cell",c);null!=c&&e&&(e=g.getCell(f),null!=e&&e!=c&&(c=null));null!=c&&(g.getChildAt(l,D)!=c&&g.add(l,c,D),this.patchCellRecursive(b,g,c,d,q),D++);return f});for(K=[null];0<K.length;)if(L=K.shift(),L=J(null!=L?L.child:null,null!=L?L.insert:!1),N=y[L],null!=N&&(delete y[L],K.push({child:g.getCell(N)})),N=x[L],null!=N&&(delete x[L],K.push({child:this.getCellForJson(N),insert:!0})),0==K.length){for(L in y)K.push({child:g.getCell(y[L])}),delete y[L];for(L in x)K.push({child:this.getCellForJson(x[L]),
+EditorUi.prototype.patchCellRecursive=function(b,g,l,d,q){if(null!=l){var y=d[l.getId()],x=null!=y&&null!=y.inserted?y.inserted:{};y=null!=y&&null!=y.moved?y.moved:{};for(var D=0,J=g.getChildCount(l),K="",L=0;L<J;L++){var Q=g.getChildAt(l,L).getId();null==y[K]&&(null==q[EditorUi.DIFF_UPDATE]||null==q[EditorUi.DIFF_UPDATE][Q]||null==q[EditorUi.DIFF_UPDATE][Q].previous&&null==q[EditorUi.DIFF_UPDATE][Q].parent)&&(y[K]=Q);K=Q}J=mxUtils.bind(this,function(c,e){var f=null!=c?c.getId():"";null==f&&EditorUi.debug("EditorUi.patchCellRecursive: Inserting cell with null id",
+"cell",c);null!=c&&e&&(e=g.getCell(f),null!=e&&e!=c&&(c=null));null!=c&&(g.getChildAt(l,D)!=c&&g.add(l,c,D),this.patchCellRecursive(b,g,c,d,q),D++);return f});for(K=[null];0<K.length;)if(L=K.shift(),L=J(null!=L?L.child:null,null!=L?L.insert:!1),Q=y[L],null!=Q&&(delete y[L],K.push({child:g.getCell(Q)})),Q=x[L],null!=Q&&(delete x[L],K.push({child:this.getCellForJson(Q),insert:!0})),0==K.length){for(L in y)K.push({child:g.getCell(y[L])}),delete y[L];for(L in x)K.push({child:this.getCellForJson(x[L]),
insert:!0}),delete x[L]}}};
EditorUi.prototype.patchCell=function(b,g,l,d){if(null!=g&&null!=l){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in l?b.setValue(g,l.value):null!=l.xmlValue&&b.setValue(g,mxUtils.parseXml(l.xmlValue).documentElement);null!=d&&null!=d.style||null==l.style||b.setStyle(g,l.style);null!=l.visible&&b.setVisible(g,1==l.visible);null!=l.collapsed&&b.setCollapsed(g,1==l.collapsed);null!=l.vertex&&(g.vertex=1==l.vertex);null!=l.edge&&(g.edge=1==l.edge);null!=l.connectable&&(g.connectable=
1==l.connectable);null!=l.geometry&&b.setGeometry(g,this.codec.decode(mxUtils.parseXml(l.geometry).documentElement));null!=l.source&&b.setTerminal(g,b.getCell(l.source),!0);null!=l.target&&b.setTerminal(g,b.getCell(l.target),!1);for(var q in l)this.cellProperties[q]||(g[q]=l[q])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var g=null;null!=b&&(g=mxUtils.getXml(b));return g};
EditorUi.prototype.getNodeForPages=function(b){var g=null;if(null!=this.fileNode&&null!=b){g=this.fileNode.cloneNode(!1);for(var l=0;l<b.length;l++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[l].root));this.editor.graph.saveViewState(b[l].viewState,d);var q=b[l].node.cloneNode(!1);q.appendChild(d);g.appendChild(q)}}return g};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
EditorUi.prototype.getPagesForNode=function(b,g){var l=this.editor.extractGraphModel(b,!0,!0);null!=l&&(b=l);g=b.getElementsByTagName(g||"diagram");l=[];if(0<g.length)for(b=0;b<g.length;b++){var d=new DiagramPage(g[b]);this.updatePageRoot(d,!0);l.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),d.node.appendChild(b.cloneNode(!0)),l.push(d));return l};
-EditorUi.prototype.diffPages=function(b,g){var l=[],d=[],q={},y={},x={},D=null;if(null!=b&&null!=g){for(var J=0;J<g.length;J++)y[g[J].getId()]={page:g[J],prev:D},D=g[J];D=null;for(J=0;J<b.length;J++){var K=b[J].getId();g=y[K];if(null==g)d.push(K);else{this.updatePageRoot(b[J]);this.updatePageRoot(g.page);var L=this.diffCells(b[J].root,g.page.root),N={};mxUtils.isEmptyObject(L)||(N.cells=L);L=this.diffViewState(b[J],g.page);mxUtils.isEmptyObject(L)||(N.view=L);if((null!=g.prev?null==D:null!=D)||null!=
-D&&null!=g.prev&&D.getId()!=g.prev.getId())N.previous=null!=g.prev?g.prev.getId():"";null!=g.page.getName()&&b[J].getName()!=g.page.getName()&&(N.name=g.page.getName());mxUtils.isEmptyObject(N)||(x[K]=N)}delete y[b[J].getId()];D=b[J]}for(K in y)g=y[K],l.push({id:g.page.getId(),data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});mxUtils.isEmptyObject(x)||(q[EditorUi.DIFF_UPDATE]=x);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<l.length&&(q[EditorUi.DIFF_INSERT]=l)}return q};
+EditorUi.prototype.diffPages=function(b,g){var l=[],d=[],q={},y={},x={},D=null;if(null!=b&&null!=g){for(var J=0;J<g.length;J++)y[g[J].getId()]={page:g[J],prev:D},D=g[J];D=null;for(J=0;J<b.length;J++){var K=b[J].getId();g=y[K];if(null==g)d.push(K);else{this.updatePageRoot(b[J]);this.updatePageRoot(g.page);var L=this.diffCells(b[J].root,g.page.root),Q={};mxUtils.isEmptyObject(L)||(Q.cells=L);L=this.diffViewState(b[J],g.page);mxUtils.isEmptyObject(L)||(Q.view=L);if((null!=g.prev?null==D:null!=D)||null!=
+D&&null!=g.prev&&D.getId()!=g.prev.getId())Q.previous=null!=g.prev?g.prev.getId():"";null!=g.page.getName()&&b[J].getName()!=g.page.getName()&&(Q.name=g.page.getName());mxUtils.isEmptyObject(Q)||(x[K]=Q)}delete y[b[J].getId()];D=b[J]}for(K in y)g=y[K],l.push({id:g.page.getId(),data:mxUtils.getXml(g.page.node),previous:null!=g.prev?g.prev.getId():""});mxUtils.isEmptyObject(x)||(q[EditorUi.DIFF_UPDATE]=x);0<d.length&&(q[EditorUi.DIFF_REMOVE]=d);0<l.length&&(q[EditorUi.DIFF_INSERT]=l)}return q};
EditorUi.prototype.createCellLookup=function(b,g,l){l=null!=l?l:{};null==b.getId()?EditorUi.debug("EditorUi.createCellLookup: Ignored inserted cell with no id",b):l[b.getId()]={cell:b,prev:g};var d=b.getChildCount();g=null;for(var q=0;q<d;q++){var y=b.getChildAt(q);this.createCellLookup(y,g,l);g=y}return l};
EditorUi.prototype.diffCellRecursive=function(b,g,l,d,q){d=null!=d?d:{};var y=l[b.getId()];delete l[b.getId()];if(null==y)null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored removed cell with no id",b):q.push(b.getId());else{var x=this.diffCell(b,y.cell);if(null!=x.parent||(null!=y.prev?null==g:null!=g)||null!=g&&null!=y.prev&&g.getId()!=y.prev.getId())x.previous=null!=y.prev?y.prev.getId():"";mxUtils.isEmptyObject(x)||(null==b.getId()?EditorUi.debug("EditorUi.diffCellRecursive: Ignored changed cell with no id",
b,"diff",x):d[b.getId()]=x)}y=b.getChildCount();g=null;for(x=0;x<y;x++){var D=b.getChildAt(x);this.diffCellRecursive(D,g,l,d,q);g=D}return d};
@@ -13666,8 +13670,8 @@ DrawioFileSync.prototype.patchRealtime=function(b,g,l,d){var q=null;if(this.file
"all",q,"local",y,"applied",x,"immediate",d)}return q};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),g=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,g,!0);this.snapshot=b;var l=this.ui.resolveCrossReferences(g,this.ui.diffPages(this.file.ownPages,this.ui.pages));this.file.ownPages=this.ui.patchPages(this.file.ownPages,l,!0);this.isRealtimeActive()&&this.doSendLocalChanges([l,g])}this.localFileWasChanged=
!1}catch(d){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),b,d)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,g,l,d,q,y,x){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var J=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(J,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(J,this.file.ownPages):null;J=this.ui.applyPatches(J,b);var N=null==g?null:this.ui.getHashValueForPages(J);
-EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",g,"current",N,"valid",g==N,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l),"immediate",x);if(null!=g&&g!=N){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=q&&q()}),y,null,x);return}this.file.setShadowPages(J);null==this.patchRealtime(b,null,L,x)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
+DrawioFileSync.prototype.merge=function(b,g,l,d,q,y,x){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var J=this.ui.clonePages(this.file.getShadowPages()),K=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(J,this.ui.pages):null,L=this.file.isRealtime()?this.ui.diffPages(J,this.file.ownPages):null;J=this.ui.applyPatches(J,b);var Q=null==g?null:this.ui.getHashValueForPages(J);
+EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"changes",K,"pending",L,"checksum",g,"current",Q,"valid",g==Q,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l),"immediate",x);if(null!=g&&g!=Q){this.reload(mxUtils.bind(this,function(){null!=d&&d()}),mxUtils.bind(this,function(){null!=q&&q()}),y,null,x);return}this.file.setShadowPages(J);null==this.patchRealtime(b,null,L,x)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?
K:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);null!=d&&d(!0)}catch(f){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();null!=q&&q(f);try{var c=this.file.getCurrentUser(),e=null!=c?c.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),e,f)}catch(p){}}};
DrawioFileSync.prototype.fileChanged=function(b,g,l,d,q){var y=window.setTimeout(mxUtils.bind(this,function(){null!=l&&l()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"immediate",q,"remoteFileChanged",this.remoteFileChanged,"valid",this.isValidState()),this.isValidState()?(this.remoteFileChanged=!1,this.file.loadPatchDescriptor(mxUtils.bind(this,function(x){null!=l&&l()||(this.isValidState()?this.catchup(x,b,g,l,q):null!=g&&g())}),g)):null!=g&&g())}),d?this.cacheReadyDelay:0);return this.notifyThread=
y};
@@ -13676,19 +13680,19 @@ this.cleanupThread=null;"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.fast
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
DrawioFileSync.prototype.catchup=function(b,g,l,d,q){if(null!=b&&(null==d||!d())){var y=this.file.getCurrentRevisionId(),x=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",y,"to",x,"immediate",q,"valid",this.isValidState());if(y==x)this.file.patchDescriptor(this.file.getDescriptor(),b),"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.catchup",[this],"up to date","cleanup",this.cleanupThread,"checksum",this.ui.getHashValueForPages(this.ui.pages)),
-document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=g&&g(!0);else if(this.isValidState()){var D=this.file.getDescriptorChecksum(b),J=this.file.getDescriptorSecret(b);if(null!=D&&D==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=g&&g(!0);else if(Editor.enableRealtimeCache&&null!=J&&"1"!=urlParams.lockdown){var K=0,L=!1,N=mxUtils.bind(this,function(){if(null==d||!d())if(y!=this.file.getCurrentRevisionId())null!=g&&
+document.hidden||"1"!=urlParams.test||"1"!=urlParams.checksum||null!=this.cleanupThread||this.testChecksum(),null!=g&&g(!0);else if(this.isValidState()){var D=this.file.getDescriptorChecksum(b),J=this.file.getDescriptorSecret(b);if(null!=D&&D==this.ui.getHashValueForPages(this.ui.pages))this.fastForward(b),null!=g&&g(!0);else if(Editor.enableRealtimeCache&&null!=J&&"1"!=urlParams.lockdown){var K=0,L=!1,Q=mxUtils.bind(this,function(){if(null==d||!d())if(y!=this.file.getCurrentRevisionId())null!=g&&
g(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;this.reload(g,l,d,null,q)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(y)+"&to="+encodeURIComponent(x)+(null!=J?"&secret="+encodeURIComponent(J):""),mxUtils.bind(this,function(f){this.file.stats.bytesReceived+=f.getText().length;window.clearTimeout(e);if(c&&(null==d||!d()))if(y!=this.file.getCurrentRevisionId())null!=
-g&&g(!0);else if(this.isValidState()){var p=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[f],"status",f.getStatus(),"cacheReadyRetryCount",K,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=f.getStatus()&&299>=f.getStatus()&&0<f.getText().length)try{var t=JSON.parse(f.getText());if(null!=t&&0<t.length)for(var z=0;z<t.length;z++){var F=this.stringToObject(t[z]);if(F.v>DrawioFileSync.PROTOCOL){L=!0;n=[];break}else if(F.v===DrawioFileSync.PROTOCOL&&null!=F.d)p=F.d.checksum,
-n.push(F.d.patch);else{L=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[t],"status",L?"failed":"ok","temp",n,"checksum",p)}catch(C){n=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,p,b,g,l,d,q)):K<=this.maxCacheReadyRetries-1&&!L&&401!=f.getStatus()&&503!=f.getStatus()&&410!=f.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(N,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
-this.reload(g,l,d,null,q))}catch(C){null!=l&&l(C)}}else null!=l&&l()}),l)}else null!=l&&l()});window.setTimeout(N,this.cacheReadyDelay)}else this.reload(g,l,d,null,q)}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,g,l,d,q){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",q);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(y){null!=g&&g(y)}),l,d,q)};
+g&&g(!0);else if(this.isValidState()){var p=null,n=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"request",[f],"status",f.getStatus(),"cacheReadyRetryCount",K,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=f.getStatus()&&299>=f.getStatus()&&0<f.getText().length)try{var t=JSON.parse(f.getText());if(null!=t&&0<t.length)for(var z=0;z<t.length;z++){var E=this.stringToObject(t[z]);if(E.v>DrawioFileSync.PROTOCOL){L=!0;n=[];break}else if(E.v===DrawioFileSync.PROTOCOL&&null!=E.d)p=E.d.checksum,
+n.push(E.d.patch);else{L=!0;n=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[t],"status",L?"failed":"ok","temp",n,"checksum",p)}catch(C){n=[],null!=window.console&&"1"==urlParams.test&&console.log(C)}try{0<n.length?(this.file.stats.cacheHits++,this.merge(n,p,b,g,l,d,q)):K<=this.maxCacheReadyRetries-1&&!L&&401!=f.getStatus()&&503!=f.getStatus()&&410!=f.getStatus()?(K++,this.file.stats.cacheMiss++,window.setTimeout(Q,(K+1)*this.cacheReadyDelay)):(this.file.stats.cacheFail++,
+this.reload(g,l,d,null,q))}catch(C){null!=l&&l(C)}}else null!=l&&l()}),l)}else null!=l&&l()});window.setTimeout(Q,this.cacheReadyDelay)}else this.reload(g,l,d,null,q)}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,g,l,d,q){EditorUi.debug("DrawioFileSync.reload",[this],"immediate",q);this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(y){null!=g&&g(y)}),l,d,q)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var g=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),l=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",l)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,g,l){var d=!0,q=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(y){window.clearTimeout(q);d&&(200<=y.getStatus()&&299>=y.getStatus()?g(y.getText()):l({code:y.getStatus(),message:"Token Error "+y.getStatus()}))}),l)};
DrawioFileSync.prototype.fileSaving=function(){this.file.isOptimisticSync()&&this.notify(this.createMessage({m:Date.now(),type:"optimistic"}));EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
DrawioFileSync.prototype.fileSaved=function(b,g,l,d,q,y){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var x=this.file.getDescriptorSecret(this.file.getDescriptor()),D=this.createMessage({m:this.lastModified.getTime()}),J=this.file.getDescriptorRevisionId(g),K=this.file.getCurrentRevisionId();if(null!=x&&null!=q&&
-"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);g=this.file.getDescriptorSecret(g);y=null!=y?y:this.ui.getHashValueForPages(b);var N=this.objectToString(this.createMessage({patch:L,checksum:y}));this.file.stats.bytesSent+=N.length;this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
-"&from="+encodeURIComponent(J)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(D)))+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=g?"&last-secret="+encodeURIComponent(g):"")+(N.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(N):"")+(null!=q?"&token="+encodeURIComponent(q):""),mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200<=f.getStatus()&&299>=f.getStatus()?(Editor.p2pSyncNotify&&this.notify(D),null!=l&&l()):d({message:mxResources.get("realtimeCollaboration")+
-(0!=f.getStatus()?": "+f.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,N.length,"bytes","checksum",y)}else this.notify(D),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
+"1"!=urlParams.lockdown&&Editor.enableRealtimeCache){var L=this.ui.diffPages(this.file.getShadowPages(),b);g=this.file.getDescriptorSecret(g);y=null!=y?y:this.ui.getHashValueForPages(b);var Q=this.objectToString(this.createMessage({patch:L,checksum:y}));this.file.stats.bytesSent+=Q.length;this.file.stats.msgSent++;var c=!0,e=window.setTimeout(mxUtils.bind(this,function(){c=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+
+"&from="+encodeURIComponent(J)+"&to="+encodeURIComponent(K)+(Editor.p2pSyncNotify?"":"&msg="+encodeURIComponent(this.objectToString(D)))+(null!=x?"&secret="+encodeURIComponent(x):"")+(null!=g?"&last-secret="+encodeURIComponent(g):"")+(Q.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(Q):"")+(null!=q?"&token="+encodeURIComponent(q):""),mxUtils.bind(this,function(f){window.clearTimeout(e);c&&(200<=f.getStatus()&&299>=f.getStatus()?(Editor.p2pSyncNotify&&this.notify(D),null!=l&&l()):d({message:mxResources.get("realtimeCollaboration")+
+(0!=f.getStatus()?": "+f.getStatus():"")}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag(),"diff",L,Q.length,"bytes","msg",D,"checksum",y)}else this.notify(D),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",J,"to",K,"etag",this.file.getCurrentEtag())}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,g,l){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,g,l):this.fileChanged(g,l)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
DrawioFileSync.prototype.stop=function(){null!=this.pusher?(null!=this.pusher.connection&&(this.pusher.connection.unbind("state_change",this.connectionListener),this.pusher.connection.unbind("error",this.pusherErrorListener)),null!=this.channel&&(this.channel.unbind("changed",this.changeListener),this.channel=null),this.pusher.disconnect(),this.pusher=null,null!=this.p2pCollab&&(this.p2pCollab.destroy(),this.p2pCollab=null),EditorUi.debug("DrawioFileSync.stop",[this])):null!=this.polling&&(this.polling.stop(),
@@ -13712,22 +13716,22 @@ null):window.OneDriveClient=null),"function"===typeof window.TrelloClient&&("1"=
App.clearServiceWorker=function(b,g){navigator.serviceWorker.getRegistrations().then(function(l){if(null!=l&&0<l.length){for(var d=0;d<l.length;d++)l[d].unregister();null!=b&&b()}})["catch"](function(){null!=g&&g()})};App.isSameDomain=function(b){var g=document.createElement("a");g.href=b;return g.protocol===window.location.protocol||g.host===window.location.host};App.isBuiltInPlugin=function(b){for(var g in App.pluginRegistry)if(App.pluginRegistry[g]==b)return!0;return!1};
App.main=function(b,g){try{var l=function(){try{if(null!=mxSettings.settings){if(null!=mxSettings.settings.autosaveDelay){var e=parseInt(mxSettings.settings.autosaveDelay);!isNaN(e)&&0<e?(DrawioFile.prototype.autosaveDelay=e,EditorUi.debug("Setting autosaveDelay",e)):EditorUi.debug("Invalid autosaveDelay",e)}null!=mxSettings.settings.defaultEdgeLength&&(e=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(e)&&0<e?(Graph.prototype.defaultEdgeLength=e,EditorUi.debug("Using defaultEdgeLength",e)):
EditorUi.debug("Invalid defaultEdgeLength",e))}}catch(p){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(p.stack)):console.error(p)}try{if(null!=Menus.prototype.defaultFonts)for(e=0;e<Menus.prototype.defaultFonts.length;e++){var f=Menus.prototype.defaultFonts[e];"string"!==typeof f&&null!=f.fontFamily&&null!=f.fontUrl&&Graph.addFont(f.fontFamily,f.fontUrl)}mxResources.loadDefaultBundle=!1;d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,
-mxLanguage))}catch(p){document.body.innerHTML="",f=document.createElement("pre"),mxUtils.write(f,p.stack),document.body.appendChild(f)}},d=function(e){mxUtils.getAll("1"!=urlParams.dev?[e]:[e,STYLE_PATH+"/default.xml"],function(f){function p(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");var C=null!=g?g():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,
-null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=
-null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===
-typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(C);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",["v"+EditorUi.VERSION,C,(new Date).getTime()-t0.getTime()+"ms"]),null!=
-urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(E){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(E.stack)):(EditorUi.logError(E.message,null,null,null,E),window.setTimeout(function(){alert(E.message)},1))}}mxResources.parse(f[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=n){EditorUi.debug("Setting configuration",
-JSON.stringify(n));if(null!=n.merge){var t=localStorage.getItem(Editor.configurationKey);if(null!=t)try{var z=JSON.parse(t),F;for(F in n.merge)z[F]=n.merge[F];n=z}catch(C){window.location.hash="",alert(C)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(C){window.location.hash="",alert(C)}1<f.length&&
-(Graph.prototype.defaultThemes["default-style2"]=f[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=f[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],p,function(C){document.body.innerHTML="";var E=document.createElement("pre");mxUtils.write(E,C.stack);document.body.appendChild(E)}))},function(f){f=document.getElementById("geStatus");null!=f&&
-(f.innerHTML="Error loading page. <a>Please try refreshing.</a>",f.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';
+mxLanguage))}catch(p){document.body.innerHTML="",f=document.createElement("pre"),mxUtils.write(f,p.stack),document.body.appendChild(f)}},d=function(e){mxUtils.getAll("1"!=urlParams.dev?[e]:[e,STYLE_PATH+"/default.xml"],function(f){function p(){try{""!=Editor.currentTheme&&"kennedy"!=Editor.currentTheme&&"dark"!=Editor.currentTheme&&0>mxUtils.indexOf(Editor.themes,Editor.currentTheme)&&(Editor.currentTheme="kennedy");"1"==urlParams.transparent&&(document.body.style.background="transparent");var C=
+null!=g?g():new App(new Editor("0"==urlParams.chrome||"min"==uiTheme,null,null,null,"0"!=urlParams.chrome));null!=window.mxscript&&("function"===typeof window.DropboxClient&&null==window.Dropbox&&null!=window.DrawDropboxClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&isSvgBrowser&&(null==document.documentMode||9<document.documentMode)?mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",
+App.DROPBOX_APPKEY)}):"undefined"===typeof window.Dropbox&&(window.DropboxClient=null),"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=
+null),"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null));null!=b&&b(C);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",
+["v"+EditorUi.VERSION,C,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}catch(F){EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(F.stack)):(EditorUi.logError(F.message,null,null,null,F),window.setTimeout(function(){alert(F.message)},1))}}mxResources.parse(f[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var n=JSON.parse(Graph.decompress(window.location.hash.substring(9)));
+if(null!=n){EditorUi.debug("Setting configuration",JSON.stringify(n));if(null!=n.merge){var t=localStorage.getItem(Editor.configurationKey);if(null!=t)try{var z=JSON.parse(t),E;for(E in n.merge)z[E]=n.merge[E];n=z}catch(C){window.location.hash="",alert(C)}else n=n.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&(localStorage.setItem(Editor.configurationKey,JSON.stringify(n)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(C){window.location.hash=
+"",alert(C)}1<f.length&&(Graph.prototype.defaultThemes["default-style2"]=f[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=f[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],p,function(C){document.body.innerHTML="";var F=document.createElement("pre");mxUtils.write(F,C.stack);document.body.appendChild(F)}))},function(f){f=document.getElementById("geStatus");
+null!=f&&(f.innerHTML="Error loading page. <a>Please try refreshing.</a>",f.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";d(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})};if(!App.isMainCalled)if(mxIsElectron&&"undefined"===typeof electron)alert("Runtime Environment not found."),document.body.innerHTML='<div style="margin-top:10%;text-align:center;"><img src="mxgraph/images/warning.png" align="top" style="padding-right:6px;"/>Runtime Environment not found.</div>';
else if(App.isMainCalled=!0,window.onerror=function(e,f,p,n,t){EditorUi.logError("Global: "+(null!=e?e:""),f,p,n,t,null,!0);null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t)):console.error("Message:",e,"\nURL:",f,"\nLine:",p,"\nColumn:",n,"\nError:",t);window.setTimeout(function(){alert("Error: "+(null!=e?e:""))},100)},window.top!=window.self||"import.diagrams.net"!==window.location.hostname&&"ac.draw.io"!==window.location.hostname&&
"aj.draw.io"!==window.location.hostname){if("1"==urlParams.embed||"1"==urlParams.lightbox){var q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q)}null!=document.referrer&&"aws3"==urlParams.libs&&"https://aws.amazon.com/architecture/icons/"==document.referrer.substring(0,42)&&(urlParams.libs="aws4");if(null!=window.mxscript){if("1"==urlParams.dev&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){var y=document.getElementById("geBootstrap");
if(null!=y){var x=mxUtils.getTextContent(y);"ff68e9badc5b6bcb8f482e0c64b103a7"!=CryptoJS.MD5(x).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}var D=document.getElementById("geMain");null!=D&&(x=mxUtils.getTextContent(D),"69c25556b6237c57cdb7d017147af34b"!=CryptoJS.MD5(x).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(x).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&
("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("service-worker.js")}catch(e){}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||
"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var J=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&isLocalStorage&&"undefined"!==typeof JSON)try{var K=JSON.parse(localStorage.getItem(mxSettings.key));null!=K&&(J=K.plugins)}catch(e){}K=urlParams.p;App.initPluginCallback();null!=K&&App.loadPlugins(K.split(";"));if(null!=J&&0<
J.length&&"0"!=urlParams.plugins)for(q=0;q<J.length;q++)try{("/"==J[q].charAt(0)&&(J[q]=PLUGINS_BASE_PATH+J[q]),App.isSameDomain(J[q]))?ALLOW_CUSTOM_PLUGINS||App.isBuiltInPlugin(J[q])?null==App.pluginsLoaded[J[q]]&&(App.pluginsLoaded[J[q]]=!0,App.embedModePluginsCount++,mxscript(J[q])):null!=window.console&&console.log("Unknown plugin:",J[q]):null!=window.console&&console.log("Blocked plugin:",J[q])}catch(e){}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&
-"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var L=window.opener||window.parent,N=function(e){if(e.source==L)try{var f=JSON.parse(e.data);null!=f&&"configure"==
-f.action&&(mxEvent.removeListener(window,"message",N),Editor.configure(f.config),mxSettings.load(),null!=f.config.darkColor&&document.body.style.setProperty("--dark-color",f.config.darkColor),f.colorSchemeMeta&&mxmeta("color-scheme","dark light"),l())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,e.data)}};mxEvent.addListener(window,"message",N);L.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
+"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var L=window.opener||window.parent,Q=function(e){if(e.source==L)try{var f=JSON.parse(e.data);null!=f&&"configure"==
+f.action&&(mxEvent.removeListener(window,"message",Q),Editor.configure(f.config),mxSettings.load(),null!=f.config.darkColor&&document.body.style.setProperty("--dark-color",f.config.darkColor),f.colorSchemeMeta&&mxmeta("color-scheme","dark light"),l())}catch(p){null!=window.console&&console.log("Error in configure message: "+p,e.data)}};mxEvent.addListener(window,"message",Q);L.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",
window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):console.error(e)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed){var c=localStorage.getItem(Editor.configurationKey);if(null!=c)try{c=JSON.parse(c),null!=c&&(EditorUi.debug("Using local configuration",c),Editor.configure(c),mxSettings.load())}catch(e){null==window.console||EditorUi.isElectronApp?(mxLog.show(),mxLog.debug(e.stack)):
console.error(e)}}}l()}}else document.body.innerHTML='<div style="margin-top:10%;text-align:center;">Stand-alone mode not allowed for this domain.</div>'}catch(e){document.body.innerHTML="",J=document.createElement("pre"),mxUtils.write(J,e.stack),document.body.appendChild(J)}};mxUtils.extend(App,EditorUi);App.prototype.defaultUserPicture=IMAGE_PATH+"/default-user.jpg";App.prototype.warnInterval=3E5;App.prototype.compactMode=!1;App.prototype.fullscreenMode=!1;
"1"!=urlParams.embed?App.prototype.menubarHeight=64:App.prototype.footerHeight=0;App.initPluginCallback=function(){null==App.DrawPlugins&&(App.DrawPlugins=[],window.Draw={},window.Draw.loadPlugin=function(b){App.DrawPlugins.push(b)})};App.pluginsLoaded={};App.embedModePluginsCount=0;
@@ -13771,9 +13775,9 @@ App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.mod
App.prototype.updateDocumentTitle=function(){var b=this.editor.appName,g=this.getCurrentFile();null==g||!this.editor.graph.isLightboxView()&&"simple"!=Editor.currentTheme||null==this.pages||null==this.currentPage?this.isOfflineApp()&&(b+=" app"):b=this.getShortPageName(this.currentPage);null!=g&&(b=(null!=g.getTitle()?g.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b)};
App.prototype.getThumbnail=function(b,g,l){l=null!=l?l:0;var d=!1;try{var q=!0,y=window.setTimeout(mxUtils.bind(this,function(){q=!1;g(null)}),this.timeout),x=mxUtils.bind(this,function(O){window.clearTimeout(y);q&&g(O)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,J=D.backgroundImage;if(null!=this.pages&&this.currentPage!=this.pages[0]){var K=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=this.editor.graph.setBackgroundImage;
var L=this.pages[0];this.currentPage==L?D.setBackgroundImage(J):null!=L.viewState&&null!=L.viewState&&(J=L.viewState.backgroundImage,D.setBackgroundImage(J));D.getGlobalVariable=function(O){return"page"==O?L.getName():"pagenumber"==O?1:K.apply(this,arguments)};D.getGlobalVariable=K;document.body.appendChild(D.container);D.model.setRoot(L.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(O){try{D!=this.editor.graph&&null!=D.container.parentNode&&
-D.container.parentNode.removeChild(D.container)}catch(Q){O=null}x(O)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,l,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var N=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,f=D.view.scale;null!=J&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+J.x)*f,(e.y+J.y)*f,J.width*f,J.height*f)));var p=b/c.width;p=Math.min(1,Math.min(3*b/(4*c.height),
-p));var n=Math.floor(c.x),t=Math.floor(c.y);N.setAttribute("width",Math.ceil(p*(c.width+4)));N.setAttribute("height",Math.ceil(p*(c.height+4)));var z=N.getContext("2d");z.scale(p,p);z.translate(-n,-t);var F=D.background;if(null==F||""==F||F==mxConstants.NONE)F="#ffffff";z.save();z.fillStyle=F;z.fillRect(n,t,Math.ceil(c.width+4),Math.ceil(c.height+4));z.restore();if(null!=J){var C=new Image;C.src=J.src;z.drawImage(C,J.x*p,J.y*p,J.width*p,J.height*p)}var E=new mxJsCanvas(N),R=new mxAsyncCanvas(this.thumbImageCache);
-E.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(O,Q){O.shape instanceof mxShape&&O.shape.checkBounds()&&(Q.save(),Q.translate(.5,.5),O.shape.paint(Q),Q.translate(-.5,-.5),Q.restore())};U.drawText=function(O,Q){};U.drawState(D.getView().getState(D.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(D.getView().getState(D.model.root),E),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(O){N=null}x(N)}));
+D.container.parentNode.removeChild(D.container)}catch(N){O=null}x(O)}),b,this.thumbImageCache,"#ffffff",function(){x()},null,null,null,null,null,null,D,l,null,null,null,"diagram",null),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var Q=document.createElement("canvas"),c=D.getGraphBounds(),e=D.view.translate,f=D.view.scale;null!=J&&(c=mxRectangle.fromRectangle(c),c.add(new mxRectangle((e.x+J.x)*f,(e.y+J.y)*f,J.width*f,J.height*f)));var p=b/c.width;p=Math.min(1,Math.min(3*b/(4*c.height),
+p));var n=Math.floor(c.x),t=Math.floor(c.y);Q.setAttribute("width",Math.ceil(p*(c.width+4)));Q.setAttribute("height",Math.ceil(p*(c.height+4)));var z=Q.getContext("2d");z.scale(p,p);z.translate(-n,-t);var E=D.background;if(null==E||""==E||E==mxConstants.NONE)E="#ffffff";z.save();z.fillStyle=E;z.fillRect(n,t,Math.ceil(c.width+4),Math.ceil(c.height+4));z.restore();if(null!=J){var C=new Image;C.src=J.src;z.drawImage(C,J.x*p,J.y*p,J.width*p,J.height*p)}var F=new mxJsCanvas(Q),R=new mxAsyncCanvas(this.thumbImageCache);
+F.images=this.thumbImageCache.images;var U=new mxImageExport;U.drawShape=function(O,N){O.shape instanceof mxShape&&O.shape.checkBounds()&&(N.save(),N.translate(.5,.5),O.shape.paint(N),N.translate(-.5,-.5),N.restore())};U.drawText=function(O,N){};U.drawState(D.getView().getState(D.model.root),R);R.finish(mxUtils.bind(this,function(){try{U.drawState(D.getView().getState(D.model.root),F),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(O){Q=null}x(Q)}));
d=!0}}catch(O){d=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}d||window.clearTimeout(y);return d};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(g,l){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();g=null!=d?d.getMode():g;g==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):g==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):g==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=g==App.MODE_DEVICE?"pointer":"default")}if(l)try{if(isLocalStorage)localStorage.setItem(".mode",g);else if("undefined"!=typeof Storage){var q=new Date;q.setYear(q.getFullYear()+1);document.cookie="MODE="+g+"; expires="+q.toUTCString()}}catch(y){}}})();
@@ -13790,13 +13794,13 @@ b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.inner
2E3)},15E3)}};
App.prototype.start=function(){try{this.restoreLibraries();this.spinner.stop();var b=this;window.onerror=function(x,D,J,K,L){"ResizeObserver loop limit exceeded"!=x&&(EditorUi.logError("Uncaught: "+(null!=x?x:""),D,J,K,L,null,!0),b.handleError({message:x},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,function(x){var D=this.getCurrentFile();EditorUi.debug("storage event",[x],
[D]);null!=D&&".draft-alive-check"==x.key&&null!=x.newValue&&null!=D.draftId&&(this.draftAliveCheck=x.newValue,D.saveDraft())}))}catch(x){}var g=this.getDiagramId();mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(x){try{var D=this.getDiagramId();if(D!=g){g=D;var J=this.getCurrentFile();null!=J&&J.getHash()==D||this.loadFile(D,!0)}else{var K=this.getHashObject();if(null!=K&&null!=K.pageId&&null!=this.currentPage&&K.pageId!=this.currentPage.getId()){var L=this.getPageById(K.pageId);
-null!=L&&this.selectPage(L)}}}catch(N){null!=document.body&&this.handleError(N,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else if((null==
+null!=L&&this.selectPage(L)}}}catch(Q){null!=document.body&&this.handleError(Q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var c=this.getCurrentFile();window.location.hash=null!=c?c.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"))}))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else if((null==
window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var l=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var x=mxUtils.bind(this,function(K){Editor.isPngDataUrl(K)&&(K=Editor.extractGraphModelFromPng(K));var L=urlParams.title;L=null!=L?decodeURIComponent(L):this.defaultFilename;K=new LocalFile(this,
K,L,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(K.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(K);this.editor.chromeless||(K.fileChanged(),window.setTimeout(mxUtils.bind(this,function(){this.actions.get("resetView").funct()}),0))}),D=window.opener||window.parent;if(D!=window){var J=urlParams.create;null!=J?x(D[decodeURIComponent(J)]):(J=urlParams.data,null!=J?x(decodeURIComponent(J)):this.installMessageHandler(mxUtils.bind(this,function(K,
L){L.source==D&&x(K)})))}}else if(null==this.dialog)if("1"==urlParams.demo)J=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=J;else if(null!=urlParams["smart-template"])this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),this.actions.get("insertTemplate").funct();else{J=!1;try{J=null!=window.opener&&null!=window.opener.openFile}catch(K){}J?this.spinner.spin(document.body,mxResources.get("loading")):(J=this.getDiagramId(),
-!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=J&&0!=J.length||this.editor.isChromelessView()?null!=J&&0<J.length?this.loadFile(J,null,null,mxUtils.bind(this,function(){var K=decodeURIComponent(urlParams.viewbox||"");if(""!=K)try{var L=JSON.parse(K);this.editor.graph.fitWindow(L,L.border)}catch(N){console.error(N)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,
+!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=J&&0!=J.length||this.editor.isChromelessView()?null!=J&&0<J.length?this.loadFile(J,null,null,mxUtils.bind(this,function(){var K=decodeURIComponent(urlParams.viewbox||"");if(""!=K)try{var L=JSON.parse(K);this.editor.graph.fitWindow(L,L.border)}catch(Q){console.error(Q)}})):"0"!=urlParams.splash||null!=urlParams.mode&&!EditorUi.isElectronApp?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,
null,null,null,null,!0):this.checkDrafts())}}),d=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&0<d.length&&this.spinner.spin(document.body,mxResources.get("loading"))){var q=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),y=mxUtils.bind(this,function(x){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,
-x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var J=4>=x?2:6<x?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(K,L){if(null==L){this.hideDialog();var N=Editor.useLocalStorage;this.createFile(0<K.length?K:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=N}else this.pickFolder(L,mxUtils.bind(this,function(c){this.createFile(K,
+x,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;x=this.getServiceCount(!0);isLocalStorage&&x++;var J=4>=x?2:6<x?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(K,L){if(null==L){this.hideDialog();var Q=Editor.useLocalStorage;this.createFile(0<K.length?K:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=Q}else this.pickFolder(L,mxUtils.bind(this,function(c){this.createFile(K,
this.getFileData(!0),null,L,null,!0,c)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,J,null,null,null,this.editor.fileExtensions);this.showDialog(D.container,420,x>J?390:280,!0,!1,mxUtils.bind(this,function(K){K&&null==this.getCurrentFile()&&this.showSplash()}));D.init()}});if("http://"!=d.substring(0,7)&&"https://"!=d.substring(0,8))if("{"==d.charAt(0))this.spinner.stop(),d=JSON.parse(d),window.isMermaidEnabled&&"mermaid"==d.type?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(x){x!=
this.emptyDiagramXml&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["create"])),this.createFile(null!=x.filename?x.filename:this.defaultFilename,x,null,null,null,!0,null,!0),this.editor.chromeless&&!this.editor.editable||this.actions.get("fitWindow").funct())})),this.generateMermaidImage(d.data,null,function(){},mxUtils.bind(this,function(x){for(var D=document.querySelectorAll('div[id^="dgeMermaidOutput"]'),J=0;J<D.length;J++)D[J].parentNode.removeChild(D[J]);mxMermaidToDrawio.resetListeners();
this.handleError(x)}))):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"));else try{null!=window.opener&&null!=window.opener[d]?y(window.opener[d]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}else this.loadTemplate(d,function(x){y(x)},mxUtils.bind(this,function(x){this.handleError(x,mxResources.get("errorLoadingFile"),q)}))}else(null==window.location.hash||1>=
@@ -13826,50 +13830,50 @@ this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.d
d.setAttribute("type","file");mxEvent.addListener(d,"change",mxUtils.bind(this,function(){if(null!=d.files){for(var y=0;y<d.files.length;y++)mxUtils.bind(this,function(x){var D=new FileReader;D.onload=mxUtils.bind(this,function(J){g(new LocalLibrary(this,J.target.result,x.name))});D.readAsText(x)})(d.files[y]);d.type="";d.type="file";d.value=""}}));d.style.display="none";document.body.appendChild(d);this.libFileInputElt=d}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
mxUtils.bind(this,function(y,x){StorageFile.listFiles(this,"L",y,x)});window.openBrowserFile=mxUtils.bind(this,function(y,x,D){StorageFile.getFileContent(this,y,x,D)});window.deleteBrowserFile=mxUtils.bind(this,function(y,x,D){StorageFile.deleteFile(this,y,x,D)});var q=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(y){this.hideDialog(y)}));window.openFile.setConsumer(mxUtils.bind(this,function(y,x){g(b==App.MODE_BROWSER?new StorageLibrary(this,
y,x):new LocalLibrary(this,y,x))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=q;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,g,l,d,q,y,x){try{d=null!=d?d:this.mode;q=null!=q?q:!1;y=null!=y?y:!1;var D=this.createLibraryDataFromImages(g),J=mxUtils.bind(this,function(N){this.spinner.stop();null!=x&&x();this.handleError(N,null!=N?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,D,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(N){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
-this.drive.insertFile(b,D,N,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
-D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();
-this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,N):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,D,b),mxUtils.bind(this,function(c){this.hideDialog(!0);this.libraryLoaded(c,g)}),J):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
-else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(D);var K=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(N){this.spinner.stop();this.hideDialog(!0);y||this.libraryLoaded(l,g);null!=x&&x()}),J)});if(b!=l.getTitle()){var L=l.getHash();l.rename(b,mxUtils.bind(this,function(N){l.constructor!=LocalLibrary&&L!=l.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(l.getHash()));this.removeLibrarySidebar(L);K()}),J)}else K()}}catch(N){this.handleError(N)}};
+App.prototype.saveLibrary=function(b,g,l,d,q,y,x){try{d=null!=d?d:this.mode;q=null!=q?q:!1;y=null!=y?y:!1;var D=this.createLibraryDataFromImages(g),J=mxUtils.bind(this,function(Q){this.spinner.stop();null!=x&&x();this.handleError(Q,null!=Q?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,D,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(Q){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+this.drive.insertFile(b,D,Q,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
+D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();
+this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,D,mxUtils.bind(this,function(c){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(c,g)}),J,Q):d==App.MODE_BROWSER?StorageFile.doInsertFile(new StorageLibrary(this,D,b),mxUtils.bind(this,function(c){this.hideDialog(!0);this.libraryLoaded(c,g)}),J):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));
+else if(q||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(D);var K=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(Q){this.spinner.stop();this.hideDialog(!0);y||this.libraryLoaded(l,g);null!=x&&x()}),J)});if(b!=l.getTitle()){var L=l.getHash();l.rename(b,mxUtils.bind(this,function(Q){l.constructor!=LocalLibrary&&L!=l.getHash()&&(mxSettings.removeCustomLibrary(L),mxSettings.addCustomLibrary(l.getHash()));this.removeLibrarySidebar(L);K()}),J)}else K()}}catch(Q){this.handleError(Q)}};
App.prototype.saveFile=function(b,g){var l=this.getCurrentFile(),d=this.mode;if(null!=l){var q=mxUtils.bind(this,function(){EditorUi.enableDrafts&&l.removeDraft();this.getCurrentFile()==l||l.isModified()||(l.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=g&&g()});if(b||null==l.getTitle()||null!=l.invalidFileHandle||null==this.mode)if(null!=l&&l.constructor==LocalFile&&null!=l.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
function(D,J){l.invalidFileHandle=null;l.fileHandle=D;l.title=J.name;l.desc=J;l.editable=null;this.save(J.name,q)}),null,this.createFileSystemOptions(l.getTitle()));else{b=null!=l.getTitle()?l.getTitle():this.defaultFilename;var y=mxUtils.bind(this,function(D,J,K,L){if(null!=D&&0<D.length)if(/(\.pdf)$/i.test(D))this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){K.value=D.split(".").slice(0,
-1).join(".");K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no"));else if(this.hideDialog(),null==d&&J==App.MODE_DEVICE)null!=l&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(c,e){l.fileHandle=c;l.mode=App.MODE_DEVICE;l.title=e.name;l.desc=e;this.setMode(App.MODE_DEVICE);this.save(e.name,q)}),mxUtils.bind(this,function(c){"AbortError"!=c.name&&this.handleError(c)}),
-this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,q));else if("download"==J)(new LocalFile(this,null,D)).save();else if("_blank"==J)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=J){var N=mxUtils.bind(this,function(c){var e=this.editor.graph,f=e.getSelectionCells(),p=e.getViewState(),n=this.currentPage;this.createFile(D,this.getFileData(/(\.xml)$/i.test(D)||
-0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,J,q,null==this.mode,c,null,null,mxUtils.bind(this,function(){this.restoreViewState(n,p,f)}))});null!=L?N(L):this.pickFolder(J,N)}else null!=J&&this.save(D,q)}),x=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(D,J,K){y(D.value,J,D,K);this.hideDialog()}),x?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(l.getTitle(),
+this.createFileSystemOptions(D)):(this.setMode(App.MODE_DEVICE),this.save(D,q));else if("download"==J)(new LocalFile(this,null,D)).save();else if("_blank"==J)window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0);else if(d!=J){var Q=mxUtils.bind(this,function(c){var e=this.editor.graph,f=e.getSelectionCells(),p=e.getViewState(),n=this.currentPage;this.createFile(D,this.getFileData(/(\.xml)$/i.test(D)||
+0>D.indexOf(".")||/(\.drawio)$/i.test(D),/(\.svg)$/i.test(D),/(\.html)$/i.test(D)),null,J,q,null==this.mode,c,null,null,mxUtils.bind(this,function(){this.restoreViewState(n,p,f)}))});null!=L?Q(L):this.pickFolder(J,Q)}else null!=J&&this.save(D,q)}),x=!mxClient.IS_IOS||!navigator.standalone;b=new SaveDialog(this,b,mxUtils.bind(this,function(D,J,K){y(D.value,J,D,K);this.hideDialog()}),x?null:["_blank"]);this.showDialog(b.container,420,150,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));b.init()}else this.save(l.getTitle(),
q)}};
App.prototype.loadTemplate=function(b,g,l,d,q){var y=!1,x=b,D=null!=d?d:b;d=/\.png$/i.test(D)||/\.pdf$/i.test(D);var J=EditorUi.isVisioFilename(D);this.editor.isCorsEnabledForUrl(x)||(y=d||J,x="t="+(new Date).getTime(),x=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+x+(y?"&base64=1":""));this.editor.loadUrl(x,mxUtils.bind(this,function(K){try{var L=y?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(K):atob(K):K;if(J||this.isVisioData(L))J||(D=q?this.isRemoteVisioData(L)?"raw.vss":"raw.vssx":this.isRemoteVisioData(L)?
-"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(N){g(N)},l,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,D))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(N){4==N.readyState&&200<=N.status&&299>=N.status&&"<mxGraphModel"==N.responseText.substring(0,13)&&g(N.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l);else if(this.isLucidChartData(L))this.convertLucidChart(L,
-mxUtils.bind(this,function(N){g(N)}),mxUtils.bind(this,function(N){l(N)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);g(L)}}catch(N){l(N)}}),l,/(\.png)($|\?)/i.test(D)||J,null,null,y)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
+"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(K.substring(K.indexOf(",")+1)),function(Q){g(Q)},l,D);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(L,D))this.isExternalDataComms()?this.parseFileData(L,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==Q.responseText.substring(0,13)&&g(Q.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l);else if(this.isLucidChartData(L))this.convertLucidChart(L,
+mxUtils.bind(this,function(Q){g(Q)}),mxUtils.bind(this,function(Q){l(Q)}));else{if(/(\.png)($|\?)/i.test(D)||Editor.isPngData(L))L=Editor.extractGraphModelFromPng(K);g(L)}}catch(Q){l(Q)}}),l,/(\.png)($|\?)/i.test(D)||J,null,null,y)};App.prototype.getModeForChar=function(b){return"G"==b?App.MODE_GOOGLE:"D"==b?App.MODE_DROPBOX:"W"==b?App.MODE_ONEDRIVE:"H"==b?App.MODE_GITHUB:"A"==b?App.MODE_GITLAB:"T"==b?App.MODE_TRELLO:null};
App.prototype.isModeEnabled=function(b){return b==App.MODE_GOOGLE?"function"===typeof window.DriveClient&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode):b==App.MODE_GITHUB?null!=this.gitHub:b==App.MODE_GITLAB?null!=this.gitLab:b==App.MODE_DROPBOX?"function"===typeof window.DropboxClient&&("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&
mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):b==App.MODE_ONEDRIVE?"function"===typeof window.OneDriveClient&&("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode):b==App.MODE_TRELLO?"function"===
typeof window.TrelloClient&&"1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode):!1};App.prototype.isModeReady=function(b){return null!=this.getServiceForName(b)&&(b!=App.MODE_DROPBOX||"undefined"!==typeof Dropbox.choose)};
App.prototype.uncompressPages=function(b){if(null!=b)try{var g=mxUtils.parseXml(b);if("mxfile"==g.documentElement.nodeName){for(var l=g.documentElement.getElementsByTagName("diagram"),d=0;d<l.length;d++){var q=Editor.parseDiagramNode(l[d],!0);null!=q&&(mxUtils.setTextContent(l[d],""),l[d].appendChild(q))}b=mxUtils.getPrettyXml(g.documentElement)}}catch(y){}return b};
-App.prototype.createFile=function(b,g,l,d,q,y,x,D,J,K){d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){g=null!=g?g:this.emptyDiagramXml;null==g||Editor.defaultCompressed||(g=this.uncompressPages(g));var L=mxUtils.bind(this,function(){this.spinner.stop()}),N=mxUtils.bind(this,function(e){L();null==e&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=e&&this.handleError(e)});try{var c=mxUtils.bind(this,function(e){L();this.fileCreated(e,
-l,y,q,J,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),this.drive.insertFile(b,g,x,c,N)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,g,c,N,!1,x):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,g,c,N,!1,x):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,g,c,N,!1,x):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,g,c,N):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?
-this.oneDrive.insertFile(b,g,c,N,!1,x):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,g,c,N):!D&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(e,f){var p=new LocalFile(this,g,f.name,null,e,f);p.saveFile(f.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,l,y,q,J,K)}),N,!0)}),mxUtils.bind(this,function(e){"AbortError"!=e.name&&N(e)}),this.createFileSystemOptions(b))):(L(),this.fileCreated(new LocalFile(this,g,b,null==d),l,y,q,J,K))}catch(e){L(),
+App.prototype.createFile=function(b,g,l,d,q,y,x,D,J,K){d=D?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){g=null!=g?g:this.emptyDiagramXml;null==g||Editor.defaultCompressed||(g=this.uncompressPages(g));var L=mxUtils.bind(this,function(){this.spinner.stop()}),Q=mxUtils.bind(this,function(e){L();null==e&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=e&&this.handleError(e)});try{var c=mxUtils.bind(this,function(e){L();this.fileCreated(e,
+l,y,q,J,K)});d==App.MODE_GOOGLE&&null!=this.drive?(null==x&&null!=this.stateArg&&null!=this.stateArg.folderId&&(x=this.stateArg.folderId),this.drive.insertFile(b,g,x,c,Q)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,g,c,Q,!1,x):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,g,c,Q,!1,x):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,g,c,Q,!1,x):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,g,c,Q):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?
+this.oneDrive.insertFile(b,g,c,Q,!1,x):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,g,c,Q):!D&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(L(),this.showSaveFilePicker(mxUtils.bind(this,function(e,f){var p=new LocalFile(this,g,f.name,null,e,f);p.saveFile(f.name,!1,mxUtils.bind(this,function(){this.fileCreated(p,l,y,q,J,K)}),Q,!0)}),mxUtils.bind(this,function(e){"AbortError"!=e.name&&Q(e)}),this.createFileSystemOptions(b))):(L(),this.fileCreated(new LocalFile(this,g,b,null==d),l,y,q,J,K))}catch(e){L(),
this.handleError(e)}}};
App.prototype.fileCreated=function(b,g,l,d,q,y){var x=window.location.pathname;null!=g&&0<g.length&&(x+="?libs="+g);null!=q&&0<q.length&&(x+="?clibs="+q);x=this.getUrl(x);b.getMode()!=App.MODE_DEVICE&&(x+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var J=window.location.protocol+"//"+window.location.hostname+x,K=D,L=null;null!=D&&/\.svg$/i.test(b.getTitle())&&(L=
-this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(D,L,b,J));null!=L&&L.container.parentNode.removeChild(L.container);var N=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(){N();var e=this.getCurrentFile();null==l&&null!=e&&(l=!e.isModified()&&null==e.getMode());var f=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,y);l&&b.addAllSavedStatus();
+this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(L.container),K=this.decodeNodeIntoGraph(K,L));b.setData(this.createFileData(D,L,b,J));null!=L&&L.container.parentNode.removeChild(L.container);var Q=mxUtils.bind(this,function(){this.spinner.stop()}),c=mxUtils.bind(this,function(){Q();var e=this.getCurrentFile();null==l&&null!=e&&(l=!e.isModified()&&null==e.getMode());var f=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b,null,y);l&&b.addAllSavedStatus();
null!=g&&this.sidebar.showEntries(g);if(null!=q){for(var n=[],t=q.split(";"),z=0;z<t.length;z++)n.push(decodeURIComponent(t[z]));this.loadLibraries(n)}null!=d&&d()}),p=mxUtils.bind(this,function(){l||null==e||!e.isModified()?f():this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==l||l?p():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
-null==b.getMode())),window.geOpenWindow(x,null,p))});b.constructor==LocalFile?c():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){c()}),mxUtils.bind(this,function(e){N();null!=e&&"AbortError"==e.name||this.handleError(e)}))}};
+null==b.getMode())),window.geOpenWindow(x,null,p))});b.constructor==LocalFile?c():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){c()}),mxUtils.bind(this,function(e){Q();null!=e&&"AbortError"==e.name||this.handleError(e)}))}};
App.prototype.loadFile=function(b,g,l,d,q){if("1"==urlParams.openInSameWin||navigator.standalone)g=!0;this.hideDialog();var y=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var J=mxUtils.bind(this,function(e){this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var f=this.getCurrentFile();
window.location.hash=null!=f?f.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(e){null!=e?(this.fileLoaded(new StorageFile(this,e,b)),null!=d&&d()):J({message:mxResources.get("fileNotFound")})}),J)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var e=this.getCurrentFile();window.location.hash=null!=e?e.getHash():""}));else if(null!=l)this.spinner.stop(),
this.fileLoaded(l),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var K=decodeURIComponent(b.substring(1));"<"!=K.charAt(0)&&(K=Graph.decompress(K));K=new LocalFile(this,K,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);K.getHash=function(){return b};this.fileLoaded(K);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(e,f){this.spinner.stop();this.fileLoaded(new EmbedFile(this,e,f));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),N=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var f=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+f,g,null,mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&this.editor.chromeless&&
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var L=decodeURIComponent(b.substring(1)),Q=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=L.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var e=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var f=L.substring(31,L.lastIndexOf("&ex"));this.loadFile("G"+f,g,null,mxUtils.bind(this,function(){var p=this.getCurrentFile();null!=p&&this.editor.chromeless&&
!this.editor.editable&&(p.getHash=function(){return"G"+f},window.location.hash="#"+p.getHash());null!=d&&d()}));return!0}return!1});!e()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",e);return!0});this.loadTemplate(L,mxUtils.bind(this,function(e){this.spinner.stop();if(null!=e&&0<e.length){var f=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var p=L,n=L.lastIndexOf("."),t=p.lastIndexOf("/");n>t&&0<t&&(p=p.substring(t+1,n),n=L.substring(n),
-this.useCanvasForExport||".png"!=n||(n=".drawio"),".svg"===n||".xml"===n||".html"===n||".png"===n||".drawio"===n)&&(f=p+n)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):f,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():N()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else N()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
-function(){N()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var c=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var e=this.getServiceForName(c);if(null==e)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
+this.useCanvasForExport||".png"!=n||(n=".drawio"),".svg"===n||".xml"===n||".html"===n||".png"===n||".drawio"===n)&&(f=p+n)}e=new LocalFile(this,e,null!=urlParams.title?decodeURIComponent(urlParams.title):f,!0);e.getHash=function(){return b};this.fileLoaded(e,!0)?null!=d&&d():Q()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else Q()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+function(){Q()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else{var c=this.getModeForChar(b.charAt(0));mxUtils.bind(this,function(){var e=this.getServiceForName(c);if(null==e)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var p=this.getCurrentFile();
window.location.hash=null!=p?p.getHash():""}));else{var f=b.charAt(0);b=decodeURIComponent(b.substring(1));e.getFile(b,mxUtils.bind(this,function(p){this.spinner.stop();this.fileLoaded(p);var n=this.getCurrentFile();if(null==n)window.location.hash="",this.showSplash();else if(this.editor.chromeless&&!this.editor.editable){n.getHash=function(){return f+b};p="#"+n.getHash();try{var t=this.getHashObject();null==t||mxUtils.isEmptyObject(t)||(p=p+"#"+encodeURIComponent(JSON.stringify(t)))}catch(z){}window.location.replace(p)}else p==
n&&null==p.getMode()&&(t=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+t+'" class="geStatusAlert">'+t+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(p){null!=window.console&&null!=p&&console.log("error in loadFile:",b,p);var n=mxUtils.bind(this,function(){var t=this.getCurrentFile();null==t?(window.location.hash="",this.showSplash()):window.location.hash="#"+t.getHash()});null==p||"AbortError"!=p.name?this.handleError(p,null!=p?mxResources.get("errorLoadingFile"):null,
n,null,null,"#"+f+b):n()}))}})()}}),x=this.getCurrentFile(),D=mxUtils.bind(this,function(){q||null==x||!x.isModified()?y():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=x&&(window.location.hash=x.getHash())}),y,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?D():null==x||g?D():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,D)).container,320,160,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var g=b.getTitle();b.constructor!=LocalLibrary&&(g+="\n"+b.getHash());b.constructor==DriveLibrary?g+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?g+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?g+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?g+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?g+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?g+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(g+=" ("+mxResources.get("device")+")");return g};App.prototype.restoreLibraries=function(){function b(l){for(var d=0;d<l.length;d++)""!=l[d]&&0>mxUtils.indexOf(g,l[d])&&g.push(l[d])}var g=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(g)};
App.prototype.loadLibraries=function(b,g){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var l=mxUtils.bind(this,function(K,L){L||mxSettings.removeCustomLibrary(K);delete this.loadedLibraries[K]}),d=0,q=[],y=0<b.length&&"L.scratchpad"==b[0]?1:0,x=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var K=b.length-1;0<=K;K--)null!=q[K]&&this.loadLibrary(q[K],K<=y);null!=g&&g()}});if(null!=b)for(var D=0;D<b.length;D++){var J=encodeURIComponent(decodeURIComponent(b[D]));
-mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var N=mxUtils.bind(this,function(t){q[L]=t;d--;x()}),c=mxUtils.bind(this,function(t){l(K,t);d--;x()}),e=K.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var t=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,t,mxUtils.bind(this,function(z){".scratchpad"==t&&null==
-z&&(z=this.emptyLibraryXml);null!=z?N(new StorageLibrary(this,z,t)):c()}),c)}catch(z){c()}}),0);else if("U"==e){var f=decodeURIComponent(K.substring(1));this.isOffline()?c(!0):this.loadTemplate(f,mxUtils.bind(this,function(t){null!=t&&0<t.length?N(new UrlLibrary(this,t,f)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(K.substring(1));try{e=JSON.parse(e);var p={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(t){try{N(new RemoteLibrary(this,
-t,p))}catch(z){c()}}),function(){c()})}catch(t){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(t){N(t)},c)}catch(t){c()}else{var n=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==e&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(t){try{N(t)}catch(z){c()}}),function(t){c()}):c(!0)}}})(J,D)}x()}};
+mxUtils.bind(this,function(K,L){if(null!=K&&0<K.length&&null==this.loadedLibraries[K]&&null==this.sidebar.palettes[K]){this.loadedLibraries[K]=!0;d++;var Q=mxUtils.bind(this,function(t){q[L]=t;d--;x()}),c=mxUtils.bind(this,function(t){l(K,t);d--;x()}),e=K.substring(0,1);if("L"==e)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var t=decodeURIComponent(K.substring(1));StorageFile.getFileContent(this,t,mxUtils.bind(this,function(z){".scratchpad"==t&&null==
+z&&(z=this.emptyLibraryXml);null!=z?Q(new StorageLibrary(this,z,t)):c()}),c)}catch(z){c()}}),0);else if("U"==e){var f=decodeURIComponent(K.substring(1));this.isOffline()?c(!0):this.loadTemplate(f,mxUtils.bind(this,function(t){null!=t&&0<t.length?Q(new UrlLibrary(this,t,f)):c()}),function(){c()},null,!0)}else if("R"==e){e=decodeURIComponent(K.substring(1));try{e=JSON.parse(e);var p={id:e[0],title:e[1],downloadUrl:e[2]};this.remoteInvoke("getFileContent",[p.downloadUrl],null,mxUtils.bind(this,function(t){try{Q(new RemoteLibrary(this,
+t,p))}catch(z){c()}}),function(){c()})}catch(t){c()}}else if("S"==e&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(K.substring(1)),function(t){Q(t)},c)}catch(t){c()}else{var n=null;"G"==e?null!=this.drive&&null!=this.drive.user&&(n=this.drive):"H"==e?null!=this.gitHub&&null!=this.gitHub.getUser()&&(n=this.gitHub):"T"==e?null!=this.trello&&this.trello.isAuthorized()&&(n=this.trello):"D"==e?null!=this.dropbox&&null!=this.dropbox.getUser()&&(n=this.dropbox):"W"==e&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(n=this.oneDrive);null!=n?n.getLibrary(decodeURIComponent(K.substring(1)),mxUtils.bind(this,function(t){try{Q(t)}catch(z){c()}}),function(t){c()}):c(!0)}}})(J,D)}x()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&(this.buttonContainer.style.paddingRight="1"==urlParams.atlas?"32px":"8px");this.commentsSupported()&&"simple"!=Editor.currentTheme&&"atlas"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme?null==this.commentButton&&(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),
this.commentButton.className="geToolbarButton geAdaptiveAsset",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;width:24px;height:24px;background-size:24px 24px;background-position:center center;cursor:pointer;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),null!=this.userElement&&this.userElement.parentNode==
this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.userElement):null!=this.shareButton&&this.shareButton.parentNode==this.buttonContainer?this.buttonContainer.insertBefore(this.commentButton,this.shareButton):this.buttonContainer.appendChild(this.commentButton)):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=null);if("draw.io"!=this.getServiceName()||"1"==urlParams.embed||this.isStandaloneApp())null!=urlParams.notif&&
@@ -13885,8 +13889,8 @@ d++;if(0==d)null!=this.notificationBtn&&(this.notificationBtn.style.display="non
"geNotification-box";d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);this.notifCount=d;d=document.createElement("div");d.className="geNotification-bell";q=document.createElement("span");q.className="geBell-top";d.appendChild(q);q=document.createElement("span");q.className="geBell-middle";d.appendChild(q);q=document.createElement("span");q.className="geBell-bottom";d.appendChild(q);q=document.createElement("span");q.className="geBell-rad";d.appendChild(q);
this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);q=document.createElement("div");q.className="header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");q.appendChild(d);d=document.createElement("span");
d.className="closeBtn";d.textContent="x";q.appendChild(d);this.notificationWin.appendChild(q);q=document.createElement("div");q.className="notifications clearfix";var x=document.createElement("div");x.setAttribute("id","geNotifList");x.style.position="relative";q.appendChild(x);this.notificationWin.appendChild(q);mxEvent.addListener(this.notificationBtn,"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=
-0;var K=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";l(0)}else y()}));mxEvent.addListener(d,"click",y)}else this.notificationBtn.style.display="";var D=0,J=document.getElementById("geNotifList");if(null!=J){J.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(K,L){L.isNew&&D++;var N=document.createElement("div");N.className="notification";
-K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));N.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(N,"click",function(){window.open(L.link,"notifWin")});J.appendChild(N)})(this,b[q]);l(D)}}};
+0;var K=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=K.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=K.right-this.notificationWin.clientWidth+"px";l(0)}else y()}));mxEvent.addListener(d,"click",y)}else this.notificationBtn.style.display="";var D=0,J=document.getElementById("geNotifList");if(null!=J){J.innerHTML='<div class="line"></div>';for(q=0;q<b.length;q++)(function(K,L){L.isNew&&D++;var Q=document.createElement("div");Q.className="notification";
+K=K.timeSince(new Date(L.timestamp));null==K&&(K=mxResources.get("lessThanAMinute"));Q.innerHTML='<div class="circle'+(L.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[K],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(L.content)+"</p>";L.link&&mxEvent.addListener(Q,"click",function(){window.open(L.link,"notifWin")});J.appendChild(Q)})(this,b[q]);l(D)}}};
App.prototype.save=function(b,g){var l=this.getCurrentFile(),d=!0,q=mxUtils.bind(this,function(){d&&(d=!1,l.handleFileSuccess(!0),null!=g&&g())}),y=mxUtils.bind(this,function(x){if(d){d=!1;Editor.addRetryToError(x,mxUtils.bind(this,function(){this.save(b,g)}));if(null!=x&&null!=x.retry){var D=x.retry;x.retry=function(){d=!0;try{l.isModified()?D():q()}catch(J){y(J)}}}l.handleFileError(x,null==x||"AbortError"!=x.name)}});if(null!=l&&this.spinner.spin(document.body,mxResources.get("saving"),y,3*this.timeout))try{this.editor.setStatus(""),
this.editor.graph.isEditing()&&this.editor.graph.stopEditing(),b==l.getTitle()?l.save(!0,q,y):l.saveAs(b,q,y)}catch(x){y(x)}};App.prototype.getExtensionForService=function(b){b=this.getServiceForName(b);return null!=b?b.extension:".drawio"};App.prototype.getServiceForName=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:null};
App.prototype.getTitleForService=function(b){return b==App.MODE_GOOGLE?mxResources.get("googleDrive"):b==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):EditorUi.prototype.getTitleForService.apply(this,arguments)};
@@ -13900,7 +13904,7 @@ function(){localStorage.setItem(g,b)}),null==localStorage.getItem(g)?l():this.co
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerText="";var g=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,g);this.fname.setAttribute("title",g+" - "+mxResources.get("rename"))}g=this.editor.graph;var l=b.isEditable();g.isEnabled()&&!l&&g.reset();g.setEnabled(l);null==urlParams.rev&&(this.updateDocumentTitle(),g=b.getHash(),0<g.length?(g!=this.getDiagramId()&&
(window.location.hash=g),this.updateHashObject()):0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
App.prototype.showAuthDialog=function(b,g,l,d){var q=this.spinner.pause();this.showDialog((new AuthDialog(this,b,g,mxUtils.bind(this,function(y){try{null!=l&&l(y,mxUtils.bind(this,function(){this.hideDialog();q()}))}catch(x){this.editor.setStatus(mxUtils.htmlEntities(x.message))}}))).container,300,g?180:140,!0,!0,mxUtils.bind(this,function(y){null!=d&&d(y);y&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,g,l,d,q,y,x,D){var J=g;/\.svg$/i.test(J)||(J=J.substring(0,g.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(g)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(D)for(var N in D)L.setRequestHeader(N,D[N]);L.onload=mxUtils.bind(this,function(){if(200<=
+App.prototype.convertFile=function(b,g,l,d,q,y,x,D){var J=g;/\.svg$/i.test(J)||(J=J.substring(0,g.lastIndexOf("."))+d);var K=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(K=!0);if(/\.v(dx|sdx?)$/i.test(g)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var L=new XMLHttpRequest;L.open("GET",b,!0);K||(L.responseType="blob");if(D)for(var Q in D)L.setRequestHeader(Q,D[Q]);L.onload=mxUtils.bind(this,function(){if(200<=
L.status&&299>=L.status){var e=null;K?(e=JSON.parse(L.responseText),e=this.base64ToBlob(e.content,"application/octet-stream")):e=new Blob([L.response],{type:"application/octet-stream"});this.importVisio(e,mxUtils.bind(this,function(f){q(new LocalFile(this,f,J,!0))}),y,g)}else null!=y&&y({message:mxResources.get("errorLoadingFile")})});L.onerror=y;L.send()}else{var c=mxUtils.bind(this,function(e){try{if(/\.pdf$/i.test(g)){var f=Editor.extractGraphModelFromPdf(e);null!=f&&0<f.length&&q(new LocalFile(this,
f,J,!0))}else/\.png$/i.test(g)?(f=this.extractGraphModelFromPng(e),null!=f?q(new LocalFile(this,f,J,!0)):q(new LocalFile(this,e,g,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,b)?this.parseFileData(e,mxUtils.bind(this,function(p){4==p.readyState&&(200<=p.status&&299>=p.status?q(new LocalFile(this,p.responseText,J,!0)):null!=y&&y({message:mxResources.get("errorLoadingFile")}))}),g):q(new LocalFile(this,e,J,!0))}catch(p){null!=y&&y(p)}});l=/\.png$/i.test(g)||/\.jpe?g$/i.test(g)||
/\.pdf$/i.test(g)||null!=l&&"image/"==l.substring(0,6);K?mxUtils.get(b,mxUtils.bind(this,function(e){if(200<=e.getStatus()&&299>=e.getStatus()){if(null!=q){e=JSON.parse(e.getText());var f=e.content;"base64"===e.encoding&&(f=/\.png$/i.test(g)?"data:image/png;base64,"+f:/\.pdf$/i.test(g)?"data:application/pdf;base64,"+f:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(f):atob(f));c(f)}}else null!=y&&y({code:App.ERROR_UNKNOWN})}),function(){null!=y&&y({code:App.ERROR_UNKNOWN})},!1,this.timeout,
@@ -13935,12 +13939,12 @@ App.prototype.toggleUserPanel=function(){if(null==this.userPanel){var b=document
D),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();x()}),2E3)):x()});b=mxUtils.bind(this,function(x){var D=document.createElement("tr"),J=document.createElement("td");J.setAttribute("valig","middle");J.style.height="59px";J.style.width="66px";var K=document.createElement("img");K.setAttribute("width","50");K.setAttribute("height","50");K.setAttribute("border","0");K.setAttribute("src",null!=x.pictureUrl?x.pictureUrl:this.defaultUserPicture);K.style.borderRadius=
"50%";K.style.margin="4px 8px 0 8px";J.appendChild(K);D.appendChild(J);J=document.createElement("td");J.setAttribute("valign","middle");J.style.whiteSpace="nowrap";J.style.paddingTop="4px";J.style.maxWidth="0";J.style.overflow="hidden";J.style.textOverflow="ellipsis";mxUtils.write(J,x.displayName+(x.isCurrent&&1<l.length?" ("+mxResources.get("default")+")":""));null!=x.email&&(mxUtils.br(J),K=document.createElement("small"),K.style.color="gray",mxUtils.write(K,x.email),J.appendChild(K));K=document.createElement("div");
K.style.marginTop="4px";var L=document.createElement("i");mxUtils.write(L,mxResources.get("googleDrive"));K.appendChild(L);J.appendChild(K);D.appendChild(J);x.isCurrent?D.setAttribute("title","User ID: "+x.id):(D.setAttribute("title",mxResources.get("login")+" (User ID: "+x.id+")"),D.style.cursor="pointer",D.style.opacity="0.3",mxEvent.addListener(D,"mouseenter",mxUtils.bind(this,function(){D.style.opacity="1"})),mxEvent.addListener(D,"mouseleave",mxUtils.bind(this,function(){D.style.opacity="0.3"})),
-mxEvent.addListener(D,"click",mxUtils.bind(this,function(N){this.hideUserPanel();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(x);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(N)})));return D});g=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width=
+mxEvent.addListener(D,"click",mxUtils.bind(this,function(Q){this.hideUserPanel();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(x);this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(c){this.handleError(c)}),!0)}),mxResources.get("changeUser")+"...");mxEvent.consume(Q)})));return D});g=!0;var q=document.createElement("table");q.style.borderSpacing="0";q.style.fontSize="10pt";q.style.width=
"100%";q.style.padding="10px";for(var y=0;y<l.length;y++)q.appendChild(b(l[y]));this.userPanel.appendChild(q);b=document.createElement("div");b.style.textAlign="left";b.style.padding="10px";b.style.whiteSpace="nowrap";b.style.borderTopStyle="solid";b.style.borderTopWidth="1px";q=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);
this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));q.className="geBtn";q.style.float="right";b.appendChild(q);q=mxUtils.button(mxResources.get("addAccount"),mxUtils.bind(this,function(){var x=this.drive.createAuthWin();x.blur();window.focus();d(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(D){this.handleError(D)}),!0,x)}),mxResources.get("closingFile")+
-"...")}));q.className="geBtn";q.style.margin="0px";b.appendChild(q);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(x,D,J,K){if(null!=x){g&&this.userPanel.appendChild(document.createElement("hr"));g=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var N=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td");e.setAttribute("valig","top");e.style.width="40px";if(null!=
+"...")}));q.className="geBtn";q.style.margin="0px";b.appendChild(q);this.userPanel.appendChild(b)}}b=mxUtils.bind(this,function(x,D,J,K){if(null!=x){g&&this.userPanel.appendChild(document.createElement("hr"));g=!0;var L=document.createElement("table");L.style.borderSpacing="0";L.style.fontSize="10pt";L.style.width="100%";L.style.padding="10px";var Q=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td");e.setAttribute("valig","top");e.style.width="40px";if(null!=
D){var f=document.createElement("img");f.setAttribute("width","40");f.setAttribute("height","40");f.setAttribute("border","0");f.setAttribute("src",D);f.style.marginRight="6px";e.appendChild(f)}c.appendChild(e);e=document.createElement("td");e.setAttribute("valign","middle");e.style.whiteSpace="nowrap";e.style.maxWidth="0";e.style.overflow="hidden";e.style.textOverflow="ellipsis";mxUtils.write(e,x.displayName);null!=x.email&&(mxUtils.br(e),D=document.createElement("small"),D.style.color="gray",mxUtils.write(D,
-x.email),e.appendChild(D));null!=K&&(x=document.createElement("div"),x.style.marginTop="4px",D=document.createElement("i"),mxUtils.write(D,K),x.appendChild(D),e.appendChild(x));c.appendChild(e);N.appendChild(c);L.appendChild(N);this.userPanel.appendChild(L);x=document.createElement("div");x.style.textAlign="center";x.style.padding="10px";x.style.whiteSpace="nowrap";null!=J&&(J=mxUtils.button(mxResources.get("signOut"),J),J.className="geBtn",x.appendChild(J));this.userPanel.appendChild(x)}});null!=
+x.email),e.appendChild(D));null!=K&&(x=document.createElement("div"),x.style.marginTop="4px",D=document.createElement("i"),mxUtils.write(D,K),x.appendChild(D),e.appendChild(x));c.appendChild(e);Q.appendChild(c);L.appendChild(Q);this.userPanel.appendChild(L);x=document.createElement("div");x.style.textAlign="center";x.style.padding="10px";x.style.whiteSpace="nowrap";null!=J&&(J=mxUtils.button(mxResources.get("signOut"),J),J.className="geBtn",x.appendChild(J));this.userPanel.appendChild(x)}});null!=
this.dropbox&&b(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==DropboxFile){var D=mxUtils.bind(this,function(){this.dropbox.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&b(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",
this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==OneDriveFile){var D=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&b(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var x=
this.getCurrentFile();if(null!=x&&x.constructor==GitHubFile){var D=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});x.isModified()?this.confirm(mxResources.get("allChangesLost"),null,D,mxResources.get("cancel"),mxResources.get("discardChanges")):D()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&b(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var x=this.getCurrentFile();if(null!=x&&x.constructor==GitLabFile){var D=
@@ -13966,8 +13970,8 @@ x.setToggleAction(!0);x.setSelectedCallback(function(){return d.isAutoDarkMode(!
x=d.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(m){d.setSketchMode(!Editor.sketchMode)}));x.setToggleAction(!0);x.setSelectedCallback(function(){return Editor.sketchMode});d.actions.addAction("properties...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new FilePropertiesDialog(d,m);d.showDialog(m.container,340,200,!0,!0);m.init()})}).isEnabled=y;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(){if(q.isEnabled()){if(null==
d.freehandWindow){var m=!mxClient.IS_IE&&!mxClient.IS_IE11;d.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,m?126:90,m)}q.freehand.isDrawing()?q.freehand.stopDrawing():q.freehand.startDrawing();d.freehandWindow.window.setVisible(q.freehand.isDrawing())}},null,null,"X")).isEnabled=function(){return y()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var m=document.createElement("div");m.style.whiteSpace="nowrap";var u=
null==d.pages||1>=d.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";m.appendChild(A);var B=d.addCheckbox(m,mxResources.get("selectionOnly"),!1,q.isSelectionEmpty()),H=d.addCheckbox(m,mxResources.get("compressed"),Editor.defaultCompressed),T=d.addCheckbox(m,mxResources.get("allPages"),!u,u);T.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?T.setAttribute("disabled",
-"disabled"):T.removeAttribute("disabled")});m=new CustomDialog(d,m,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!B.checked,u||!T.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(m,u,A,B,H,T,k,v,G){k=[];B&&G&&k.push("tags=%7B%7D");m=new EmbedDialog(d,d.createLink(m,
-u,!0,B,H,T,null,!0,k,null,A));d.showDialog(m.container,450,240,!0,!0);m.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("export"),null,m,function(u,A,B,H,T,k,v,G,I,M,P,S){d.createHtml(u,A,B,H,T,k,v,G,I,M,P,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
+"disabled"):T.removeAttribute("disabled")});m=new CustomDialog(d,m,mxUtils.bind(this,function(){d.downloadFile("xml",!H.checked,null,!B.checked,u||!T.checked)}),null,mxResources.get("export"));d.showDialog(m.container,300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),null,null,null,null,null,null,null,function(m,u,A,B,H,T,k,v,G,I,M,P){k=[];B&&G&&k.push("tags=%7B%7D");m=new EmbedDialog(d,
+d.createLink(m,u,!0,B,H,T,null,!0,k,null,A,null,P));d.showDialog(m.container,450,240,!0,!0);m.init()},null,!0)}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("export"),null,m,function(u,A,B,H,T,k,v,G,I,M,P,S){d.createHtml(u,A,B,H,T,k,v,G,I,M,P,mxUtils.bind(this,function(V,W){var X=d.getBaseFilename(v);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+
mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+W+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+".html","html",V,"text/html")}),S)})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport?d.showPrintDialog(mxResources.get("formatPdf"),mxUtils.bind(this,function(m,u){m=null!=d.pages?d.pages.length:1;var A=null==d.pages||1>=d.pages.length,
B=d.getPageIndex(d.currentPage);B=null!=B?B+1:1;d.downloadFile("pdf",null,null,!u.selection,A||!u.allPages&&u.pagesFrom==B&&u.pagesTo==B,!u.crop,u.transparent,u.scale,null,u.grid,u.includeCopy,u.allPages||u.pagesFrom==B&&u.pagesTo==B?null:{from:Math.max(0,Math.min(m-1,u.pagesFrom-1)),to:Math.max(0,Math.min(m-1,u.pagesTo-1))},u.border,u.fit,u.sheetsAcross,u.sheetsDown)})):d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,320,null!=d.pages&&1<d.pages.length&&(d.editor.editable||
"1"!=urlParams["hide-pages"])?350:280,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function m(){null!=u&&u.removeDraft();d.fileLoaded(null)}var u=d.getCurrentFile();null!=u&&u.isModified()?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):m()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){q.getSelectionCells();if(1==q.getSelectionCount()){var m=q.getSelectionCell(),
@@ -14016,9 +14020,9 @@ mxResources.parse("testCheckPages=Check Pages");mxResources.parse("testFixPages=
null,"",u.x/B-A.x,u.y/B-A.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;");var H=0,T=0;q.view.states.visit(function(k,v){k=!0;m(v.shape)||(console.log("invalid shape",v.cell.id,v.shape),k=!1);m(v.text)||(console.log("invalid text",v.cell.id,v.text),k=!1);k||H++;T++});console.log("states checked",T,"invalid",H)}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var m=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";m=new TextareaDialog(d,
"Paste Data:",m,function(u){if(0<u.length)try{var A=function(v){function G(ba){if(null==Y[ba]){if(Y[ba]=!0,null!=P[ba]){for(;0<P[ba].length;){var ea=P[ba].pop();G(ea)}delete P[ba]}}else mxLog.debug(I+": Visited: "+ba)}var I=v.parentNode.id,M=v.childNodes;v={};for(var P={},S=null,V={},W=0;W<M.length;W++){var X=M[W];if(null!=X.id&&0<X.id.length)if(null==v[X.id]){v[X.id]=X.id;var Z=X.getAttribute("parent");null==Z?null!=S?mxLog.debug(I+": Multiple roots: "+X.id):S=X.id:(null==P[Z]&&(P[Z]=[]),P[Z].push(X.id))}else V[X.id]=
X.id}M=Object.keys(V);0<M.length?(M=I+": "+M.length+" Duplicates: "+M.join(", "),mxLog.debug(M+" (see console)")):mxLog.debug(I+": Checked");var Y={};null==S?mxLog.debug(I+": No root"):(G(S),Object.keys(Y).length!=Object.keys(v).length&&(mxLog.debug(I+": Invalid tree: (see console)"),console.log(I+": Invalid tree",P)))};"<"!=u.charAt(0)&&(u=Graph.decompress(u),mxLog.debug("See console for uncompressed XML"),console.log("xml",u));var B=mxUtils.parseXml(u),H=d.getPagesForNode(B.documentElement,"mxGraphModel");
-if(null!=H&&0<H.length)try{var T=d.getHashValueForPages(H);mxLog.debug("Checksum: ",T)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=B.getElementsByTagName("root");for(u=0;u<k.length;u++)A(k[u]);mxLog.show()}catch(v){d.handleError(v),null!=window.console&&console.error(v)}});d.showDialog(m.container,620,460,!0,!0);m.init()}));var N=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var m=new TextareaDialog(d,"Diff/Sync:",
-"",function(u){var A=d.getCurrentFile();if(0<u.length&&null!=A)try{var B=JSON.parse(u);A.patch([B],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,A){N=d.getPagesForXml(d.getFileData(!0));m.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(N)}],["Diff",function(u,A){try{m.textarea.value=JSON.stringify(d.diffPages(N,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==N?
-(N=d.getPagesForXml(d.getFileData(!0)),m.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(N)):m.textarea.value=JSON.stringify(d.diffPages(N,d.pages),null,2);d.showDialog(m.container,620,460,!0,!0);m.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=d.pages&&null!=m?d.spinner.spin(document.body,mxResources.get("loading"))&&m.getLatestVersion(function(u){d.spinner.stop();
+if(null!=H&&0<H.length)try{var T=d.getHashValueForPages(H);mxLog.debug("Checksum: ",T)}catch(v){mxLog.debug("Error: ",v.message)}else mxLog.debug("No pages found for checksum");var k=B.getElementsByTagName("root");for(u=0;u<k.length;u++)A(k[u]);mxLog.show()}catch(v){d.handleError(v),null!=window.console&&console.error(v)}});d.showDialog(m.container,620,460,!0,!0);m.init()}));var Q=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var m=new TextareaDialog(d,"Diff/Sync:",
+"",function(u){var A=d.getCurrentFile();if(0<u.length&&null!=A)try{var B=JSON.parse(u);A.patch([B],null,!0,!0);d.hideDialog()}catch(H){d.handleError(H)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(u,A){Q=d.getPagesForXml(d.getFileData(!0));m.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(Q)}],["Diff",function(u,A){try{m.textarea.value=JSON.stringify(d.diffPages(Q,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==Q?
+(Q=d.getPagesForXml(d.getFileData(!0)),m.textarea.value="Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(Q)):m.textarea.value=JSON.stringify(d.diffPages(Q,d.pages),null,2);d.showDialog(m.container,620,460,!0,!0);m.init()}else d.alert("No pages")}));d.actions.addAction("testChecksum",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=d.pages&&null!=m?d.spinner.spin(document.body,mxResources.get("loading"))&&m.getLatestVersion(function(u){d.spinner.stop();
var A=d.getHashValueForPages(d.pages),B=m.getCurrentRevisionId(),H=d.getHashValueForPages(u.getShadowPages()),T=u.getDescriptorChecksum(u.getDescriptor()),k=u.getCurrentRevisionId();console.log("Local File",[m],"modified",m.isModified(),"checksum",A);console.log("Remote File",[u],"rev",k==B,"desc",T==H,"checksum",H);d.alert("Checksums "+(H==A?"match":"no not match"))},function(u){console.log("Error getLatestVersion",u);d.handleError(u)}):console.log("Checksum: no file or pages")}));d.actions.addAction("testCheckPages",
mxUtils.bind(this,function(){var m=d.getCurrentFile();console.log("editorUi",d,"file",m);if(null!=m&&m.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(m.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(m.theirPages));console.log("diff ownPages/theirPages",d.diffPages(m.ownPages,m.theirPages));var u=m.getShadowPages();null!=u&&(console.log("Checksum shadowPages",d.getHashValueForPages(u)),console.log("diff shadowPages/ownPages",d.diffPages(u,m.ownPages)),console.log("diff ownPages/shadowPages",
d.diffPages(m.ownPages,u)),console.log("diff theirPages/shadowPages",d.diffPages(m.theirPages,u)));null!=m.sync&&null!=m.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(m.sync.snapshot)),console.log("diff ownPages/snapshot",d.diffPages(m.ownPages,m.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(m.theirPages,m.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(m.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",
@@ -14026,10 +14030,10 @@ d.diffPages(m.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.dif
d.pages)])),m.ownPages=d.clonePages(d.pages),m.theirPages=d.clonePages(d.pages),m.shadowPages=d.clonePages(d.pages),null!=m.sync&&(m.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,function(){q.model.beginUpdate();try{var m=q.model.cells,u=0,A=[],B=[],H;for(H in m){var T=m[H],k=q.getCurrentCellStyle(T)[mxConstants.STYLE_IMAGE];null!=k&&"data:"==k.substring(0,5)&&(null==A[k]&&(A[k]=(A[k]||0)+1,u++),B.push(T))}q.setCellStyles(mxConstants.STYLE_IMAGE,null,
B);console.log("Removed",u,"image(s) from",B.length,"cell(s): ",[B,A])}finally{q.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,q.getModel())}));d.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var m=new mxImageExport,u=q.getGraphBounds(),A=q.view.scale,B=mxUtils.createXmlDocument(),H=B.createElement("output");B.appendChild(H);B=new mxXmlCanvas2D(H);B.translate(Math.floor((1-u.x)/A),Math.floor((1-u.y)/A));B.scale(1/A);var T=
0,k=B.save;B.save=function(){T++;k.apply(this,arguments)};var v=B.restore;B.restore=function(){T--;v.apply(this,arguments)};var G=m.drawShape;m.drawShape=function(I){mxLog.debug("entering shape",I,T);G.apply(this,arguments);mxLog.debug("leaving shape",I,T)};m.drawState(q.getView().getState(q.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(H));mxLog.debug("stateCounter",T)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=
-mxPopupMenu.prototype.zIndex-2});var c=null,e=null,f=null,p=null,n=null,t=null,z=null,F=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(q.view.revalidate=c,c=null):(c=q.view.revalidate,q.view.revalidate=function(){var m=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=e?(d.selectPage=e,e=null):(e=d.selectPage,d.selectPage=function(){var m=Date.now(),u=e.apply(this,
+mxPopupMenu.prototype.zIndex-2});var c=null,e=null,f=null,p=null,n=null,t=null,z=null,E=null;d.actions.addAction("testPerformance",mxUtils.bind(this,function(){null!=c?(q.view.revalidate=c,c=null):(c=q.view.revalidate,q.view.revalidate=function(){var m=Date.now(),u=c.apply(this,arguments);EditorUi.debug("[Performance] mxGraphView.revalidate",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=e?(d.selectPage=e,e=null):(e=d.selectPage,d.selectPage=function(){var m=Date.now(),u=e.apply(this,
arguments);EditorUi.debug("[Performance] EditorUi.selectPage",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=f?(d.diffPages=f,f=null):(f=d.diffPages,d.diffPages=function(){var m=Date.now(),u=f.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.diffPages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=p?(d.patchPages=p,p=null):(p=d.patchPages,d.patchPages=function(){var m=Date.now(),u=p.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.patchPages",
[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=n?(d.clonePages=n,n=null):(n=d.clonePages,d.clonePages=function(){var m=Date.now(),u=n.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.clonePages",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=z?(d.getHashValueForPages=z,z=null):(z=d.getHashValueForPages,d.getHashValueForPages=function(){var m=Date.now(),u=z.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getHashValueForPages",[this],
-"time",Date.now()-m+" ms","args",arguments);return u});null!=F?(d.resolveCrossReferences=F,F=null):(F=d.resolveCrossReferences,d.resolveCrossReferences=function(){var m=Date.now(),u=F.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=t?(d.getFileData=t,t=null):(t=d.getFileData,d.getFileData=function(){var m=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",
+"time",Date.now()-m+" ms","args",arguments);return u});null!=E?(d.resolveCrossReferences=E,E=null):(E=d.resolveCrossReferences,d.resolveCrossReferences=function(){var m=Date.now(),u=E.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.resolveCrossReferences",[this],"time",Date.now()-m+" ms","args",arguments);return u});null!=t?(d.getFileData=t,t=null):(t=d.getFileData,d.getFileData=function(){var m=Date.now(),u=t.apply(this,arguments);EditorUi.debug("[Performance] EditorUi.getFileData",
[this],"time",Date.now()-m+" ms","args",arguments);return u});EditorUi.debug("[Performance]",null!=c?"Enabled":"Disabled")}));this.put("testDevelop",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,"createSidebarEntry showBoundingBox - testCheckPages testChecksum testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport -".split(" "),u);var A=m.addItem(mxResources.get("testPerformance"),null,function(){d.actions.get("testPerformance").funct()},u);null!=c&&m.addCheckmark(A,
Editor.checkmarkImage);this.addMenuItems(m,["-","testShowConsole"],u)})))}d.actions.put("shapes",new Action(mxResources.get("moreShapes")+"...",function(m){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)}));d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(m){q.isEnabled()&&
(m=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),m.vertex=!0,m=new EditShapeDialog(d,m,mxResources.get("editShape")+":",630,400),d.showDialog(m.container,640,480,!0,!1),m.init())})).isEnabled=y;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showHtmlDialog(mxResources.get("create"),"https://www.drawio.com/doc/faq/embed-html-options",m,function(u,A,B,H,T,k,v,G,I,M,P,S){d.createHtml(u,A,B,H,T,k,v,G,
@@ -14038,44 +14042,44 @@ Y.writeln("</body>");Y.writeln("</html>");Y.close();if(!ba){var ea=Z.document.cr
ca.type="text/javascript";ca.src=/<script.*?src="(.*?)"/.exec(W)[1];Y.body.appendChild(ca);ea.parentNode.removeChild(ea)},20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,!0);X.init()}),S)})})}));d.actions.put("liveImage",new Action("Live image...",function(){var m=d.getCurrentFile();null!=m&&d.getPublicUrl(m,function(u){null!=u?(u=new EmbedDialog(d,'<img src="'+(m.constructor!=DriveFile?u:"https://drive.google.com/uc?id="+m.getId())+
'"/>'),d.showDialog(u.container,450,240,!0,!0),u.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("image"),
mxResources.get("retina"),d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(m,u,A,B,H,T){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(m,u,A,B,H,T,function(k){d.spinner.stop();k=new EmbedDialog(d,k);d.showDialog(k.container,450,240,!0,!0);k.init()},function(k){d.spinner.stop();d.handleError(k)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.drawio.com/doc/faq/embed-svg.html")}));
-d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){var u=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/q.view.scale))+2,null,null,null,m,d.getCurrentFile(),function(A,B,H,T,k,v,G,I,M,P){var S=[];M&&S.push("tags=%7B%7D");A=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+I+';" src="'+d.createLink(A,B,!0,T,k,v,"public"==P?m:null,null,S,null,
-H)+'"></iframe>');d.showDialog(A.container,450,240,!0,!0);A.init()},!0)})}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var m=document.createElement("div");m.style.position="absolute";m.style.bottom="30px";m.style.textAlign="center";m.style.width="100%";m.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,mxResources.get("getNotionChromeExtension"));
-m.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.getPublicUrl(d.getCurrentFile(),function(A){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",m,A,d.getCurrentFile(),
-function(B,H,T,k,v,G,I,M,P,S){I=["border=0"];P&&I.push("tags=%7B%7D");B=new EmbedDialog(d,d.createLink(B,H,!0,k,v,G,"public"==S?A:null,null,I,null,T));d.showDialog(B.container,450,240,!0,!0);B.init()})})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showPublishLinkDialog(null,null,null,null,null,null,m,d.getCurrentFile(),function(u,A,B,H,T,k,v,G,I,M){v=[];H&&I&&v.push("tags=%7B%7D");u=new EmbedDialog(d,d.createLink(u,
-A,!0,H,T,k,"public"==M?m:null,null,v,null,B));d.showDialog(u.container,450,240,!0,!0);u.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",
-function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new GoogleSitesDialog(d,m);d.showDialog(m.container,420,256,!0,!0);m.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)x=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&null!=document.getElementById("high-contrast-stylesheet")&&
-(x=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isHighContrast()}));x=d.actions.addAction("search",function(){if(null!=d.sidebar){var m=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!m);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!m,mxSettings.save())}});x.label=mxResources.get("searchShapes");x.setToggleAction(!0);x.setSelectedCallback(function(){return null!=
-d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(m){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(m){q.isEditing()&&q.stopEditing();var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var A=d.createLoadMessage("save");A.xml=u;!0!==
-m||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(A.exit=!0);u=JSON.stringify(A)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));m=d.getCurrentFile();null==m||m.constructor==EmbedFile||m.constructor==LocalFile&&null==m.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+
-"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var m=function(){d.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(u,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,m,mxResources.get("cancel"),mxResources.get("discardChanges")):
-m()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(m,u){d.isExportToCanvas()?(this.addMenuItems(m,["exportPng"],u),d.jpgSupported&&this.addMenuItems(m,["exportJpg"],u),d.webpSupported&&this.addMenuItems(m,["exportWebp"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPng","exportJpg"],u);this.addMenuItems(m,["exportSvg","-"],u);d.isOffline()||d.printPdfExport?this.addMenuItems(m,["exportPdf"],u):
-d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(m,["exportVsdx"],u);this.addMenuItems(m,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(m.addSeparator(u),this.addMenuItem(m,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||this.addMenuItems(m,["publishLink"],
-u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(m.addSeparator(u),d.menus.addSubmenu("embed",m,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(m,u){function A(T){T.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?H(v.getTitle()):"text/xml";/\.svg$/i.test(v.getTitle())&&!d.editor.isDataSvg(v.getData())&&
-(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");B(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},T==d.drive)},!0)}var B=mxUtils.bind(this,function(T,k,v){var G=q.view,I=q.getGraphBounds(),M=q.snap(Math.ceil(Math.max(0,I.x/G.scale-G.translate.x)+4*q.gridSize)),P=q.snap(Math.ceil(Math.max(0,(I.y+I.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==T.substring(0,11)?d.loadImage(T,mxUtils.bind(this,function(S){var V=
-!0,W=mxUtils.bind(this,function(){d.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(T,k,M,P,Math.round(Z*X),Math.round(Y*X),v,function(ba){d.spinner.stop();q.setSelectionCells(ba);q.scrollCellToVisible(q.getSelectionCell())})}),V)});T.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(T,k,M,P,0,
-0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),H=mxUtils.bind(this,function(T){var k="text/xml";/\.png$/i.test(T)?k="image/png":/\.jpe?g$/i.test(T)?k="image/jpg":/\.gif$/i.test(T)?k="image/gif":/\.pdf$/i.test(T)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&m.addItem(mxResources.get("googleDrive")+
-" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&m.addItem(mxResources.get("dropbox")+
-" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&m.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){A(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(m.addSeparator(u),m.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(d,"",mxResources.get("import"),function(k){if(null!=k&&0<k.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var v=
-/(\.png)($|\?)/i.test(k)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(k),function(G){B(G,v,k)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==v)}},mxResources.get("url"));d.showDialog(T.container,300,80,!0,!0);T.init()},u))}))).isEnabled=y;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(m,u){var A=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;"simple"==Editor.currentTheme&&
-(750>A&&this.addSubmenu("viewZoom",m,u,mxResources.get("zoom")),460>A&&d.isPageMenuVisible()&&this.addSubmenu("pages",m,u),320>A&&this.addSubmenu("insert",m,u),360>A&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",m,u));this.addMenuItems(m,["-","lightMode","darkMode"],u);d.isAutoDarkModeSupported()&&(A=d.menus.addMenuItem(m,"autoMode",u),null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")"));"1"!=urlParams.embed&&
-this.addMenuItems(m,["-","toggleSimpleMode"],u)})));this.put("appearance",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["-","lightMode","darkMode"],u);if(d.isAutoDarkModeSupported()){var A=d.menus.addMenuItem(m,"autoMode",u);null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}m.addSeparator(u);A=d.menus.addMenuItem(m,"highContrast",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&d.menus.addLinkToItem(A,
-"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",function(m){q.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(m)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(m,u){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=m.addItem(mxResources.get("automatic"),null,function(){d.setCurrentTheme("")},
-u),H=m.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},u),T=!1;if("kennedy"==A||"dark"==A)m.addCheckmark(H,Editor.checkmarkImage),T=!0;for(var k=0;k<Editor.themes.length;k++)mxUtils.bind(this,function(v){H=m.addItem(mxResources.get("min"==v?"minimal":v),null,function(){d.setCurrentTheme(v)},u);A==v&&(m.addCheckmark(H,Editor.checkmarkImage),T=!0)})(Editor.themes[k]);T||m.addCheckmark(B,Editor.checkmarkImage)})));x=this.editorUi.actions.addAction("rename...",
-mxUtils.bind(this,function(){var m=this.editorUi.getCurrentFile();if(null!=m)if(m.constructor==LocalFile&&null!=m.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(A,B){m.invalidFileHandle=null;m.fileHandle=A;m.title=B.name;m.desc=B;d.save(B.name)}),null,d.createFileSystemOptions(m.getTitle()));else{var u=null!=m.getTitle()?m.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,function(A){null!=A&&0<A.length&&null!=m&&A!=
-m.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&m.rename(A,mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),m.constructor==DriveFile||m.constructor==StorageFile?mxResources.get("diagramName"):null,function(A){if(null!=A&&0<A.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),mxResources.get("ok"));return!1},
-null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));x.isEnabled=function(){return this.enabled&&y.apply(this,arguments)};x.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var m=d.getCurrentFile();if(null!=m){var u=d.getCopyFilename(m);m.constructor==DriveFile?(u=new CreateDialog(d,u,mxUtils.bind(this,function(A,B){"_blank"==B?d.editor.editAsNew(d.getFileData(),A):("download"==
-B&&(B=App.MODE_GOOGLE),null!=A&&0<A.length&&(B==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&m.saveAs(A,mxUtils.bind(this,function(H){m.desc=H;m.save(!1,mxUtils.bind(this,function(){d.spinner.stop();m.setModified(!1);m.addAllSavedStatus()}),mxUtils.bind(this,function(T){d.handleError(T)}))}),mxUtils.bind(this,function(H){d.handleError(H)})):d.createFile(A,d.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),
-null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(u.container,420,380,!0,!0),u.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(m,u){m=d.getCurrentFile();null!=m&&d.openLink(m.getFolderUrl())}));d.actions.addAction("openFile...",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=m&&d.openLink(m.getFileUrl())}));d.actions.addAction("moveToFolder...",
+d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){var u=q.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),"100%",Math.ceil(Math.max(100,u.height/q.view.scale))+2,null,null,null,m,d.getCurrentFile(),function(A,B,H,T,k,v,G,I,M,P,S,V){var W=[];M&&W.push("tags=%7B%7D");A=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+G+";height:"+I+';" src="'+d.createLink(A,B,!0,T,k,v,"public"==P?m:null,null,W,
+null,H,S,V)+'"'+(S?' allowtransparency="true"':"")+"></iframe>");d.showDialog(A.container,450,240,!0,!0);A.init()},!0,!0)})}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var m=document.createElement("div");m.style.position="absolute";m.style.bottom="30px";m.style.textAlign="center";m.style.width="100%";m.style.left="0px";var u=document.createElement("a");u.setAttribute("href","javascript:void(0);");u.setAttribute("target","_blank");u.style.cursor="pointer";mxUtils.write(u,
+mxResources.get("getNotionChromeExtension"));m.appendChild(u);mxUtils.setPrefixedStyle(u.style,"transition","all 1s ease");mxUtils.setOpacity(u,0);window.setTimeout(function(){mxUtils.setOpacity(u,100)},300);mxEvent.addListener(u,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.getPublicUrl(d.getCurrentFile(),function(A){d.showPublishLinkDialog(mxResources.get("notion"),null,null,!0,"https://www.drawio.com/blog/drawio-notion",
+m,A,d.getCurrentFile(),function(B,H,T,k,v,G,I,M,P,S,V,W){I=["border=0"];P&&I.push("tags=%7B%7D");B=new EmbedDialog(d,d.createLink(B,H,!0,k,v,G,"public"==S?A:null,null,I,null,T,null,W));d.showDialog(B.container,450,240,!0,!0);B.init()},null,!0)})}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){d.showPublishLinkDialog(null,null,null,null,null,null,m,d.getCurrentFile(),function(u,A,B,H,T,k,v,G,I,M,P,S){v=[];H&&I&&v.push("tags=%7B%7D");
+u=new EmbedDialog(d,d.createLink(u,A,!0,H,T,k,"public"==M?m:null,null,v,null,B,null,S));d.showDialog(u.container,450,240,!0,!0);u.init()},null,!0)})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});
+d.actions.addAction("googleSites...",function(){d.getPublicUrl(d.getCurrentFile(),function(m){m=new GoogleSitesDialog(d,m);d.showDialog(m.container,420,256,!0,!0);m.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)x=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),x.setToggleAction(!0),x.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});window.matchMedia&&
+null!=document.getElementById("high-contrast-stylesheet")&&(x=d.actions.addAction("highContrast",function(){d.setAndPersistHighContrast(!d.isHighContrast())}),x.setToggleAction(!0),x.setSelectedCallback(function(){return d.isHighContrast()}));x=d.actions.addAction("search",function(){if(null!=d.sidebar){var m=d.sidebar.isEntryVisible("search");d.sidebar.showPalette("search",!m);Editor.isSettingsEnabled()&&(mxSettings.settings.search=!m,mxSettings.save())}});x.label=mxResources.get("searchShapes");
+x.setToggleAction(!0);x.setSelectedCallback(function(){return null!=d.sidebar&&d.sidebar.isEntryVisible("search")});d.actions.get("clearDefaultStyle").funct=function(m){q.isEnabled()&&(d.clearDefaultStyle(),Editor.sketchMode&&d.setSketchMode(!1))};"1"==urlParams.embed&&(d.actions.get("saveAs").setEnabled(!1),d.actions.get("save").funct=function(m){q.isEditing()&&q.stopEditing();var u="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==
+urlParams.proto){var A=d.createLoadMessage("save");A.xml=u;!0!==m||"1"!=urlParams.saveAndExit&&"1"!=urlParams.publishClose||(A.exit=!0);u=JSON.stringify(A)}(window.opener||window.parent).postMessage(u,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));m=d.getCurrentFile();null==m||m.constructor==EmbedFile||m.constructor==LocalFile&&null==m.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():
+d.actions.get("save").funct(!0)},null,null,Editor.ctrlKey+"+S").label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var m=function(){d.editor.modified=!1;var u="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(u,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,
+m,mxResources.get("cancel"),mxResources.get("discardChanges")):m()}},null,null,"1"==urlParams.embedInline?"Escape":null));this.put("exportAs",new Menu(mxUtils.bind(this,function(m,u){d.isExportToCanvas()?(this.addMenuItems(m,["exportPng"],u),d.jpgSupported&&this.addMenuItems(m,["exportJpg"],u),d.webpSupported&&this.addMenuItems(m,["exportWebp"],u)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPng","exportJpg"],u);this.addMenuItems(m,["exportSvg","-"],u);d.isOffline()||
+d.printPdfExport?this.addMenuItems(m,["exportPdf"],u):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(m,["exportPdf"],u);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(m,["exportVsdx"],u);this.addMenuItems(m,["-","exportHtml","exportXml","exportUrl"],u);d.isOffline()||(m.addSeparator(u),this.addMenuItem(m,"export",u).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...");mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"min"!=Editor.currentTheme||
+this.addMenuItems(m,["publishLink"],u);d.mode==App.MODE_ATLAS||"1"==urlParams.extAuth||"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||(m.addSeparator(u),d.menus.addSubmenu("embed",m,u))})));this.put("importFrom",new Menu(mxUtils.bind(this,function(m,u){function A(T){T.pickFile(function(k){d.spinner.spin(document.body,mxResources.get("loading"))&&T.getFile(k,function(v){var G="data:image/"==v.getData().substring(0,11)?H(v.getTitle()):"text/xml";/\.svg$/i.test(v.getTitle())&&
+!d.editor.isDataSvg(v.getData())&&(v.setData(Editor.createSvgDataUri(v.getData())),G="image/svg+xml");B(v.getData(),G,v.getTitle())},function(v){d.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null)},T==d.drive)},!0)}var B=mxUtils.bind(this,function(T,k,v){var G=q.view,I=q.getGraphBounds(),M=q.snap(Math.ceil(Math.max(0,I.x/G.scale-G.translate.x)+4*q.gridSize)),P=q.snap(Math.ceil(Math.max(0,(I.y+I.height)/G.scale-G.translate.y)+4*q.gridSize));"data:image/"==T.substring(0,11)?d.loadImage(T,
+mxUtils.bind(this,function(S){var V=!0,W=mxUtils.bind(this,function(){d.resizeImage(S,T,mxUtils.bind(this,function(X,Z,Y){X=V?Math.min(1,Math.min(d.maxImageSize/Z,d.maxImageSize/Y)):1;d.importFile(T,k,M,P,Math.round(Z*X),Math.round(Y*X),v,function(ba){d.spinner.stop();q.setSelectionCells(ba);q.scrollCellToVisible(q.getSelectionCell())})}),V)});T.length>d.resampleThreshold?d.confirmImageResize(function(X){V=X;W()}):W()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):
+d.importFile(T,k,M,P,0,0,v,function(S){d.spinner.stop();q.setSelectionCells(S);q.scrollCellToVisible(q.getSelectionCell())})}),H=mxUtils.bind(this,function(T){var k="text/xml";/\.png$/i.test(T)?k="image/png":/\.jpe?g$/i.test(T)?k="image/jpg":/\.gif$/i.test(T)?k="image/gif":/\.pdf$/i.test(T)&&(k="application/pdf");return k});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?m.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},u):d.isModeEnabled(App.MODE_GOOGLE)&&
+m.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1));d.isModeReady(App.MODE_ONEDRIVE)?m.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},u):d.isModeEnabled(App.MODE_ONEDRIVE)&&m.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);d.isModeReady(App.MODE_DROPBOX)?m.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},u):d.isModeEnabled(App.MODE_DROPBOX)&&
+m.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);d.isModeReady(App.MODE_GITHUB)&&m.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},u);d.isModeReady(App.MODE_GITLAB)&&m.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},u);d.isModeReady(App.MODE_TRELLO)?m.addItem(mxResources.get("trello")+"...",null,function(){A(d.trello)},u):d.isModeEnabled(App.MODE_TRELLO)&&m.addItem(mxResources.get("trello")+
+" ("+mxResources.get("loading")+"...)",null,function(){},u,null,!1);m.addSeparator(u);isLocalStorage&&"0"!=urlParams.browser&&m.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},u);"1"!=urlParams.noDevice&&m.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},u);d.isOffline()||(m.addSeparator(u),m.addItem(mxResources.get("url")+"...",null,function(){var T=new FilenameDialog(d,"",mxResources.get("import"),function(k){if(null!=k&&0<k.length&&
+d.spinner.spin(document.body,mxResources.get("loading"))){var v=/(\.png)($|\?)/i.test(k)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+"?url="+encodeURIComponent(k),function(G){B(G,v,k)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==v)}},mxResources.get("url"));d.showDialog(T.container,300,80,!0,!0);T.init()},u))}))).isEnabled=y;this.put("dynamicAppearance",new Menu(mxUtils.bind(this,function(m,u){var A=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;"simple"==Editor.currentTheme&&(750>A&&this.addSubmenu("viewZoom",m,u,mxResources.get("zoom")),460>A&&d.isPageMenuVisible()&&this.addSubmenu("pages",m,u),320>A&&this.addSubmenu("insert",m,u),360>A&&"1"!=urlParams.embed&&"draw.io"==d.getServiceName()&&this.addSubmenu("share",m,u));this.addMenuItems(m,["-","lightMode","darkMode"],u);d.isAutoDarkModeSupported()&&(A=d.menus.addMenuItem(m,"autoMode",u),null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?
+"dark":"light")+")"));"1"!=urlParams.embed&&this.addMenuItems(m,["-","toggleSimpleMode"],u)})));this.put("appearance",new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["-","lightMode","darkMode"],u);if(d.isAutoDarkModeSupported()){var A=d.menus.addMenuItem(m,"autoMode",u);null!=A&&A.setAttribute("title",mxResources.get("automatic")+" ("+mxResources.get(Editor.isDarkMode()?"dark":"light")+")")}m.addSeparator(u);A=d.menus.addMenuItem(m,"highContrast",u);(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&d.menus.addLinkToItem(A,"https://github.com/jgraph/drawio/issues/4296")})));d.actions.addAction("addToScratchpad",function(m){q.isSelectionEmpty()||null==d.addSelectionToScratchpad||d.addSelectionToScratchpad(m)});d.actions.addAction("accounts...",function(){d.toggleUserPanel();d.userPanel.style.right="10px";d.userPanel.style.top="10px"});this.put("theme",new Menu(mxUtils.bind(this,function(m,u){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=m.addItem(mxResources.get("automatic"),
+null,function(){d.setCurrentTheme("")},u),H=m.addItem(mxResources.get("classic"),null,function(){d.setCurrentTheme(Editor.isDarkMode()?"dark":"kennedy")},u),T=!1;if("kennedy"==A||"dark"==A)m.addCheckmark(H,Editor.checkmarkImage),T=!0;for(var k=0;k<Editor.themes.length;k++)mxUtils.bind(this,function(v){H=m.addItem(mxResources.get("min"==v?"minimal":v),null,function(){d.setCurrentTheme(v)},u);A==v&&(m.addCheckmark(H,Editor.checkmarkImage),T=!0)})(Editor.themes[k]);T||m.addCheckmark(B,Editor.checkmarkImage)})));
+x=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var m=this.editorUi.getCurrentFile();if(null!=m)if(m.constructor==LocalFile&&null!=m.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(A,B){m.invalidFileHandle=null;m.fileHandle=A;m.title=B.name;m.desc=B;d.save(B.name)}),null,d.createFileSystemOptions(m.getTitle()));else{var u=null!=m.getTitle()?m.getTitle():this.editorUi.defaultFilename;u=new FilenameDialog(this.editorUi,u,mxResources.get("rename"),mxUtils.bind(this,
+function(A){null!=A&&0<A.length&&null!=m&&A!=m.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&m.rename(A,mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),m.constructor==DriveFile||m.constructor==StorageFile?mxResources.get("diagramName"):null,function(A){if(null!=A&&0<A.length)return!0;d.showError(mxResources.get("error"),mxResources.get("invalidName"),
+mxResources.get("ok"));return!1},null,FilenameDialog.filenameHelpLink,null,null,d.editor.fileExtensions);this.editorUi.showDialog(u.container,340,96,!0,!0);u.init()}}));x.isEnabled=function(){return this.enabled&&y.apply(this,arguments)};x.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var m=d.getCurrentFile();if(null!=m){var u=d.getCopyFilename(m);m.constructor==DriveFile?(u=new CreateDialog(d,u,mxUtils.bind(this,function(A,B){"_blank"==B?d.editor.editAsNew(d.getFileData(),
+A):("download"==B&&(B=App.MODE_GOOGLE),null!=A&&0<A.length&&(B==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&m.saveAs(A,mxUtils.bind(this,function(H){m.desc=H;m.save(!1,mxUtils.bind(this,function(){d.spinner.stop();m.setModified(!1);m.addAllSavedStatus()}),mxUtils.bind(this,function(T){d.handleError(T)}))}),mxUtils.bind(this,function(H){d.handleError(H)})):d.createFile(A,d.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(u.container,420,380,!0,!0),u.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),u)}}));d.actions.put("openFolder",new Action(mxResources.get("openIt",[mxResources.get("folder")])+"...",function(m,u){m=d.getCurrentFile();null!=m&&d.openLink(m.getFolderUrl())}));d.actions.addAction("openFile...",mxUtils.bind(this,function(){var m=d.getCurrentFile();null!=m&&d.openLink(m.getFileUrl())}));d.actions.addAction("moveToFolder...",
mxUtils.bind(this,function(){var m=d.getCurrentFile();if(m.getMode()==App.MODE_GOOGLE||m.getMode()==App.MODE_ONEDRIVE){var u=!1;if(m.getMode()==App.MODE_GOOGLE&&null!=m.desc.parents)for(var A=0;A<m.desc.parents.length;A++)if(m.desc.parents[A].isRoot){u=!0;break}d.pickFolder(m.getMode(),mxUtils.bind(this,function(B){d.spinner.spin(document.body,mxResources.get("moving"))&&m.move(B,mxUtils.bind(this,function(H){d.spinner.stop()}),mxUtils.bind(this,function(H){d.handleError(H)}))}),null,!0,u)}}));this.put("publish",
new Menu(mxUtils.bind(this,function(m,u){this.addMenuItems(m,["publishLink"],u)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var m=d.getCurrentFile();null!=m&&m.share()}catch(u){d.handleError(u)}})).isEnabled=y;this.put("embed",new Menu(mxUtils.bind(this,function(m,u){var A=d.getCurrentFile();null==A||A.getMode()!=App.MODE_GOOGLE&&A.getMode()!=
App.MODE_GITHUB||!/(\.png)$/i.test(A.getTitle())||this.addMenuItems(m,["liveImage","-"],u);this.addMenuItems(m,["embedImage","embedSvg","-","embedHtml"],u);navigator.standalone||d.isOffline()||this.addMenuItems(m,["embedIframe"],u);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(m,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),u)})));d.addInsertItem=function(m,u,A,B){("plantUml"!=B||EditorUi.enablePlantUml&&!d.isOffline())&&m.addItem(A,null,mxUtils.bind(this,
function(){if("fromText"==B||"formatSql"==B||"plantUml"==B||"mermaid"==B){var H=new ParseDialog(d,A,B);d.showDialog(H.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else H=new CreateGraphDialog(d,A,B),d.showDialog(H.container,620,420,!0,!1,function(T,k){if(k)return d.confirm(mxResources.get("areYouSure"),function(){d.hideDialog()}),!1;null!=H.graph&&(null!=H.graph.container.parentNode&&H.graph.container.parentNode.removeChild(H.graph.container),H.graph.destroy(),H.graph=null)});
-H.init()}),u,null,y())};var C=function(m){q.getModel().beginUpdate();try{m=q.addCell(m),q.fireEvent(new mxEventObject("cellsInserted","cells",[m])),q.model.isVertex(m)&&q.isAutoSizeCell(m)&&q.updateCellSize(m)}finally{q.getModel().endUpdate()}q.scrollCellToVisible(m);q.setSelectionCell(m);q.container.focus();q.editAfterInsert&&q.startEditing(m);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(m))},0);return m},E=function(m,u,A,B,H){m=new mxCell(m,new mxGeometry(0,
-0,u,A),B);m.vertex=!0;null==H&&(H=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([m],!0)));m.geometry.x=H.x;m.geometry.y=H.y;return C(m)};d.actions.put("insertText",new Action(mxResources.get("text"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(E("Text",60,30,q.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",q.vertexFontSize),null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||
-!q.isMouseInsertPoint()?null:q.getInsertPoint()))},null,null,"A")).isEnabled=y;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&E("",120,60,"whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"D")).isEnabled=y;d.actions.put("insertNote",new Action(mxResources.get("note"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
-E("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"S")).isEnabled=y;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
-E("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=y;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&E("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"R")).isEnabled=y;d.actions.put("insertEdge",
+H.init()}),u,null,y())};var C=function(m){q.getModel().beginUpdate();try{m=q.addCell(m),q.fireEvent(new mxEventObject("cellsInserted","cells",[m])),q.model.isVertex(m)&&q.isAutoSizeCell(m)&&q.updateCellSize(m)}finally{q.getModel().endUpdate()}q.scrollCellToVisible(m);q.setSelectionCell(m);q.container.focus();q.editAfterInsert&&q.startEditing(m);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(q.view.getState(m))},0);return m},F=function(m,u,A,B,H){m=new mxCell(m,new mxGeometry(0,
+0,u,A),B);m.vertex=!0;null==H&&(H=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([m],!0)));m.geometry.x=H.x;m.geometry.y=H.y;return C(m)};d.actions.put("insertText",new Action(mxResources.get("text"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&q.startEditingAtCell(F("Text",60,30,q.appendFontSize("text;strokeColor=none;align=center;fillColor=none;html=1;verticalAlign=middle;whiteSpace=wrap;rounded=0;",q.vertexFontSize),null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||
+!q.isMouseInsertPoint()?null:q.getInsertPoint()))},null,null,"A")).isEnabled=y;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&F("",120,60,"whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"D")).isEnabled=y;d.actions.put("insertNote",new Action(mxResources.get("note"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
+F("",140,160,"shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"S")).isEnabled=y;d.actions.put("insertEllipse",new Action(mxResources.get("ellipse"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&
+F("",80,80,"ellipse;whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"F")).isEnabled=y;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(m){q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())&&F("",80,80,"rhombus;whiteSpace=wrap;html=1;",null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint())},null,null,"R")).isEnabled=y;d.actions.put("insertEdge",
new Action(mxResources.get("line"),function(m){if(q.isEnabled()&&!q.isCellLocked(q.getDefaultParent())){var u=q.defaultEdgeLength;m=null==m||mxEvent.isControlDown(m)||mxEvent.isMetaDown(m)||!q.isMouseInsertPoint()?null:q.getInsertPoint();null==m&&(m=q.getCenterInsertPoint(q.getBoundingBoxFromGeometry([A],!0)));var A=new mxCell("",new mxGeometry(0,0,u,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");A.geometry.setTerminalPoint(m,!0);A.geometry.setTerminalPoint(new mxPoint(m.x+A.geometry.width,
m.y),!1);A.geometry.points=[];A.geometry.relative=!0;A.edge=!0;C(A)}},null,null,"C")).isEnabled=y;x=d.actions.put("toggleShapes",new Action(mxResources.get("shapes"),function(){null!=d.sidebarWindow?d.sidebarWindow.window.setVisible(!d.sidebarWindow.window.isVisible()):d.toggleShapesPanel(!d.isShapesPanelVisible())},null,null,Editor.ctrlKey+"+Shift+K"));x.setToggleAction(!0);x.setSelectedCallback(mxUtils.bind(this,function(){return null!=d.sidebarWindow&&d.sidebarWindow.window.isVisible()||null==
d.sidebarWindow&&0<d.hsplitPosition}));d.addInsertMenuItems=mxUtils.bind(this,function(m,u,A){for(var B=0;B<A.length;B++)"-"==A[B]?m.addSeparator(u):d.addInsertItem(m,u,mxResources.get(A[B])+"...",A[B])});this.put("insert",new Menu(mxUtils.bind(this,function(m,u){"sketch"==Editor.currentTheme?(d.menus.addMenuItems(m,["toggleShapes"],u),d.menus.addSubmenu("table",m,u),m.addSeparator(u),d.insertTemplateEnabled&&!d.isOffline()&&d.menus.addMenuItems(m,["insertTemplate"],u),d.menus.addMenuItems(m,["insertImage",
@@ -14107,8 +14111,8 @@ u),m.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){d.remov
function(){d.editor.editAsNew(d.getFileData(!0,null,null,null,!0,!0))}),u)))})));this.put("pages",new Menu(mxUtils.bind(this,function(m,u){var A=d.currentPage;d.editor.graph.isLightboxView()||(m.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){try{d.insertPage()}catch(H){d.handleError(H)}}),u,null,d.editor.graph.isEnabled()),m.addSeparator(u));if(null!=d.pages)for(var B=0;B<d.pages.length;B++)mxUtils.bind(this,function(H){var T=null;T=d.pages[H]!=A||d.editor.graph.isLightboxView()?
m.addItem(d.getShortPageName(d.pages[H]),null,mxUtils.bind(this,function(){d.selectPage(d.pages[H])}),u):d.menus.addSubmenu("currentPage",m,u,d.getShortPageName(A));var k=d.pages[H].getId();T.setAttribute("title",d.pages[H].getName()+" ("+(H+1)+"/"+d.pages.length+")"+(null!=k?" ["+k+"]":""));d.pages[H]==A&&m.addCheckmark(T,Editor.checkmarkImage)})(B)})));if(EditorUi.isElectronApp){var R="1"==urlParams.enableSpellCheck;x=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();R=!R;d.alert(mxResources.get("restartForChangeRequired"))});
x.setToggleAction(!0);x.setSelectedCallback(function(){return R});var U="1"==urlParams.enableStoreBkp;x=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();U=!U});x.setToggleAction(!0);x.setSelectedCallback(function(){return U});var O="1"==urlParams.isGoogleFontsEnabled;x=d.actions.addAction("googleFonts",function(){d.toggleGoogleFonts();O=!O;d.alert(mxResources.get("restartForChangeRequired"))});x.setToggleAction(!0);x.setSelectedCallback(function(){return O});d.actions.addAction("openDevTools",
-function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var m=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(m.container,320,80,!0,!0);m.init()})}var Q=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme||
-"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",m,u);m.addSeparator(u);null==Q||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",m,u);d.menus.addSubmenu("units",
+function(){d.openDevTools()});d.actions.addAction("drafts...",function(){var m=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(u){u=parseInt(u);0<=u&&(EditorUi.draftSaveDelay=1E3*u,EditorUi.enableDrafts=0<u,mxSettings.setDraftSaveDelay(u),mxSettings.save())}),mxResources.get("draftSaveInt"));d.showDialog(m.container,320,80,!0,!0);m.init()})}var N=this.get("language");this.put("extras",new Menu(mxUtils.bind(this,function(m,u){if("simple"==Editor.currentTheme||
+"sketch"==Editor.currentTheme||"min"==Editor.currentTheme){"1"==urlParams.embed&&"1"!=urlParams.atlas||"1"==urlParams.extAuth||d.mode==App.MODE_ATLAS||"1"==urlParams.embedInline||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&d.menus.addSubmenu("theme",m,u);m.addSeparator(u);null==N||"1"==urlParams.embed&&null!=urlParams.lang||d.menus.addSubmenu("language",m,u);d.menus.addSubmenu("units",
m,u);d.menus.addMenuItems(m,"- copyConnect collapseExpand - tooltips animations -".split(" "),u);var A=d.getCurrentFile();"simple"!=Editor.currentTheme&&(null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(m,["showRemoteCursors"],u),d.menus.addMenuItems(m,["ruler","-"],u));EditorUi.isElectronApp&&d.menus.addMenuItems(m,"- googleFonts spellCheck autoBkp drafts -".split(" "),u);this.addSubmenu("diagramLanguage",m,u);m.addSeparator(u);d.mode!=App.MODE_ATLAS&&d.menus.addMenuItem(m,
"configuration",u);m.addSeparator(u)}else"1"==urlParams.embed&&null!=urlParams.lang||this.addSubmenu("language",m,u),"1"==urlParams.embed&&"1"!=urlParams.atlas||"atlas"==Editor.currentTheme||!Editor.isDarkMode()&&(mxClient.IS_IE||mxClient.IS_IE11)||d.menus.addSubmenu("appearance",m,u),"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&d.mode!=App.MODE_ATLAS&&this.addSubmenu("theme",m,u),m.addSeparator(u),A=this.addSubmenu("adaptiveColors",m,u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&
d.menus.addLinkToItem(A,"https://github.com/jgraph/drawio/discussions/4713"),"undefined"!==typeof MathJax&&(A=this.addMenuItem(m,"mathematicalTypesetting",u),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.drawio.com/doc/faq/math-typesetting")),EditorUi.isElectronApp&&this.addMenuItems(m,["googleFonts","spellCheck","autoBkp","drafts","-"],u),this.addMenuItems(m,["copyConnect","collapseExpand","-"],u),"1"!=urlParams.embed&&(A=d.getCurrentFile(),null!=
@@ -14203,7 +14207,7 @@ EditorUi.prototype.createPageMenuTab=function(){return this.createControlTab(mxR
d=mxEvent.getClientY(b);g.popup(l,d,null,b);this.setCurrentMenu(g);mxEvent.consume(b)}))};EditorUi.prototype.createTabForPage=function(b,g){var l=this.createTab(),d=b.getName()||mxResources.get("untitled"),q=b.getId();l.setAttribute("title",d+(null!=q?" ("+q+")":"")+" ["+g+"]");g=document.createElement("span");g.style.maxWidth="160px";g.style.textOverflow="ellipsis";g.style.overflow="hidden";mxUtils.write(g,d);l.appendChild(g);this.addTabListeners(b,l);return l};
EditorUi.prototype.addTabListeners=function(b,g){mxEvent.disableContextMenu(g);var l=this.editor.graph;mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(J){this.renamePage(b);mxEvent.consume(J)}));var d=document.createElement("div");d.className="geTabMenuButton";d.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";d.style.backgroundPosition="center center";d.style.backgroundRepeat="no-repeat";d.style.backgroundSize="10px";g.appendChild(d);var q=!1,y=!1,x=mxUtils.bind(this,
function(J){q=null!=this.currentMenu;y=b==this.currentPage;this.scrollToPage(b);l.isMouseDown||y||this.selectPage(b)}),D=mxUtils.bind(this,function(J){if(l.isEnabled()&&!l.isMouseDown&&(y&&(mxEvent.isTouchEvent(J)||mxEvent.getSource(J)==d)||mxEvent.isPopupTrigger(J))&&(l.popupMenuHandler.hideMenu(),this.hideCurrentMenu(),!mxEvent.isTouchEvent(J)||!q)){var K=new mxPopupMenu(this.createPageMenu(b));K.div.className+=" geMenubarMenu";K.smartSeparators=!0;K.showDisabled=!0;K.autoExpand=!0;K.hideMenu=mxUtils.bind(this,
-function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(J),N=mxEvent.getClientY(J);K.popup(L,N,null,J);this.setCurrentMenu(K,g)}mxEvent.consume(J)});mxEvent.addGestureListeners(d,x,null,D);mxEvent.addGestureListeners(g,x,null,D)};
+function(){mxPopupMenu.prototype.hideMenu.apply(K,arguments);this.resetCurrentMenu();K.destroy()});var L=mxEvent.getClientX(J),Q=mxEvent.getClientY(J);K.popup(L,Q,null,J);this.setCurrentMenu(K,g)}mxEvent.consume(J)});mxEvent.addGestureListeners(d,x,null,D);mxEvent.addGestureListeners(g,x,null,D)};
EditorUi.prototype.createPageMenu=function(b,g){return mxUtils.bind(this,function(l,d){1!=urlParams.embed&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,!0,!0))}),d));l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);l.addSeparator(d);this.currentPage==
b&&1<this.pages.length&&this.menus.addSubmenu("movePage",l,d,mxResources.get("move"));l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);l.addItem(mxResources.get("rename")+"...",null,mxUtils.bind(this,function(){this.renamePage(b,g)}),d)})};(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();
(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){g=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=g;return d};mxCodecRegistry.register(b)})();(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(g,l,d){d.ui=g.ui;return l};b.afterDecode=function(g,l,d){g=d.previous;d.previous=d.name;d.name=g;return d};mxCodecRegistry.register(b)})();
@@ -14220,23 +14224,23 @@ S.height,Y.y+Y.height)-Math.max(S.y,Y.y))/P))}}W?I=0:k=0;for(X=0;X<V.length;X++)
try{var H=D(B),T=f.getIncomingTreeEdges(B),k=f.cloneCells([T[0],B]);f.model.setTerminal(T[0],k[1],!1);f.model.setTerminal(k[0],k[1],!0);f.model.setTerminal(k[0],B,!1);var v=f.model.getParent(B),G=v.geometry,I=[];f.view.currentRoot!=v&&(k[1].geometry.x-=G.x,k[1].geometry.y-=G.y);f.traverse(B,!0,function(S,V){var W=null!=V&&f.isTreeEdge(V);W&&I.push(V);(null==V||W)&&I.push(S);return null==V||W});var M=B.geometry.width+40,P=B.geometry.height+40;H==mxConstants.DIRECTION_SOUTH?M=0:H==mxConstants.DIRECTION_NORTH?
(M=0,P=-P):H==mxConstants.DIRECTION_WEST?(M=-M,P=0):H==mxConstants.DIRECTION_EAST&&(P=0);f.moveCells(I,M,P);return f.addCells(k,v)}finally{f.model.endUpdate()}}function L(B,H){f.model.beginUpdate();try{var T=f.model.getParent(B),k=f.getIncomingTreeEdges(B),v=D(B);0==k.length&&(k=[f.createEdge(T,null,"",null,null,f.createCurrentEdgeStyle())],v=H);var G=f.cloneCells([k[0],B]);f.model.setTerminal(G[0],B,!0);null==f.model.getTerminal(G[0],!1)&&(f.model.setTerminal(G[0],G[1],!1),f.applyNewEdgeStyle(G[1],
[G[0]],v));k=f.getOutgoingTreeEdges(B);var I=T.geometry;H=[];f.view.currentRoot==T&&(I=new mxRectangle);for(var M=0;M<k.length;M++){var P=f.model.getTerminal(k[M],!1);null!=P&&H.push(P)}var S=f.view.getBounds(H),V=f.view.translate,W=f.view.scale;v==mxConstants.DIRECTION_SOUTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-G[1].geometry.width)/2:(S.x+S.width)/W-V.x-I.x+10,G[1].geometry.y+=G[1].geometry.height-I.y+40):v==mxConstants.DIRECTION_NORTH?(G[1].geometry.x=null==S?B.geometry.x+(B.geometry.width-
-G[1].geometry.width)/2:(S.x+S.width)/W-V.x+-I.x+10,G[1].geometry.y-=G[1].geometry.height+I.y+40):(G[1].geometry.x=v==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+I.x+40):G[1].geometry.x+(G[1].geometry.width-I.x+40),G[1].geometry.y=null==S?B.geometry.y+(B.geometry.height-G[1].geometry.height)/2:(S.y+S.height)/W-V.y+-I.y+10);return f.addCells(G,T)}finally{f.model.endUpdate()}}function N(B,H,T){B=f.getOutgoingTreeEdges(B);T=f.view.getState(T);var k=[];if(null!=T&&null!=B){for(var v=
+G[1].geometry.width)/2:(S.x+S.width)/W-V.x+-I.x+10,G[1].geometry.y-=G[1].geometry.height+I.y+40):(G[1].geometry.x=v==mxConstants.DIRECTION_WEST?G[1].geometry.x-(G[1].geometry.width+I.x+40):G[1].geometry.x+(G[1].geometry.width-I.x+40),G[1].geometry.y=null==S?B.geometry.y+(B.geometry.height-G[1].geometry.height)/2:(S.y+S.height)/W-V.y+-I.y+10);return f.addCells(G,T)}finally{f.model.endUpdate()}}function Q(B,H,T){B=f.getOutgoingTreeEdges(B);T=f.view.getState(T);var k=[];if(null!=T&&null!=B){for(var v=
0;v<B.length;v++){var G=f.view.getState(f.model.getTerminal(B[v],!1));null!=G&&(!H&&Math.min(G.x+G.width,T.x+T.width)>=Math.max(G.x,T.x)||H&&Math.min(G.y+G.height,T.y+T.height)>=Math.max(G.y,T.y))&&k.push(G)}k.sort(function(I,M){return H?I.x+I.width-M.x-M.width:I.y+I.height-M.y-M.height})}return k}function c(B,H){var T=D(B),k=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;(T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST)==k&&T!=H?e.actions.get("selectParent").funct():T==
-H?(H=f.getOutgoingTreeEdges(B),null!=H&&0<H.length&&f.setSelectionCell(f.model.getTerminal(H[0],!1))):(T=f.getIncomingTreeEdges(B),null!=T&&0<T.length&&(k=N(f.model.getTerminal(T[0],!0),k,B),B=f.view.getState(B),null!=B&&(B=mxUtils.indexOf(k,B),0<=B&&(B+=H==mxConstants.DIRECTION_NORTH||H==mxConstants.DIRECTION_WEST?-1:1,0<=B&&B<=k.length-1&&f.setSelectionCell(k[B].cell)))))}var e=this,f=e.editor.graph,p=f.getModel(),n=e.menus.createPopupMenu;e.menus.createPopupMenu=function(B,H,T){n.apply(this,arguments);
+H?(H=f.getOutgoingTreeEdges(B),null!=H&&0<H.length&&f.setSelectionCell(f.model.getTerminal(H[0],!1))):(T=f.getIncomingTreeEdges(B),null!=T&&0<T.length&&(k=Q(f.model.getTerminal(T[0],!0),k,B),B=f.view.getState(B),null!=B&&(B=mxUtils.indexOf(k,B),0<=B&&(B+=H==mxConstants.DIRECTION_NORTH||H==mxConstants.DIRECTION_WEST?-1:1,0<=B&&B<=k.length-1&&f.setSelectionCell(k[B].cell)))))}var e=this,f=e.editor.graph,p=f.getModel(),n=e.menus.createPopupMenu;e.menus.createPopupMenu=function(B,H,T){n.apply(this,arguments);
if(1==f.getSelectionCount()){H=f.getSelectionCell();var k=f.getOutgoingTreeEdges(H);B.addSeparator();0<k.length&&(d(f.getSelectionCell())&&this.addMenuItems(B,["selectChildren"],null,T),this.addMenuItems(B,["selectDescendants"],null,T));d(f.getSelectionCell())?(B.addSeparator(),0<f.getIncomingTreeEdges(H).length&&this.addMenuItems(B,["selectSiblings","selectParent"],null,T)):0<f.model.getEdgeCount(H)&&this.addMenuItems(B,["selectConnections"],null,T)}};e.actions.addAction("selectChildren",function(B){if(f.isEnabled()&&
1==f.getSelectionCount()){var H=f.getSelectionCell();B=mxEvent.isControlDown(B)?null:f.getOutgoingTreeEdges(H);if(null!=B&&0<B.length){H=[];for(var T=0;T<B.length;T++)H.push(f.model.getTerminal(B[T],!1));f.setSelectionCells(H)}else f.setSelectionCells(f.model.getChildren(H))}},null,null,"Alt+Shift+C");e.actions.addAction("selectDescendants",function(B){var H=f.getSelectionCell();if(f.isEnabled()&&null!=H){var T=[];mxEvent.isControlDown(B)||f.traverse(H,!0,function(k,v){var G=null!=v&&f.isTreeEdge(v);
G&&mxEvent.isControlDown(B)&&T.push(v);(null==v||G)&&T.push(k);return null==v||G});if(0==T.length||1==T.length&&T[0]==H)T=f.model.getDescendants(H);f.setSelectionCells(T)}},null,null,"Alt+Shift+X");e.actions.addAction("selectParent",function(B){var H=f.getSelectionCell();f.isEnabled()&&null!=H&&(B=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H),null!=B&&0<B.length?f.setSelectionCell(f.model.getTerminal(B[0],!0)):f.selectParentCell())},null,null,"Alt+Shift+P");e.actions.addAction("selectSiblings",
function(B){if(f.isEnabled()&&1==f.getSelectionCount()){var H=f.getSelectionCell(),T=mxEvent.isControlDown(B)?null:f.getIncomingTreeEdges(H);B=[];if(null!=T&&0<T.length&&(T=f.getOutgoingTreeEdges(f.model.getTerminal(T[0],!0)),null!=T))for(var k=0;k<T.length;k++)B.push(f.model.getTerminal(T[k],!1));0==B.length&&(B=f.model.getChildren(f.model.getParent(H)));f.setSelectionCells(B)}},null,null,"Alt+Shift+S");var t=f.removeCells;f.removeCells=function(B,H){H=null!=H?H:!0;null==B&&(B=this.getDeletableCells(this.getSelectionCells()));
H&&(B=this.getDeletableCells(this.addAllEdges(B)));for(var T=[],k=0;k<B.length;k++){var v=B[k];p.isEdge(v)&&y(v)&&(T.push(v),v=p.getTerminal(v,!1));if(d(v)){var G=[];f.traverse(v,!0,function(I,M){var P=null!=M&&f.isTreeEdge(M);P&&G.push(M);(null==M||P)&&G.push(I);return null==M||P});0<G.length&&(T=T.concat(G),v=f.getIncomingTreeEdges(B[k]),B=B.concat(v))}else null!=v&&T.push(B[k])}B=T;return t.apply(this,arguments)};e.hoverIcons.getStateAt=function(B,H,T){return d(B.cell)?null:this.graph.view.getState(this.graph.getCellAt(H,
T))};var z=f.duplicateCells;f.duplicateCells=function(B,H){B=null!=B?B:this.getSelectionCells();for(var T=B.slice(0),k=0;k<T.length;k++){var v=f.view.getState(T[k]);if(null!=v&&d(v.cell)){var G=f.getIncomingTreeEdges(v.cell);for(v=0;v<G.length;v++)mxUtils.remove(G[v],B)}}this.model.beginUpdate();try{var I=z.call(this,B,H);if(I.length==B.length)for(k=0;k<B.length;k++)if(d(B[k])){var M=f.getIncomingTreeEdges(I[k]);G=f.getIncomingTreeEdges(B[k]);if(0==M.length&&0<G.length){var P=this.cloneCell(G[0]);
-this.addEdge(P,f.getDefaultParent(),this.model.getTerminal(G[0],!0),I[k])}}}finally{this.model.endUpdate()}return I};var F=f.moveCells;f.moveCells=function(B,H,T,k,v,G,I){for(var M=null,P=[],S=0;S<B.length;S++)(q(B[S])||d(B[S]))&&!x(B[S])&&this.isCellCollapsed(B[S])?P=P.concat(this.getSubtree(B[S])):P.push(B[S]);B=mxUtils.removeDuplicates(P);this.model.beginUpdate();try{P=v;var V=this.getCurrentCellStyle(v);if(null!=B&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<B.length;S++)if(d(B[S])||
-f.model.isEdge(B[S])&&null==f.model.getTerminal(B[S],!0)){v=f.model.getParent(B[S]);break}if(null!=P&&v!=P&&null!=this.view.getState(B[0])){var W=f.getIncomingTreeEdges(B[0]);if(0<W.length){var X=f.view.getState(f.model.getTerminal(W[0],!0));if(null!=X){var Z=f.view.getState(P);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/f.view.scale,T=(Z.getCenterY()-X.getCenterY())/f.view.scale)}}}}M=F.apply(this,arguments);if(null!=M&&null!=B&&M.length==B.length)for(S=0;S<M.length;S++)if(this.model.isEdge(M[S]))d(P)&&
+this.addEdge(P,f.getDefaultParent(),this.model.getTerminal(G[0],!0),I[k])}}}finally{this.model.endUpdate()}return I};var E=f.moveCells;f.moveCells=function(B,H,T,k,v,G,I){for(var M=null,P=[],S=0;S<B.length;S++)(q(B[S])||d(B[S]))&&!x(B[S])&&this.isCellCollapsed(B[S])?P=P.concat(this.getSubtree(B[S])):P.push(B[S]);B=mxUtils.removeDuplicates(P);this.model.beginUpdate();try{P=v;var V=this.getCurrentCellStyle(v);if(null!=B&&d(v)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(S=0;S<B.length;S++)if(d(B[S])||
+f.model.isEdge(B[S])&&null==f.model.getTerminal(B[S],!0)){v=f.model.getParent(B[S]);break}if(null!=P&&v!=P&&null!=this.view.getState(B[0])){var W=f.getIncomingTreeEdges(B[0]);if(0<W.length){var X=f.view.getState(f.model.getTerminal(W[0],!0));if(null!=X){var Z=f.view.getState(P);null!=Z&&(H=(Z.getCenterX()-X.getCenterX())/f.view.scale,T=(Z.getCenterY()-X.getCenterY())/f.view.scale)}}}}M=E.apply(this,arguments);if(null!=M&&null!=B&&M.length==B.length)for(S=0;S<M.length;S++)if(this.model.isEdge(M[S]))d(P)&&
0>mxUtils.indexOf(M,this.model.getTerminal(M[S],!0))&&this.model.setTerminal(M[S],P,!0);else if(d(B[S])&&(W=f.getIncomingTreeEdges(B[S]),0<W.length))if(!k)d(P)&&0>mxUtils.indexOf(B,this.model.getTerminal(W[0],!0))&&this.model.setTerminal(W[0],P,!0);else if(0==f.getIncomingTreeEdges(M[S]).length){V=P;if(null==V||V==f.model.getParent(B[S]))V=f.model.getTerminal(W[0],!0);k=this.cloneCell(W[0]);this.addEdge(k,f.getDefaultParent(),V,M[S])}}finally{this.model.endUpdate()}return M};if(null!=e.sidebar){var C=
-e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=function(B,H,T,k){var v=f.model,G=null;v.beginUpdate();try{if(G=C.apply(this,arguments),d(B))for(var I=0;I<G.length;I++)if(v.isEdge(G[I])&&null==v.getTerminal(G[I],!0)){v.setTerminal(G[I],B,!0);var M=f.getCellGeometry(G[I]);M.points=null;null!=M.getTerminalPoint(!0)&&M.setTerminalPoint(null,!0)}}finally{v.endUpdate()}return G}}var E={67:e.actions.get("selectChildren"),88:e.actions.get("selectDescendants"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},
-R={67:e.actions.get("copyStyle"),86:e.actions.get("pasteStyle")},U=e.onKeyDown;e.onKeyDown=function(B){try{var H=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=H){var T=mxEvent.isAltDown(B)&&mxEvent.isShiftDown(B)?E[B.keyCode]:mxEvent.isAltDown(B)?R[B.keyCode]:null;null!=T?(T.funct(B),mxEvent.consume(B)):d(H)&&(T=null,0<f.getIncomingTreeEdges(H).length&&(9==B.which?T=mxEvent.isShiftDown(B)?K(H):L(H):13==B.which&&(T=J(H,!mxEvent.isShiftDown(B)))),null!=T&&0<T.length?(1==T.length&&f.model.isEdge(T[0])?
+e.sidebar.dropAndConnect;e.sidebar.dropAndConnect=function(B,H,T,k){var v=f.model,G=null;v.beginUpdate();try{if(G=C.apply(this,arguments),d(B))for(var I=0;I<G.length;I++)if(v.isEdge(G[I])&&null==v.getTerminal(G[I],!0)){v.setTerminal(G[I],B,!0);var M=f.getCellGeometry(G[I]);M.points=null;null!=M.getTerminalPoint(!0)&&M.setTerminalPoint(null,!0)}}finally{v.endUpdate()}return G}}var F={67:e.actions.get("selectChildren"),88:e.actions.get("selectDescendants"),80:e.actions.get("selectParent"),83:e.actions.get("selectSiblings")},
+R={67:e.actions.get("copyStyle"),86:e.actions.get("pasteStyle")},U=e.onKeyDown;e.onKeyDown=function(B){try{var H=f.getSelectionCell();if(f.isEnabled()&&!f.isEditing()&&null!=H){var T=mxEvent.isAltDown(B)&&mxEvent.isShiftDown(B)?F[B.keyCode]:mxEvent.isAltDown(B)?R[B.keyCode]:null;null!=T?(T.funct(B),mxEvent.consume(B)):d(H)&&(T=null,0<f.getIncomingTreeEdges(H).length&&(9==B.which?T=mxEvent.isShiftDown(B)?K(H):L(H):13==B.which&&(T=J(H,!mxEvent.isShiftDown(B)))),null!=T&&0<T.length?(1==T.length&&f.model.isEdge(T[0])?
f.setSelectionCell(f.model.getTerminal(T[0],!1)):f.setSelectionCell(T[T.length-1]),null!=e.hoverIcons&&e.hoverIcons.update(f.view.getState(H)),f.startEditingAtCell(H),mxEvent.consume(B)):37==B.keyCode?(c(H,mxConstants.DIRECTION_WEST),mxEvent.consume(B)):38==B.keyCode?(c(H,mxConstants.DIRECTION_NORTH),mxEvent.consume(B)):39==B.keyCode?(c(H,mxConstants.DIRECTION_EAST),mxEvent.consume(B)):40==B.keyCode&&(c(H,mxConstants.DIRECTION_SOUTH),mxEvent.consume(B)))}}catch(k){e.handleError(k)}mxEvent.isConsumed(B)||
U.apply(this,arguments)};var O=f.connectVertex;f.connectVertex=function(B,H,T,k,v,G,I){var M=f.getIncomingTreeEdges(B);if(d(B)){var P=D(B),S=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,V=H==mxConstants.DIRECTION_EAST||H==mxConstants.DIRECTION_WEST;return P==H||0==M.length?L(B,H):S==V?K(B):J(B,H!=mxConstants.DIRECTION_NORTH&&H!=mxConstants.DIRECTION_WEST)}return O.apply(this,arguments)};f.getSubtree=function(B){var H=[B];!q(B)&&!d(B)||x(B)||f.traverse(B,!0,function(T,k){var v=null!=
-k&&f.isTreeEdge(k);v&&0>mxUtils.indexOf(H,k)&&H.push(k);(null==k||v)&&0>mxUtils.indexOf(H,T)&&H.push(T);return null==k||v});return H};var Q=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){Q.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+k&&f.isTreeEdge(k);v&&0>mxUtils.indexOf(H,k)&&H.push(k);(null==k||v)&&0>mxUtils.indexOf(H,T)&&H.push(T);return null==k||v});return H};var N=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){N.apply(this,arguments);(q(this.state.cell)||d(this.state.cell))&&!x(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(B){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(B),mxEvent.getClientY(B),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=
mxEvent.isMouseEvent(B);this.graph.isMouseDown=!0;e.hoverIcons.reset();mxEvent.consume(B)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var m=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){m.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:
0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var u=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(B){u.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=B?"":"none")};var A=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(B,H){A.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=
@@ -14245,22 +14249,22 @@ D.vertex=!0;var J=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=
return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var x=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");x.vertex=!0;var D=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
D.vertex=!0;var J=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-L.vertex=!0;var N=new mxCell("",new mxGeometry(0,0,0,0),K.style);N.geometry.relative=!0;N.edge=!0;D.insertEdge(N,!0);L.insertEdge(N,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
+L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),K.style);Q.geometry.relative=!0;Q.edge=!0;D.insertEdge(Q,!0);L.insertEdge(Q,!1);var c=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),K.style);e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);var f=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
-f.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),K.style);p.geometry.relative=!0;p.edge=!0;D.insertEdge(p,!0);f.insertEdge(p,!1);x.insert(K);x.insert(N);x.insert(e);x.insert(p);x.insert(D);x.insert(J);x.insert(L);x.insert(c);x.insert(f);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
+f.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),K.style);p.geometry.relative=!0;p.edge=!0;D.insertEdge(p,!0);f.insertEdge(p,!1);x.insert(K);x.insert(Q);x.insert(e);x.insert(p);x.insert(D);x.insert(J);x.insert(L);x.insert(c);x.insert(f);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var x=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};treeFolding=1;treeMoving=1;');
x.vertex=!0;return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var x=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');
x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var x=new mxCell("Sub Topic",new mxGeometry(0,0,80,26),
'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;");
D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree orgchart organization division",function(){var x=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var D=new mxCell("Organization",new mxGeometry(80,
40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(D,"treeRoot","1");D.vertex=!0;var J=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
-K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var N=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");N.geometry.relative=
-!0;N.edge=!0;D.insertEdge(N,!0);L.insertEdge(N,!1);x.insert(K);x.insert(N);x.insert(D);x.insert(J);x.insert(L);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;return y.createVertexTemplateFromCells([x],
+K.geometry.relative=!0;K.edge=!0;D.insertEdge(K,!0);J.insertEdge(K,!1);var L=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');L.vertex=!0;var Q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");Q.geometry.relative=
+!0;Q.edge=!0;D.insertEdge(Q,!0);L.insertEdge(Q,!1);x.insert(K);x.insert(Q);x.insert(D);x.insert(J);x.insert(L);return y.createVertexTemplateFromCells([x],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree root",function(){var x=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');q.setAttributeForCell(x,"treeRoot","1");x.vertex=!0;return y.createVertexTemplateFromCells([x],
x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree division",function(){var x=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;curved=0;");
D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);return y.createVertexTemplateFromCells([x,D],x.geometry.width,x.geometry.height,x.value)}),this.addEntry("tree sub sections",function(){var x=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");x.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;curved=0;rounded=0;");
D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;x.insertEdge(D,!1);var J=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");J.vertex=!0;var K=new mxCell("",new mxGeometry(0,0,0,0),D.style);K.geometry.setTerminalPoint(new mxPoint(110,-40),!0);K.geometry.relative=!0;K.edge=!0;J.insertEdge(K,!1);return y.createVertexTemplateFromCells([D,K,x,J],220,60,"Sub Sections")})])}}})();Editor.themes.push("min");EditorUi.windowed="0"!=urlParams.windows;
EditorUi.initMinimalTheme=function(){function b(c,e){if(EditorUi.windowed){var f=c.editor.graph;f.popupMenuHandler.hideMenu();null==c.formatWindow?(e=Math.max(10,c.diagramContainer.clientWidth-248),f=Math.min(566,f.container.clientHeight-10),c.formatWindow=new WrapperWindow(c,mxResources.get("format"),e,60,240,f,function(p){c.createFormat(p).init()}),c.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.formatWindow.window.fit()})),c.formatWindow.window.minimumSize=new mxRectangle(0,
0,240,80)):c.formatWindow.window.setVisible(null!=e?e:!c.formatWindow.window.isVisible())}else null==c.formatElt&&(c.formatElt=c.createSidebarContainer(),c.createFormat(c.formatElt).init(),c.formatElt.style.border="none",c.formatElt.style.width="240px",c.formatElt.style.borderLeftWidth="1px",c.formatElt.style.borderLeftStyle="solid",c.formatElt.style.right="0px"),f=c.diagramContainer.parentNode,null!=c.formatElt.parentNode?(c.formatElt.parentNode.removeChild(c.formatElt),f.style.right="0px"):(f.parentNode.appendChild(c.formatElt),
-f.style.right=c.formatElt.style.width)}function g(c,e){function f(t,z){var F=c.menus.get(t);t=p.addMenu(z,mxUtils.bind(this,function(){F.funct.apply(this,arguments)}));t.setAttribute("title",z);t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";t.className="geTitle";e.appendChild(t);return t}var p=new Menubar(c,e);if(Editor.enableCustomLibraries&&
+f.style.right=c.formatElt.style.width)}function g(c,e){function f(t,z){var E=c.menus.get(t);t=p.addMenu(z,mxUtils.bind(this,function(){E.funct.apply(this,arguments)}));t.setAttribute("title",z);t.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";t.className="geTitle";e.appendChild(t);return t}var p=new Menubar(c,e);if(Editor.enableCustomLibraries&&
("1"!=urlParams.embed||"1"==urlParams.libraries))if(null!=c.actions.get("newLibrary")){var n=document.createElement("div");n.style.cssText="position:absolute;border-width:1px;cusor:pointer;border-style:none;height:24px;bottom:0px;text-align:center;padding:8px 6px 0 6px;border-top-style:solid;width:50%;height:32px;box-sizing:border-box;font-size:11px;";n.className="geTitle";mxUtils.write(n,mxResources.get("newLibrary"));e.appendChild(n);mxEvent.addListener(n,"click",this.actions.get("newLibrary").funct);
n=n.cloneNode(!1);n.style.left="50%";n.style.borderLeftStyle="solid";mxUtils.write(n,mxResources.get("openLibrary"));e.appendChild(n);mxEvent.addListener(n,"click",this.actions.get("openLibrary").funct)}else n=f("newLibrary",mxResources.get("newLibrary")),n.style.display="block",n.style.fontSize="11px",n.style.left="0",n=f("openLibraryFrom",mxResources.get("openLibraryFrom")),n.style.borderLeftStyle="solid",n.style.display="block",n.style.fontSize="11px",n.style.left="50%";e.appendChild(c.sidebar.container);
e.style.overflow="hidden"}function l(c,e){if(EditorUi.windowed){var f=c.editor.graph;f.popupMenuHandler.hideMenu();null==c.sidebarWindow?(e=Math.min(f.container.clientWidth-10,218),f=Math.min(f.container.clientHeight-40,650),c.sidebarWindow=new WrapperWindow(c,mxResources.get("shapes"),10,56,e-6,f-6,function(p){g(c,p)}),c.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){c.sidebarWindow.window.fit()})),c.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90),c.sidebarWindow.window.setVisible(!0),
@@ -14272,100 +14276,100 @@ null!=this.tabContainer&&(this.tabContainer.style.right="62px",this.diagramConta
x.apply(this,arguments)};EditorUi.prototype.toggleFormatPanel=function(c){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=c?c:!this.formatWindow.window.isVisible()):b(this)};EditorUi.prototype.isFormatPanelVisible=function(){return null!=this.formatWindow&&this.formatWindow.window.isVisible()||null==this.formatWindow&&0<this.formatWidth};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){this.destroyWindows();D.apply(this,arguments)};var J=EditorUi.prototype.setGraphEnabled;
EditorUi.prototype.setGraphEnabled=function(c){J.apply(this,arguments);if(c){var e=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=e&&null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&1E3<=e&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};
var K=Menus.prototype.init;Menus.prototype.init=function(){K.apply(this,arguments);var c=this.editorUi;EditorUi.enablePlantUml&&!c.isOffline()&&c.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var p=new ParseDialog(c,mxResources.get("plantUml")+"...","plantUml");c.showDialog(p.container,620,420,!0,!1);p.init()}));c.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var p=new ParseDialog(c,mxResources.get("mermaid")+"...","mermaid");c.showDialog(p.container,
-620,420,!0,!1);p.init()}));var e="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),f=function(p,n,t,z){p.addItem(t,null,mxUtils.bind(this,function(){var F=new CreateGraphDialog(c,t,z);c.showDialog(F.container,620,420,!0,!1);F.init()}),n)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(p,n){for(var t=0;t<e.length;t++)"-"==e[t]?p.addSeparator(n):f(p,n,mxResources.get(e[t])+"...",e[t])})))};EditorUi.prototype.installFormatToolbar=function(c){var e=
+620,420,!0,!1);p.init()}));var e="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),f=function(p,n,t,z){p.addItem(t,null,mxUtils.bind(this,function(){var E=new CreateGraphDialog(c,t,z);c.showDialog(E.container,620,420,!0,!1);E.init()}),n)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(p,n){for(var t=0;t<e.length;t++)"-"==e[t]?p.addSeparator(n):f(p,n,mxResources.get(e[t])+"...",e[t])})))};EditorUi.prototype.installFormatToolbar=function(c){var e=
this.editor.graph,f=document.createElement("div");f.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";e.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(p,n){0<e.getSelectionCount()?(c.appendChild(f),f.innerHTML="Selected: "+e.getSelectionCount()):null!=f.parentNode&&f.parentNode.removeChild(f)}))};var L=!1;EditorUi.prototype.initFormatWindow=
function(){if(!L&&null!=this.formatWindow){L=!0;var c=this.formatWindow.window.toggleMinimized,e=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(e=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+e-140+"px"):(this.div.style.width=e+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-e+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var N=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(W,X,Z){var Y=z.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),E);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(f){mxEvent.getSource(f)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var Q=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(W,X,Z){var Y=z.menus.get(W),ba=R.addMenu(mxResources.get(W),mxUtils.bind(this,function(){ba.classList.contains("mxDisabled")||Y.funct.apply(this,arguments)}),F);ba.className="geMenuItem";ba.style.display="inline-block";ba.style.boxSizing=
"border-box";ba.style.top="6px";ba.style.marginRight="6px";ba.style.height="30px";ba.style.paddingTop="6px";ba.style.paddingBottom="6px";ba.style.cursor="pointer";ba.setAttribute("title",mxResources.get(W));z.menus.menuCreated(Y,ba,"geMenuItem");null!=Z?(ba.style.backgroundImage="url("+Z+")",ba.style.backgroundPosition="center center",ba.style.backgroundRepeat="no-repeat",ba.style.backgroundSize="24px 24px",ba.style.width="34px",ba.innerText=""):X||(ba.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
")",ba.style.backgroundPosition="right 6px center",ba.style.backgroundRepeat="no-repeat",ba.style.paddingRight="22px");return ba}function e(W,X,Z,Y,ba,ea){var ca=document.createElement("a");ca.className="geMenuItem";ca.style.display="inline-block";ca.style.boxSizing="border-box";ca.style.height="30px";ca.style.padding="6px";ca.style.position="relative";ca.style.verticalAlign="top";ca.style.top="0px";null!=z.statusContainer?C.insertBefore(ca,z.statusContainer):C.appendChild(ca);null!=ea?(ca.style.backgroundImage=
"url("+ea+")",ca.style.backgroundPosition="center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.width="34px"):mxUtils.write(ca,W);mxEvent.addListener(ca,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fa){fa.preventDefault()}));mxEvent.addListener(ca,"click",function(fa){"disabled"!=ca.getAttribute("disabled")&&X(fa);mxEvent.consume(fa)});null==Z&&(ca.style.marginRight="4px");null!=Y&&ca.setAttribute("title",Y);null!=ba&&(W=function(){ba.isEnabled()?
-(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),F.addListener("enabledChanged",W),W());return ca}function f(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&
-(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=z.statusContainer?C.insertBefore(Z,z.statusContainer):C.appendChild(Z);return Z}function p(){for(var W=C.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}E=C.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>d;var Z=null;W||(Z=c("diagram"));X=W?c("diagram",null,
-Editor.menuImage):null;null!=X&&(Z=X);f([Z,e(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),W?Editor.shapesImage:null),e(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=c("insert",!0,W?Q:null);f([X,e(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),
-z.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);F.isEnabled()||X.classList.add("mxDisabled");411<=d&&(f([I,M],60),520<=d&&f([P,640<=d?e("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}N.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),
+(ca.removeAttribute("disabled"),ca.style.cursor="pointer"):(ca.setAttribute("disabled","disabled"),ca.style.cursor="default")},ba.addListener("stateChanged",W),E.addListener("enabledChanged",W),W());return ca}function f(W,X,Z){Z=document.createElement("div");Z.className="geMenuItem";Z.style.display="inline-block";Z.style.verticalAlign="top";Z.style.marginRight="6px";Z.style.padding="0 4px 0 4px";Z.style.height="30px";Z.style.position="relative";Z.style.top="0px";for(var Y=0;Y<W.length;Y++)null!=W[Y]&&
+(W[Y].style.margin="0px",W[Y].style.boxShadow="none",Z.appendChild(W[Y]));null!=X&&mxUtils.setOpacity(Z,X);null!=z.statusContainer?C.insertBefore(Z,z.statusContainer):C.appendChild(Z);return Z}function p(){for(var W=C.firstChild;null!=W;){var X=W.nextSibling;"geMenuItem"!=W.className&&"geItem"!=W.className||W.parentNode.removeChild(W);W=X}F=C.firstChild;d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;W=1E3>d;var Z=null;W||(Z=c("diagram"));X=W?c("diagram",null,
+Editor.menuImage):null;null!=X&&(Z=X);f([Z,e(mxResources.get("shapes"),z.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),z.actions.get("image"),W?Editor.shapesImage:null),e(mxResources.get("format"),z.actions.get("format").funct,null,mxResources.get("format")+" ("+z.actions.get("format").shortcut+")",z.actions.get("image"),W?Editor.formatImage:null)],W?60:null);X=c("insert",!0,W?N:null);f([X,e(mxResources.get("delete"),z.actions.get("delete").funct,null,mxResources.get("delete"),
+z.actions.get("delete"),W?Editor.trashImage:null)],W?60:null);E.isEnabled()||X.classList.add("mxDisabled");411<=d&&(f([I,M],60),520<=d&&f([P,640<=d?e("",H.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",H,Editor.zoomInImage):null,640<=d?e("",T.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",T,Editor.zoomOutImage):null],60))}Q.apply(this,arguments);var n=mxUtils.isAncestorNode(document.body,this.container)?this.container:this.editor.graph.container;null!=n&&(n.classList.add("geSimple"),
n.classList.add("geMinimal"));n=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var t=document.createElement("div");t.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";t.style.bottom=n?"32px":"0px";this.sidebar=this.createSidebar(t);if(1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
-this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=d&&(b(this,!0),this.formatWindow.window.setVisible(!0));var z=this,F=z.editor.graph;z.toolbar=this.createToolbar(z.createDiv("geToolbar"));z.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.className="geMenubarContainer";var E=null,R=new Menubar(z,C);z.statusContainer=z.createStatusContainer();z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.cursor=
+this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=d&&(b(this,!0),this.formatWindow.window.setVisible(!0));var z=this,E=z.editor.graph;z.toolbar=this.createToolbar(z.createDiv("geToolbar"));z.defaultLibraryName=mxResources.get("untitledLibrary");var C=document.createElement("div");C.className="geMenubarContainer";var F=null,R=new Menubar(z,C);z.statusContainer=z.createStatusContainer();z.statusContainer.style.position="relative";z.statusContainer.style.maxWidth="";z.statusContainer.style.cursor=
"default";var U=z.hideCurrentMenu;z.hideCurrentMenu=function(){U.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var O=z.descriptorChanged;z.descriptorChanged=function(){O.apply(this,arguments);var W=z.getCurrentFile();if(null!=W&&null!=W.getTitle()){var X=W.getMode();"google"==X?X="googleDrive":"github"==X?X="gitHub":"gitlab"==X?X="gitLab":"onedrive"==X&&(X="oneDrive");X=mxResources.get(X);C.setAttribute("title",W.getTitle()+(null!=X?" ("+X+")":""))}else C.removeAttribute("title")};
z.setStatusText(z.editor.getStatus());C.appendChild(z.statusContainer);z.buttonContainer=document.createElement("div");z.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";C.appendChild(z.buttonContainer);z.menubarContainer=z.buttonContainer;z.tabContainer=document.createElement("div");z.tabContainer.className="geTabContainer geTabItem";z.tabContainer.style.cssText=
-"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=z.diagramContainer.parentNode;t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="47px";var Q=Editor.addBoxImage;if(null!=z.hoverIcons){var m=z.hoverIcons.update;z.hoverIcons.update=function(){F.freehand.isDrawing()||m.apply(this,arguments)}}if(null!=F.freehand){var u=F.freehand.createStyle;F.freehand.createStyle=
+"position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";n=z.diagramContainer.parentNode;t=document.createElement("div");t.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";z.diagramContainer.style.top="47px";var N=Editor.addBoxImage;if(null!=z.hoverIcons){var m=z.hoverIcons.update;z.hoverIcons.update=function(){E.freehand.isDrawing()||m.apply(this,arguments)}}if(null!=E.freehand){var u=E.freehand.createStyle;E.freehand.createStyle=
function(W){return u.apply(this,arguments)+"sketch=0;"}}z.editor.addListener("statusChanged",mxUtils.bind(this,function(){z.setStatusText(z.editor.getStatus())}));z.setStatusText(z.editor.getStatus());var A=z.menus.get("viewZoom");if(null!=A){var B=function(W){if(mxEvent.isAltDown(W))z.hideCurrentMenu(),z.actions.get("customZoom").funct(),mxEvent.consume(W);else if("geMenuItem"==mxEvent.getSource(W).className||mxEvent.isShiftDown(W))z.hideCurrentMenu(),z.actions.get("smartFit").funct(),mxEvent.consume(W)},
H=z.actions.get("zoomIn"),T=z.actions.get("zoomOut"),k=z.actions.get("resetView"),v=z.actions.get("undo"),G=z.actions.get("redo"),I=e("",v.funct,null,mxResources.get("undo")+" ("+v.shortcut+")",v,Editor.undoImage),M=e("",G.funct,null,mxResources.get("redo")+" ("+G.shortcut+")",G,Editor.redoImage),P=e("",B,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);C.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";
this.tabContainer.style.right="70px";var S=R.addMenu("100%",A.funct);S.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");S.className="geTabItem";S.style.height=z.tabContainerHeight+"px";S.style.position="absolute";S.style.display="0"!=urlParams.pages?"flex":"none";S.style.alignItems="center";S.style.justifyContent="center";S.style.paddingRight="11px";S.style.whiteSpace="nowrap";S.style.overflow="hidden";S.style.fontSize="11px";S.style.width="51px";S.style.right="0px";S.style.bottom=
"0px";S.style.boxSizing="content-box";S.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";S.style.backgroundPosition="right 6px top 15px";S.style.backgroundRepeat="no-repeat";S.style.backgroundSize="10px";S.style.zIndex="1";t.appendChild(S);(function(W){mxEvent.addListener(W,"click",B);var X=mxUtils.bind(this,function(Z,Y,ba){W.innerText="";mxUtils.write(W,Math.round(100*z.editor.graph.view.scale*(null!=ba?ba:1))+"%")});z.editor.graph.view.addListener(mxEvent.EVENT_SCALE,X);z.editor.addListener("resetGraphView",
X);z.editor.addListener("pageSelected",X);z.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(Z,Y){X(Z,Y,Y.getProperty("factor"))}))})(S);var V=z.setGraphEnabled;z.setGraphEnabled=function(){V.apply(this,arguments);null!=this.tabContainer&&(S.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}t.appendChild(C);t.appendChild(z.diagramContainer);
n.appendChild(t);z.updateTabContainer();!EditorUi.windowed&&1E3<=d&&b(this,!0);t.appendChild(z.tabContainer);p();z.addListener("lockedChanged",p);mxEvent.addListener(window,"resize",function(){p();null!=z.sidebarWindow&&z.sidebarWindow.window.fit();null!=z.formatWindow&&z.formatWindow.window.fit();null!=z.actions.outlineWindow&&z.actions.outlineWindow.window.fit();null!=z.actions.layersWindow&&z.actions.layersWindow.window.fit();null!=z.menus.chatWindow&&z.menus.chatWindow.window.fit();null!=z.menus.tagsWindow&&
-z.menus.tagsWindow.window.fit();null!=z.menus.findWindow&&z.menus.findWindow.window.fit();null!=z.menus.findReplaceWindow&&z.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var g=EditorUi.initTheme;EditorUi.initTheme=function(){g.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,y,x){var D=q.y,J=q.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=q){var N=this,c=new mxCellState,e=this.graph.getView().scale,f=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+J;c.y=d.y+D;c.width=d.width;c.height=d.height;for(var p=[],n=[],t=0;t<this.states.length;t++){var z=this.states[t];z instanceof mxCellState&&(x||!this.graph.isCellSelected(z.cell))&&((c.x>=z.x&&c.x<=z.x+z.width||z.x>=c.x&&z.x<=c.x+c.width)&&(c.y>
-z.y+z.height+4||c.y+c.height+4<z.y)?p.push(z):(c.y>=z.y&&c.y<=z.y+z.height||z.y>=c.y&&z.y<=c.y+c.height)&&(c.x>z.x+z.width+4||c.x+c.width+4<z.x)&&n.push(z))}var F=0,C=0,E=z=0,R=0,U=0,O=0,Q=0,m=5*e;if(1<p.length){p.push(c);p.sort(function(H,T){return H.y-T.y});var u=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];z=C=E=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var A=p[t+1],B=c==e||c==A;A=A.y-e.y-e.height;u|=c==e;if(0==C&&0==
-F)C=A,F=1;else if(Math.abs(C-A)<=(B||1==t&&u?f:0))F+=1;else if(1<F&&u){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!u)F=0,z=C=0!=E?E:0,p.splice(0,0==t?1:t),t=-1;else break;0!=z||B||(C=z=A)}3==p.length&&p[1]==c&&(z=0)}if(1<n.length){n.push(c);n.sort(function(H,T){return H.x-T.x});u=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];O=U=Q=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];A=n[t+1];B=c==e||c==A;A=A.x-e.x-e.width;u|=c==e;
-if(0==U&&0==R)U=A,R=1;else if(Math.abs(U-A)<=(B||1==t&&u?f:0))R+=1;else if(1<R&&u){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!u)R=0,O=U=0!=Q?Q:0,n.splice(0,0==t?1:t),t=-1;else break;0!=O||B||(U=O=A)}3==n.length&&n[1]==c&&(O=0)}f=function(H,T,k,v){var G=[];if(v){v=m;var I=0}else v=0,I=m;G.push(new mxPoint(H.x-v,H.y-I));G.push(new mxPoint(H.x+v,H.y+I));G.push(H);G.push(T);G.push(new mxPoint(T.x-v,T.y-I));G.push(new mxPoint(T.x+v,T.y+I));if(null!=k)return k.points=G,k;H=new mxPolyline(G,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(N.graph.getView().getOverlayPane());return H};U=function(H,T){if(H&&null!=N.guidesArrHor)for(H=0;H<N.guidesArrHor.length;H++)N.guidesArrHor[H].node.style.visibility="hidden";if(T&&null!=N.guidesArrVer)for(H=0;H<N.guidesArrVer.length;H++)N.guidesArrVer[H].node.style.visibility="hidden"};if(1<R&&R==n.length-1){R=[];Q=N.guidesArrHor;K=[];J=0;t=n[0]==c?1:0;u=n[t].y+n[t].height;if(0<O)for(t=0;t<n.length-1;t++)e=
-n[t],A=n[t+1],c==e?(J=A.x-e.width-O,K.push(new mxPoint(J+e.width+m,u)),K.push(new mxPoint(A.x-m,u))):c==A?(K.push(new mxPoint(e.x+e.width+m,u)),J=e.x+e.width+O,K.push(new mxPoint(J-m,u))):(K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(A.x-m,u)));else e=n[0],t=n[2],J=e.x+e.width+(t.x-e.x-e.width-c.width)/2,K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(J-m,u)),K.push(new mxPoint(J+c.width+m,u)),K.push(new mxPoint(t.x-m,u));for(t=0;t<K.length;t+=2)n=K[t],O=K[t+1],n=f(n,O,null!=Q?
-Q[t/2]:null),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=K.length/2;null!=Q&&t<Q.length;t++)Q[t].destroy();N.guidesArrHor=R;J-=d.x;K=!0}else U(!0);if(1<F&&F==p.length-1){R=[];Q=N.guidesArrVer;L=[];D=0;t=p[0]==c?1:0;F=p[t].x+p[t].width;if(0<z)for(t=0;t<p.length-1;t++)e=p[t],A=p[t+1],c==e?(D=A.y-e.height-z,L.push(new mxPoint(F,D+e.height+m)),L.push(new mxPoint(F,A.y-m))):c==A?(L.push(new mxPoint(F,e.y+e.height+m)),D=e.y+e.height+z,L.push(new mxPoint(F,D-m))):(L.push(new mxPoint(F,e.y+
-e.height+m)),L.push(new mxPoint(F,A.y-m)));else e=p[0],t=p[2],D=e.y+e.height+(t.y-e.y-e.height-c.height)/2,L.push(new mxPoint(F,e.y+e.height+m)),L.push(new mxPoint(F,D-m)),L.push(new mxPoint(F,D+c.height+m)),L.push(new mxPoint(F,t.y-m));for(t=0;t<L.length;t+=2)n=L[t],O=L[t+1],n=f(n,O,null!=Q?Q[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=L.length/2;null!=Q&&t<Q.length;t++)Q[t].destroy();N.guidesArrVer=R;D-=d.y;L=!0}else U(!1,!0)}if(K||L)return c=new mxPoint(J,D),p=b.call(this,
+z.menus.tagsWindow.window.fit();null!=z.menus.findWindow&&z.menus.findWindow.window.fit();null!=z.menus.findReplaceWindow&&z.menus.findReplaceWindow.window.fit()})}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var g=EditorUi.initTheme;EditorUi.initTheme=function(){g.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,q,y,x){var D=q.y,J=q.x,K=!1,L=!1;if(null!=this.states&&null!=d&&null!=q){var Q=this,c=new mxCellState,e=this.graph.getView().scale,f=Math.max(2,this.getGuideTolerance()/2);c.x=d.x+J;c.y=d.y+D;c.width=d.width;c.height=d.height;for(var p=[],n=[],t=0;t<this.states.length;t++){var z=this.states[t];z instanceof mxCellState&&(x||!this.graph.isCellSelected(z.cell))&&((c.x>=z.x&&c.x<=z.x+z.width||z.x>=c.x&&z.x<=c.x+c.width)&&(c.y>
+z.y+z.height+4||c.y+c.height+4<z.y)?p.push(z):(c.y>=z.y&&c.y<=z.y+z.height||z.y>=c.y&&z.y<=c.y+c.height)&&(c.x>z.x+z.width+4||c.x+c.width+4<z.x)&&n.push(z))}var E=0,C=0,F=z=0,R=0,U=0,O=0,N=0,m=5*e;if(1<p.length){p.push(c);p.sort(function(H,T){return H.y-T.y});var u=!1;t=c==p[0];e=c==p[p.length-1];if(!t&&!e)for(t=1;t<p.length-1;t++)if(c==p[t]){e=p[t-1];t=p[t+1];z=C=F=(t.y-e.y-e.height-c.height)/2;break}for(t=0;t<p.length-1;t++){e=p[t];var A=p[t+1],B=c==e||c==A;A=A.y-e.y-e.height;u|=c==e;if(0==C&&0==
+E)C=A,E=1;else if(Math.abs(C-A)<=(B||1==t&&u?f:0))E+=1;else if(1<E&&u){p=p.slice(0,t+1);break}else if(3<=p.length-t&&!u)E=0,z=C=0!=F?F:0,p.splice(0,0==t?1:t),t=-1;else break;0!=z||B||(C=z=A)}3==p.length&&p[1]==c&&(z=0)}if(1<n.length){n.push(c);n.sort(function(H,T){return H.x-T.x});u=!1;t=c==n[0];e=c==n[n.length-1];if(!t&&!e)for(t=1;t<n.length-1;t++)if(c==n[t]){e=n[t-1];t=n[t+1];O=U=N=(t.x-e.x-e.width-c.width)/2;break}for(t=0;t<n.length-1;t++){e=n[t];A=n[t+1];B=c==e||c==A;A=A.x-e.x-e.width;u|=c==e;
+if(0==U&&0==R)U=A,R=1;else if(Math.abs(U-A)<=(B||1==t&&u?f:0))R+=1;else if(1<R&&u){n=n.slice(0,t+1);break}else if(3<=n.length-t&&!u)R=0,O=U=0!=N?N:0,n.splice(0,0==t?1:t),t=-1;else break;0!=O||B||(U=O=A)}3==n.length&&n[1]==c&&(O=0)}f=function(H,T,k,v){var G=[];if(v){v=m;var I=0}else v=0,I=m;G.push(new mxPoint(H.x-v,H.y-I));G.push(new mxPoint(H.x+v,H.y+I));G.push(H);G.push(T);G.push(new mxPoint(T.x-v,T.y-I));G.push(new mxPoint(T.x+v,T.y+I));if(null!=k)return k.points=G,k;H=new mxPolyline(G,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);H.dialect=mxConstants.DIALECT_SVG;H.pointerEvents=!1;H.init(Q.graph.getView().getOverlayPane());return H};U=function(H,T){if(H&&null!=Q.guidesArrHor)for(H=0;H<Q.guidesArrHor.length;H++)Q.guidesArrHor[H].node.style.visibility="hidden";if(T&&null!=Q.guidesArrVer)for(H=0;H<Q.guidesArrVer.length;H++)Q.guidesArrVer[H].node.style.visibility="hidden"};if(1<R&&R==n.length-1){R=[];N=Q.guidesArrHor;K=[];J=0;t=n[0]==c?1:0;u=n[t].y+n[t].height;if(0<O)for(t=0;t<n.length-1;t++)e=
+n[t],A=n[t+1],c==e?(J=A.x-e.width-O,K.push(new mxPoint(J+e.width+m,u)),K.push(new mxPoint(A.x-m,u))):c==A?(K.push(new mxPoint(e.x+e.width+m,u)),J=e.x+e.width+O,K.push(new mxPoint(J-m,u))):(K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(A.x-m,u)));else e=n[0],t=n[2],J=e.x+e.width+(t.x-e.x-e.width-c.width)/2,K.push(new mxPoint(e.x+e.width+m,u)),K.push(new mxPoint(J-m,u)),K.push(new mxPoint(J+c.width+m,u)),K.push(new mxPoint(t.x-m,u));for(t=0;t<K.length;t+=2)n=K[t],O=K[t+1],n=f(n,O,null!=N?
+N[t/2]:null),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=K.length/2;null!=N&&t<N.length;t++)N[t].destroy();Q.guidesArrHor=R;J-=d.x;K=!0}else U(!0);if(1<E&&E==p.length-1){R=[];N=Q.guidesArrVer;L=[];D=0;t=p[0]==c?1:0;E=p[t].x+p[t].width;if(0<z)for(t=0;t<p.length-1;t++)e=p[t],A=p[t+1],c==e?(D=A.y-e.height-z,L.push(new mxPoint(E,D+e.height+m)),L.push(new mxPoint(E,A.y-m))):c==A?(L.push(new mxPoint(E,e.y+e.height+m)),D=e.y+e.height+z,L.push(new mxPoint(E,D-m))):(L.push(new mxPoint(E,e.y+
+e.height+m)),L.push(new mxPoint(E,A.y-m)));else e=p[0],t=p[2],D=e.y+e.height+(t.y-e.y-e.height-c.height)/2,L.push(new mxPoint(E,e.y+e.height+m)),L.push(new mxPoint(E,D-m)),L.push(new mxPoint(E,D+c.height+m)),L.push(new mxPoint(E,t.y-m));for(t=0;t<L.length;t+=2)n=L[t],O=L[t+1],n=f(n,O,null!=N?N[t/2]:null,!0),n.node.style.visibility="visible",n.redraw(),R.push(n);for(t=L.length/2;null!=N&&t<N.length;t++)N[t].destroy();Q.guidesArrVer=R;D-=d.y;L=!0}else U(!1,!0)}if(K||L)return c=new mxPoint(J,D),p=b.call(this,
d,c,y,x),K&&!L?c.y=p.y:L&&!K&&(c.x=p.x),p.y!=c.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),p.x!=c.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),c;U(!0,!0);return b.apply(this,arguments)};var g=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){g.call(this,d);var q=this.guidesArrVer,y=this.guidesArrHor;if(null!=q)for(var x=0;x<q.length;x++)q[x].node.style.visibility=d?"visible":"hidden";if(null!=
-y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=q){for(y=0;y<q.length;y++)q[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,l,d){function q(){var F=b.diagramContainer;N.style.top=F.offsetTop-J+"px";N.style.left=F.offsetLeft-J+"px";N.style.width=(l?0:F.offsetWidth)+J+"px";N.style.height=(l?F.offsetHeight:0)+J+"px"}function y(F,C,E){if(null!=x)return F;var R;return function(){var U=this,O=arguments,Q=E&&!R;clearTimeout(R);R=setTimeout(function(){R=null;E||F.apply(U,O)},C);Q&&F.apply(U,O)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
-D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,K=this;this.unit=g;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},N=document.createElement("div");N.className="geRuler";N.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){L=
-Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};N.style[l?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;N.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(N);mxEvent.disableContextMenu(N);this.editorUiRefresh=b.refresh;b.refresh=function(F){K.editorUiRefresh.apply(b,
-arguments);q()};q();var c=document.createElement("canvas");c.width=N.offsetWidth;c.height=N.offsetHeight;N.style.overflow="hidden";c.style.position="relative";N.appendChild(c);var e=c.getContext("2d");this.ui=b;var f=b.editor.graph;this.graph=f;this.container=N;this.canvas=c;var p=function(F,C,E,R,U){F=Math.round(F);C=Math.round(C);E=Math.round(E);R=Math.round(R);e.beginPath();e.moveTo(F+.5,C+.5);e.lineTo(E+.5,R+.5);e.stroke();U&&(l?(e.save(),e.translate(F,C),e.rotate(-Math.PI/2),e.fillText(U,0,0),
-e.restore()):e.fillText(U,F,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=L.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var F=f.view.scale,C=f.view.getBackgroundPageBounds(),E=f.view.translate,R=f.pageVisible;E=R?J+(l?C.y-f.container.scrollTop:C.x-f.container.scrollLeft):J+(l?E.y*F-f.container.scrollTop:E.x*F-f.container.scrollLeft);var U=0;R&&(U=f.getPageLayout(),U=l?U.y*f.pageFormat.height:U.x*f.pageFormat.width);var O;switch(K.unit){case mxConstants.POINTS:var Q=
-O=10;var m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;Q=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;Q=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=F||4<=F?8:16,Q=mxConstants.PIXELS_PER_INCH/O,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var u=Q;2<=F?u=Q/(2*Math.floor(F/2)):.5>=F&&(u=Q*Math.floor(1/F/2)*(K.unit==mxConstants.MILLIMETERS?2:1));Q=null;C=R?Math.min(E+(l?C.height:C.width),l?
-c.height:c.width):l?c.height:c.width;if(R)if(e.fillStyle=L.outBkgClr,l){var A=E-J;0<A&&e.fillRect(0,J,J,A);C<c.height&&e.fillRect(0,C,J,c.height)}else A=E-J,0<A&&e.fillRect(J,0,A,J),C<c.width&&e.fillRect(C,0,c.width,J);e.fillStyle=L.fontClr;for(R=R?E:E%(u*F);R<=C;R+=u*F)if(A=Math.round((R-E)/F/u),!(R<J||A==Q)){Q=A;var B=null;0==A%O&&(B=K.formatText(U+A*u)+"");l?p(J-m[Math.abs(A)%O],R,J,R,B):p(R,J-m[Math.abs(A)%O],R,J,B)}e.lineWidth=1;p(l?0:J,l?J:0,J,J);e.fillStyle=L.cornerClr;e.fillRect(0,0,J,J)},
-t=-1,z=function(){null!=x?(null!=D&&D(t),t=x(n)):n()};this.drawRuler=z;this.sizeListener=g=y(function(){var F=f.container;l?(F=F.offsetHeight+J,c.height!=F&&(c.height=F,N.style.height=F+"px",z())):(F=F.offsetWidth+J,c.width!=F&&(c.width=F,N.style.width=F+"px",z()))},10);this.pageListener=function(){z()};this.scrollListener=d=y(function(){var F=l?f.container.scrollTop:f.container.scrollLeft;K.lastScroll!=F&&(K.lastScroll=F,z())},10);this.unitListener=function(F,C){K.setUnit(C.getProperty("unit"))};
-f.addListener(mxEvent.SIZE,g);f.container.addEventListener("scroll",d);f.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(F){L=F;N.style.background=L.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(F,C,E,R){if(l&&4<F.height||!l&&4<F.width){if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,
-K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(v){}var U=K.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=L.guideClr;e.setLineDash([2]);if(l){var O=F.y+U.y+J-this.graph.container.scrollTop;var Q=0;var m=O+F.height/2;var u=J/2;var A=O+F.height;var B=0;var H=e.getImageData(Q,O-1,J,3);p(Q,O,J,O);O--;var T=e.getImageData(u,m-1,J,3);p(u,m,J,m);m--;var k=e.getImageData(B,
-A-1,J,3);p(B,A,J,A);A--}else O=0,Q=F.x+U.x+J-this.graph.container.scrollLeft,m=J/2,u=Q+F.width/2,A=0,B=Q+F.width,H=e.getImageData(Q-1,O,3,J),p(Q,O,Q,J),Q--,T=e.getImageData(u-1,m,3,J),p(u,m,u,J),u--,k=e.getImageData(B-1,A,3,J),p(B,A,B,J),B--;if(null==K.guidePart||K.guidePart.x1!=Q||K.guidePart.y1!=O)K.guidePart={imgData1:H,x1:Q,y1:O,imgData2:T,x2:u,y2:m,imgData3:k,x3:B,y3:A}}catch(v){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
-function(){var F=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(C){}return F}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
+y)for(x=0;x<y.length;x++)y[x].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,q=this.guidesArrHor;if(null!=d){for(var y=0;y<d.length;y++)d[y].destroy();this.guidesArrVer=null}if(null!=q){for(y=0;y<q.length;y++)q[y].destroy();this.guidesArrHor=null}}})();function mxRuler(b,g,l,d){function q(){var E=b.diagramContainer;Q.style.top=E.offsetTop-J+"px";Q.style.left=E.offsetLeft-J+"px";Q.style.width=(l?0:E.offsetWidth)+J+"px";Q.style.height=(l?E.offsetHeight:0)+J+"px"}function y(E,C,F){if(null!=x)return E;var R;return function(){var U=this,O=arguments,N=F&&!R;clearTimeout(R);R=setTimeout(function(){R=null;F||E.apply(U,O)},C);N&&E.apply(U,O)}}var x=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+D=window.cancelAnimationFrame||window.mozCancelAnimationFrame,J=this.RULER_THICKNESS,K=this;this.unit=g;var L=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},Q=document.createElement("div");Q.className="geRuler";Q.style.position="fixed";this.updateStyle=mxUtils.bind(this,function(){L=
+Editor.isDarkMode()?{outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};Q.style[l?"borderRight":"borderBottom"]="0.5px solid "+L.strokeClr;Q.style.borderLeft="0.5px solid "+L.strokeClr});this.updateStyle();b.diagramContainer.appendChild(Q);mxEvent.disableContextMenu(Q);this.editorUiRefresh=b.refresh;b.refresh=function(E){K.editorUiRefresh.apply(b,
+arguments);q()};q();var c=document.createElement("canvas");c.width=Q.offsetWidth;c.height=Q.offsetHeight;Q.style.overflow="hidden";c.style.position="relative";Q.appendChild(c);var e=c.getContext("2d");this.ui=b;var f=b.editor.graph;this.graph=f;this.container=Q;this.canvas=c;var p=function(E,C,F,R,U){E=Math.round(E);C=Math.round(C);F=Math.round(F);R=Math.round(R);e.beginPath();e.moveTo(E+.5,C+.5);e.lineTo(F+.5,R+.5);e.stroke();U&&(l?(e.save(),e.translate(E,C),e.rotate(-Math.PI/2),e.fillText(U,0,0),
+e.restore()):e.fillText(U,E,C))},n=function(){e.clearRect(0,0,c.width,c.height);e.beginPath();e.lineWidth=.7;e.strokeStyle=L.strokeClr;e.setLineDash([]);e.font="9px Arial";e.textAlign="center";var E=f.view.scale,C=f.view.getBackgroundPageBounds(),F=f.view.translate,R=f.pageVisible;F=R?J+(l?C.y-f.container.scrollTop:C.x-f.container.scrollLeft):J+(l?F.y*E-f.container.scrollTop:F.x*E-f.container.scrollLeft);var U=0;R&&(U=f.getPageLayout(),U=l?U.y*f.pageFormat.height:U.x*f.pageFormat.width);var O;switch(K.unit){case mxConstants.POINTS:var N=
+O=10;var m=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:O=10;N=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:O=20;N=mxConstants.PIXELS_PER_MM;m=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:O=.5>=E||4<=E?8:16,N=mxConstants.PIXELS_PER_INCH/O,m=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var u=N;2<=E?u=N/(2*Math.floor(E/2)):.5>=E&&(u=N*Math.floor(1/E/2)*(K.unit==mxConstants.MILLIMETERS?2:1));N=null;C=R?Math.min(F+(l?C.height:C.width),l?
+c.height:c.width):l?c.height:c.width;if(R)if(e.fillStyle=L.outBkgClr,l){var A=F-J;0<A&&e.fillRect(0,J,J,A);C<c.height&&e.fillRect(0,C,J,c.height)}else A=F-J,0<A&&e.fillRect(J,0,A,J),C<c.width&&e.fillRect(C,0,c.width,J);e.fillStyle=L.fontClr;for(R=R?F:F%(u*E);R<=C;R+=u*E)if(A=Math.round((R-F)/E/u),!(R<J||A==N)){N=A;var B=null;0==A%O&&(B=K.formatText(U+A*u)+"");l?p(J-m[Math.abs(A)%O],R,J,R,B):p(R,J-m[Math.abs(A)%O],R,J,B)}e.lineWidth=1;p(l?0:J,l?J:0,J,J);e.fillStyle=L.cornerClr;e.fillRect(0,0,J,J)},
+t=-1,z=function(){null!=x?(null!=D&&D(t),t=x(n)):n()};this.drawRuler=z;this.sizeListener=g=y(function(){var E=f.container;l?(E=E.offsetHeight+J,c.height!=E&&(c.height=E,Q.style.height=E+"px",z())):(E=E.offsetWidth+J,c.width!=E&&(c.width=E,Q.style.width=E+"px",z()))},10);this.pageListener=function(){z()};this.scrollListener=d=y(function(){var E=l?f.container.scrollTop:f.container.scrollLeft;K.lastScroll!=E&&(K.lastScroll=E,z())},10);this.unitListener=function(E,C){K.setUnit(C.getProperty("unit"))};
+f.addListener(mxEvent.SIZE,g);f.container.addEventListener("scroll",d);f.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(E){L=E;Q.style.background=L.bkgClr;n()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(E,C,F,R){if(l&&4<E.height||!l&&4<E.width){if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,
+K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3)}catch(v){}var U=K.origGuideMove.apply(this,arguments);try{e.lineWidth=.5;e.strokeStyle=L.guideClr;e.setLineDash([2]);if(l){var O=E.y+U.y+J-this.graph.container.scrollTop;var N=0;var m=O+E.height/2;var u=J/2;var A=O+E.height;var B=0;var H=e.getImageData(N,O-1,J,3);p(N,O,J,O);O--;var T=e.getImageData(u,m-1,J,3);p(u,m,J,m);m--;var k=e.getImageData(B,
+A-1,J,3);p(B,A,J,A);A--}else O=0,N=E.x+U.x+J-this.graph.container.scrollLeft,m=J/2,u=N+E.width/2,A=0,B=N+E.width,H=e.getImageData(N-1,O,3,J),p(N,O,N,J),N--,T=e.getImageData(u-1,m,3,J),p(u,m,u,J),u--,k=e.getImageData(B-1,A,3,J),p(B,A,B,J),B--;if(null==K.guidePart||K.guidePart.x1!=N||K.guidePart.y1!=O)K.guidePart={imgData1:H,x1:N,y1:O,imgData2:T,x2:u,y2:m,imgData3:k,x3:B,y3:A}}catch(v){}}else U=K.origGuideMove.apply(this,arguments);return U};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=
+function(){var E=K.origGuideDestroy.apply(this,arguments);if(null!=K.guidePart)try{e.putImageData(K.guidePart.imgData1,K.guidePart.x1,K.guidePart.y1),e.putImageData(K.guidePart.imgData2,K.guidePart.x2,K.guidePart.y2),e.putImageData(K.guidePart.imgData3,K.guidePart.x3,K.guidePart.y3),K.guidePart=null}catch(C){}return E}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};
mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener(this.unitListener);this.ui.removeListener(this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,g){var l=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return l};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,g,!0);this.hRuler=new mxRuler(b,g,!1,!0);g=mxUtils.bind(this,function(d){var q=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
function(y){q=null!=b.currentMenu;mxEvent.consume(y)}),null,mxUtils.bind(this,function(y){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(y)||mxEvent.isPopupTrigger(y))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(y)||!q){var x=new mxPopupMenu(mxUtils.bind(this,function(K,L){b.menus.addMenuItems(K,["points","inches","millimeters","meters"],L)}));x.div.className+=" geMenubarMenu";x.smartSeparators=!0;x.showDisabled=!0;x.autoExpand=
!0;x.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(x,arguments);b.resetCurrentMenu();x.destroy()});var D=mxEvent.getClientX(y),J=mxEvent.getClientY(y);x.popup(D,J,null,y);b.setCurrentMenu(x,d)}mxEvent.consume(y)}}))});g(this.hRuler.container);g(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var g=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=g){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.MILD_SMOOTHING,d=null,q=[],y,x=[],D,J=!1,K=!0,L=!0,N=!0,c=!0,e=[],f=!1,p=!1,n=!1,t="default",z={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},F=!0;this.setClosedPath=function(m){J=m};this.setAutoClose=function(m){K=m};this.setAutoInsert=
-function(m){L=m};this.setAutoScroll=function(m){N=m};this.setOpenFill=function(m){c=m};this.setStopClickEnabled=function(m){p=m};this.setSelectInserted=function(m){n=m};this.setSmoothing=function(m){l=m};this.getSmoothing=function(){return l};this.setPerfectFreehandMode=function(m){F=m};this.isPerfectFreehandMode=function(){return F};this.setBrushSize=function(m){z.size=m};this.getBrushSize=function(){return z.size};var C=function(m){f=m;b.getRubberband().setEnabled(!m);b.graphHandler.setSelectEnabled(!m);
-b.graphHandler.setMoveEnabled(!m);b.container.style.cursor=m?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return f};var E=mxUtils.bind(this,function(m){if(d){var u=D.length,A=p&&0<x.length&&null!=D&&2>D.length;A||x.push.apply(x,D);D=[];x.push(null);q.push(d);d=null;(A||L)&&this.stopDrawing();L&&(!A||2<=u)&&this.startDrawing();mxEvent.consume(m)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(m){var u=null!=
-t?t:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=u||m||(u=b.shapeForegroundColor);return u};this.setStrokeColor=function(m){t=m};this.createStyle=function(m){var u=";fillColor=none;";F&&(u=";lineShape=1;");u+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+m+u};this.stopDrawing=function(){if(0<q.length){if(F){for(var m=[],u=0;u<x.length;u++)null!=x[u]&&m.push([x[u].x,
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var g=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=g){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.MILD_SMOOTHING,d=null,q=[],y,x=[],D,J=!1,K=!0,L=!0,Q=!0,c=!0,e=[],f=!1,p=!1,n=!1,t="default",z={size:5,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},E=!0;this.setClosedPath=function(m){J=m};this.setAutoClose=function(m){K=m};this.setAutoInsert=
+function(m){L=m};this.setAutoScroll=function(m){Q=m};this.setOpenFill=function(m){c=m};this.setStopClickEnabled=function(m){p=m};this.setSelectInserted=function(m){n=m};this.setSmoothing=function(m){l=m};this.getSmoothing=function(){return l};this.setPerfectFreehandMode=function(m){E=m};this.isPerfectFreehandMode=function(){return E};this.setBrushSize=function(m){z.size=m};this.getBrushSize=function(){return z.size};var C=function(m){f=m;b.getRubberband().setEnabled(!m);b.graphHandler.setSelectEnabled(!m);
+b.graphHandler.setMoveEnabled(!m);b.container.style.cursor=m?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};this.startDrawing=function(){C(!0)};this.isDrawing=function(){return f};var F=mxUtils.bind(this,function(m){if(d){var u=D.length,A=p&&0<x.length&&null!=D&&2>D.length;A||x.push.apply(x,D);D=[];x.push(null);q.push(d);d=null;(A||L)&&this.stopDrawing();L&&(!A||2<=u)&&this.startDrawing();mxEvent.consume(m)}}),R=new mxCell;R.edge=!0;this.getStrokeColor=function(m){var u=null!=
+t?t:mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(b.getCurrentCellStyle(R),mxConstants.STYLE_STROKECOLOR,"#000"));"default"!=u||m||(u=b.shapeForegroundColor);return u};this.setStrokeColor=function(m){t=m};this.createStyle=function(m){var u=";fillColor=none;";E&&(u=";lineShape=1;");u+="strokeColor="+this.getStrokeColor(!0)+";";return mxConstants.STYLE_SHAPE+"="+m+u};this.stopDrawing=function(){if(0<q.length){if(E){for(var m=[],u=0;u<x.length;u++)null!=x[u]&&m.push([x[u].x,
x[u].y]);m=PerfectFreehand.getStroke(m,z);x=[];for(u=0;u<m.length;u++)x.push({x:m[u][0],y:m[u][1]});x.push(null)}m=x[0].x;var A=x[0].x,B=x[0].y,H=x[0].y;for(u=1;u<x.length;u++)null!=x[u]&&(m=Math.max(m,x[u].x),A=Math.min(A,x[u].x),B=Math.max(B,x[u].y),H=Math.min(H,x[u].y));m-=A;B-=H;if(0<m&&0<B){var T=100/m,k=100/B;x.map(function(P){if(null==P)return P;P.x=(P.x-A)*T;P.y=(P.y-H)*k;return P});var v='<shape strokewidth="inherit"><foreground>',G=0;for(u=0;u<x.length;u++){var I=x[u];if(null==I){I=!1;G=
x[G];var M=x[u-1];!J&&K&&(I=G.x-M.x,M=G.y-M.y,I=Math.sqrt(I*I+M*M)<=b.tolerance);if(J||I)v+='<line x="'+G.x.toFixed(2)+'" y="'+G.y.toFixed(2)+'"/>';v+="</path>"+(c||J||I?"<fillstroke/>":"<stroke/>");G=u+1}else v=u==G?v+('<path><move x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>'):v+('<line x="'+I.x.toFixed(2)+'" y="'+I.y.toFixed(2)+'"/>')}v+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){u=this.createStyle("stencil("+Graph.compress(v)+")");v=b.view.scale;G=b.view.translate;
u=new mxCell("",new mxGeometry(A/v-G.x,H/v-G.y,m/v,B/v),u);u.vertex=1;b.model.beginUpdate();try{u=b.addCell(u),b.fireEvent(new mxEventObject("cellsInserted","cells",[u])),b.fireEvent(new mxEventObject("freehandInserted","cell",u))}finally{b.model.endUpdate()}n&&b.setSelectionCells([u])}}for(u=0;u<q.length;u++)q[u].parentNode.removeChild(q[u]);d=null;q=[];x=[]}C(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(m,u){m=u.getProperty("eventName");u=u.getProperty("event");m==mxEvent.MOUSE_MOVE&&
f&&(null!=u.sourceState&&u.sourceState.setCursor("crosshair"),u.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(m,u){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(m=u.getEvent(),f&&!mxEvent.isPopupTrigger(m)&&!mxEvent.isMiddleMouseButton(m)&&!mxEvent.isMultiTouchEvent(m))){var A=parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);A=Math.max(1,A*b.view.scale);var B=this.getStrokeColor();d=document.createElementNS("http://www.w3.org/2000/svg","path");
-d.setAttribute("fill",F?B:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",B);d.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(H){return parseFloat(H)*A}).join(" "),d.setAttribute("stroke-dasharray",B));e=[];m=U(m);O(m);y="M"+m.x+" "+m.y;x.push(m);D=[];d.setAttribute("d",F?PerfectFreehand.getSvgPathFromStroke([[m.x,m.y]],z):y);g.appendChild(d);u.consume()}}),
-mouseMove:mxUtils.bind(this,function(m,u){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){m=u.getEvent();m=U(m);O(m);var A=Q(0);if(A)if(x.push(A),F){var B=[];for(A=0;A<x.length;A++)B.push([x[A].x,x[A].y]);D=[];for(var H=2;H<e.length;H+=2)A=Q(H),B.push([A.x,A.y]),D.push(A);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,z))}else{y+=" L"+A.x+" "+A.y;B="";D=[];for(H=2;H<e.length;H+=2)A=Q(H),B+=" L"+A.x+" "+A.y,D.push(A);d.setAttribute("d",y+B)}N&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(m.x-
-A.x,m.y-A.y)).grow(20)));u.consume()}}),mouseUp:mxUtils.bind(this,function(m,u){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(E(u.getEvent()),u.consume())})});var U=function(m){return mxUtils.convertPoint(b.container,mxEvent.getClientX(m),mxEvent.getClientY(m))},O=function(m){for(e.push(m);e.length>l;)e.shift()},Q=function(m){var u=e.length;if(1===u%2||u>=l){var A=0,B=0,H,T=0;for(H=m;H<u;H++)T++,m=e[H],A+=m.x,B+=m.y;return{x:A/T,y:B/T}}return null}}}
+d.setAttribute("fill",E?B:"none");d.setAttribute("pointer-events","none");d.setAttribute("stroke",B);d.setAttribute("stroke-width",A);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(B=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",B=B.split(" ").map(function(H){return parseFloat(H)*A}).join(" "),d.setAttribute("stroke-dasharray",B));e=[];m=U(m);O(m);y="M"+m.x+" "+m.y;x.push(m);D=[];d.setAttribute("d",E?PerfectFreehand.getSvgPathFromStroke([[m.x,m.y]],z):y);g.appendChild(d);u.consume()}}),
+mouseMove:mxUtils.bind(this,function(m,u){if(null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){m=u.getEvent();m=U(m);O(m);var A=N(0);if(A)if(x.push(A),E){var B=[];for(A=0;A<x.length;A++)B.push([x[A].x,x[A].y]);D=[];for(var H=2;H<e.length;H+=2)A=N(H),B.push([A.x,A.y]),D.push(A);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(B,z))}else{y+=" L"+A.x+" "+A.y;B="";D=[];for(H=2;H<e.length;H+=2)A=N(H),B+=" L"+A.x+" "+A.y,D.push(A);d.setAttribute("d",y+B)}Q&&(A=b.view.translate,b.scrollRectToVisible((new mxRectangle(m.x-
+A.x,m.y-A.y)).grow(20)));u.consume()}}),mouseUp:mxUtils.bind(this,function(m,u){null!=d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(F(u.getEvent()),u.consume())})});var U=function(m){return mxUtils.convertPoint(b.container,mxEvent.getClientX(m),mxEvent.getClientY(m))},O=function(m){for(e.push(m);e.length>l;)e.shift()},N=function(m){var u=e.length;if(1===u%2||u>=l){var A=0,B=0,H,T=0;for(H=m;H<u;H++)T++,m=e[H],A+=m.x,B+=m.y;return{x:A/T,y:B/T}}return null}}}
mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,g,l,d,q){this.id=b;this.email=g;this.displayName=l;this.pictureUrl=d;this.locale=q};DrawioComment=function(b,g,l,d,q,y,x){this.file=b;this.id=g;this.content=l;this.modifiedDate=d;this.createdDate=q;this.isResolved=y;this.user=x;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,g,l,d,q){g()};DrawioComment.prototype.editComment=function(b,g,l){g()};DrawioComment.prototype.deleteComment=function(b,g){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function g(w){if(w&&null!=LucidImporter.imgSrcRepl){var F=LucidImporter.imgSrcRepl.attMap;if(F[w])w=F[w];else{F=LucidImporter.imgSrcRepl.imgRepl;for(var D=0;D<F.length;D++){var u=F[D];w=w.replace(u.searchVal,u.replVal)}LucidImporter.hasExtImgs=!0}}return w}function y(w){lb="";try{if(w){var F=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(F=LucidImporter.advImpConfig.fontMapping[w]);if(F){for(var D in F)lb+=D+"="+F[D]+";";return F.fontFamily?"font-family: "+F.fontFamily:
""}if("Liberation Sans"!=w)return lb="fontFamily="+w+";","font-family: "+w+";"}}catch(u){}return""}function z(w){return Math.round(10*w)/10}function B(w,F,D){function u(la,Ma){var ya="",za=la.t,Pb=la.l||{v:za&&"ul"==za.v?"auto":"decimal"};if(null==za||0!=Na&&Na==za.v&&Ka==Pb.v)null==za&&(Na&&(ya+=P(!0),Na=!1),ya+='<div style="',Ca.push("div"));else{Na&&(ya+=P(!0));Na=za.v;Ka=Pb.v;"ul"==za.v?(ya+="<ul ",Ca.push("ul")):(ya+="<ol ",Ca.push("ol"));ya+='style="margin: 0px; padding-left: 10px;list-style-position: inside; list-style-type:';
-if("hl"==za.v)ya+="upper-roman";else switch(Pb.v){case "auto":ya+="disc";break;case "inv":ya+="circle";break;case "disc":ya+="circle";break;case "trib":ya+="square";break;case "square":ya+="square";break;case "dash":ya+="square";break;case "heart":ya+="disc";break;default:ya+="decimal"}ya+='">'}if(null!=za){ya+='<li style="text-align:'+(la.a?la.a.v:D.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var fa=Ma.c.v;if(Ma.s)var xb=Ma.s.v}try{var Va=aa[ja],rc=ra[Aa];Ma=ja;if(Va&&rc&&Va.s<rc.e)for(var vc=
+if("hl"==za.v)ya+="upper-roman";else switch(Pb.v){case "auto":ya+="disc";break;case "inv":ya+="circle";break;case "disc":ya+="circle";break;case "trib":ya+="square";break;case "square":ya+="square";break;case "dash":ya+="square";break;case "heart":ya+="disc";break;default:ya+="decimal"}ya+='">'}if(null!=za){ya+='<li style="text-align:'+(la.a?la.a.v:D.TextAlign||"center")+";";if(null!=Ma){if(Ma.c)var fa=Ma.c.v;if(Ma.s)var xb=Ma.s.v}try{var Va=aa[ka],rc=ra[Aa];Ma=ka;if(Va&&rc&&Va.s<rc.e)for(var vc=
Va.s;null!=Va&&Va.s==vc;)"s"==Va.n?xb=Va.v:"c"==Va.n&&(fa=Va.v),Va=aa[++Ma]}catch(Fb){console.log(Fb)}fa=R(fa);null!=fa&&(fa=fa.substring(0,7),ya+="color:"+fa+";");xb&&(ya+="font-size:"+z(.75*xb)+"px;");ya+='">';Ca.push("li");ya+='<span style="';Ca.push("span")}Na||(xb=fa=la.a?la.a.v:D.TextAlign||"center","left"==fa?xb="flex-start":"right"==fa&&(xb="flex-end"),ya+="display: flex; justify-content: "+xb+"; text-align: "+fa+"; align-items: baseline; font-size: 0; line-height: 1.25;");la.il&&(ya+="margin-left: "+
Math.max(0,z(.75*la.il.v-(Na?28:0)))+"px;");la.ir&&(ya+="margin-right: "+z(.75*la.ir.v)+"px;");la.mt&&(ya+="margin-top: "+z(.75*la.mt.v)+"px;");la.mb&&(ya+="margin-bottom: "+z(.75*la.mb.v)+"px;");ya+='margin-top: -2px;">';Na||(ya+="<span>",Ca.push("span"));return ya}function e(la){if(mxUtils.isEmptyObject(la))return"";var Ma="",ya=0;if(la.lk){var za=la.lk;null!=za.v&&0<za.v.length&&(Ma+='<a href="'+n(za.v[0])+'">',Ba.push("a"),ya++)}Ma+='<span style="';Ba.push("span");ya++;Ma+="font-size:"+(la.s&&
la.s.v?z(.75*la.s.v):"13")+"px;";la.c&&(za=R(la.c.v),null!=za&&(za=za.substring(0,7),Ma+="color:"+za+";"));if(la.b&&la.b.v||la.fc&&la.fc.v&&0==la.fc.v.indexOf("Bold"))Ma+="font-weight: bold;";la.i&&la.i.v&&(Ma+="font-style: italic;");la.ac&&la.ac.v&&(Ma+="text-transform: uppercase;");za=null;la.f?za=la.f.v:D.Font&&(za=D.Font);Ma+=y(za);za=[];la.u&&la.u.v&&za.push("underline");la.k&&la.k.v&&za.push("line-through");0<za.length&&(Ma+="text-decoration: "+za.join(" ")+";");Ma+='">';Pa.push(ya);return Ma}
function P(la){var Ma="";do{var ya=Ca.pop();if(!la&&Na&&("ul"==ya||"ol"==ya)){Ca.push(ya);break}Ma+="</"+ya+">"}while(0<Ca.length);return Ma}function r(la,Ma,ya,za){la=la?la.substring(Ma,ya):"";Na&&(la=la.trim());0==Ba.length&&0<la.length&&(la=e({dummy:1})+la);la=la.replace(/</g,"&lt;").replace(/>/g,"&gt;");do for(Ma=Pa.pop(),ya=0;ya<Ma;ya++){var Pb=Ba.pop();la+="</"+Pb+">"}while(za&&0<Ba.length);return la}var p={a:!0,il:!0,ir:!0,mt:!0,mb:!0,p:!0,t:!0,l:!0},Z={lk:!0,s:!0,c:!0,b:!0,fc:!0,i:!0,u:!0,
-k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return p[la.n]});for(var V=[0],wa=0;0<(wa=w.indexOf("\n",wa));)wa++,V.push(wa);for(var ja=wa=0;ja<F.length;ja++){if(F[ja].s>V[wa])F.splice(ja,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ja+na<F.length&&F[ja+na].s==V[wa];)na++;1<na&&(ja+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||
-"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ja=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=w.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(w,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:w.length;V+=u(ma,na);ua&&(V+=e(na));ua=!0}for(;ja>=Aa&&(ja<aa.length||Aa<ra.length);)if(Ea=aa[ja],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<
-La-l&&(V+=e(na)+r(w,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ja];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(w,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ja,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(w,l,Ia)),V+=P(!0));return V}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:
+k:!0,f:!0,ac:!0};F.sort(function(la,Ma){return la.s-Ma.s});var aa=F.filter(function(la){return Z[la.n]});aa[0]&&0!=aa[0].s&&aa.unshift({s:0,n:"dummy",v:"",e:aa[0].s});F=F.filter(function(la){return p[la.n]});for(var V=[0],wa=0;0<(wa=w.indexOf("\n",wa));)wa++,V.push(wa);for(var ka=wa=0;ka<F.length;ka++){if(F[ka].s>V[wa])F.splice(ka,0,{s:V[wa],n:"a",v:D.TextAlign||"center"});else{for(var na=0;ka+na<F.length&&F[ka+na].s==V[wa];)na++;1<na&&(ka+=na-1)}wa++}null!=V[wa]&&F.push({s:V[wa],n:"a",v:D.TextAlign||
+"center"});V="";var ra=aa.slice();ra.sort(function(la,Ma){return la.e-Ma.e});var Aa=ka=0;wa=0;na={};for(var ma={},Ba=[],Pa=[],Ca=[],ua=!1,Na=!1,Ka,La=0,l=0,Ia=w.length,bb=!0;wa<F.length||bb;){bb=!1;if(wa<F.length){var Ea=F[wa],Ra=F[wa].s;ua&&(ma={},V+=r(w,La,Ia,!0),l=La=Ia,V+=P());for(;null!=Ea&&Ea.s==Ra;)ma[Ea.n]=Ea,Ea=F[++wa];Ia=null!=Ea?Ea.s:w.length;V+=u(ma,na);ua&&(V+=e(na));ua=!0}for(;ka>=Aa&&(ka<aa.length||Aa<ra.length);)if(Ea=aa[ka],Ra=ra[Aa],Ea&&Ra&&Ea.s<Ra.e){if(Ea.s>=Ia)break;La=Ea.s;0<
+La-l&&(V+=e(na)+r(w,l,La),l=La);for(;null!=Ea&&Ea.s==La;)na[Ea.n]=Ea,Ea=aa[++ka];V+=e(na)}else if(Ra){if(Ra.e>Ia)break;l=Ra.e;do delete na[Ra.n],Ra=ra[++Aa];while(null!=Ra&&Ra.e==l);V+=r(w,La,l);La=l;0!=Pa.length||null!=Ea&&Ea.s==l||(aa.splice(ka,0,{s:l,n:"dummy",v:""}),ra.splice(Aa,0,{e:Ea?Ea.s:Ia,n:"dummy",v:""}))}else break}V+=r(null,null,null,!0);ua&&(l!=Ia&&(V+=e({dummy:1})+r(w,l,Ia)),V+=P(!0));return V}function m(w,F){G=!1;var D=null!=w.Text&&w.Text.t?w.Text:null!=w.Value&&w.Value.t?w.Value:
null!=w.Lane_0&&w.Lane_0.t?w.Lane_0:null;null==D&&null!=w.State?w.State.t&&(D=w.State):null==D&&null!=w.Note?w.Note.t&&(D=w.Note):null==D&&null!=w.Title?w.Title.t&&(D=w.Title):w.t&&(D=w);null==D&&null!=w.TextAreas?null!=w.TextAreas.Text&&null!=w.TextAreas.Text.Value&&w.TextAreas.Text.Value.t&&(D=w.TextAreas.Text.Value):null==D&&null!=w.t0&&w.t0.t&&(D=w.t0);if(null!=D){if(null!=D.t){var u=D.t;u=u.replace(/\u2028/g,"\n");D=D.m;try{/ /.test(u)&&(LucidImporter.hasUnknownShapes=!0);for(var e=0;e<D.length;e++)if(0<
D[e].s||null!=D[e].e&&D[e].e<u.length||"t"==D[e].n||"ac"==D[e].n||"lk"==D[e].n){G=!0;break}if(G=G||F)return B(u,D,w)}catch(P){console.log(P)}u=u.replace(/</g,"&lt;");return u=u.replace(/>/g,"&gt;")}if(null!=D.Value&&null!=D.Value.t)return D.Value.t=D.Value.t.replace(/</g,"&lt;"),D.Value.t=D.Value.t.replace(/>/g,"&gt;"),D.Value.t}return""}function h(w){return null!=w.Action?w.Action:w}function c(w){if(null!=w.Text){if(null!=w.Text.m)return w.Text.m}else if(null!=w.TextAreas){if(null!=w.TextAreas.Text&&
-null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+M(w)+K(w)+Q(w))+S(w)+H(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");lb=
+null!=w.TextAreas.Text.Value&&null!=w.TextAreas.Text.Value.m)return w.TextAreas.Text.Value.m}else{if(null!=w.m)return w.m;if(null!=w.Title){if(null!=w.Title.m)return w.Title.m}else if(null!=w.State){if(null!=w.State.m)return w.State.m}else if(null!=w.Note&&null!=w.Note.m)return w.Note.m}return null}function a(w,F){w="whiteSpace=wrap;"+(F?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+lb:f(w)+k(w)+q(w)+t(w)+C(w)+I(w)+N(w)+K(w)+O(w))+S(w)+H(w)+Zb(mxConstants.STYLE_ALIGN,w.TextAlign,"center");lb=
"";return w}function b(w,F,D,u,e,P){P=null==P?!1:P;var r="",p=!1,Z=!1;if(null!=w)if(P){P=w.split(";");w="";for(var aa=0;aa<P.length;aa++)"fillColor=none"==P[aa]?Z=!0:"strokeColor=none"==P[aa]?p=!0:""!=P[aa]&&(w+=P[aa]+";")}else""!=w&&";"!=w.charAt(w.length-1)&&(r=";");r+=(Xc(w,"whiteSpace")?"":"whiteSpace=wrap;")+(e?(Xc(w,"overflow")?"":"overflow=block;blockSpacing=1;")+(Xc(w,"html")?"":"html=1;")+"fontSize=13;"+lb:d(mxConstants.STYLE_FONTSIZE,w,F,D,u)+d(mxConstants.STYLE_FONTFAMILY,w,F,D,u)+d(mxConstants.STYLE_FONTCOLOR,
w,F,D,u)+d(mxConstants.STYLE_FONTSTYLE,w,F,D,u)+d(mxConstants.STYLE_ALIGN,w,F,D,u)+d(mxConstants.STYLE_SPACING_LEFT,w,F,D,u)+d(mxConstants.STYLE_SPACING_RIGHT,w,F,D,u)+d(mxConstants.STYLE_SPACING_TOP,w,F,D,u)+d(mxConstants.STYLE_SPACING_BOTTOM,w,F,D,u))+d(mxConstants.STYLE_ALIGN+"Global",w,F,D,u)+d(mxConstants.STYLE_SPACING,w,F,D,u)+d(mxConstants.STYLE_VERTICAL_ALIGN,w,F,D,u)+d(mxConstants.STYLE_STROKECOLOR,w,F,D,u)+d(mxConstants.STYLE_OPACITY,w,F,D,u)+d(mxConstants.STYLE_ROUNDED,w,F,D,u)+d(mxConstants.STYLE_ROTATION,
w,F,D,u)+d(mxConstants.STYLE_FLIPH,w,F,D,u)+d(mxConstants.STYLE_FLIPV,w,F,D,u)+d(mxConstants.STYLE_SHADOW,w,F,D,u)+d(mxConstants.STYLE_FILLCOLOR,w,F,D,u)+d(mxConstants.STYLE_DASHED,w,F,D,u)+d(mxConstants.STYLE_STROKEWIDTH,w,F,D,u)+d(mxConstants.STYLE_IMAGE,w,F,D,u)+d(mxConstants.STYLE_POINTER_EVENTS,w,F,D,u);Z&&!Xc(r,mxConstants.STYLE_FILLCOLOR)&&(r+="fillColor=none;");p&&!Xc(r,mxConstants.STYLE_STROKECOLOR)&&(r+="strokeColor=none;");lb="";return r}function d(w,F,D,u,e){if(!Xc(F,w))switch(w){case mxConstants.STYLE_FONTSIZE:return f(D);
-case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return M(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return Q(D);case mxConstants.STYLE_SPACING:return S(D);
-case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return J(D,u);case mxConstants.STYLE_OPACITY:return O(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return ba(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return W(D);
-case mxConstants.STYLE_FILLCOLOR:return ca(D,u);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=
+case mxConstants.STYLE_FONTFAMILY:return k(D);case mxConstants.STYLE_FONTCOLOR:return q(D);case mxConstants.STYLE_FONTSTYLE:return t(D);case mxConstants.STYLE_ALIGN:return C(D);case mxConstants.STYLE_ALIGN+"Global":return Zb(mxConstants.STYLE_ALIGN,D.TextAlign,"center");case mxConstants.STYLE_SPACING_LEFT:return I(D);case mxConstants.STYLE_SPACING_RIGHT:return N(D);case mxConstants.STYLE_SPACING_TOP:return K(D);case mxConstants.STYLE_SPACING_BOTTOM:return O(D);case mxConstants.STYLE_SPACING:return S(D);
+case mxConstants.STYLE_VERTICAL_ALIGN:return H(D);case mxConstants.STYLE_STROKECOLOR:return J(D,u);case mxConstants.STYLE_OPACITY:return Q(D,u,e);case mxConstants.STYLE_ROUNDED:return w=!e.edge&&!e.style.includes("rounded")&&null!=D.Rounding&&0<D.Rounding?"rounded=1;absoluteArcSize=1;arcSize="+z(.75*D.Rounding)+";":"",w;case mxConstants.STYLE_ROTATION:return ca(D,u,e);case mxConstants.STYLE_FLIPH:return w=D.FlipX?"flipH=1;":"",w;case mxConstants.STYLE_FLIPV:return w=D.FlipY?"flipV=1;":"",w;case mxConstants.STYLE_SHADOW:return W(D);
+case mxConstants.STYLE_FILLCOLOR:return ba(D,u);case mxConstants.STYLE_DASHED:return qa(D);case mxConstants.STYLE_STROKEWIDTH:return sa(D);case mxConstants.STYLE_IMAGE:return Fa(D,u);case mxConstants.STYLE_POINTER_EVENTS:return D.Magnetize?"container=1;pointerEvents=0;collapsible=0;recursiveResize=0;":""}return""}function f(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("s"==D.n&&D.v)return"fontSize="+z(.75*D.v)+";";F++}return"fontSize=13;"}function k(w){var F=c(w);if(null!=F)for(var D=
0;D<F.length;D++)if("f"==F[D].n&&F[D].v){var u=F[D].v;break}!u&&w.Font&&(u=w.Font);y(u);return lb}function n(w){return"ext"==w.tp?w.url:"ml"==w.tp?"mailto:"+w.eml:"pg"==w.tp?"data:page/id,"+(LucidImporter.pageIdsMap[w.id]||0):"c"==w.tp?"data:confluence/id,"+w.ccid:null}function q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("c"==D.n&&null!=D.v)return w=R(D.v).substring(0,7),"#000000"==w&&(w="default"),mxConstants.STYLE_FONTCOLOR+"="+w+";";F++}return""}function t(w){return A(c(w))}function A(w){if(null!=
w){var F=0,D=!1;if(null!=w)for(var u=0;!D&&u<w.length;){var e=w[u];"b"==e.n?null!=e.v&&e.v&&(D=!0,F+=1):"fc"==e.n&&"Bold"==e.v&&(D=!0,F+=1);u++}D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"i"==e.n&&null!=e.v&&e.v&&(D=!0,F+=2),u++;D=!1;if(null!=w)for(u=0;!D&&u<w.length;)e=w[u],"u"==e.n&&null!=e.v&&e.v&&(D=!0,F+=4),u++;if(0<F)return"fontStyle="+F+";"}return""}function C(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("a"==D.n&&null!=D.v)return"align="+D.v+";";F++}return""}function I(w){w=
-c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function M(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function Q(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+
-z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function H(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function J(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,T(w.LineColor),
-"#000000")}function N(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+T(w)+";":""}function L(w){return null!=w?"swimlaneFillColor="+T(w)+";":""}function O(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=R(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=R(w.FillColor),7<w.FillColor.length&&(w=
-"0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function ba(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
-F.Class)?(w-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(w+=180);0!=w&&(u+="rotation="+w+";");e||(u+="horizontal=0;")}return u}function W(w){return null!=w.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(w){if(w){if("object"===typeof w)try{w=w.cs[0].c}catch(F){console.log(F),w="#ffffff"}"rgb"==w.substring(0,3)?w="#"+w.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=w.charAt(0)&&(w="#"+w)}return w}function T(w){return(w=R(w))?
-w.substring(0,7):null}function ka(w,F){return(w=R(w))&&7<w.length?F+"="+Math.round(parseInt("0x"+w.substr(7))/2.55)+";":""}function ca(w,F){if(null!=w.FillColor)if("object"===typeof w.FillColor){if(null!=w.FillColor.cs&&1<w.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,T(w.FillColor.cs[1].c))}else return"string"===typeof w.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,T(w.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
+c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if(null!=D.v&&"il"==D.n)return"spacingLeft="+z(.75*D.v)+";";F++}return""}function N(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("ir"==D.n&&null!=D.v)return"spacingRight="+z(.75*D.v)+";";F++}return""}function K(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mt"==D.n&&null!=D.v)return"spacingTop="+z(.75*D.v)+";";F++}return""}function O(w){w=c(w);if(null!=w)for(var F=0;F<w.length;){var D=w[F];if("mb"==D.n&&null!=D.v)return"spacingBottom="+
+z(.75*D.v)+";";F++}return""}function S(w){return"number"===typeof w.InsetMargin?"spacing="+Math.max(0,z(.75*w.InsetMargin))+";":""}function H(w){return null!=w.Text_VAlign&&"string"===typeof w.Text_VAlign?"verticalAlign="+w.Text_VAlign+";":null!=w.Title_VAlign&&"string"===typeof w.Title_VAlign?"verticalAlign="+w.Title_VAlign+";":Zb(mxConstants.STYLE_VERTICAL_ALIGN,w.TextVAlign,"middle")}function J(w,F){return 0==w.LineWidth?mxConstants.STYLE_STROKECOLOR+"=none;":Zb(mxConstants.STYLE_STROKECOLOR,U(w.LineColor),
+"#000000")}function M(w){return null!=w?mxConstants.STYLE_FILLCOLOR+"="+U(w)+";":""}function L(w){return null!=w?"swimlaneFillColor="+U(w)+";":""}function Q(w,F,D){F="";if("string"===typeof w.LineColor&&(w.LineColor=R(w.LineColor),7<w.LineColor.length)){var u="0x"+w.LineColor.substring(w.LineColor.length-2,w.LineColor.length);D.style.includes("strokeOpacity")||(F+="strokeOpacity="+Math.round(parseInt(u)/2.55)+";")}"string"===typeof w.FillColor&&(w.FillColor=R(w.FillColor),7<w.FillColor.length&&(w=
+"0x"+w.FillColor.substring(w.FillColor.length-2,w.FillColor.length),D.style.includes("fillOpacity")||(F+="fillOpacity="+Math.round(parseInt(w)/2.55)+";")));return F}function ca(w,F,D){var u="";if(null!=w.Rotation){w=mxUtils.toDegree(parseFloat(w.Rotation));var e=!0;0!=w&&F.Class&&("UMLSwimLaneBlockV2"==F.Class||(0<=F.Class.indexOf("Rotated")||-90==w||270==w)&&(0<=F.Class.indexOf("Pool")||0<=F.Class.indexOf("SwimLane")))?(w+=90,D.geometry.rotate90(),D.geometry.isRotated=!0,e=!1):0<=mxUtils.indexOf(vf,
+F.Class)?(w-=90,D.geometry.rotate90()):0<=mxUtils.indexOf(wf,F.Class)&&(w+=180);0!=w&&(u+="rotation="+w+";");e||(u+="horizontal=0;")}return u}function W(w){return null!=w.Shadow?mxConstants.STYLE_SHADOW+"=1;":""}function R(w){if(w){if("object"===typeof w)try{w=w.cs[0].c}catch(F){console.log(F),w="#ffffff"}"rgb"==w.substring(0,3)?w="#"+w.match(/\d+/g).map(function(F){F=parseInt(F).toString(16);return(1==F.length?"0":"")+F}).join(""):"#"!=w.charAt(0)&&(w="#"+w)}return w}function U(w){return(w=R(w))?
+w.substring(0,7):null}function ia(w,F){return(w=R(w))&&7<w.length?F+"="+Math.round(parseInt("0x"+w.substr(7))/2.55)+";":""}function ba(w,F){if(null!=w.FillColor)if("object"===typeof w.FillColor){if(null!=w.FillColor.cs&&1<w.FillColor.cs.length)return Zb(mxConstants.STYLE_FILLCOLOR,U(w.FillColor.cs[0].c))+Zb(mxConstants.STYLE_GRADIENTCOLOR,U(w.FillColor.cs[1].c))}else return"string"===typeof w.FillColor?Zb(mxConstants.STYLE_FILLCOLOR,U(w.FillColor),"#FFFFFF"):Zb(mxConstants.STYLE_FILLCOLOR,"none");
return""}function qa(w){return"dotted"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 4;":"dashdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5;":"dashdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 5 1 5 1 5;":"dotdotdot"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=1 2;":"longdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=16 6;":"dashlongdash"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=10 6 16 6;":"dashed24"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=3 8;":
"dashed32"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=6 5;":"dashed44"==w.StrokeStyle?"dashed=1;fixDash=1;dashPattern=8 8;":null!=w.StrokeStyle&&"dashed"==w.StrokeStyle.substring(0,6)?"dashed=1;fixDash=1;":""}function sa(w){return null!=w.LineWidth?Zb(mxConstants.STYLE_STROKEWIDTH,z(.75*parseFloat(w.LineWidth)),"1"):""}function Fa(w,F,D){var u="";w.FillColor&&w.FillColor.url?(D=w.FillColor.url,"fill"==w.FillColor.pos&&(u="imageAspect=0;")):"ImageSearchBlock2"==F.Class?D=w.URL:"UserImage2Block"==
F.Class&&null!=w.ImageFillProps&&null!=w.ImageFillProps.url&&(D=w.ImageFillProps.url);return null!=D?"image="+g(D)+";"+u:""}function pa(w,F,D){null!=F.Link&&0<F.Link.length&&D.setAttributeForCell(w,"link",n(F.Link[0]));null!=F.NoteHint&&F.NoteHint.t&&D.setAttributeForCell(w,"Notes",F.NoteHint.t);var u=[],e=D.convertValueToString(w),P=!1;if(null!=e){for(var r=0;match=xf.exec(e);){var p=match[0];P=!0;if(2<p.length){var Z=p.substring(2,p.length-2);"documentName"==Z?Z="filename":"pageName"==Z?Z="page":
"totalPages"==Z?Z="pagecount":"page"==Z?Z="pagenumber":"date:"==Z.substring(0,5)?Z="date{"+Z.substring(5).replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy")+"}":"lastModifiedTime"==Z.substring(0,16)?Z=Z.replace(/MMMM/g,"mmmm").replace(/MM/g,"mm").replace(/YYYY/g,"yyyy"):"i18nDate:"==Z.substring(0,9)&&(Z="date{"+Z.substring(9).replace(/i18nShort/g,"shortDate").replace(/i18nMediumWithTime/g,"mmm d, yyyy hh:MM TT")+"}");Z="%"+Z+"%";u.push(e.substring(r,match.index)+(null!=Z?Z:p));r=
-match.index+p.length}}P&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(w,wa,V.Value,D)}catch(ja){window.console&&console.log("Ignored "+aa+":",ja)}}function Za(w,F,D,u){for(var e=F,P=0;null!=u.getAttributeForCell(w,e);)P++,e=F+"_"+P;u.setAttributeForCell(w,
+match.index+p.length}}P&&(u.push(e.substring(r)),D.setAttributeForCell(w,"label",u.join("")),D.setAttributeForCell(w,"placeholders","1"))}for(var aa in F)if(F.hasOwnProperty(aa)&&aa.toString().startsWith("ShapeData_"))try{var V=F[aa],wa=mxUtils.trim(V.Label).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,"");Za(w,wa,V.Value,D)}catch(ka){window.console&&console.log("Ignored "+aa+":",ka)}}function Za(w,F,D,u){for(var e=F,P=0;null!=u.getAttributeForCell(w,e);)P++,e=F+"_"+P;u.setAttributeForCell(w,
e,null!=D?D:"")}function Qb(w,F,D,u,e,P){var r=h(F);if(null!=r){var p=Od[r.Class];null!=p?(w.style+=p,";"!=w.style.charAt(w.style.length-1)&&(w.style+=";")):w.edge||(console.log("No mapping found for: "+r.Class),LucidImporter.hasUnknownShapes=!0);p=null!=r.Properties?r.Properties:r;if(null!=p&&(w.value=P?"":m(p),w.style+=b(w.style,p,r,w,G,!0),w.style.includes("strokeColor")||(w.style+=J(p,r)),pa(w,p,D),p.Title&&p.Title.t&&p.Text&&p.Text.t&&"ExtShape"!=r.Class.substr(0,8)&&(D=w.geometry,D=new mxCell(m(p.Title),
new mxGeometry(0,D.height,D.width,10),"strokeColor=none;fillColor=none;"),D.vertex=!0,w.insert(D),D.style+=a(p.Title,G)),w.edge)){w.style=null!=p.Rounding&&"diagonal"!=p.Shape?w.style+("rounded=1;arcSize="+p.Rounding+";"):w.style+"rounded=0;";if(D="curve"==p.Shape)w.style+="curved=1;";else if("diagonal"!=p.Shape)if(null!=p.ElbowPoints&&0<p.ElbowPoints.length)for(w.geometry.points=[],r=0;r<p.ElbowPoints.length;r++)w.geometry.points.push(new mxPoint(Math.round(.75*p.ElbowPoints[r].x+wc),Math.round(.75*
p.ElbowPoints[r].y+xc)));else if("elbow"==p.Shape||null!=p.Endpoint1.Block&&null!=p.Endpoint2.Block)w.style+="edgeStyle=orthogonalEdgeStyle;";if(p.LineJumps||LucidImporter.globalProps.LineJumps)w.style+="jumpStyle=arc;";null!=p.Endpoint1.Style&&(P=Ee[p.Endpoint1.Style],null!=P?(P=P.replace(/xyz/g,"start"),w.style+="startArrow="+P+";"):(LucidImporter.hasUnknownShapes=!0,window.console&&console.log("Unknown endpoint style: "+p.Endpoint1.Style)));null!=p.Endpoint2.Style&&(P=Ee[p.Endpoint2.Style],null!=
@@ -14375,46 +14379,46 @@ D.x+wc),Math.round(.75*D.y+xc)));D=!1;if((null==w.geometry.points||0==w.geometry
2?-20:20:0;xc=D.y==P.y?Math.abs(D.y-u.geometry.y)<u.geometry.height/2?-20:20:0;var Z=new mxPoint(D.x+wc,D.y+xc),aa=new mxPoint(P.x+wc,P.y+xc);Z.generated=!0;aa.generated=!0;w.geometry.points=[Z,aa];D=D.x==P.x}null!=u&&u.geometry.isRotated||(Z=Fe(w,p.Endpoint1,!0,D,null,u));null!=u&&null!=Z&&(null==u.stylePoints&&(u.stylePoints=[]),u.stylePoints.push(Z),LucidImporter.stylePointsSet.add(u));null!=e&&e.geometry.isRotated||(aa=Fe(w,p.Endpoint2,!1,D,null,e));null!=e&&null!=aa&&(null==e.stylePoints&&(e.stylePoints=
[]),e.stylePoints.push(aa),LucidImporter.stylePointsSet.add(e))}}null!=F.id&&(w.style+=";lucidId="+F.id+";");w.lucidchartObject=F}function vb(w,F){var D=h(w).Properties,u=D.BoundingBox;null==w.Class||"AWS"!==w.Class.substring(0,3)&&"Amazon"!==w.Class.substring(0,6)||w.Class.includes("AWS19")||(u.h-=20);v=new mxCell("",new mxGeometry(Math.round(.75*u.x+wc),Math.round(.75*u.y+xc),Math.round(.75*u.w),Math.round(.75*u.h)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;Qb(v,w,F);
v.zOrder=D.ZOrder;Ge(v,D);D.Hidden&&(v.visible=!1);return v}function yf(w,F,D,u){var e=new mxCell("",new mxGeometry(0,0,100,100),"html=1;jettySize=18;");e.geometry.relative=!0;e.edge=!0;Qb(e,w,F,D,u,!0);var P=h(w).Properties,r=null!=P?P.TextAreas:w.TextAreas;if(null!=r){for(var p=0;void 0!==r["t"+p];){var Z=r["t"+p];null!=Z&&(e=Pd(Z,e,w,D,u,F));p++}for(p=0;void 0!==r["m"+p]||1>p;)Z=r["m"+p],null!=Z&&(e=Pd(Z,e,w,D,u,F)),p++;null!=r.Text&&(e=Pd(r.Text,e,w,D,u,F));r=null!=P?P.TextAreas:w.TextAreas;null!=
-r.Message&&(e=Pd(r.Message,e,w,D,u,F))}w.Hidden&&(e.visible=!1);return e}function Pd(w,F,D,u,e,P){var r=2*(parseFloat(w.Location)-.5);isNaN(r)&&null!=w.Text&&null!=w.Text.Location&&(r=2*(parseFloat(w.Text.Location)-.5));P=m(w);var p=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=w&&null!=w.Value&&null!=w.Value.m){wa=A(w.Value.m);for(var ja=0;ja<w.Value.m.length;ja++)if("s"==w.Value.m[ja].n&&w.Value.m[ja].v)V=z(.75*parseFloat(w.Value.m[ja].v));
-else if("c"==w.Value.m[ja].n){var na=R(w.Value.m[ja].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}p=new p(P,r,Z+aa);p.geometry.relative=!0;p.vertex=!0;if(w.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=u&&null!=e){var ra=u.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*
+r.Message&&(e=Pd(r.Message,e,w,D,u,F))}w.Hidden&&(e.visible=!1);return e}function Pd(w,F,D,u,e,P){var r=2*(parseFloat(w.Location)-.5);isNaN(r)&&null!=w.Text&&null!=w.Text.Location&&(r=2*(parseFloat(w.Text.Location)-.5));P=m(w);var p=mxCell;r=new mxGeometry(isNaN(r)?0:r,0,0,0);var Z=ge;var aa=D;if(G)aa=lb;else{var V="13",wa="";if(null!=w&&null!=w.Value&&null!=w.Value.m){wa=A(w.Value.m);for(var ka=0;ka<w.Value.m.length;ka++)if("s"==w.Value.m[ka].n&&w.Value.m[ka].v)V=z(.75*parseFloat(w.Value.m[ka].v));
+else if("c"==w.Value.m[ka].n){var na=R(w.Value.m[ka].v);null!=na&&(na=na.substring(0,7));"#000000"==na&&(na="default");wa+="fontColor="+na+";"}wa+=k(aa);lb=""}aa=wa+";fontSize="+V+";"}p=new p(P,r,Z+aa);p.geometry.relative=!0;p.vertex=!0;if(w.Side)try{D.Action&&D.Action.Properties&&(D=D.Action.Properties);if(null!=u&&null!=e){var ra=u.geometry,Aa=e.geometry;var ma=Math.abs(ra.x+ra.width*D.Endpoint1.LinkX-(Aa.x+Aa.width*D.Endpoint2.LinkX));var Ba=Math.abs(ra.y+ra.height*D.Endpoint1.LinkY-(Aa.y+Aa.height*
D.Endpoint2.LinkY))}else ma=Math.abs(D.Endpoint1.x-D.Endpoint2.x),Ba=Math.abs(D.Endpoint1.y-D.Endpoint2.y);var Pa=mxUtils.getSizeForString(P.replace(/\n/g,"<br>"));p.geometry.offset=0==ma||ma<Ba?new mxPoint(Math.sign(D.Endpoint1.y-D.Endpoint2.y)*w.Side*(Pa.width/2+5+ma),0):new mxPoint(0,Math.sign(D.Endpoint2.x-D.Endpoint1.x)*w.Side*(Pa.height/2+5+Ba))}catch(Ca){console.log(Ca)}p.lucidchartObject=w;F.insert(p);return F}function Zb(w,F,D,u){null!=F&&null!=u&&(F=u(F));return null!=F&&F!=D?w+"="+F+";":
""}function Fe(w,F,D,u,e,P){if(null!=F&&null!=F.LinkX&&null!=F.LinkY&&(F.LinkX=Math.round(1E3*F.LinkX)/1E3,F.LinkY=Math.round(1E3*F.LinkY)/1E3,null!=P&&P.style&&-1<P.style.indexOf("flipH=1")&&(F.LinkX=1-F.LinkX),null!=P&&P.style&&-1<P.style.indexOf("flipV=1")&&(F.LinkY=1-F.LinkY),w.style+=(u?"":(D?"exitX":"entryX")+"="+F.LinkX+";")+(e?"":(D?"exitY":"entryY")+"="+F.LinkY+";")+(D?"exitPerimeter":"entryPerimeter")+"=0;",F.Inside))return"["+F.LinkX+","+F.LinkY+",0]"}function He(w,F,D,u,e){try{var P=function(ma,
-Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,p=Math.min(p,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=w.Action&&null!=w.Action.Properties&&(w=w.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=w.ZOrder;var p=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=w.Members;e=[];for(var ja in wa){var na=
-F[ja];null!=na?e.push(na):null!=u[ja]&&(e.push(u[ja]),D[ja]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=p;r.geometry.y=Z;
+Ba){if(null!=ma)if(Array.isArray(ma))for(var Pa=0;Pa<ma.length;Pa++)P(ma[Pa].p?ma[Pa].p:ma[Pa],Ba);else Ba=Ba?.75:1,p=Math.min(p,ma.x*Ba),Z=Math.min(Z,ma.y*Ba),aa=Math.max(aa,(ma.x+(ma.width?ma.width:0))*Ba),V=Math.max(V,(ma.y+(ma.height?ma.height:0))*Ba)};null!=w.Action&&null!=w.Action.Properties&&(w=w.Action.Properties);var r=new mxCell("",new mxGeometry,"group;dropTarget=0;pointerEvents=0;");r.vertex=!0;r.zOrder=w.ZOrder;var p=Infinity,Z=Infinity,aa=-Infinity,V=-Infinity,wa=w.Members;e=[];for(var ka in wa){var na=
+F[ka];null!=na?e.push(na):null!=u[ka]&&(e.push(u[ka]),D[ka]=r)}e.sort(function(ma,Ba){ma=ma.zOrder||ma.ZOrder;Ba=Ba.zOrder||Ba.ZOrder;return null!=ma&&null!=Ba?ma>Ba?1:ma<Ba?-1:0:0});for(D=F=0;D<e.length;D++)if(na=e[D],na.vertex)P(na.geometry),na.parent=r,r.insert(na,F++);else{var ra=null!=na.Action&&na.Action.Properties?na.Action.Properties:na;P(ra.Endpoint1,!0);P(ra.Endpoint2,!0);P(ra.ElbowPoints,!0);P(ra.ElbowControlPoints,!0);P(ra.BezierJoints,!0);P(ra.Joints,!0)}r.geometry.x=p;r.geometry.y=Z;
r.geometry.width=aa-p;r.geometry.height=V-Z;if(null!=r.children)for(D=0;D<r.children.length;D++){var Aa=r.children[D].geometry;Aa.x-=p;Aa.y-=Z}w.IsState?(r.lucidLayerInfo={name:w.Name,visible:!w.Hidden,locked:w.Restrictions.b&&w.Restrictions.p&&w.Restrictions.c},r.style+="container=1;collapsible=0;recursiveResize=0;"):w.Hidden&&(r.visible=!1);r.lucidchartObject=w;return r}catch(ma){console.log(ma)}}function zf(w,F,D){LucidImporter.hasMath=!1;LucidImporter.stylePointsSet=new Set;w.getModel().beginUpdate();
try{var u=function(Ca,ua){function Na(Ra,la,Ma){null==Ra||Ra.generated||(Ra.x-=la,Ra.y-=Ma)}var Ka=null!=ua.Endpoint1.Block?P[ua.Endpoint1.Block]:null,La=null!=ua.Endpoint2.Block?P[ua.Endpoint2.Block]:null,l=yf(Ca,w,Ka,La);if(ua.Endpoint1&&ua.Endpoint1.Line||ua.Endpoint2&&ua.Endpoint2.Line)console.log("Edge to Edge case"),LucidImporter.hasUnknownShapes=!0;null==Ka&&null!=ua.Endpoint1&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint1.x),Math.round(.75*ua.Endpoint1.y)),!0);null==
La&&null!=ua.Endpoint2&&l.geometry.setTerminalPoint(new mxPoint(Math.round(.75*ua.Endpoint2.x),Math.round(.75*ua.Endpoint2.y)),!1);Ca=r[Ca.id];if(null!=Ca){for(var Ia=l.geometry,bb=ua=0,Ea=Ca;null!=Ea&&null!=Ea.geometry;)ua+=Ea.geometry.x,bb+=Ea.geometry.y,Ea=Ea.parent;Na(Ia.sourcePoint,ua,bb);Na(Ia.targetPoint,ua,bb);Na(Ia.offset,ua,bb);Ia=Ia.points;if(null!=Ia)for(Ea=0;Ea<Ia.length;Ea++)Na(Ia[Ea],ua,bb)}e.push(w.addCell(l,Ca,null,Ka,La))},e=[],P={},r={},p={},Z=[];null!=F.Lines&&(p=F.Lines);if(null!=
-F.Blocks){Object.assign(p,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,w),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,w),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,w,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ja=0;ja<F.Objects.length;ja++)V=F.Objects[ja],p[V.id]=V,null!=V.Action&&"mxCompositeShape"==
-Od[V.Action.Class]?P[V.id]=Ie(V,e,w):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,w):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,w,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ja=0;ja<F.Objects.length;ja++)if(V=F.Objects[ja],V.IsGroup){var na=He(V,P,r,p,w);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=
-F.Groups[aa],V.id=aa,na=He(V,P,r,p,w))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ja=0;ja<Z.length;ja++){V=Z[ja];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;w.addCell(Aa,w.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
+F.Blocks){Object.assign(p,F.Blocks);for(var aa in F.Blocks){var V=F.Blocks[aa];V.id=aa;var wa=!1;null!=Od[V.Class]&&"mxCompositeShape"==Od[V.Class]&&(P[V.id]=Ie(V,e,w),Z.push(V),wa=!0);wa||(P[V.id]=vb(V,w),Z.push(V))}if(null!=F.Generators)for(aa in F.Generators)"OrgChart2018"==F.Generators[aa].ClassName?(LucidImporter.hasUnknownShapes=!0,Je(aa,F.Generators[aa],F.Data,w,P)):LucidImporter.hasUnknownShapes=!0}else{for(var ka=0;ka<F.Objects.length;ka++)V=F.Objects[ka],p[V.id]=V,null!=V.Action&&"mxCompositeShape"==
+Od[V.Action.Class]?P[V.id]=Ie(V,e,w):V.IsBlock&&null!=V.Action&&null!=V.Action.Properties?P[V.id]=vb(V,w):V.IsGenerator&&V.GeneratorData&&V.GeneratorData.p&&("OrgChart2018"==V.GeneratorData.p.ClassName?(LucidImporter.hasUnknownShapes=!0,Je(V.GeneratorData.id,V.GeneratorData.p,V.GeneratorData.gs,w,P)):LucidImporter.hasUnknownShapes=!0),Z.push(V);for(ka=0;ka<F.Objects.length;ka++)if(V=F.Objects[ka],V.IsGroup){var na=He(V,P,r,p,w);na&&(P[V.id]=na,Z.push(V))}}if(null!=F.Groups)try{for(aa in F.Groups)if(V=
+F.Groups[aa],V.id=aa,na=He(V,P,r,p,w))P[V.id]=na,Z.push(V)}catch(Ca){console.log(Ca)}if(null!=F.Lines)for(aa in F.Lines)V=F.Lines[aa],V.id=aa,Z.push(V);Z.sort(function(Ca,ua){Ca=h(Ca);ua=h(ua);Ca=null!=Ca.Properties?Ca.Properties.ZOrder:Ca.ZOrder;ua=null!=ua.Properties?ua.Properties.ZOrder:ua.ZOrder;return null!=Ca&&null!=ua?Ca>ua?1:Ca<ua?-1:0:0});for(ka=0;ka<Z.length;ka++){V=Z[ka];var ra=P[V.id];if(null!=ra){if(null==ra.parent)if(ra.lucidLayerInfo){var Aa=new mxCell;w.addCell(Aa,w.model.root);Aa.setVisible(ra.lucidLayerInfo.visible);
ra.lucidLayerInfo.locked&&Aa.setStyle("locked=1;");Aa.setValue(ra.lucidLayerInfo.name);delete ra.lucidLayerInfo;w.addCell(ra,Aa)}else e.push(w.addCell(ra))}else V.IsLine&&null!=V.Action&&null!=V.Action.Properties?u(V,V.Action.Properties):null!=V.StrokeStyle&&u(V,V)}LucidImporter.stylePointsSet.forEach(function(Ca){Ca.style="points=["+Ca.stylePoints.join(",")+"];"+Ca.style;delete Ca.stylePoints});try{var ma=w.getModel().cells;w.view.validate();for(var Ba in ma){var Pa=ma[Ba];null!=Pa&&(Af(w,Pa),Bf(w,
Pa),Cf(w,Pa),"1"==urlParams.lucidchartObject&&null!=Pa.lucidchartObject&&Za(Pa,"lucidchartObject",JSON.stringify(Pa.lucidchartObject,null,2),w),delete Pa.lucidchartObject,delete Pa.zOrder)}}catch(Ca){console.log(Ca)}D||w.setSelectionCells(e)}finally{w.getModel().endUpdate()}}function Cf(w,F){if(w.model.contains(F)&&F.edge){var D=w.view.getState(F);if(null!=D&&null!=F.children){var u=mxRectangle.fromRectangle(D.paintBounds);u.grow(5);for(var e=0;e<F.children.length;e++){var P=w.view.getState(F.children[e]);
null==P||mxUtils.contains(u,P.paintBounds.x,P.paintBounds.y)||(P.cell.geometry.offset=new mxPoint(0,0))}}w=F.lucidchartObject;null!=w&&"elbow"==w.Shape&&null==w.ElbowControlPoints&&null==w.ElbowPoints&&null!=D.style.exitX&&null!=D.style.exitY&&null!=D.style.entryX&&null!=D.style.entryY&&(F.style=mxUtils.setStyle(F.style,"exitX",Math.round(20*D.style.exitX)/20),F.style=mxUtils.setStyle(F.style,"exitY",Math.round(20*D.style.exitY)/20),F.style=mxUtils.setStyle(F.style,"entryX",Math.round(20*D.style.entryX)/
20),F.style=mxUtils.setStyle(F.style,"entryY",Math.round(20*D.style.entryY)/20))}}function Bf(w,F){if(w.model.contains(F)&&null!=F.style&&""!=F.style){w=F.style.split(";");for(var D={},u=[],e=w.length-1;0<=e;e--){var P=w[e].split("=");if(2!=P.length||null==D[P[0]])D[P[0]]=P[1],""!=w[e]&&u.push(w[e])}F.style=u.reverse().join(";")+";"}}function Af(w,F){if(w.model.contains(F)&&null!=F.children&&null!=F.geometry&&F.vertex&&"group;dropTarget=0;pointerEvents=0;"==F.style){for(var D=null,u=0;u<F.children.length;u++)if(F.children[u].vertex){var e=
F.children[u].geometry;if(null!=e&&0==e.x&&0==e.y&&e.width==F.geometry.width&&e.height==F.geometry.height){if(null!=D)return;D=F.children[u]}}F=D;if(null!=F&&(D=F.parent,""==w.convertValueToString(D))){if(null!=F.edges)for(u=0;u<F.edges.length;u++)F.edges[u].source==F&&F.edges[u].setTerminal(F.parent,!0),F.edges[u].target==F&&F.edges[u].setTerminal(F.parent,!1);if(null!=F.children&&0<F.children.length)for(e=F.children.slice(),u=0;u<e.length;u++)D.insert(e[u]);w.cellLabelChanged(D,w.convertValueToString(F));
D.style=mxUtils.setStyle(mxUtils.setStyle(F.style,"container","1"),"collapsible","0");F.removeFromParent()}}}function Df(){var w=new Graph;w.setExtendParents(!1);w.setExtendParentsOnAdd(!1);w.setConstrainChildren(!1);w.setHtmlLabels(!0);w.getModel().maintainEdgeParent=!1;return w}function Qd(w,F,D,u,e,P,r,p){this.nurbsValues=[1,3,0,0,100*(w+D),100-100*(1-(F+u)),0,1,100*(e+r),100-100*(1-(P+p)),0,1]}function Ke(w,F){try{for(var D=[],u=F.BoundingBox.w,e=F.BoundingBox.h,P=0;P<F.Shapes.length;P++){var r=
-F.Shapes[P],p=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ja=['<shape strokewidth="inherit"><foreground>'];ja.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/u;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ja.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=u,Na=e,Ka=new Qd(V[Aa.p1].x/u,V[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,V[Aa.p2].x/u,V[Aa.p2].y/
+F.Shapes[P],p=r.FillColor,Z=r.StrokeColor,aa=r.LineWidth,V=r.Points,wa=r.Lines,ka=['<shape strokewidth="inherit"><foreground>'];ka.push("<path>");for(var na=null,ra=0;ra<wa.length;ra++){var Aa=wa[ra];if(na!=Aa.p1){var ma=V[Aa.p1].x,Ba=V[Aa.p1].y;ma=100*ma/u;Ba=100*Ba/e;ma=Math.round(100*ma)/100;Ba=Math.round(100*Ba)/100;ka.push('<move x="'+ma+'" y="'+Ba+'"/>')}if(null!=Aa.n1){var Pa=V[Aa.p2].x,Ca=V[Aa.p2].y,ua=u,Na=e,Ka=new Qd(V[Aa.p1].x/u,V[Aa.p1].y/e,Aa.n1.x/u,Aa.n1.y/e,V[Aa.p2].x/u,V[Aa.p2].y/
e,Aa.n2.x/u,Aa.n2.y/e);if(2<=Ka.getSize()){Ka.getX(0);Ka.getY(0);Ka.getX(1);Ka.getY(1);Pa=Math.round(100*Pa/ua*100)/100;Ca=Math.round(100*Ca/Na*100)/100;ua=[];Na=[];for(var La=[],l=Ka.getSize(),Ia=0;Ia<l-1;Ia+=3)ua.push(new mxPoint(Ka.getX(Ia),Ka.getY(Ia))),Na.push(new mxPoint(Ka.getX(Ia+1),Ka.getY(Ia+1))),Ia<l-2?La.push(new mxPoint(Ka.getX(Ia+2),Ka.getY(Ia+2))):La.push(new mxPoint(Pa,Ca));var bb="";for(Ia=0;Ia<ua.length;Ia++)bb+='<curve x1="'+ua[Ia].x+'" y1="'+ua[Ia].y+'" x2="'+Na[Ia].x+'" y2="'+
-Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ja.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/u,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ja.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ja.push("</path>");ja.push("<fillstroke/>");ja.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ja.join(""))+")",FillColor:p,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
+Na[Ia].y+'" x3="'+La[Ia].x+'" y3="'+La[Ia].y+'"/>';var Ea=bb}else Ea=void 0;ka.push(Ea)}else ma=V[Aa.p2].x,Ba=V[Aa.p2].y,ma=100*ma/u,Ba=100*Ba/e,ma=Math.round(100*ma)/100,Ba=Math.round(100*Ba)/100,ka.push('<line x="'+ma+'" y="'+Ba+'"/>');na=Aa.p2}ka.push("</path>");ka.push("<fillstroke/>");ka.push("</foreground></shape>");D.push({shapeStencil:"stencil("+Graph.compress(ka.join(""))+")",FillColor:p,LineColor:Z,LineWidth:aa})}LucidImporter.stencilsMap[w]={text:F.Text,w:u,h:e,x:F.BoundingBox.x,y:F.BoundingBox.y,
stencils:D}}catch(Ra){console.log("Stencil parsing error:",Ra)}}function sc(w,F,D,u,e,P,r,p){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;r.insert(w);P=[w];D=D.clone();p.insertEdge(D,!1);w.insertEdge(D,!0);P.push(D);u.push(e.addCell(D,null,null,null,null))}function fb(w,F,D,u,e,P,r,p,Z){w=new mxCell("",new mxGeometry(w,F,0,0),"strokeColor=none;fillColor=none;");w.vertex=!0;Z.insert(w);D=new mxCell("",new mxGeometry(D,u,0,0),"strokeColor=none;fillColor=none;");
D.vertex=!0;Z.insert(D);p=[D];e=e.clone();w.insertEdge(e,!0);D.insertEdge(e,!1);p.push(e);P.push(r.addCell(e,null,null,null,null))}function Sa(w,F,D,u,e,P){u.style="rounded=1;absoluteArcSize=1;fillColor=#ffffff;arcSize=2;strokeColor=#dddddd;";u.style+=b(u.style,e,P,u);F=m(e);u.vertex=!0;w=new mxCell(F,new mxGeometry(0,.5,24,24),"dashed=0;connectable=0;html=1;strokeColor=none;"+mxConstants.STYLE_SHAPE+"=mxgraph.gcp2."+w+";part=1;shadow=0;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=5;");
w.style+=b(w.style,e,P,w,G);w.geometry.relative=!0;w.geometry.offset=new mxPoint(5,-12);w.vertex=!0;u.insert(w)}function Wa(w,F,D,u,e,P,r,p){e="transparent"!=w?mxConstants.STYLE_SHAPE+"=mxgraph.gcp2.":mxConstants.STYLE_SHAPE+"=";P.style="rounded=1;absoluteArcSize=1;arcSize=2;verticalAlign=bottom;fillColor=#ffffff;strokeColor=#dddddd;whiteSpace=wrap;";P.style+=b(P.style,r,p,P);P.value=m(r);P.vertex=!0;w=new mxCell(null,new mxGeometry(.5,0,.7*u*F,.7*u*D),e+w+";part=1;dashed=0;connectable=0;html=1;strokeColor=none;shadow=0;");
w.geometry.relative=!0;w.geometry.offset=new mxPoint(-F*u*.35,10+(1-D)*u*.35);w.vertex=!0;w.style+=b(w.style,r,p,w,G);P.insert(w)}function Xc(w,F){return null!=w&&null!=F&&(F==mxConstants.STYLE_ALIGN+"Global"&&(F=mxConstants.STYLE_ALIGN),w.includes(";"+F+"=")||w.substring(0,F.length+1)==F+"=")?!0:!1}function Rd(w,F){function D(u){u=Math.round(parseInt("0x"+u)*F).toString(16);return 1==u.length?"0"+u:u}return"#"+D(w.substr(1,2))+D(w.substr(3,2))+D(w.substr(5,2))}function Ie(w,F,D){var u=h(w),e=u.Properties,
P=e.BoundingBox,r=Math.round(.75*P.w),p=Math.round(.75*P.h),Z=Math.round(.75*P.x+wc),aa=Math.round(.75*P.y+xc);null==w.Class||"GCPInputDatabase"!==w.Class&&"GCPInputRecord"!==w.Class&&"GCPInputPayment"!==w.Class&&"GCPInputGateway"!==w.Class&&"GCPInputLocalCompute"!==w.Class&&"GCPInputBeacon"!==w.Class&&"GCPInputStorage"!==w.Class&&"GCPInputList"!==w.Class&&"GCPInputStream"!==w.Class&&"GCPInputMobileDevices"!==w.Class&&"GCPInputCircuitBoard"!==w.Class&&"GCPInputLive"!==w.Class&&"GCPInputUsers"!==w.Class&&
"GCPInputLaptop"!==w.Class&&"GCPInputApplication"!==w.Class&&"GCPInputLightbulb"!==w.Class&&"GCPInputGame"!==w.Class&&"GCPInputDesktop"!==w.Class&&"GCPInputDesktopAndMobile"!==w.Class&&"GCPInputWebcam"!==w.Class&&"GCPInputSpeaker"!==w.Class&&"GCPInputRetail"!==w.Class&&"GCPInputReport"!==w.Class&&"GCPInputPhone"!==w.Class&&"GCPInputBlank"!==w.Class||(p+=20);v=new mxCell("",new mxGeometry(Z,aa,r,p),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;");v.vertex=!0;v.zOrder=e.ZOrder;var V=null!=w.Class?
-w.Class:null!=u?u.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ja=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ja=new mxCell("",new mxGeometry(r-.125*p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ja=new mxCell("",
-new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ja.vertex=!0;v.insert(ja);ja.style+=b(ja.style,e,u,ja);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,u,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
+w.Class:null!=u?u.Class:null;switch(V){case "BraceNoteBlock":case "UI2BraceNoteBlock":var wa=!1;null!=e.BraceDirection&&"Right"==e.BraceDirection&&(wa=!0);var ka=null,na=null,ra=m(e),Aa=e.Rotation?mxUtils.getSizeForString(ra.replace(/\n/g,"<br>"),null,null,Math.abs(r-.125*p)):{width:0,height:0};wa?(ka=new mxCell("",new mxGeometry(r-.125*p,0,.125*p,p),"shape=curlyBracket;rounded=1;"),na=new mxCell("",new mxGeometry(Aa.height,-2*Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;")):(ka=new mxCell("",
+new mxGeometry(0,0,.125*p,p),"shape=curlyBracket;rounded=1;flipH=1;"),na=new mxCell("",new mxGeometry(.125*p-Aa.height,Aa.width,r-.125*p,p),"strokeColor=none;fillColor=none;"));v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);ka.vertex=!0;v.insert(ka);ka.style+=b(ka.style,e,u,ka);na.vertex=!0;na.value=ra;v.insert(na);na.style+=b(na.style,e,u,na,G);break;case "BPMNAdvancedPoolBlockRotated":case "UMLMultiLanePoolRotatedBlock":case "UMLMultiLanePoolBlock":case "BPMNAdvancedPoolBlock":case "AdvancedSwimLaneBlockRotated":case "AdvancedSwimLaneBlock":case "UMLSwimLaneBlockV2":var ma=
"MainText",Ba=null,Pa="HeaderFill_",Ca="BodyFill_",ua=25,Na=25,Ka=0;if(null!=e.Lanes)Ka=e.Lanes.length;else if(null!=e.PrimaryLane){var La=function(gb){if(gb)32>gb?gb=32:208<gb&&(gb=208);else return 0;return.75*gb};Ka=e.PrimaryLane.length;for(var l=p=r=0;l<Ka;l++)r+=e.PrimaryLane[l];for(l=0;l<e.SecondaryLane.length;l++)p+=e.SecondaryLane[l];ua=La(e.PrimaryPoolTitleHeight);Na=La(e.PrimaryLaneTitleHeight);r*=.75;p=.75*p+ua+Na;v.geometry.width=r;v.geometry.height=p;ma="poolPrimaryTitleKey";Pa="PrimaryLaneHeaderFill_";
Ca="CellFill_0,";Ba=e.PrimaryLaneTextAreaIds;if(null==Ba)for(Ba=[],l=0;l<Ka;l++)Ba.push("Primary_"+l)}if(0==e.IsPrimaryLaneVertical){e.Rotation=-1.5707963267948966;var Ia=v.geometry.x,bb=v.geometry.y}var Ea=0!=e.Rotation,Ra=0<V.indexOf("Pool"),la=0==V.indexOf("BPMN"),Ma=null!=e[ma];v.style=(Ra?"swimlane;startSize="+ua+";":"fillColor=none;strokeColor=none;pointerEvents=0;fontStyle=0;")+"html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;"+(Ea?"horizontalStack=0;":
-"");v.style+=b(v.style,e,u,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+q(e[ma])+k(e[ma])+t(e[ma])+C(e[ma],v)+I(e[ma])+M(e[ma])+K(e[ma])+Q(e[ma]))+S(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);
-l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,p-vc,r*xb):new mxGeometry(rc,vc,r*xb,p-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,u,za[fa],G)+(G?"fontSize=13;":f(e[Va])+q(e[Va])+t(e[Va])+C(e[Va],za[fa])+I(e[Va])+M(e[Va])+K(e[Va])+Q(e[Va]))+S(e[Va])+H(e[Va])+N(e[Pa+l])+L(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
+"");v.style+=b(v.style,e,u,v);Ma&&(v.value=m(e[ma]),v.style+=(G?"overflow=block;blockSpacing=1;fontSize=13;"+lb:f(e[ma])+q(e[ma])+k(e[ma])+t(e[ma])+C(e[ma],v)+I(e[ma])+N(e[ma])+K(e[ma])+O(e[ma]))+S(e[ma])+H(e[ma]));for(var ya=0,za=[],Pb="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;fontStyle=0;startSize="+Na+";dropTarget=0;rounded=0;"+(Ea?"horizontal=0;":"")+(la?"swimlaneLine=0;fillColor=none;":""),fa=e.Rotation=0;fa<Ka;fa++){if(null==Ba){var xb=parseFloat(e.Lanes[fa].p);
+l=parseInt(e.Lanes[fa].tid)||fa;var Va="Lane_"+l}else xb=.75*e.PrimaryLane[fa]/r,l=fa,Va=Ba[fa];var rc=r*ya,vc=Ra?ua:0;za.push(new mxCell("",Ea?new mxGeometry(vc,rc,p-vc,r*xb):new mxGeometry(rc,vc,r*xb,p-vc),Pb));za[fa].vertex=!0;v.insert(za[fa]);za[fa].value=m(e[Va]);za[fa].style+=b(za[fa].style,e,u,za[fa],G)+(G?"fontSize=13;":f(e[Va])+q(e[Va])+t(e[Va])+C(e[Va],za[fa])+I(e[Va])+N(e[Va])+K(e[Va])+O(e[Va]))+S(e[Va])+H(e[Va])+M(e[Pa+l])+L(e[Ca+l]);ya+=xb}null!=Ia&&(v.geometry.x=Ia,v.geometry.y=bb);
break;case "UMLMultidimensionalSwimlane":var Fb=0,Rb=0,Kb=null,$b=null;if(null!=e.Rows&&null!=e.Columns){Fb=e.Rows.length;Rb=e.Columns.length;var Xa=.75*e.TitleHeight||25,pb=.75*e.TitleWidth||25}else if(null!=e.PrimaryLane&&null!=e.SecondaryLane){Fb=e.SecondaryLane.length;Rb=e.PrimaryLane.length;pb=.75*e.SecondaryLaneTitleHeight||25;Xa=.75*e.PrimaryLaneTitleHeight||25;for(l=p=r=0;l<Fb;l++)p+=e.SecondaryLane[l];for(l=0;l<Rb;l++)r+=e.PrimaryLane[l];r=.75*r+pb;p=.75*p+Xa;v.geometry.width=r;v.geometry.height=
p;Kb=e.SecondaryLaneTextAreaIds;$b=e.PrimaryLaneTextAreaIds}v.style="group;";var Nc=new mxCell("",new mxGeometry(0,Xa,r,p-Xa),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;horizontalStack=0;");Nc.vertex=!0;var Fc=new mxCell("",new mxGeometry(pb,0,r-pb,p),"fillColor=none;strokeColor=none;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;");Fc.vertex=!0;v.insert(Nc);
v.insert(Fc);aa=0;var Gc="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;horizontal=0;fontStyle=0;startSize="+pb+";";for(fa=0;fa<Fb;fa++){if(null==Kb){var Sd=.75*parseInt(e.Rows[fa].height);l=parseInt(e.Rows[fa].id)||fa;var Sb="Row_"+l}else Sd=.75*e.SecondaryLane[fa],Sb=Kb[fa];var Hc=new mxCell("",new mxGeometry(0,aa,r,Sd),Gc);aa+=Sd;Hc.vertex=!0;Nc.insert(Hc);Hc.value=m(e[Sb]);Hc.style+=b(Hc.style,e,u,Hc,G)+(G?"fontSize=13;":f(e[Sb])+q(e[Sb])+t(e[Sb])+C(e[Sb],
-Hc)+I(e[Sb])+M(e[Sb])+K(e[Sb])+Q(e[Sb]))+S(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,p),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":
-f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Ic)+I(e[Tb])+M(e[Tb])+K(e[Tb])+Q(e[Tb]))+S(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");var yb=
-new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,G);v.style+=ca(e,u).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,p-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
-yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ba(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
+Hc)+I(e[Sb])+N(e[Sb])+K(e[Sb])+O(e[Sb]))+S(e[Sb])+H(e[Sb])}var Ef="swimlane;html=1;whiteSpace=wrap;container=1;connectable=0;collapsible=0;dropTarget=0;fontStyle=0;startSize="+Xa+";";for(fa=Z=0;fa<Rb;fa++){if(null==$b){var Yc=.75*parseInt(e.Columns[fa].width);l=parseInt(e.Columns[fa].id)||fa;var Tb="Column_"+l}else Yc=.75*e.PrimaryLane[fa],Tb=$b[fa];var Ic=new mxCell("",new mxGeometry(Z,0,Yc,p),Ef);Z+=Yc;Ic.vertex=!0;Fc.insert(Ic);Ic.value=m(e[Tb]);Ic.style+=b(Ic.style,e,u,Ic,G)+(G?"fontSize=13;":
+f(e[Tb])+q(e[Tb])+t(e[Tb])+C(e[Tb],Ic)+I(e[Tb])+N(e[Tb])+K(e[Tb])+O(e[Tb]))+S(e[Tb])+H(e[Tb])}break;case "UMLStateBlock":if(0==e.Composite)v.style="rounded=1;arcSize=20",v.value=m(e.State,!0),v.style+=b(v.style,e,u,v,G);else{v.style="swimlane;startSize=25;html=1;whiteSpace=wrap;container=1;collapsible=0;childLayout=stackLayout;resizeParent=1;dropTarget=0;rounded=1;arcSize=20;fontStyle=0;";v.value=m(e.State,!0);v.style+=b(v.style,e,u,v,G);v.style+=ba(e,u).replace("fillColor","swimlaneFillColor");var yb=
+new mxCell("",new mxGeometry(0,25,r,p-25),"rounded=1;arcSize=20;strokeColor=none;fillColor=none");yb.value=m(e.Action,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb)}break;case "GSDFDProcessBlock":var he=Math.round(.75*e.nameHeight);v.style="shape=swimlane;html=1;rounded=1;arcSize=10;collapsible=0;fontStyle=0;startSize="+he;v.value=m(e.Number,!0);v.style+=b(v.style,e,u,v,G);v.style+=ba(e,u).replace("fillColor","swimlaneFillColor");yb=new mxCell("",new mxGeometry(0,he,r,p-he),"rounded=1;arcSize=10;strokeColor=none;fillColor=none");
+yb.value=m(e.Text,!0);yb.style+=b(yb.style,e,u,yb,G);yb.vertex=!0;v.insert(yb);break;case "AndroidDevice":if(null!=e.AndroidDeviceName){var mb=ca(e,u,v);v.style="fillColor=#000000;strokeColor=#000000;";var yc=null,Zc=null,$c=null;if("Tablet"==e.AndroidDeviceName||"Mini Tablet"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Tablet"==e.CustomDeviceType)v.style+="shape=mxgraph.android.tab2;",yc=new mxCell("",new mxGeometry(.112,.077,.77*r,.85*p),mb),e.KeyboardShown&&(Zc=new mxCell("",new mxGeometry(.112,
.727,.77*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.112,.077,.77*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));else if("Large Phone"==e.AndroidDeviceName||"Phone"==e.AndroidDeviceName||"custom"==e.AndroidDeviceName&&"Phone"==e.CustomDeviceType)v.style+="shape=mxgraph.android.phone2;",yc=new mxCell("",new mxGeometry(.04,.092,.92*r,.816*p),mb),e.KeyboardShown&&(Zc=new mxCell("",
new mxGeometry(.04,.708,.92*r,.2*p),"shape=mxgraph.android.keyboard;"+mb)),e.FullScreen||($c=new mxCell("",new mxGeometry(.04,.092,.92*r,.03*p),"shape=mxgraph.android.statusBar;strokeColor=#33b5e5;fillColor=#000000;fontColor=#33b5e5;fontSize="+.015*p+";"+mb));yc.vertex=!0;yc.geometry.relative=!0;v.insert(yc);"Dark"==e.Scheme?yc.style+="fillColor=#111111;":"Light"==e.Scheme&&(yc.style+="fillColor=#ffffff;");null!=Zc&&(Zc.vertex=!0,Zc.geometry.relative=!0,v.insert(Zc));null!=$c&&($c.vertex=!0,$c.geometry.relative=
!0,v.insert($c))}v.style+=b(v.style,e,u,v);break;case "AndroidAlertDialog":var ac=new mxCell("",new mxGeometry(0,0,r,30),"strokeColor=none;fillColor=none;spacingLeft=9;");ac.vertex=!0;v.insert(ac);var Qa=new mxCell("",new mxGeometry(0,25,r,10),"shape=line;strokeColor=#33B5E5;");Qa.vertex=!0;v.insert(Qa);var qd=new mxCell("",new mxGeometry(0,30,r,p-30),"strokeColor=none;fillColor=none;verticalAlign=top;");qd.vertex=!0;v.insert(qd);var ib=new mxCell("",new mxGeometry(0,p-25,.5*r,25),"fillColor=none;");
@@ -14440,12 +14444,12 @@ break;case "AndroidTextBox":v.value=m(e.Label);v.style+=a(e.Label,G);var Ad=new
r,.15*p,.7*r,.7*p),"ellipse;fillColor=#33B5E5;strokeWidth=1;"),Pc.vertex=!0,v.insert(Pc));"Dark"==e.Scheme?(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;strokeColor=#272727;",e.Checked?(Pc.style+="strokeColor=#1F5C73;",v.style+="fillColor=#193C49;"):v.style+="fillColor=#111111;"):(v.style+="shape=ellipse;perimeter=ellipsePerimeter;strokeWidth=1;fillColor=#ffffff;strokeColor=#5C5C5C;",e.Checked&&(Pc.style+="strokeColor=#999999;"));v.style+=b(v.style,e,u,v);break;case "AndroidCheckBox":var ie=
null;e.Checked&&(ie=new mxCell("",new mxGeometry(.25*r,.05*-p,r,.8*p),"shape=mxgraph.ios7.misc.check;strokeColor=#33B5E5;strokeWidth=2;"),ie.vertex=!0,v.insert(ie));v.style="Dark"==e.Scheme?v.style+"strokeWidth=1;strokeColor=#272727;fillColor=#111111;":v.style+"strokeWidth=1;strokeColor=#5C5C5C;fillColor=#ffffff;";v.style+=b(v.style,e,u,v);break;case "AndroidToggle":v.style="Dark"==e.Scheme?e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#666666;":v.style+"shape=mxgraph.android.switch_off;fillColor=#666666;":
e.Checked?v.style+"shape=mxgraph.android.switch_on;fillColor=#E6E6E6;":v.style+"shape=mxgraph.android.switch_off;fillColor=#E6E6E6;";v.style+=b(v.style,e,u,v);break;case "AndroidSlider":v.style+="shape=mxgraph.android.progressScrubberFocused;dx="+e.BarPosition+";fillColor=#33b5e5;";v.style+=b(v.style,e,u,v);break;case "iOSSegmentedControl":cc=parseInt(e.Tabs);Gb=r;v.style+="strokeColor=none;fillColor=none;";0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),
-"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ca(e,u):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),
-Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+ca(e,u));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),
+"strokeColor="+e.FillColor+";"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=a(e["Tab_"+l],G),Ta[l].style=e.Selected==l?Ta[l].style+ba(e,u):Ta[l].style+"fillColor=none;";v.style+=b(v.style,e,u,v);break;case "iOSSlider":v.style+="shape=mxgraph.ios7ui.slider;strokeColor="+e.FillColor+";fillColor=#ffffff;strokeWidth=2;barPos="+100*e.BarPosition+";";v.style+=b(v.style,e,u,v);break;case "iOSProgressBar":v=new mxCell("",new mxGeometry(Math.round(Z),Math.round(aa+.25*p),Math.round(r),
+Math.round(.5*p)),"html=1;overflow=block;blockSpacing=1;whiteSpace=wrap;strokeColor=none;fillColor=#B5B5B5;");v.vertex=!0;zd=new mxCell("",new mxGeometry(0,0,r*e.BarPosition,Math.round(.5*p)),"strokeColor=none;"+ba(e,u));zd.vertex=!0;v.insert(zd);v.style+=b(v.style,e,u,v);break;case "iOSPageControls":v.style+="shape=mxgraph.ios7ui.pageControl;strokeColor=#D6D6D6;";v.style+=b(v.style,e,u,v);break;case "iOSStatusBar":v.style+="shape=mxgraph.ios7ui.appBar;strokeColor=#000000;";var Da=new mxCell(m(e.Text),
new mxGeometry(.35*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.Text,G);var Cb=new mxCell(m(e.Carrier),new mxGeometry(.09*r,0,.2*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.Carrier,G);v.style+=b(v.style,e,u,v);break;case "iOSSearchBar":v.value=m(e.Search);v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v,G)+a(e.Search,G);var Ja=new mxCell("",new mxGeometry(.3*r,.3*p,.4*p,.4*p),"shape=mxgraph.ios7.icons.looking_glass;strokeColor=#000000;fillColor=none;");
Ja.vertex=!0;v.insert(Ja);break;case "iOSNavBar":v.value=m(e.Title);v.style+="shape=partialRectangle;top=0;right=0;left=0;strokeColor=#979797;"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);Da=new mxCell(m(e.LeftText),new mxGeometry(.03*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Da.vertex=!0;v.insert(Da);Da.style+=a(e.LeftText,G);Cb=new mxCell(m(e.RightText),new mxGeometry(.65*r,0,.3*r,p),"strokeColor=none;fillColor=none;");Cb.vertex=!0;v.insert(Cb);Cb.style+=a(e.RightText,G);Ja=new mxCell("",new mxGeometry(.02*
r,.2*p,.3*p,.5*p),"shape=mxgraph.ios7.misc.left;strokeColor=#007AFF;strokeWidth=2;");Ja.vertex=!0;v.insert(Ja);break;case "iOSTabs":cc=parseInt(e.Tabs);Gb=r;v.style+="shape=partialRectangle;right=0;left=0;bottom=0;strokeColor=#979797;";v.style+=b(v.style,e,u,v);0<cc&&(Gb/=cc);Ta=[];Qa=[];for(l=0;l<cc;l++)Ta[l]=new mxCell("",new mxGeometry(l*Gb,0,Gb,p),"strokeColor=none;"),Ta[l].vertex=!0,v.insert(Ta[l]),Ta[l].value=m(e["Tab_"+l]),Ta[l].style+=G?"overflow=block;blockSpacing=1;html=1;fontSize=13;"+
-lb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+M(e["Tab_"+l])+K(e["Tab_"+l])+Q(e["Tab_"+l])+S(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*
+lb:f(e["Tab_"+l])+k(e["Tab_"+l])+q(e["Tab_"+l])+t(e["Tab_"+l])+C(e["Tab_"+l])+I(e["Tab_"+l])+N(e["Tab_"+l])+K(e["Tab_"+l])+O(e["Tab_"+l])+S(e["Tab_"+l]),Ta[l].style+="verticalAlign=bottom;",Ta[l].style=e.Selected==l?Ta[l].style+"fillColor=#BBBBBB;":Ta[l].style+"fillColor=none;";break;case "iOSDatePicker":var dc=new mxCell("",new mxGeometry(0,0,.5*r,.2*p),"strokeColor=none;fillColor=none;");dc.vertex=!0;v.insert(dc);dc.value=m(e.Option11);dc.style+=a(e.Option11,G);var ec=new mxCell("",new mxGeometry(.5*
r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");ec.vertex=!0;v.insert(ec);ec.value=m(e.Option21);ec.style+=a(e.Option21,G);var fc=new mxCell("",new mxGeometry(.65*r,0,.15*r,.2*p),"strokeColor=none;fillColor=none;");fc.vertex=!0;v.insert(fc);fc.value=m(e.Option31);fc.style+=a(e.Option31,G);var gc=new mxCell("",new mxGeometry(0,.2*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");gc.vertex=!0;v.insert(gc);gc.value=m(e.Option12);gc.style+=a(e.Option12,G);var hc=new mxCell("",new mxGeometry(.5*r,.2*
p,.15*r,.2*p),"strokeColor=none;fillColor=none;");hc.vertex=!0;v.insert(hc);hc.value=m(e.Option22);hc.style+=a(e.Option22,G);var ic=new mxCell("",new mxGeometry(.65*r,.2*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");ic.vertex=!0;v.insert(ic);ic.value=m(e.Option32);ic.style+=a(e.Option32,G);var qb=new mxCell("",new mxGeometry(0,.4*p,.5*r,.2*p),"strokeColor=none;fillColor=none;");qb.vertex=!0;v.insert(qb);qb.value=m(e.Option13);qb.style+=a(e.Option13,G);var rb=new mxCell("",new mxGeometry(.5*r,
.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");rb.vertex=!0;v.insert(rb);rb.value=m(e.Option23);rb.style+=a(e.Option23,G);var jc=new mxCell("",new mxGeometry(.65*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");jc.vertex=!0;v.insert(jc);jc.value=m(e.Option33);jc.style+=a(e.Option33,G);var sb=new mxCell("",new mxGeometry(.8*r,.4*p,.15*r,.2*p),"strokeColor=none;fillColor=none;");sb.vertex=!0;v.insert(sb);sb.value=m(e.Option43);sb.style+=a(e.Option43,G);var tb=new mxCell("",new mxGeometry(0,
@@ -14473,48 +14477,48 @@ b(v.style,e,u,v);var Ub=new mxCell("",new mxGeometry(0,0,.25*r,p),"fillColor=non
lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);switch(e.AccessoryIndicatorType){case "Disclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);break;case "DetailDisclosure":Ja=new mxCell("",new mxGeometry(.91*r,.35*p,.15*p,.3*p),"shape=mxgraph.ios7.misc.right;strokeColor=#D2D2D6;");Ja.vertex=!0;v.insert(Ja);$a=new mxCell("",new mxGeometry(.79*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");
$a.vertex=!0;v.insert($a);break;case "DetailIndicator":$a=new mxCell("",new mxGeometry(.87*r,.25*p,.5*p,.5*p),"shape=mxgraph.ios7.icons.info;strokeColor=#007AFF;fillColor=#ffffff;");$a.vertex=!0;v.insert($a);break;case "CheckMark":Ja=new mxCell("",new mxGeometry(.89*r,.37*p,.4*p,.26*p),"shape=mxgraph.ios7.misc.check;strokeColor=#007AFF;strokeWidth=2;"),Ja.vertex=!0,v.insert(Ja)}break;case "iOSTableGroupedSectionBreak":v.style+="shape=partialRectangle;left=0;right=0;fillColor=#EFEFF4;strokeColor=#C8C7CC;";
Da=new mxCell("",new mxGeometry(0,0,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Da.vertex=!0;v.insert(Da);Da.value=m(e.text);Da.style+=G?"html=1;fontSize=13;"+lb:f(e.text)+k(e.text)+q(e.text)+t(e.text);Cb=new mxCell("",new mxGeometry(0,.6*p,r,.4*p),"fillColor=none;strokeColor=none;spacing=10;align=left;");Cb.vertex=!0;v.insert(Cb);Cb.value=m(e["bottom-text"]);Cb.style+=G?"html=1;fontSize=13;"+lb:f(e["bottom-text"])+k(e["bottom-text"])+q(e["bottom-text"])+t(e["bottom-text"]);
-break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=J(e,u)+ca(e,u)+O(e,u,x)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*
-p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=J(e,u)+ca(e,u)+O(e,u,E)+W(e)+sa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=J(e,u)+ca(e,u)+O(e,u,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=
+break;case "iOSTablePlainHeaderFooter":v.style+="fillColor=#F7F7F7;strokeColor=none;align=left;spacingLeft=5;spacing=0;";v.value=m(e.text);v.style+=G?"fontSize=13;":f(e.text)+q(e.text)+t(e.text);v.style+=b(v.style,e,u,v,G);break;case "SMPage":if(e.Group){v.style+="strokeColor=none;fillColor=none;";var x=new mxCell("",new mxGeometry(0,0,.9*r,.9*p),"rounded=1;arcSize=3;part=1;");x.vertex=!0;v.insert(x);x.style+=J(e,u)+ba(e,u)+Q(e,u,x)+W(e)+sa(e);var E=new mxCell("",new mxGeometry(.1*r,.1*p,.9*r,.9*
+p),"rounded=1;arcSize=3;part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=J(e,u)+ba(e,u)+Q(e,u,E)+W(e)+sa(e)+a(e,G);e.Future&&(x.style+="dashed=1;fixDash=1;",E.style+="dashed=1;fixDash=1;")}else v.style+="rounded=1;arcSize=3;",e.Future&&(v.style+="dashed=1;fixDash=1;"),v.value=m(e.Text),v.style+=J(e,u)+ba(e,u)+Q(e,u,v)+W(e)+sa(e)+a(e,G);v.style+=b(v.style,e,u,v,G);break;case "SMHome":case "SMPrint":case "SMSearch":case "SMSettings":case "SMSitemap":case "SMSuccess":case "SMVideo":case "SMAudio":case "SMCalendar":case "SMChart":case "SMCloud":case "SMDocument":case "SMForm":case "SMGame":case "SMUpload":x=
null;switch(w.Class){case "SMHome":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.home;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMPrint":x=new mxCell("",new mxGeometry(.5*r-.4*p,.19*p,.8*p,.62*p),"part=1;shape=mxgraph.office.devices.printer;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSearch":x=new mxCell("",new mxGeometry(.5*r-.4*p,.1*p,.8*p,.8*p),"part=1;shape=mxgraph.office.concepts.search;flipH=1;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
break;case "SMSettings":x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.settings;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSitemap":x=new mxCell("",new mxGeometry(.5*r-.35*p,.2*p,.7*p,.6*p),"part=1;shape=mxgraph.office.sites.site_collection;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMSuccess":x=new mxCell("",new mxGeometry(.5*r-.3*p,.25*p,.6*p,.5*p),"part=1;shape=mxgraph.mscae.general.checkmark;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
break;case "SMVideo":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.office.concepts.video_play;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMAudio":x=new mxCell("",new mxGeometry(.5*r-.3*p,.2*p,.6*p,.6*p),"part=1;shape=mxgraph.mscae.general.audio;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMCalendar":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
-break;case "SMChart":var Y=ca(e,u);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
+break;case "SMChart":var Y=ba(e,u);Y=""==Y?"#ffffff;":Y.replace("fillColor=","");x=new mxCell("",new mxGeometry(.5*r-.35*p,.15*p,.7*p,.7*p),"part=1;shape=mxgraph.ios7.icons.pie_chart;fillColor=#e6e6e6;fillOpacity=50;strokeWidth=4;strokeColor="+Y);break;case "SMCloud":x=new mxCell("",new mxGeometry(.5*r-.4*p,.27*p,.8*p,.46*p),"part=1;shape=mxgraph.networks.cloud;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMDocument":x=new mxCell("",new mxGeometry(.5*r-.25*p,.15*p,.5*p,.7*p),"part=1;shape=mxgraph.mscae.enterprise.document;fillColor=#e6e6e6;opacity=50;strokeColor=none;");
break;case "SMForm":x=new mxCell("",new mxGeometry(.5*r-.4*p,.15*p,.8*p,.7*p),"part=1;shape=mxgraph.office.concepts.form;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMGame":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.general.game_controller;fillColor=#e6e6e6;opacity=50;strokeColor=none;");break;case "SMUpload":x=new mxCell("",new mxGeometry(.5*r-.4*p,.2*p,.8*p,.6*p),"part=1;shape=mxgraph.mscae.enterprise.backup_online;fillColor=#e6e6e6;opacity=50;strokeColor=none;")}x.vertex=
!0;v.insert(x);x.value=m(e.Text);x.style+=a(e,G);v.style+=b(v.style,e,u,v);break;case "UMLMultiplicityBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.9*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(0,.1*p,.9*r,.9*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "UMLConstraintBlock":var Bc=new mxCell("",new mxGeometry(0,0,.25*p,p),"shape=curlyBracket;rounded=1;");
-Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bc.style+=O(e,u,Bc);Cc.style+=O(e,u,Cc);na.style+=q(e,na);Bc.style+=b(Bc.style,e,u,Bc);Cc.style+=b(Cc.style,e,u,Cc);na.style+=b(na.style,e,u,na,G);break;case "UMLTextBlock":v.value=
-m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ba(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,p),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,
-.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ba(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,
+Bc.vertex=!0;v.insert(Bc);var Cc=new mxCell("",new mxGeometry(r-.25*p,0,.25*p,p),"shape=curlyBracket;rounded=1;flipH=1;");Cc.vertex=!0;v.insert(Cc);na=new mxCell("",new mxGeometry(.25*p,0,r-.5*p,p),"strokeColor=none;fillColor=none;");na.vertex=!0;na.value=m(e);v.insert(na);v.style="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bc.style+=Q(e,u,Bc);Cc.style+=Q(e,u,Cc);na.style+=q(e,na);Bc.style+=b(Bc.style,e,u,Bc);Cc.style+=b(Cc.style,e,u,Cc);na.style+=b(na.style,e,u,na,G);break;case "UMLTextBlock":v.value=
+m(e.Text);v.style+="strokeColor=none;"+a(e.Text,G);v.style+=b(v.style,e,u,v,G);break;case "UMLProvidedInterfaceBlock":case "UMLProvidedInterfaceBlockV2":mb=ca(e,u,v);e.Rotatio=null;var Vb=b(v.style,e,u,v,G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Td=.8*r,Ff=r-Td,Qc=new mxCell("",new mxGeometry(.2,0,Td,p),"shape=ellipse;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);Qa=new mxCell("",new mxGeometry(0,
+.5,Ff,1),"line;"+Vb);Qa.geometry.relative=!0;Qa.vertex=!0;v.insert(Qa);break;case "UMLComponentBoxBlock":case "UMLComponentBoxBlockV2":v.value=m(e);v.style="html=1;dropTarget=0;"+b(v.style,e,u,v,G);var nb=new mxCell("",new mxGeometry(1,0,15,15),"shape=component;jettyWidth=8;jettyHeight=4;");nb.geometry.relative=!0;nb.geometry.offset=new mxPoint(-20,5);nb.vertex=!0;v.insert(nb);break;case "UMLAssemblyConnectorBlock":case "UMLAssemblyConnectorBlockV2":mb=ca(e,u,v);e.Rotatio=null;Vb=b(v.style,e,u,v,
G);-1==Vb.indexOf(mxConstants.STYLE_STROKEWIDTH)&&(Vb=mxConstants.STYLE_STROKEWIDTH+"=1;"+Vb);v.style="group;dropTarget=0;pointerEvents=0;"+mb;var Re=.225*r,Se=.1*r;Td=r-Re-Se;Qc=new mxCell("",new mxGeometry(.225,0,Td,p),"shape=providedRequiredInterface;verticalLabelPosition=bottom;"+Vb);Qc.vertex=!0;Qc.geometry.relative=!0;v.insert(Qc);zb=new mxCell("",new mxGeometry(0,.5,Re,1),"line;"+Vb);zb.geometry.relative=!0;zb.vertex=!0;v.insert(zb);Ab=new mxCell("",new mxGeometry(.9,.5,Se,1),"line;"+Vb);Ab.geometry.relative=
!0;Ab.vertex=!0;v.insert(Ab);break;case "BPMNActivity":v.value=m(e.Text);switch(e.bpmnActivityType){case 1:v.style+=a(e.Text,G);break;case 2:v.style+="shape=ext;double=1;"+a(e.Text,G);break;case 3:v.style+="shape=ext;dashed=1;dashPattern=2 5;"+a(e.Text,G);break;case 4:v.style+="shape=ext;strokeWidth=2;"+a(e.Text,G)}if(0!=e.bpmnTaskType){switch(e.bpmnTaskType){case 1:x=new mxCell("",new mxGeometry(0,0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 2:x=new mxCell("",new mxGeometry(0,
0,19,12),"shape=message;");x.geometry.offset=new mxPoint(4,7);break;case 3:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.user_task;");x.geometry.offset=new mxPoint(4,5);break;case 4:x=new mxCell("",new mxGeometry(0,0,15,10),"shape=mxgraph.bpmn.manual_task;");x.geometry.offset=new mxPoint(4,7);break;case 5:x=new mxCell("",new mxGeometry(0,0,18,13),"shape=mxgraph.bpmn.business_rule_task;");x.geometry.offset=new mxPoint(4,7);break;case 6:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.service_task;");
-x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),x.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ca(e,u);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");x.style+=Rc+Y+"part=1;"}else x.style+=ca(e,u)+J(e,u)+"part=1;";x.geometry.relative=!0;x.vertex=!0;v.insert(x)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
-0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
-x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",
-new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,
--20);x.style+=ca(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ca(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);
-Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ca(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=
+x.geometry.offset=new mxPoint(4,5);break;case 7:x=new mxCell("",new mxGeometry(0,0,15,15),"shape=mxgraph.bpmn.script_task;"),x.geometry.offset=new mxPoint(4,5)}if(1==e.bpmnTaskType){var Rc=ba(e,u);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");Rc=Rc.replace("fillColor","strokeColor");""==Y&&(Y="fillColor=#000000;");""==Rc&&(Rc="strokeColor=#ffffff;");x.style+=Rc+Y+"part=1;"}else x.style+=ba(e,u)+J(e,u)+"part=1;";x.geometry.relative=!0;x.vertex=!0;v.insert(x)}var Bd=0;0!=e.bpmnActivityMarker1&&Bd++;
+0!=e.bpmnActivityMarker2&&Bd++;var Db=0;1==Bd?Db=-7.5:2==Bd&&(Db=-19);if(0!=e.bpmnActivityMarker1){switch(e.bpmnActivityMarker1){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");
+x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",
+new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ba(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}2==Bd&&(Db=5);if(0!=e.bpmnActivityMarker2){switch(e.bpmnActivityMarker2){case 1:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=plus;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 2:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=mxgraph.bpmn.loop;part=1;");x.geometry.offset=new mxPoint(Db,
+-20);x.style+=ba(e,u)+J(e,u);break;case 3:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 4:x=new mxCell("",new mxGeometry(.5,1,15,15),"shape=parallelMarker;direction=south;part=1;");x.geometry.offset=new mxPoint(Db,-20);x.style+=ba(e,u)+J(e,u);break;case 5:x=new mxCell("",new mxGeometry(.5,1,15,10),"shape=mxgraph.bpmn.ad_hoc;strokeColor=none;flipH=1;part=1;");x.geometry.offset=new mxPoint(Db,-17);
+Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");x.style+=Y;break;case 6:x=new mxCell("",new mxGeometry(.5,1,15,11),"shape=mxgraph.bpmn.compensation;part=1;"),x.geometry.offset=new mxPoint(Db,-18),x.style+=ba(e,u)+J(e,u)}x.geometry.relative=!0;x.vertex=!0;v.insert(x)}v.style+=b(v.style,e,u,v);break;case "BPMNEvent":v.style+="shape=mxgraph.bpmn.shape;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);if(1==e.bpmnDashed)switch(e.bpmnEventGroup){case 0:v.style+=
"outline=eventNonint;";break;case 1:v.style+="outline=boundNonint;";break;case 2:v.style+="outline=end;"}else switch(e.bpmnEventGroup){case 0:v.style+="outline=standard;";break;case 1:v.style+="outline=throwing;";break;case 2:v.style+="outline=end;"}switch(e.bpmnEventType){case 1:v.style+="symbol=message;";break;case 2:v.style+="symbol=timer;";break;case 3:v.style+="symbol=escalation;";break;case 4:v.style+="symbol=conditional;";break;case 5:v.style+="symbol=link;";break;case 6:v.style+="symbol=error;";
-break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ia=T(e.FillColor),je=Rd(ia,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ia="swimlaneFillColor="+je+";";v.value=
-m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");
+break;case 7:v.style+="symbol=cancel;";break;case 8:v.style+="symbol=compensation;";break;case 9:v.style+="symbol=signal;";break;case 10:v.style+="symbol=multiple;";break;case 11:v.style+="symbol=parallelMultiple;";break;case 12:v.style+="symbol=terminate;"}v.style+=b(v.style,e,u,v,G);break;case "BPMNChoreography":try{var ja=U(e.FillColor),je=Rd(ja,.75),Jc=f(e.Name).match(/\d+/),db=Math.max(mxUtils.getSizeForString(e.Name.t,Jc?Jc[0]:"13",null,r-10).height,24);ja="swimlaneFillColor="+je+";";v.value=
+m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);var Wb=db;Jc=f(e.TaskName).match(/\d+/);var pc=e.TaskHeight?.75*e.TaskHeight:Math.max(mxUtils.getSizeForString(e.TaskName.t,Jc?Jc[0]:"13",null,r-10).height+15,24),Dc=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");
Dc.value=m(e.TaskName);Dc.vertex=!0;v.insert(Dc);Dc.style+=a(e.TaskName,G);Dc.style+=b(Dc.style,e,u,Dc,G);Wb+=pc;X=[];for(l=0;l<e.Fields;l++){var Ud=e["Participant"+(l+1)];Jc=f(Ud).match(/\d+/);pc=Math.max(mxUtils.getSizeForString(Ud.t,Jc?Jc[0]:"13",null,r-10).height,24);X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;resizeHeight=0;fillColor=none;spacingTop=-1;spacingLeft=3;spacingRight=3;");Wb+=pc;X[l].vertex=!0;v.insert(X[l]);X[l].style+=a(Ud,G);X[l].style+=b(X[l].style,e,u,X[l],G);
-X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=ca(e,u)+J(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";
+X[l].value=m(Ud)}}catch(gb){console.log(gb)}break;case "BPMNConversation":v.style+="shape=hexagon;perimeter=hexagonPerimeter2;";v.value=m(e.Text);v.style=0==e.bpmnConversationType?v.style+sa(e):v.style+"strokeWidth=2;";e.bpmnIsSubConversation&&(x=new mxCell("",new mxGeometry(.5,1,12,12),"shape=plus;part=1;"),x.geometry.offset=new mxPoint(-6,-17),x.style+=ba(e,u)+J(e,u),x.geometry.relative=!0,x.vertex=!0,v.insert(x));v.style+=b(v.style,e,u,v,G);break;case "BPMNGateway":v.style+="shape=mxgraph.bpmn.shape;perimeter=rhombusPerimeter;background=gateway;verticalLabelPosition=bottom;verticalAlign=top;";
switch(e.bpmnGatewayType){case 0:v.style+="outline=none;symbol=general;";break;case 1:v.style+="outline=none;symbol=exclusiveGw;";break;case 2:v.style+="outline=catching;symbol=multiple;";break;case 3:v.style+="outline=none;symbol=parallelGw;";break;case 4:v.style+="outline=end;symbol=general;";break;case 5:v.style+="outline=standard;symbol=multiple;";break;case 6:v.style+="outline=none;symbol=complexGw;";break;case 7:v.style+="outline=standard;symbol=parallelMultiple;"}v.style+=b(v.style,e,u,v);
-v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,
-3);x.style+=ca(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=J(e,u),x.geometry.relative=
+v.value=m(e.Text);v.style+=a(e,G);break;case "BPMNData":v.style+="shape=note;size=14;";switch(e.bpmnDataType){case 0:v.value=m(e.Text);e.Text&&!e.Text.t&&(e.Text.t=" ");break;case 1:x=new mxCell("",new mxGeometry(.5,1,12,10),"shape=parallelMarker;part=1;");x.geometry.offset=new mxPoint(-6,-15);x.style+=ba(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);break;case 2:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;");x.geometry.offset=new mxPoint(3,
+3);x.style+=ba(e,u)+J(e,u);x.geometry.relative=!0;x.vertex=!0;v.insert(x);v.style+="verticalLabelPosition=bottom;verticalAlign=top;";Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;");Da.geometry.offset=new mxPoint(0,14);Da.geometry.relative=!0;Da.vertex=!0;v.insert(Da);Da.value=m(e.Text);Da.style+=a(e,G);break;case 3:x=new mxCell("",new mxGeometry(0,0,12,10),"shape=singleArrow;part=1;arrowWidth=0.4;arrowSize=0.4;"),x.geometry.offset=new mxPoint(3,3),x.style+=J(e,u),x.geometry.relative=
!0,x.vertex=!0,v.insert(x),Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),x.style+=Y,Da=new mxCell("",new mxGeometry(0,0,r,20),"strokeColor=none;fillColor=none;"),Da.geometry.offset=new mxPoint(0,14),Da.geometry.relative=!0,Da.vertex=!0,v.insert(Da),Da.value=m(e.Text),Da.style+=a(e,G)}v.style+=b(v.style,e,u,v);break;case "BPMNBlackPool":v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,p),"fillColor=#000000;strokeColor=none;opacity=30;");
x.vertex=!0;v.insert(x);break;case "DFDExternalEntityBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,.95*r,.95*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.05*p,.95*r,.95*p),"part=1;");E.vertex=!0;v.insert(E);E.value=m(e.Text);E.style+=a(e.Text,G);E.style+=b(E.style,e,u,E,G);break;case "GSDFDDataStoreBlock":v.value=m(e.Text);v.style+="shape=partialRectangle;right=0;"+a(e.Text,G);
v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,.2*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Number);x.style+=a(e.Number,G);x.style+=b(x.style,e,u,x,G);break;case "OrgBlock":var Te="";for(Ga in e.Active)"Photo"!=Ga&&e.Active[Ga]&&(Te+=m(e[Ga],!0));if(e.Active.Photo){var ke=.4*r;v.style+="spacingLeft="+ke+";imageWidth="+(ke-4)+";imageHeight="+(ke-4)+";imageAlign=left;imageVerticalAlign=top;image="+g(e.Photo)}v.value=Te;v.style+=b(v.style,e,u,v,!0);break;case "DefaultTableBlock":try{Fb=
-e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ka(We,"fillOpacity"),Ye=e.LineColor,Jf=ka(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;p=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l+
-","+fa;if(Dd[Lb])Z+=Cd[fa];else{var kb=e["CellFill_"+Lb],ne=e["NoBand_"+Lb],Xd=e["CellSize_"+Lb],qc=e["Cell_"+Lb],Ze=e["Cell_"+Lb+"_VAlign"],Kf=e["Cell_"+Lb+"_TRotation"],Lf=e["CellBorderWidthH_"+Lb],Mf=e["CellBorderColorH_"+Lb],Nf=e["CellBorderStrokeStyleH_"+Lb],Of=e["CellBorderWidthV_"+Lb],Pf=e["CellBorderColorV_"+Lb],Qf=e["CellBorderStrokeStyleV_"+Lb],$e=Wd?Pf:Mf,af=ka($e,"strokeOpacity"),bf=Wd?Of:Lf,Sc=Wd?Qf:Nf;kb=Gf&&!ne?0==l%2?le:Ue&&!ne?0==fa%2?le:me:me:Ue&&!ne?0==fa%2?le:me:kb;var Rf=ka(kb,
-"fillOpacity")||If;r=Cd[fa];var cf=p;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ca({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,T($e),
-T(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,u,oa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,oa)+I(qc)+M(qc)+K(qc)+Q(qc))+S(qc)+H(qc);v.insert(oa);Z+=r}}aa+=p}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
+e.RowHeights.length;Rb=e.ColWidths.length;var Vd=[],Cd=[];for(l=0;l<Fb;l++)Vd[l]=.75*e.RowHeights[l];for(fa=0;fa<Rb;fa++)Cd[fa]=.75*e.ColWidths[fa];v.style="group;dropTarget=0;pointerEvents=0;";var le=e.BandedColor1,me=e.BandedColor2,Gf=e.BandedRows,Ue=e.BandedCols,Wd=e.HideH,Hf=e.HideV,Ve=e.TextVAlign,We=e.FillColor,Xe=e.StrokeStyle;delete e.StrokeStyle;var If=ia(We,"fillOpacity"),Ye=e.LineColor,Jf=ia(Ye,"strokeOpacity");aa=0;var Dd={};for(l=0;l<Fb;l++){Z=0;p=Vd[l];for(fa=0;fa<Rb;fa++){var Lb=l+
+","+fa;if(Dd[Lb])Z+=Cd[fa];else{var kb=e["CellFill_"+Lb],ne=e["NoBand_"+Lb],Xd=e["CellSize_"+Lb],qc=e["Cell_"+Lb],Ze=e["Cell_"+Lb+"_VAlign"],Kf=e["Cell_"+Lb+"_TRotation"],Lf=e["CellBorderWidthH_"+Lb],Mf=e["CellBorderColorH_"+Lb],Nf=e["CellBorderStrokeStyleH_"+Lb],Of=e["CellBorderWidthV_"+Lb],Pf=e["CellBorderColorV_"+Lb],Qf=e["CellBorderStrokeStyleV_"+Lb],$e=Wd?Pf:Mf,af=ia($e,"strokeOpacity"),bf=Wd?Of:Lf,Sc=Wd?Qf:Nf;kb=Gf&&!ne?0==l%2?le:Ue&&!ne?0==fa%2?le:me:me:Ue&&!ne?0==fa%2?le:me:kb;var Rf=ia(kb,
+"fillOpacity")||If;r=Cd[fa];var cf=p;Yc=r;for(var Mb=l+1;Mb<l+Xd.h;Mb++)if(null!=Vd[Mb]){cf+=Vd[Mb];Dd[Mb+","+fa]=!0;for(var Tc=fa+1;Tc<fa+Xd.w;Tc++)Dd[Mb+","+Tc]=!0}for(Mb=fa+1;Mb<fa+Xd.w;Mb++)if(null!=Cd[Mb])for(Yc+=Cd[Mb],Dd[l+","+Mb]=!0,Tc=l+1;Tc<l+Xd.h;Tc++)Dd[Tc+","+Mb]=!0;var oa=new mxCell("",new mxGeometry(Z,aa,Yc,cf),"shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;"+(Hf?"left=0;right=0;":"")+(Wd?"top=0;bottom=0;":"")+ba({FillColor:kb||We})+Zb(mxConstants.STYLE_STROKECOLOR,U($e),
+U(Ye))+(null!=bf?Zb(mxConstants.STYLE_STROKEWIDTH,Math.round(.75*parseFloat(bf)),"1"):"")+(af?af:Jf)+Rf+"verticalAlign="+(Ze?Ze:Ve?Ve:"middle")+";"+qa({StrokeStyle:Sc?Sc:Xe?Xe:"solid"})+(Kf?"horizontal=0;":""));oa.vertex=!0;oa.value=m(qc);oa.style+=b(oa.style,e,u,oa,G)+(G?"fontSize=13;":f(qc)+q(qc)+t(qc)+C(qc,oa)+I(qc)+N(qc)+K(qc)+O(qc))+S(qc)+H(qc);v.insert(oa);Z+=r}}aa+=p}}catch(gb){console.log(gb)}break;case "VSMDedicatedProcessBlock":case "VSMProductionControlBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process;spacingTop=15;";
"VSMDedicatedProcessBlock"==w.Class?v.value=m(e.Text):"VSMProductionControlBlock"==w.Class&&(v.value=m(e.Resources));v.style+=b(v.style,e,u,v,G);"VSMDedicatedProcessBlock"==w.Class&&(x=new mxCell("",new mxGeometry(0,1,11,9),"part=1;shape=mxgraph.lean_mapping.operator;"),x.geometry.relative=!0,x.geometry.offset=new mxPoint(4,-13),x.vertex=!0,v.insert(x),x.style+=b(x.style,e,u,x));Da=new mxCell("",new mxGeometry(0,0,r,15),"strokeColor=none;fillColor=none;part=1;");Da.vertex=!0;v.insert(Da);Da.value=
m(e.Title);Da.style+=a(e.Title,G);e.Text=null;break;case "VSMSharedProcessBlock":v.style+="shape=mxgraph.lean_mapping.manufacturing_process_shared;spacingTop=-5;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);Da=new mxCell("",new mxGeometry(.1*r,.3*p,.8*r,.6*p),"part=1;");Da.vertex=!0;v.insert(Da);Da.value=m(e.Resource);Da.style+=a(e.Resource,G);Da.style+=b(Da.style,e,u,Da,G);break;case "VSMWorkcellBlock":v.style+="shape=mxgraph.lean_mapping.work_cell;verticalAlign=top;spacingTop=-2;";
-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;",e,u,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ia),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";
-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ia=b("part=1;fillColor=none;",e,u,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ia),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=
+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSafetyBufferStockBlock":case "VSMDatacellBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ja=b("part=1;",e,u,v);0<bc&&(Bb/=bc);X=[];Qa=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),ja),X[l].vertex=!0,v.insert(X[l]),X[l].value=m(e["cell_"+l]),X[l].style+=a(e["cell_"+l],G);break;case "VSMInventoryBlock":v.style+="shape=mxgraph.lean_mapping.inventory_box;verticalLabelPosition=bottom;verticalAlign=top;";
+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);break;case "VSMSupermarketBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);Bb=p;bc=parseInt(e.Cells);ja=b("part=1;fillColor=none;",e,u,v);0<bc&&(Bb/=bc);X=[];Ub=[];for(l=1;l<=bc;l++)X[l]=new mxCell("",new mxGeometry(.5*r,(l-1)*Bb,.5*r,Bb),"shape=partialRectangle;left=0;"+ja),X[l].vertex=!0,v.insert(X[l]),Ub[l]=new mxCell("",new mxGeometry(0,(l-1)*Bb,r,Bb),"strokeColor=none;fillColor=none;part=1;"),Ub[l].vertex=!0,v.insert(Ub[l]),Ub[l].value=
m(e["cell_"+l]),Ub[l].style+=a(e["cell_"+l],G);break;case "VSMFIFOLaneBlock":v.style+="shape=mxgraph.lean_mapping.fifo_sequence_flow;fontStyle=0;fontSize=18";v.style+=b(v.style,e,u,v);v.value="FIFO";break;case "VSMGoSeeProductionBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.17*r,.2*p,13,6),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;");x.vertex=!0;v.insert(x);
-x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ia="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ia);E.vertex=!0;v.insert(E);E.style+=b(E.style,
-e,u,E);var U=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ia);U.vertex=!0;v.insert(U);U.value=m(e.Text);U.style+=b(U.style,e,u,U,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=
+x.style+=b(x.style,e,u,x);break;case "VSMProductionKanbanBatchBlock":v.style+="strokeColor=none;fillColor=none;";ja="shape=card;size=18;flipH=1;part=1;";x=new mxCell("",new mxGeometry(.1*r,0,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.05*r,.1*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;"+ja);E.vertex=!0;v.insert(E);E.style+=b(E.style,
+e,u,E);var T=new mxCell("",new mxGeometry(0,.2*p,.9*r,.8*p),"shape=mxgraph.lean_mapping.go_see_production_scheduling;flipH=1;part=1;whiteSpace=wrap;html=1;spacing=2;"+ja);T.vertex=!0;v.insert(T);T.value=m(e.Text);T.style+=b(T.style,e,u,T,G);break;case "VSMElectronicInformationArrow":v.style="group;";v.value=m(e.Title);v.style+=a(e.Title,G);var va=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.lean_mapping.electronic_info_flow_edge;html=1;entryX=0;entryY=1;exitX=1;exitY=0;");va.edge=!0;va.geometry.relative=
1;D.addCell(va,v,null,v,v);break;case "AWSRoundedRectangleContainerBlock2":case "AWSRoundedRectangleContainerBlock":v.style+="strokeColor=none;fillColor=none;";e.Spotfleet?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,35,40),
"strokeColor=none;shape=mxgraph.aws3.spot_instance;fillColor=#f58536;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.Beanstalk?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,30,40),"strokeColor=none;shape=mxgraph.aws3.elastic_beanstalk;fillColor=#759C3E;"),
E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.EC2?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,32,40),"strokeColor=none;shape=mxgraph.aws3.ec2;fillColor=#F58534;"),E.geometry.relative=
@@ -14523,15 +14527,15 @@ new mxPoint(30,0),E.vertex=!0,v.insert(E)):e.VPC?(x=new mxCell("",new mxGeometry
0),E.vertex=!0,v.insert(E)):e.AWS?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,60,40),"strokeColor=none;shape=mxgraph.aws3.cloud;fillColor=#F58534;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):
e.Corporate?(x=new mxCell("",new mxGeometry(0,0,r,p-20),"resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;"),x.geometry.offset=new mxPoint(0,20),x.geometry.relative=!0,x.vertex=!0,v.insert(x),x.value=m(e.Title),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,0,25,40),"strokeColor=none;shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(30,0),E.vertex=!0,v.insert(E)):
(v.style="resizeWidth=1;resizeHeight=1;fillColor=none;align=center;verticalAlign=bottom;spacing=2;rounded=1;arcSize=10;",v.value=m(e.Title),v.style+=b(v.style,e,u,v,G));break;case "AWSElasticComputeCloudBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.ec2;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRoute53Block2":v.style+="strokeColor=none;shape=mxgraph.aws3.route_53;verticalLabelPosition=bottom;align=center;verticalAlign=top;";
-v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ca(e,u);va=new mxCell("",new mxGeometry(0,
+v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "AWSRDBSBlock2":v.style+="strokeColor=none;shape=mxgraph.aws3.rds;verticalLabelPosition=bottom;align=center;verticalAlign=top;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);break;case "NET_RingNetwork":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"ellipse;html=1;strokeColor=#29AAE1;strokeWidth=2;");oa.vertex=!0;v.insert(oa);var Oa=[oa];oa.style+=ba(e,u);va=new mxCell("",new mxGeometry(0,
0,0,0),"edgeStyle=none;rounded=0;endArrow=none;dashed=0;html=1;strokeColor=#29AAE1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;sc(.5*r,0,va,F,D,Oa,v,oa);sc(.855*r,.145*p,va,F,D,Oa,v,oa);sc(r,.5*p,va,F,D,Oa,v,oa);sc(.855*r,.855*p,va,F,D,Oa,v,oa);sc(.5*r,p,va,F,D,Oa,v,oa);sc(.145*r,.855*p,va,F,D,Oa,v,oa);sc(0,.5*p,va,F,D,Oa,v,oa);sc(.145*r,.145*p,va,F,D,Oa,v,oa);break;case "NET_Ethernet":v.style+="strokeColor=none;fillColor=none;";oa=new mxCell("",new mxGeometry(0,.5*p-10,r,20),"shape=mxgraph.networks.bus;gradientColor=none;gradientDirection=north;fontColor=#ffffff;perimeter=backbonePerimeter;backboneSize=20;fillColor=#29AAE1;strokeColor=#29AAE1;");
oa.vertex=!0;v.insert(oa);Oa=[oa];va=new mxCell("",new mxGeometry(0,0,0,0),"strokeColor=#29AAE1;edgeStyle=none;rounded=0;endArrow=none;html=1;strokeWidth=2;");va.geometry.relative=!0;va.edge=!0;Oa=[oa];var Ed=r/e.NumTopNodes;for(l=0;l<e.NumTopNodes;l++)sc(.5*Ed+l*Ed,0,va,F,D,Oa,v,oa);Ed=r/e.NumBottomNodes;for(l=0;l<e.NumBottomNodes;l++)sc(.5*Ed+l*Ed,p,va,F,D,Oa,v,oa);break;case "EE_OpAmp":v.style+="shape=mxgraph.electrical.abstract.operational_amp_1;";v.value=m(e.Title);v.style+=b(v.style,e,u,v,G);
e.ToggleCharge&&(v.style+="flipV=1;");break;case "EIMessageChannelBlock":case "EIDatatypeChannelBlock":case "EIInvalidMessageChannelBlock":case "EIDeadLetterChannelBlock":case "EIGuaranteedDeliveryBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);"EIMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDatatypeChannelBlock"==
w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.dataChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIInvalidMessageChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.invalidMessageChannel;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(.45*-r,0)):"EIDeadLetterChannelBlock"==w.Class?(x=new mxCell("",new mxGeometry(.5,.5,.9*r,20),"shape=mxgraph.eip.deadLetterChannel;fillColor=#818181;part=1;"),x.geometry.offset=
new mxPoint(.45*-r,0)):"EIGuaranteedDeliveryBlock"==w.Class&&(x=new mxCell("",new mxGeometry(.5,.5,20,27),"shape=cylinder;fillColor=#818181;part=1;"),x.geometry.offset=new mxPoint(-10,-7));x.geometry.relative=!0;x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(.15*r,.25*p,.85*r,.25*p,va,F,D,Oa,v,oa);break;
-case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
-U.geometry.relative=!0;U.geometry.offset=new mxPoint(.4*-r,-10);U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=J(e,u);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
-da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);U.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Fd=
+case "EIChannelAdapterBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.07*p,.21*r,.86*p),"fillColor=#FFFF33;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.26*r,.09*p,.2*r,.82*p),"shape=mxgraph.eip.channel_adapter;fillColor=#4CA3D9;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);T=new mxCell("",new mxGeometry(1,.5,.35*r,20),"shape=mxgraph.eip.messageChannel;fillColor=#818181;part=1;");
+T.geometry.relative=!0;T.geometry.offset=new mxPoint(.4*-r,-10);T.vertex=!0;v.insert(T);T.style+=b(T.style,e,u,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=none;dashed=0;html=1;strokeWidth=1;endFill=1;endSize=2;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!0);E.insertEdge(ea,!1);ea.style+=J(e,u);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=1;exitY=0.5;entryX=0;entryY=0.5;endArrow=block;startArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=2;startFill=1;startSize=2;");
+da.geometry.relative=!0;da.edge=!0;E.insertEdge(da,!0);T.insertEdge(da,!1);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageBlock":case "EICommandMessageBlock":case "EIDocumentMessageBlock":case "EIEventMessageBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);var Fd=
e.Messages,oe=(p-17)/Fd;E=[];va=[];for(l=0;l<Fd;l++){var Gd=oe*(l+1)-3;E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;");E[l].vertex=!0;v.insert(E[l]);switch(w.Class){case "EIMessageBlock":E[l].value=m(e["message_"+(l+1)]);E.style+=a(e["message_"+(l+1)],G);break;case "EICommandMessageBlock":E[l].value="C";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIDocumentMessageBlock":E[l].value="D";E[l].style+="fontStyle=1;fontSize=13;";break;case "EIEventMessageBlock":E[l].value="E",E[l].style+=
"fontStyle=1;fontSize=13;"}E[l].style+=b(E[l].style,e,u,E[l]);va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");va[l].geometry.relative=!0;va[l].edge=!0;x.insertEdge(va[l],!1);E[l].insertEdge(va[l],!0);va[l].style+=b(va[l].style,e,u,va[l]);var Kc=[];Kc.push(new mxPoint(Z+8.5,aa+Gd+10));va[l].geometry.points=Kc;F.push(D.addCell(va[l],null,null,null,null))}break;case "EIMessageEndpointBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.45*r,.25*p,.3*r,.5*p),"part=1;fillColor=#ffffff");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);va=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");va.geometry.relative=!0;va.edge=!0;fb(0,.5*p,.4*r,.5*p,va,F,D,Oa,v,oa);break;case "EIPublishSubscribeChannelBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
@@ -14542,21 +14546,21 @@ xa.geometry.relative=!0;xa.edge=!0;xa.style+=J(e,u);fb(.7*r,.1*p,.7*r,.5*p,xa,F,
e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.21*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");ea.geometry.relative=!0;ea.edge=!0;fb(.45*r,.33*p,.8*r,.33*p,ea,F,D,Oa,v,oa);E=new mxCell("",new mxGeometry(.64*r,.55*p,.16*r,.24*p),"part=1;fillColor=#ffffff;");E.vertex=!0;v.insert(E);E.style+=b(E.style,
e,u,E);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=none;rounded=0;endArrow=block;dashed=0;html=1;strokeColor=#818181;strokeWidth=1;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.55*r,.67*p,.2*r,.67*p,da,F,D,Oa,v,oa);break;case "EIReturnAddressBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.1*r,.15*p,.8*r,.7*p),"part=1;shape=mxgraph.eip.retAddr;fillColor=#FFE040;");x.vertex=!0;v.insert(x);
x.style+=b(x.style,e,u,x);break;case "EICorrelationIDBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.04*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.2*r,.56*p,.2*r,.32*p),"part=1;");E.vertex=!0;v.insert(E);E.value="A";E.style+="fontStyle=1;fontSize=13;";x.style+=b(x.style,e,u,x);ea=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,u,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*p));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));U=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");U.vertex=!0;v.insert(U);U.style+=J(e,u)+sa(e);U.style+=b(U.style,e,u,U);ta=new mxCell("",new mxGeometry(.76*
-r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=J(e,u)+O(e,u,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;U.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*p));da.geometry.points=
-df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*r,.4*p,.1*r,.19*p),
-"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
-x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*p)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);U.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
+0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");ea.geometry.relative=!0;ea.edge=!0;x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.style+=b(ea.style,e,u,ea);Kc=[];Kc.push(new mxPoint(Z+.13*r,aa+.72*p));ea.geometry.points=Kc;F.push(D.addCell(ea,null,null,null,null));T=new mxCell("",new mxGeometry(.6*r,.06*p,.18*r,.28*p),"ellipse;fillColor=#808080;part=1;");T.vertex=!0;v.insert(T);T.style+=J(e,u)+sa(e);T.style+=b(T.style,e,u,T);ta=new mxCell("",new mxGeometry(.76*
+r,.56*p,.2*r,.32*p),"part=1;");ta.vertex=!0;v.insert(ta);ta.style+=J(e,u)+Q(e,u,ta)+sa(e)+qa(e);ta.value="B";ta.style+="fontStyle=1;fontSize=13;fillColor=#ffffff;";ta.style+=b(ta.style,e,u,ta);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;part=1;");da.geometry.relative=!0;da.edge=!0;T.insertEdge(da,!1);ta.insertEdge(da,!0);da.style+=b(da.style,e,u,da);var df=[];df.push(new mxPoint(Z+.69*r,aa+.72*p));da.geometry.points=
+df;F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;endArrow=block;endFill=1;endSize=6;part=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));break;case "EIMessageSequenceBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("1",new mxGeometry(.2*r,.4*p,.1*r,.19*p),
+"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("2",new mxGeometry(.45*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);T=new mxCell("3",new mxGeometry(.7*r,.4*p,.1*r,.19*p),"fontStyle=1;fillColor=#ffffff;fontSize=13;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,u,T);ea=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");
+x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.geometry.points=[new mxPoint(Z+.375*r,aa+.15*p)];ea.geometry.relative=!0;ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"curved=1;endArrow=block;html=1;endSize=3;part=1;");E.insertEdge(da,!1);T.insertEdge(da,!0);da.geometry.points=[new mxPoint(Z+.675*r,aa+.15*p)];da.geometry.relative=!0;da.edge=!0;da.style+=b(da.style,e,u,da);F.push(D.addCell(da,null,null,null,null));break;case "EIMessageExpirationBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.3*r,.2*p,.4*r,.6*p),"shape=mxgraph.ios7.icons.clock;fillColor=#ffffff;flipH=1;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageBrokerBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.38*r,.42*p,.24*r,.16*p),"part=1;fillColor=#aefe7d;");
-x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);U=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");U.vertex=!0;v.insert(U);U.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,
-.61*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);U.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);
+x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=new mxCell("",new mxGeometry(.38*r,0,.24*r,.16*p),"part=1;");E.vertex=!0;v.insert(E);E.style+=b(E.style,e,u,E);T=new mxCell("",new mxGeometry(.76*r,.23*p,.24*r,.16*p),"");T.vertex=!0;v.insert(T);T.style=E.style;var ta=new mxCell("",new mxGeometry(.76*r,.61*p,.24*r,.16*p),"");ta.vertex=!0;v.insert(ta);ta.style=E.style;var Yd=new mxCell("",new mxGeometry(.38*r,.84*p,.24*r,.16*p),"");Yd.vertex=!0;v.insert(Yd);Yd.style=E.style;var Zd=new mxCell("",new mxGeometry(0,
+.61*p,.24*r,.16*p),"");Zd.vertex=!0;v.insert(Zd);Zd.style=E.style;var $d=new mxCell("",new mxGeometry(0,.23*p,.24*r,.16*p),"");$d.vertex=!0;v.insert($d);$d.style=E.style;ea=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(ea,!1);E.insertEdge(ea,!0);ea.edge=!0;ea.style+=b(ea.style,e,u,ea);F.push(D.addCell(ea,null,null,null,null));da=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(da,!1);T.insertEdge(da,!0);da.edge=!0;da.style+=b(da.style,e,u,da);
F.push(D.addCell(da,null,null,null,null));xa=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(xa,!1);ta.insertEdge(xa,!0);xa.edge=!0;xa.style+=b(xa.style,e,u,xa);F.push(D.addCell(xa,null,null,null,null));Ya=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Ya,!1);Yd.insertEdge(Ya,!0);Ya.edge=!0;Ya.style+=b(Ya.style,e,u,Ya);F.push(D.addCell(Ya,null,null,null,null));var Lc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Lc,
!1);Zd.insertEdge(Lc,!0);Lc.edge=!0;Lc.style+=b(Lc.style,e,u,Lc);F.push(D.addCell(Lc,null,null,null,null));var Mc=new mxCell("",new mxGeometry(0,0,0,0),"endArrow=none;part=1;");x.insertEdge(Mc,!1);$d.insertEdge(Mc,!0);Mc.edge=!0;Mc.style+=b(Mc.style,e,u,Mc);F.push(D.addCell(Mc,null,null,null,null));break;case "EIDurableSubscriberBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);ea=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");
ea.geometry.relative=!0;ea.edge=!0;fb(.05*r,.5*p,.6*r,.25*p,ea,F,D,Oa,v,oa);da=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;rounded=0;endArrow=block;endFill=1;endSize=6;");da.geometry.relative=!0;da.edge=!0;fb(.05*r,.5*p,.6*r,.75*p,da,F,D,Oa,v,oa);x=new mxCell("",new mxGeometry(.7*r,.1*p,.15*r,.32*p),"shape=mxgraph.eip.durable_subscriber;part=1;fillColor=#818181;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIControlBusBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";
-v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);U=new mxCell("",
-new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");U.vertex=!0;v.insert(U);U.style+=b(U.style,e,u,U);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);U.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,
+v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.25*r,.25*p,.5*r,.5*p),"shape=mxgraph.eip.control_bus;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "EIMessageHistoryBlock":v.style+="strokeColor=none;fillColor=none;verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,17,17),"ellipse;fillColor=#808080;part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);T=new mxCell("",
+new mxGeometry(r-45,30,30,20),"shape=mxgraph.mockup.misc.mail2;fillColor=#FFE040;part=1;");T.vertex=!0;v.insert(T);T.style+=b(T.style,e,u,T);xa=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");xa.geometry.relative=!0;xa.edge=!0;x.insertEdge(xa,!1);T.insertEdge(xa,!0);xa.style+=b(xa.style,e,u,xa);xa.geometry.points=[new mxPoint(Z+8.5,aa+40)];F.push(D.addCell(xa,null,null,null,null));ta=new mxCell("",new mxGeometry(r-45,
p-20,20,20),"part=1;");ta.vertex=!0;v.insert(ta);ta.value=m(e.message_0);ta.style+=a(e.message_0,G);ta.style+=b(ta.style,e,u,ta,G);Ya=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;");Ya.geometry.relative=!0;Ya.edge=!0;x.insertEdge(Ya,!1);ta.insertEdge(Ya,!0);Ya.style+=b(Ya.style,e,u,Ya);Ya.geometry.points=[new mxPoint(Z+8.5,aa+p-10)];F.push(D.addCell(Ya,null,null,null,null));Fd=e.HistoryMessages;oe=(p-75)/Fd;E=[];va=
-[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,U.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Kc=[],Kc.push(new mxPoint(Z+
+[];for(l=0;l<Fd;l++)Gd=oe*(l+1)+30,E[l]=new mxCell("",new mxGeometry(r-20,Gd,20,20),"part=1;"),E[l].vertex=!0,E[l].value=m(e["message_"+(l+1)]),E.style+=a(e["message_"+(l+1)],G),v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l],G),va[l]=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;rounded=0;exitX=0;exitY=0.5;endArrow=none;dashed=0;html=1;"),va[l].geometry.relative=!0,va[l].edge=!0,T.insertEdge(va[l],!1),E[l].insertEdge(va[l],!0),va[l].style+=b(va[l].style,e,u,va[l]),Kc=[],Kc.push(new mxPoint(Z+
r-30,aa+Gd+10)),va[l].geometry.points=Kc,F.push(D.addCell(va[l],null,null,null,null));break;case "Equation":LucidImporter.hasMath=!0;v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);v.value="$$"+e.Latex+"$$";break;case "fpDoor":v.style+="shape=mxgraph.floorplan.doorRight;";0>e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpWall":v.style+="labelPosition=center;verticalAlign=bottom;verticalLabelPosition=top;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.style=v.style.replace("rotation=180;",
"");break;case "fpDoubleDoor":v.style+="shape=mxgraph.floorplan.doorDouble;";0<e.DoorAngle&&(v.style+="flipV=1;");v.style+=b(v.style,e,u,v);break;case "fpRestroomLights":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=new mxCell("",new mxGeometry(0,0,r,.25*p),"part=1;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);E=[];var ef=.02*r,pe=(r-2*ef)/e.LightCount,ff=.8*pe;for(l=0;l<e.LightCount;l++)E[l]=new mxCell("",new mxGeometry(ef+pe*l+(pe-ff)/2,.25*p,ff,.75*p),"ellipse;part=1;"),
E[l].vertex=!0,v.insert(E[l]),E[l].style+=b(E[l].style,e,u,E[l]);break;case "fpRestroomSinks":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];var gf=r/e.SinkCount;for(l=0;l<e.SinkCount;l++)x[l]=new mxCell("",new mxGeometry(gf*l,0,gf,p),"part=1;shape=mxgraph.floorplan.sink_2;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]);break;case "fpRestroomStalls":v.style+="strokeColor=none;fillColor=none;";var Eb=.1*r/e.StallCount;x=new mxCell("",new mxGeometry(0,
@@ -14566,35 +14570,35 @@ Id[l].vertex=!0,v.insert(Id[l]),Id[l].style+=se,Hd[l]=new mxCell("",new mxGeomet
"strokeColor=none;fillColor=none;";ae="edgeStyle=none;endArrow=none;part=1;";Y=J(e,u);Y=""==Y?"#000000;":Y.replace("strokeColor=","");Uc="shape=triangle;part=1;fillColor="+Y;Uc+=b(Uc,e,u,v);ha=p/e.numLines;da=[];Vc=[];for(l=0;l<e.numLines;l++)da[l]=new mxCell("",new mxGeometry(0,0,0,0),ae),da[l].geometry.relative=!0,da[l].edge=!0,fb(0,(l+.5)*ha,.96*r,(l+.5)*ha,da[l],F,D,Oa,v,oa),Vc[l]=new mxCell("",new mxGeometry(.95*r,(l+.2)*ha,.05*r,.6*ha),Uc),Vc[l].vertex=!0,v.insert(Vc[l]);break;case "PEVesselBlock":v.style+=
"verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);switch(e.vesselType){case 1:v.style+="shape=mxgraph.pid.vessels.pressurized_vessel;";break;case 2:v.style+="shape=hexagon;perimeter=hexagonPerimeter2;size=0.10;direction=south;"}v.style+=b(v.style,e,u,v,G);break;case "PEClosedTankBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);1==e.peakedRoof&&0==e.stumpType?v.style+="shape=mxgraph.pid.vessels.tank_(conical_roof);":1==e.stumpType&&(v.style+="shape=mxgraph.pid.vessels.tank_(boot);");
v.style+=b(v.style,e,u,v,G);break;case "PEColumnBlock":v.style+="verticalLabelPosition=bottom;verticalAlign=top;";v.value=m(e.Text);v.style=0==e.columnType?v.style+"shape=mxgraph.pid.vessels.pressurized_vessel;":v.style+"shape=mxgraph.pid.vessels.tank;";v.style+=b(v.style,e,u,v,G);break;case "PECompressorTurbineBlock":v.style+="strokeColor=none;fillColor=none;";v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,.2*p,r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");
-x.vertex=!0;v.insert(x);x.style+=ia;x.style+=b(x.style,e,u,x);ia="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.2*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.67*p,r,p,da,F,D,Oa,v,oa)):(x.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=
-!0,ea.edge=!0,ea.style+=ia,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.33*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ia,da.style+=b(da.style,e,u,da),fb(r,.8*p,r,p,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ia,xa.style+=b(xa.style,e,u,xa),fb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
+x.vertex=!0;v.insert(x);x.style+=ja;x.style+=b(x.style,e,u,x);ja="endSize=4;endArrow=block;endFill=1;";0==e.compressorType?(ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=!0,ea.edge=!0,ea.style+=ja,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.2*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=b(da.style,e,u,da),fb(r,.67*p,r,p,da,F,D,Oa,v,oa)):(x.style+="flipH=1;",ea=new mxCell("",new mxGeometry(0,0,0,0),""),ea.geometry.relative=
+!0,ea.edge=!0,ea.style+=ja,ea.style+=b(ea.style,e,u,ea),fb(0,0,0,.33*p,ea,F,D,Oa,v,oa),da=new mxCell("",new mxGeometry(0,0,0,0),""),da.geometry.relative=!0,da.edge=!0,da.style+=ja,da.style+=b(da.style,e,u,da),fb(r,.8*p,r,p,da,F,D,Oa,v,oa));1==e.centerLineType&&(xa=new mxCell("",new mxGeometry(0,0,0,0),""),xa.geometry.relative=!0,xa.edge=!0,xa.style+=ja,xa.style+=b(xa.style,e,u,xa),fb(.2*r,.5*p,.8*r,.5*p,xa,F,D,Oa,v,oa));break;case "PEMotorDrivenTurbineBlock":v.style+="shape=ellipse;perimeter=ellipsePerimeter;";
v.value=m(e.Text);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(.2*r,.2*p,.6*r,.6*p),"part=1;shape=trapezoid;perimeter=trapezoidPerimeter;direction=south;");x.vertex=!0;v.insert(x);x.style+=b(x.style,e,u,x);break;case "PEIndicatorBlock":case "PEIndicator2Block":case "PESharedIndicatorBlock":case "PEComputerIndicatorBlock":case "PESharedIndicator2Block":case "PEProgrammableIndicatorBlock":switch(w.Class){case "PEIndicatorBlock":v.style+="shape=mxgraph.pid2inst.discInst;";break;case "PEIndicator2Block":v.style+=
"shape=mxgraph.pid2inst.indicator;indType=inst;";break;case "PESharedIndicatorBlock":v.style+="shape=mxgraph.pid2inst.sharedCont;";break;case "PEComputerIndicatorBlock":v.style+="shape=mxgraph.pid2inst.compFunc;";break;case "PESharedIndicator2Block":v.style+="shape=mxgraph.pid2inst.indicator;indType=ctrl;";break;case "PEProgrammableIndicatorBlock":v.style+="shape=mxgraph.pid2inst.progLogCont;"}v.style+=b(v.style,e,u,v);"PEIndicator2Block"==w.Class||"PESharedIndicator2Block"==w.Class?(x=new mxCell("",
new mxGeometry(0,0,r,.5*r),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*r,r,.5*r),"part=1;strokeColor=none;fillColor=none;")):(x=new mxCell("",new mxGeometry(0,0,r,.5*p),"part=1;strokeColor=none;fillColor=none;"),x.vertex=!0,v.insert(x),x.value=m(e.TopText),x.style+=a(e.TopText,G),x.style+=b(x.style,e,u,x,G),E=new mxCell("",new mxGeometry(0,.5*p,r,.5*p),"part=1;strokeColor=none;fillColor=none;"));
E.vertex=!0;v.insert(E);E.value=m(e.BotText);E.style+=a(e.BotText,G);E.style+=b(E.style,e,u,E,G);switch(e.instrumentLocation){case 0:v.style+="mounting=field;";break;case 1:v.style+="mounting=inaccessible;";break;case 2:v.style+="mounting=room;";break;case 3:v.style+="mounting=local;"}break;case "PEGateValveBlock":case "PEGlobeValveBlock":case "PEAngleValveBlock":case "PEAngleGlobeValveBlock":case "PEPoweredValveBlock":var te=!1;"PEPoweredValveBlock"==w.Class?1!=e.poweredHandOperated&&(te=!0):1!=
e.handOperated&&(te=!0);if(te){e=h(w).Properties;P=e.BoundingBox;var Sf=P.h;P.h="PEAngleValveBlock"==w.Class||"PEAngleGlobeValveBlock"==w.Class?.7*P.h:.6*P.h;v=new mxCell("",new mxGeometry(Math.round(.75*P.x+wc),Math.round(.75*(P.y+Sf-P.h)+xc),Math.round(.75*P.w),Math.round(.75*P.h)),"");v.vertex=!0;Qb(v,w,D)}if("PEPoweredValveBlock"==w.Class)v.style+="shape=mxgraph.pid2valves.valve;verticalLabelPosition=bottom;verticalAlign=top;",v.style+=b(v.style,e,u,v),1==e.poweredHandOperated?(v.style+="valveType=gate;actuator=powered;",
-x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+M(e.PoweredText)+Q(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(w.Class){case "PEGateValveBlock":v.style+=
-"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
-new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,110),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
-ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
-0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=
+x=new mxCell("",new mxGeometry(.325*r,0,.35*r,.35*p),"part=1;strokeColor=none;fillColor=none;spacingTop=2;"),x.vertex=!0,v.insert(x),x.value=m(e.PoweredText),x.style+=(G?"":q(e.PoweredText)+t(e.PoweredText)+C(e.PoweredText)+I(e.PoweredText)+N(e.PoweredText)+O(e.PoweredText)+S(e.PoweredText))+"fontSize=6;"+H(e.PoweredText),x.style+=b(x.style,e,u,x,G)):v.style+="valveType=gate;";else{v.style+="verticalLabelPosition=bottom;verticalAlign=top;shape=mxgraph.pid2valves.valve;";v.value=m(e.Text);switch(w.Class){case "PEGateValveBlock":v.style+=
+"valveType=gate;";break;case "PEGlobeValveBlock":v.style+="valveType=globe;";break;case "PEAngleValveBlock":v.style+="valveType=angle;";break;case "PEAngleGlobeValveBlock":v.style+="valveType=angleGlobe;flipH=1;"}1==e.handOperated&&(v.style+="actuator=man;")}v.style+=b(v.style,e,u,v,G);break;case "UI2BrowserBlock":v.style+="shape=mxgraph.mockup.containers.browserWindow;mainText=;";1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-130),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
+new mxCell("",new mxGeometry(1,0,20,p-110),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,110),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
+ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);break;case "UI2WindowBlock":v.value=m(e.Title);v.style+="shape=mxgraph.mockup.containers.window;mainText=;align=center;verticalAlign=top;spacing=5;"+(G?"fontSize=13;":f(e.Title)+q(e.Title)+t(e.Title));1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,
+0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=
!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v,G);break;case "UI2DialogBlock":v.value=m(e.Text);v.style+=a(e.Text,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=new mxPoint(-25,-10);
-E.vertex=!0;x.insert(E);1==e.vScroll&&(U=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(-20,30),U.vertex=!0,v.insert(U),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,
+E.vertex=!0;x.insert(E);1==e.vScroll&&(T=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-50),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-30),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(-20,30),T.vertex=!0,v.insert(T),v.style+="spacingRight=20;");1==e.hScroll&&(ta=1==e.vScroll?new mxCell("",new mxGeometry(0,
1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),ta.geometry.relative=!0,ta.geometry.offset=new mxPoint(0,-20),ta.vertex=!0,v.insert(ta));v.style+=b(v.style,e,u,v);e.Text=null;break;case "UI2AccordionBlock":x=[];ha=25;for(l=0;l<=e.Panels-1;l++)x[l]=l<e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"):
l==e.Selected-1?new mxCell("",new mxGeometry(0,l*ha,r,ha),"part=1;fillColor=none;"):new mxCell("",new mxGeometry(0,p-(e.Panels-e.Selected)*ha+(l-e.Selected)*ha,r,ha),"part=1;fillColor=#000000;fillOpacity=25;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Panel_"+(l+1)]),x[l].style+=a(e["Panel_"+(l+1)],G),0>x[l].style.indexOf(";align=")&&(x[l].style+="align=left;spacingLeft=5;");var Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?
new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-20-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,e.Selected*ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,
-e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-
+e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20-(e.Panels-e.Selected)*ha),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,u,T));ta=1==e.vScroll?new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-
20-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;"):new mxCell("",new mxGeometry(0,e.Selected*ha,r-20,p-e.Selected*ha-(e.Panels-e.Selected)*ha),"part=1;fillColor=none;strokeColor=none;");ta.vertex=!0;v.insert(ta);ta.value=m(e.Content_1);ta.style+=a(e.Content_1,G);!G&&0>ta.style.indexOf(";align=")&&(ta.style+="align=left;spacingLeft=5;");v.style+=b(v.style,e,u,v);break;case "UI2TabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;var Hb=3,Ha=(r+Hb)/
(e.Tabs+1),hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(10+l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=
!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),
-E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=
-Ua,U.style+=b(U.style,e,u,U));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=
+E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=
+Ua,T.style+=b(T.style,e,u,T));break;case "UI2TabBar2ContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];ha=25;Hb=3;Ha=(r+Hb)/e.Tabs;hb=new mxCell("",new mxGeometry(0,ha,r,p-ha),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha-Hb,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=
b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha-Hb,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;");Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):
-new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
-U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,p),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+
+new mxCell("",new mxGeometry(1,0,20,p-ha),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,ha),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(0,1,r-20,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(0,1,r,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),
+T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,u,T));break;case "UI2VTabBarContainerBlock":v.style+="strokeColor=none;fillColor=none;";x=[];E=[];Hb=3;ha=25+Hb;Ha=80;zc=10;hb=new mxCell("",new mxGeometry(Ha,0,r-Ha,p),"part=1;");hb.vertex=!0;v.insert(hb);hb.style+=b(hb.style,e,u,hb);for(l=0;l<=e.Tabs-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),""),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Tab_"+
(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G)):(x[l]=new mxCell("",new mxGeometry(0,zc+l*ha,Ha,ha-Hb),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,ha-Hb),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].value=m(e["Tab_"+(l+1)]),E[l].style+=a(e["Tab_"+(l+1)],G)),0>E[l].style.indexOf(";align=")&&(E[l].style+="align=left;spacingLeft=2;"),E[l].style+=b(E[l].style,
e,u,E[l]);Ua=J(e,u);Ua=Ua.replace("strokeColor","fillColor2");""==Ua&&(Ua="fillColor2=#000000;");1==e.vScroll&&(E=1==e.hScroll?new mxCell("",new mxGeometry(1,0,20,p-20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"):new mxCell("",new mxGeometry(1,0,20,p),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=95;direction=north;resizeHeight=1;"),E.geometry.relative=!0,E.geometry.offset=new mxPoint(-20,0),E.vertex=!0,v.insert(E),v.style+="spacingRight=20;",
-E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(U=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),U.geometry.relative=!0,U.geometry.offset=new mxPoint(0,-20),U.vertex=!0,v.insert(U),U.style+=Ua,U.style+=b(U.style,e,u,U));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
+E.style+=Ua,E.style+=b(E.style,e,u,E));1==e.hScroll&&(T=1==e.vScroll?new mxCell("",new mxGeometry(Ha,1,r-20-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"):new mxCell("",new mxGeometry(Ha,1,r-Ha,20),"part=1;shape=mxgraph.mockup.navigation.scrollBar;barPos=5;resizeWidth=1;"),T.geometry.relative=!0,T.geometry.offset=new mxPoint(0,-20),T.vertex=!0,v.insert(T),T.style+=Ua,T.style+=b(T.style,e,u,T));break;case "UI2CheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";
ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,l*ha+.5*ha-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,
2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2HorizontalCheckBoxBlock":v.style+="strokeColor=none;fillColor=none;";Ha=r/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(l*Ha,.5*p-5,10,10),"labelPosition=right;part=1;verticalLabelPosition=middle;align=left;verticalAlign=middle;spacingLeft=3;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Option_"+(l+1)]),x[l].style+=
a(e["Option_"+(l+1)],G),x[l].style+=b(x[l].style,e,u,x[l],G),null!=e.Selected[l+1]&&1==e.Selected[l+1]&&(Y=J(e,u),Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"shape=mxgraph.mscae.general.checkmark;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2RadioBlock":v.style+="strokeColor=none;fillColor=none;";ha=p/e.Options;x=[];E=[];for(l=0;l<e.Options;l++)x[l]=new mxCell("",new mxGeometry(0,
@@ -14603,35 +14607,35 @@ b(E[l].style,e,u,E[l]));break;case "UI2HorizontalRadioBlock":v.style+="strokeCol
Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),E[l]=new mxCell("",new mxGeometry(2,2,6,6),"ellipse;part=1;"),E[l].vertex=!0,x[l].insert(E[l]),E[l].style+=Y,E[l].style+=b(E[l].style,e,u,E[l]));break;case "UI2SelectBlock":v.style+="shape=mxgraph.mockup.forms.comboBox;strokeColor=#999999;fillColor=#ddeeff;align=left;fillColor2=#aaddff;mainText=;fontColor=#666666";v.value=m(e.Selected);break;case "UI2HSliderBlock":case "UI2VSliderBlock":v.style+="shape=mxgraph.mockup.forms.horSlider;sliderStyle=basic;handleStyle=handle;";
"UI2VSliderBlock"==w.Class&&(v.style+="direction=south;");v.style+="sliderPos="+100*e.ScrollVal+";";v.style+=b(v.style,e,u,v);break;case "UI2DatePickerBlock":v.style+="strokeColor=none;fillColor=none;";x=new mxCell("",new mxGeometry(0,0,.6*r,p),"part=1;");x.vertex=!0;v.insert(x);x.value=m(e.Date);x.style+=a(e.Date,G);v.style+=b(v.style,e,u,v);Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");E=new mxCell("",new mxGeometry(.75*r,0,.25*r,p),"part=1;shape=mxgraph.gmdl.calendar;");
E.vertex=!0;v.insert(E);E.style+=Y;E.style+=b(E.style,e,u,E);break;case "UI2SearchBlock":v.value=m(e.Search);v.style+="shape=mxgraph.mockup.forms.searchBox;mainText=;flipH=1;align=left;spacingLeft=26;"+a(e.Search,G);v.style+=b(v.style,e,u,v,G);break;case "UI2NumericStepperBlock":Y=J(e,u);Y=Y.replace("strokeColor","fillColor");""==Y&&(Y="fillColor=#000000;");v.value=m(e.Number);v.style+="shape=mxgraph.mockup.forms.spinner;spinLayout=right;spinStyle=normal;adjStyle=triangle;mainText=;align=left;spacingLeft=8;"+
-Y+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{kb=T(e.FillColor);var Kd=T(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:T(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:T(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
+Y+a(e.Number,G);v.style+=b(v.style,e,u,v,G);break;case "UI2TableBlock":try{kb=U(e.FillColor);var Kd=U(e.LineColor);Sc="";var be=20;v.style="html=1;overflow=fill;verticalAlign=top;spacing=0;";var Ld='<table style="width:100%;height:100%;border-collapse: collapse;border: 1px solid '+Kd+';">',tc=e.Data.split("\n");var hf=e.AltRow&&"default"!=e.AltRow?"none"==e.AltRow?kb:U(e.AltRow):Rd(kb,.95);Oc=e.Header&&"default"!=e.Header?"none"==e.Header?hf:U(e.Header):Rd(kb,.8);if("full"==e.GridLines)Sc="border: 1px solid "+
Kd,be=19;else if("row"==e.GridLines)Sc="border-bottom: 1px solid "+Kd,be=19;else if("default"==e.GridLines||"column"==e.GridLines)Sc="border-right: 1px solid "+Kd;tc=tc.filter(function(gb){return gb});/^\{[^}]*\}$/.test(tc[tc.length-1])&&tc.pop();Fc=tc[0].split(",").length;var jf="";for(fa=0;fa<Fc-1;fa++)jf+=" , ";for(l=tc.length;l<Math.ceil(p/20);l++)tc.push(jf);for(l=0;l<tc.length;l++){Ld+='<tr style="height: '+be+"px;background:"+(0==l?Oc:l%2?kb:hf)+'">';var kf=tc[l].split(",");for(fa=0;fa<kf.length;fa++){var Md=
-e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?T(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"strokeColor=none;"),
+e["Cell_"+l+"_"+fa],Tf=Md&&Md.m&&Md.m[0]&&"c"==Md.m[0].n?U(Md.m[0].v):Kd;Ld+='<td style="height: '+be+"px;color:"+Tf+";"+Sc+'">'+mxUtils.htmlEntities(kf[fa])+"</td>"}Ld+="</tr>"}Ld+="</table>";v.value=Ld}catch(gb){console.log(gb)}break;case "UI2ButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),""),E[l].vertex=!0,v.insert(E[l])):(x[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"strokeColor=none;"),
x[l].vertex=!0,v.insert(x[l]),x[l].style+=x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2VerticalButtonBarBlock":v.style+=b(v.style,e,u,v);x=[];E=[];ha=p/e.Buttons;for(l=0;l<=e.Buttons-1;l++)l==e.Selected-1?(E[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),""),E[l].vertex=!0,v.insert(E[l])):
(x[l]=new mxCell("",new mxGeometry(0,l*ha,r,ha),"strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].style+=b(x[l].style,e,u,x[l]),E[l]=new mxCell("",new mxGeometry(0,0,r,ha),"fillColor=#000000;fillOpacity=25;"),E[l].vertex=!0,x[l].insert(E[l])),E[l].value=m(e["Button_"+(l+1)]),E[l].style+=a(e["Button_"+(l+1)],G),E[l].style+=b(E[l].style,e,u,E[l],G);break;case "UI2LinkBarBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)0!=
l?(E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"shape=partialRectangle;top=0;bottom=0;right=0;fillColor=none;"),E[l].style+=b(E[l].style,e,u,E[l])):E[l]=new mxCell("",new mxGeometry(l*Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),E[l].vertex=!0,v.insert(E[l]),E[l].value=m(e["Link_"+(l+1)]),E[l].style+=a(e["Link_"+(l+1)],G);break;case "UI2BreadCrumbsBlock":v.style+="strokeColor=none;fillColor=none;";v.style+=b(v.style,e,u,v);x=[];E=[];Ha=r/e.Links;for(l=0;l<e.Links;l++)x[l]=new mxCell("",new mxGeometry(l*
Ha,0,Ha,p),"fillColor=none;strokeColor=none;"),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["Link_"+(l+1)]),x[l].style+=a(e["Link_"+(l+1)],G);for(l=1;l<e.Links;l++)E[l]=new mxCell("",new mxGeometry(l/e.Links,.5,6,10),"shape=mxgraph.ios7.misc.right;"),E[l].geometry.relative=!0,E[l].geometry.offset=new mxPoint(-3,-5),E[l].vertex=!0,v.insert(E[l]);break;case "UI2MenuBarBlock":v.style+="strokeColor=none;";v.style+=b(v.style,e,u,v);x=[];Ha=r/(e.Buttons+1);for(l=0;l<=e.Buttons-1;l++)x[l]=l!=e.Selected-
1?new mxCell("",new mxGeometry(0,0,Ha,p),"strokeColor=none;fillColor=none;resizeHeight=1;"):new mxCell("",new mxGeometry(0,0,Ha,p),"fillColor=#000000;fillOpacity=25;strokeColor=none;resizeHeight=1;"),x[l].geometry.relative=!0,x[l].geometry.offset=new mxPoint(l*Ha,0),x[l].vertex=!0,v.insert(x[l]),x[l].value=m(e["MenuItem_"+(l+1)]),x[l].style+=a(e["MenuItem_"+(l+1)],G);break;case "UI2AtoZBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_0);v.value="0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z";
-break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];nb=[];var jd=[];ha=p/e.Lines;ia=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ia&&(ia=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),
-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=J(e,u),
-Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ia&&(ia=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ia,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*
+break;case "UI2PaginationBlock":v.style+="fillColor=none;strokeColor=none;"+a(e.Text_prev);v.value=m(e.Text_prev)+" ";for(l=0;l<e.Links;l++)v.value+=m(e["Link_"+(l+1)])+" ";v.value+=m(e.Text_next);break;case "UI2ContextMenuBlock":v.style+=b(v.style,e,u,v);X=[];nb=[];var jd=[];ha=p/e.Lines;ja=null;for(l=0;l<e.Lines;l++)null!=e["Item_"+(l+1)]&&(null==ja&&(ja=""+f(e["Item_"+(l+1)])+q(e["Item_"+(l+1)])+t(e["Item_"+(l+1)])),X[l]=new mxCell("",new mxGeometry(0,l*p/e.Lines,r,ha),"strokeColor=none;fillColor=none;spacingLeft=20;align=left;html=1;"),
+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja,X[l].value=m(e["Item_"+(l+1)])),null!=e.Icons[l+1]&&null!=X[l]&&("dot"==e.Icons[l+1]?(nb[l]=new mxCell("",new mxGeometry(0,.5,8,8),"ellipse;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6,-4)):"check"==e.Icons[l+1]&&(nb[l]=new mxCell("",new mxGeometry(0,.5,7,8),"shape=mxgraph.mscae.general.checkmark;strokeColor=none;"),nb[l].geometry.offset=new mxPoint(6.5,-4)),null!=nb[l]&&(nb[l].geometry.relative=!0,nb[l].vertex=!0,X[l].insert(nb[l]),Y=J(e,u),
+Y=Y.replace("strokeColor","fillColor"),""==Y&&(Y="fillColor=#000000;"),nb[l].style+=Y)),null!=e["Shortcut_"+(l+1)]&&(null==ja&&(ja=""+f(e["Shortcut_"+(l+1)])+q(e["Shortcut_"+(l+1)])+t(e["Shortcut_"+(l+1)])),jd[l]=new mxCell("",new mxGeometry(.6*r,l*p/e.Lines,.4*r,ha),"strokeColor=none;fillColor=none;spacingRight=3;align=right;html=1;"),jd[l].vertex=!0,v.insert(jd[l]),jd[l].style+=ja,jd[l].value=m(e["Shortcut_"+(l+1)])),null!=e.Dividers[l+1]&&(X[l]=new mxCell("",new mxGeometry(.05*r,l*p/e.Lines,.9*
r,ha),"shape=line;strokeWidth=1;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=J(e,u));break;case "UI2ProgressBarBlock":v.style+="shape=mxgraph.mockup.misc.progressBar;fillColor2=#888888;barPos="+100*e.ScrollVal+";";break;case "CalloutSquareBlock":case "UI2TooltipSquareBlock":v.value=m(e.Tip||e.Text);v.style+="html=1;shape=callout;flipV=1;base=13;size=7;position=0.5;position2=0.66;rounded=1;arcSize="+e.RoundCorners+";"+a(e.Tip||e.Text,G);v.style+=b(v.style,e,u,v,G);v.geometry.height+=10;break;case "UI2CalloutBlock":v.value=
m(e.Txt);v.style+="shape=ellipse;perimeter=ellipsePerimeter;"+a(e.Txt,G);v.style+=b(v.style,e,u,v,G);break;case "UI2AlertBlock":v.value=m(e.Txt);v.style+=a(e.Txt,G);v.style+=b(v.style,e,u,v,G);x=new mxCell("",new mxGeometry(0,0,r,30),"part=1;resizeHeight=0;");x.vertex=!0;v.insert(x);x.value=m(e.Title);x.style+=a(e.Title,G);x.style+=b(x.style,e,u,x,G);E=new mxCell("",new mxGeometry(1,.5,20,20),"ellipse;part=1;strokeColor=#008cff;resizable=0;fillColor=none;html=1;");E.geometry.relative=!0;E.geometry.offset=
-new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);U=[];for(l=0;l<e.Buttons;l++)U[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),U[l].geometry.relative=!0,U[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),U[l].vertex=!0,v.insert(U[l]),U[l].value=m(e["Button_"+(l+1)]),U[l].style+=a(e["Button_"+(l+1)],G),U[l].style+=b(U[l].style,e,u,U[l],G);break;case "UMLClassBlock":if(0==e.Simple){ia=ca(e,u);db=Math.round(.75*e.TitleHeight)||25;ia=ia.replace("fillColor",
-"swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ue=[],wb=db/p;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
+new mxPoint(-25,-10);E.vertex=!0;x.insert(E);var Uf=45*e.Buttons+(10*e.Buttons-1);T=[];for(l=0;l<e.Buttons;l++)T[l]=new mxCell("",new mxGeometry(.5,1,45,20),"part=1;html=1;"),T[l].geometry.relative=!0,T[l].geometry.offset=new mxPoint(.5*-Uf+55*l,-40),T[l].vertex=!0,v.insert(T[l]),T[l].value=m(e["Button_"+(l+1)]),T[l].style+=a(e["Button_"+(l+1)],G),T[l].style+=b(T[l].style,e,u,T[l],G);break;case "UMLClassBlock":if(0==e.Simple){ja=ba(e,u);db=Math.round(.75*e.TitleHeight)||25;ja=ja.replace("fillColor",
+"swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Title);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+db+";"+a(e.Title,G);v.style+=b(v.style,e,u,v,G);X=[];var ue=[],wb=db/p;Wb=db;for(l=0;l<=e.Attributes;l++)0<l&&(ue[l]=new mxCell("",new mxGeometry(0,Wb,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
Wb+=8,ue[l].vertex=!0,v.insert(ue[l])),ha=0,0==e.Attributes?ha=l=1:l<e.Attributes?(ha=e["Text"+(l+1)+"Percent"],wb+=ha):ha=1-wb,pc=Math.round((p-db)*ha)+(e.ExtraHeightSet&&1==l?.75*e.ExtraHeight:0),X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;html=1;whiteSpace=wrap;resizeHeight=0;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),X[l].style+=
-ia+O(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ia+"startSize="+
-db+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ia=T(e.FillColor),je=Rd(ia,.85),v.style+="fillColor="+je+";"):v.style+=ca(e,u);X=[];wb=db/p;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),
-X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?
-v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],
-G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=
-ia+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ia+"startSize="+db+
-";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),
-Ga[l].style+=ia+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ia=ca(e,u);db=.75*e.Name_h;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+
-ia+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ca(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ia+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+O(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-X[l].vertex=!0,v.insert(X[l]),X[l].style+=ia+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+O(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
-Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ia+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+O(e,u,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,u,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Sa("blank",
+ja+Q(e,u,X[l])+a(e["Text"+(l+1)],G),X[l].value=m(e["Text"+(l+1)])}else v.value=m(e.Title),v.style+="align=center;",v.style+=a(e.Title,G),v.style+=b(v.style,e,u,v,G);break;case "ERDEntityBlock":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;fontStyle=0;marginBottom=0;"+ja+"startSize="+
+db+";"+a(e.Name,G);v.style+=b(v.style,e,u,v,G);e.ShadedHeader?(ja=U(e.FillColor),je=Rd(ja,.85),v.style+="fillColor="+je+";"):v.style+=ba(e,u);X=[];wb=db/p;Wb=db;for(l=0;l<e.Fields;l++)ha=0,pc=.75*e["Field"+(l+1)+"_h"],X[l]=new mxCell("",new mxGeometry(0,Wb,r,pc),"part=1;resizeHeight=0;strokeColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Wb+=pc,X[l].vertex=!0,v.insert(X[l]),
+X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;opacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]);break;case "ERDEntityBlock2":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Name);v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+db+";"+a(e.Name,G);v.style=e.ShadedHeader?
+v.style+"fillColor=#e0e0e0;":v.style+ba(e,u);v.style+=b(v.style,e,u,v,G);X=[];var Ga=[];wb=db;var Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ja+a(e["Key"+(l+1)],
+G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+Q(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;html=1;whiteSpace=wrap;"),X[l].vertex=!0,v.insert(X[l]),X[l].style+=
+ja+a(e["Field"+(l+1)],G),v.style+=b(v.style,e,u,v),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),wb+=.75*e["Key"+(l+1)+"_h"];break;case "ERDEntityBlock3":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+ja+"startSize="+db+
+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ba(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];wb=db;Ib=30;null!=e.Column1&&(Ib=.75*e.Column1);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Field"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),Ga[l].vertex=!0,v.insert(Ga[l]),
+Ga[l].style+=ja+a(e["Field"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+Q(e,u,Ga[l])),Ga[l].value=m(e["Field"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Type"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Type"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),wb+=.75*e["Field"+(l+1)+"_h"];break;case "ERDEntityBlock4":ja=ba(e,u);db=.75*e.Name_h;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.style+="swimlane;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;fontStyle=0;"+
+ja+"startSize="+db+";"+a(e.Name);v.style=e.ShadedHeader?v.style+"fillColor=#e0e0e0;":v.style+ba(e,u);v.value=m(e.Name);v.style+=b(v.style,e,u,v,G);X=[];Ga=[];var Jb=[];wb=db;Ib=30;var ce=40;null!=e.Column1&&(Ib=.75*e.Column1);null!=e.Column2&&(ce=.75*e.Column2);for(l=0;l<e.Fields;l++)ha=0,Ga[l]=new mxCell("",new mxGeometry(0,wb,Ib,.75*e["Key"+(l+1)+"_h"]),"strokeColor=none;part=1;resizeHeight=0;align=center;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+Ga[l].vertex=!0,v.insert(Ga[l]),Ga[l].style+=ja+a(e["Key"+(l+1)],G),Ga[l].style=1==e.AltRows&&0!=l%2?Ga[l].style+"fillColor=#000000;fillOpacity=5;":Ga[l].style+("fillColor=none;"+Q(e,u,Ga[l])),Ga[l].value=m(e["Key"+(l+1)]),Ga[l].style+=b(Ga[l].style,e,u,Ga[l],G),X[l]=new mxCell("",new mxGeometry(Ib,wb,r-Ib-ce,.75*e["Field"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+X[l].vertex=!0,v.insert(X[l]),X[l].style+=ja+a(e["Field"+(l+1)],G),X[l].style=1==e.AltRows&&0!=l%2?X[l].style+"fillColor=#000000;fillOpacity=5;":X[l].style+("fillColor=none;"+Q(e,u,X[l])),X[l].value=m(e["Field"+(l+1)]),X[l].style+=b(X[l].style,e,u,X[l],G),Jb[l]=new mxCell("",new mxGeometry(r-ce,wb,ce,.75*e["Type"+(l+1)+"_h"]),"shape=partialRectangle;top=0;right=0;bottom=0;part=1;resizeHeight=0;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;"),
+Jb[l].vertex=!0,v.insert(Jb[l]),Jb[l].style+=ja+a(e["Type"+(l+1)],G),Jb[l].style=1==e.AltRows&&0!=l%2?Jb[l].style+"fillColor=#000000;fillOpacity=5;":Jb[l].style+("fillColor=none;"+Q(e,u,Jb[l])),Jb[l].value=m(e["Type"+(l+1)]),Jb[l].style+=b(Jb[l].style,e,u,Jb[l],G),wb+=.75*e["Key"+(l+1)+"_h"];break;case "GCPServiceCardApplicationSystemBlock":Sa("application_system",r,p,v,e,u);break;case "GCPServiceCardAuthorizationBlock":Sa("internal_payment_authorization",r,p,v,e,u);break;case "GCPServiceCardBlankBlock":Sa("blank",
r,p,v,e,u);break;case "GCPServiceCardReallyBlankBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardBucketBlock":Sa("bucket",r,p,v,e,u);break;case "GCPServiceCardCDNInterconnectBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardCloudDNSBlock":Sa("blank",r,p,v,e,u);break;case "GCPServiceCardClusterBlock":Sa("cluster",r,p,v,e,u);break;case "GCPServiceCardDiskSnapshotBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardEdgePopBlock":Sa("google_network_edge_cache",
r,p,v,e,u);break;case "GCPServiceCardFrontEndPlatformServicesBlock":Sa("frontend_platform_services",r,p,v,e,u);break;case "GCPServiceCardGatewayBlock":Sa("gateway",r,p,v,e,u);break;case "GCPServiceCardGoogleNetworkBlock":Sa("google_network_edge_cache",r,p,v,e,u);break;case "GCPServiceCardImageServicesBlock":Sa("image_services",r,p,v,e,u);break;case "GCPServiceCardLoadBalancerBlock":Sa("network_load_balancer",r,p,v,e,u);break;case "GCPServiceCardLocalComputeBlock":Sa("dedicated_game_server",r,p,v,
e,u);break;case "GCPServiceCardLocalStorageBlock":Sa("persistent_disk_snapshot",r,p,v,e,u);break;case "GCPServiceCardLogsAPIBlock":Sa("logs_api",r,p,v,e,u);break;case "GCPServiceCardMemcacheBlock":Sa("memcache",r,p,v,e,u);break;case "GCPServiceCardNATBlock":Sa("nat",r,p,v,e,u);break;case "GCPServiceCardPaymentFormBlock":Sa("external_payment_form",r,p,v,e,u);break;case "GCPServiceCardPushNotificationsBlock":Sa("push_notification_service",r,p,v,e,u);break;case "GCPServiceCardScheduledTasksBlock":Sa("scheduled_tasks",
@@ -14640,9 +14644,9 @@ e,u);break;case "GCPInputPayment":Wa("payment",1,.8,r,p,v,e,u);break;case "GCPIn
case "GCPInputCircuitBoard":Wa("circuit_board",1,.9,r,p,v,e,u);break;case "GCPInputLive":Wa("live",.74,1,r,p,v,e,u);break;case "GCPInputUsers":Wa("users",1,.63,r,p,v,e,u);break;case "GCPInputLaptop":Wa("laptop",1,.66,r,p,v,e,u);break;case "GCPInputApplication":Wa("application",1,.8,r,p,v,e,u);break;case "GCPInputLightbulb":Wa("lightbulb",.7,1,r,p,v,e,u);break;case "GCPInputGame":Wa("game",1,.54,r,p,v,e,u);break;case "GCPInputDesktop":Wa("desktop",1,.9,r,p,v,e,u);break;case "GCPInputDesktopAndMobile":Wa("desktop_and_mobile",
1,.66,r,p,v,e,u);break;case "GCPInputWebcam":Wa("webcam",.5,1,r,p,v,e,u);break;case "GCPInputSpeaker":Wa("speaker",.7,1,r,p,v,e,u);break;case "GCPInputRetail":Wa("retail",1,.89,r,p,v,e,u);break;case "GCPInputReport":Wa("report",1,1,r,p,v,e,u);break;case "GCPInputPhone":Wa("phone",.64,1,r,p,v,e,u);break;case "GCPInputBlank":Wa("transparent",1,1,r,p,v,e,u);break;case "PresentationFrameBlock":0==e.ZOrder?v.style+="strokeColor=none;fillColor=none;":(v.style+=a(e.Text),v.value=m(e.Text),v.style+=b(v.style,
e,u,v,G));break;case "SVGPathBlock2":try{var Vf=e.LineWidth,Wf=e.LineColor,lf=e.FillColor,mf=e.DrawData.Data,de='<svg viewBox="0 0 1 1" xmlns="http://www.w3.org/2000/svg">',ve=null;for(l=0;l<mf.length;l++){var uc=mf[l],Xf=uc.a,Yf=("prop"==uc.w||null==uc.w?Vf:uc.w)/Math.min(r,p)*.75;Rc="prop"==uc.s||null==uc.s?Wf:uc.s;Y="prop"==uc.f||null==uc.f?lf:uc.f;"object"==typeof Y&&(null!=Y.url&&(ve="shape=image;image="+g(Y.url)+";"),Y=Array.isArray(Y.cs)?Y.cs[0].c:lf);de+='<path d="'+Xf+'" fill="'+Y+'" stroke="'+
-Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,u,v,G);mb=ba(e,u,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:p),100),xe=
+Rc+'" stroke-width="'+Yf+'"/>'}de+="</svg>";v.style=ve?ve:"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image=data:image/svg+xml,"+(window.btoa?btoa(de):Base64.encode(de,!0))+";"}catch(gb){}break;case "BraceBlock":case "BraceBlockRotated":case "BracketBlock":case "BracketBlockRotated":var nf=0==V.indexOf("Bracket")?"size=0;arcSize=50;":"",of=b(v.style,e,u,v,G);mb=ca(e,u,v);v.style="group;"+mb;var we=Math.min(.14*(mb?r:p),100),xe=
new mxCell("",new mxGeometry(0,0,we,p),"shape=curlyBracket;rounded=1;"+nf+of);xe.vertex=!0;xe.geometry.relative=!0;var ye=new mxCell("",new mxGeometry(1-we/r,0,we,p),"shape=curlyBracket;rounded=1;flipH=1;"+nf+of);ye.vertex=!0;ye.geometry.relative=!0;v.insert(xe);v.insert(ye);break;case "BPMNTextAnnotation":case "NoteBlock":e.InsetMargin=null;v.value=m(e.Text);v.style="group;spacingLeft=8;align=left;spacing=0;strokeColor=none;";v.style+=b(v.style,e,u,v,G);0>v.style.indexOf("verticalAlign")&&(v.style+=
-"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,u,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ba(e,u,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
+"verticalAlign=middle;");var kd=new mxCell("",new mxGeometry(0,0,8,p),"shape=partialRectangle;right=0;fillColor=none;");kd.geometry.relative=!0;kd.vertex=!0;kd.style+=b(kd.style,e,u,v,G);v.insert(kd);break;case "VSMTimelineBlock":case "TimelineBlock":case "TimelineMilestoneBlock":case "TimelineIntervalBlock":LucidImporter.hasTimeLine=!0;LucidImporter.hasUnknownShapes=!0;break;case "FreehandBlock":try{mb=ca(e,u,v);v.style="group;"+mb;if(null!=e.Stencil){null==e.Stencil.id&&(e.Stencil.id="$$tmpId$$",
Ke(e.Stencil.id,e.Stencil));var Ob=LucidImporter.stencilsMap[e.Stencil.id],Zf=-Ob.x/Ob.w,$f=-Ob.y/Ob.h;for(l=0;l<Ob.stencils.length;l++){var ob=Ob.stencils[l];oa=new mxCell("",new mxGeometry(Zf,$f,r,p),"shape="+ob.shapeStencil+";");var ag=ob.FillColor,bg=ob.LineColor,cg=ob.LineWidth;"prop"==ob.FillColor&&(ob.FillColor=e.FillColor);null==ob.FillColor&&(ob.FillColor="#ffffff00");"prop"==ob.LineColor&&(ob.LineColor=e.LineColor);null==ob.LineColor&&(ob.LineColor="#ffffff00");"prop"==ob.LineWidth&&(ob.LineWidth=
e.LineWidth);oa.style+=b(oa.style,ob,u,oa,G);ob.FillColor=ag;ob.LineColor=bg;ob.LineWidth=cg;Y=e.FillColor;var dg=e.LineColor,eg=e.LineWidth;e.FillColor=null;e.LineColor=null;e.LineWidth=null;oa.style+=b(oa.style,e,u,oa,G);e.FillColor=Y;e.LineColor=dg;e.LineWidth=eg;oa.vertex=!0;oa.geometry.relative=!0;v.insert(oa)}var Xb=0;for(mb=e.Rotation;e["t"+Xb];){var pf=e["t"+Xb],qf=m(pf);if(qf){ra=new mxCell(qf,new mxGeometry(0,0,r,p),"strokeColor=none;fillColor=none;overflow=visible;");e.Rotation=0;ra.style+=
b(ra.style,pf,u,ra,G);ra.style+=b(ra.style,e,u,ra,G);e.Rotation=mb;if(null!=Ob.text&&null!=Ob.text["t"+Xb]){var eb=Ob.text["t"+Xb];eb.Rotation=mb+(eb.rotation?eb.rotation:0)+(e["t"+Xb+"_TRotation"]?e["t"+Xb+"_TRotation"]:0)+(e["t"+Xb+"_TAngle"]?e["t"+Xb+"_TAngle"]:0);ra.style+=b(ra.style,eb,u,ra,G);var Yb=ra.geometry;eb.w&&(Yb.width*=eb.w/Ob.w);eb.h&&(Yb.height*=eb.h/Ob.h);eb.x&&(Yb.x=eb.x/Ob.w);eb.y&&(Yb.y=eb.y/Ob.h);eb.fw&&(Yb.width*=.75*eb.fw/r);eb.fh&&(Yb.height*=.75*eb.fh/p);eb.fx&&(Yb.x=(0<
@@ -14651,16 +14655,16 @@ e,u,v,G);break;case "DoubleArrowBlock":ze=e.Head*p/r;v.style="shape=doubleArrow;
"shape=mxgraph.aws3.virtual_private_cloud;fillColor=#F58536;";md=52;nd=36;break;case "ElasticBeanStalkContainer2017":ld="shape=mxgraph.aws3.elastic_beanstalk;fillColor=#F58536;";md=30;nd=41;break;case "EC2InstanceContents2017":ld="shape=mxgraph.aws3.instance;fillColor=#F58536;";md=40;nd=41;break;case "AWSCloudContainer2017":ld="shape=mxgraph.aws3.cloud;fillColor=#F58536;";md=52;nd=36;break;case "CorporateDataCenterContainer2017":ld="shape=mxgraph.aws3.corporate_data_center;fillColor=#7D7C7C;",md=
30,nd=42}v.style="rounded=1;arcSize=10;dashed=0;verticalAlign=bottom;";v.value=m(e);v.style+=b(v.style,e,u,v,G);v.geometry.y+=20;v.geometry.height-=20;nb=new mxCell("",new mxGeometry(20,-20,md,nd),ld);nb.vertex=!0;v.insert(nb);break;case "FlexiblePolygonBlock":var Wc=['<shape strokewidth="inherit"><foreground>'];Wc.push("<path>");for(fa=0;fa<e.Vertices.length;fa++)Qa=e.Vertices[fa],0==fa?Wc.push('<move x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>'):Wc.push('<line x="'+100*Qa.x+'" y="'+100*Qa.y+'"/>');Wc.push("</path>");
Wc.push("<fillstroke/>");Wc.push("</foreground></shape>");v.style="shape=stencil("+Graph.compress(Wc.join(""))+");";v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "InfographicsBlock":var rf=e.ShapeData_1.Value,Ae=e.ShapeData_2.Value-rf,Be=e.ShapeData_3.Value-rf,ee=e.ShapeData_4.Value*r/200;Xb="ProgressBar"==e.InternalStencilId?4:5;kb=e["ShapeData_"+Xb].Value;kb="=fillColor()"==kb?e.FillColor:kb;var od=e["ShapeData_"+(Xb+1)].Value;switch(e.InternalStencilId){case "ProgressDonut":v.style="shape=mxgraph.basic.donut;dx="+
-ee+";strokeColor=none;fillColor="+T(od)+";"+ka(od,"fillOpacity");v.style+=b(v.style,e,u,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity"));ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+
-sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+T(od)+";"+ka(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
-T(od)+";"+ka(od,"fillOpacity"),v.style+=b(v.style,e,u,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,p),"strokeColor=none;fillColor="+T(kb)+";"+ka(kb,"fillOpacity")),ab.style+=b(ab.style,e,u,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||
-fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ia=ca(e,u);db=p/2;ia=ia.replace("fillColor","swimlaneFillColor");""==ia&&(ia="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ia+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,
+ee+";strokeColor=none;fillColor="+U(od)+";"+ia(od,"fillOpacity");v.style+=b(v.style,e,u,v,G);var ab=new mxCell("",new mxGeometry(0,0,r,p),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+Be/Ae+";arcWidth="+ee/r*2+";strokeColor=none;fillColor="+U(kb)+";"+ia(kb,"fillOpacity"));ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressHalfDonut":v.geometry.height*=2;v.geometry.rotate90();var sf=Be/Ae/2;v.style="shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+
+sf+";arcWidth="+2*ee/r+";strokeColor=none;fillColor="+U(kb)+";"+ia(kb,"fillOpacity");e.Rotation-=Math.PI/2;v.style+=b(v.style,e,u,v,G);ab=new mxCell("",new mxGeometry(0,0,v.geometry.width,v.geometry.height),"shape=mxgraph.basic.partConcEllipse;startAngle=0;endAngle="+(.5-sf)+";arcWidth="+2*ee/r+";strokeColor=none;flipH=1;fillColor="+U(od)+";"+ia(od,"fillOpacity"));e.Rotation+=Math.PI;ab.style+=b(ab.style,e,u,ab,G);ab.vertex=!0;ab.geometry.relative=1;v.insert(ab);break;case "ProgressBar":v.style="strokeColor=none;fillColor="+
+U(od)+";"+ia(od,"fillOpacity"),v.style+=b(v.style,e,u,v,G),ab=new mxCell("",new mxGeometry(0,0,r*Be/Ae,p),"strokeColor=none;fillColor="+U(kb)+";"+ia(kb,"fillOpacity")),ab.style+=b(ab.style,e,u,ab,G),ab.vertex=!0,ab.geometry.relative=1,v.insert(ab)}break;case "InternalStorageBlock":v.style+="shape=internalStorage;dx=10;dy=10";if(e.Text&&e.Text.m){var fe=e.Text.m,Ce=!1,De=!1;for(l=0;l<fe.length;l++){var pd=fe[l];Ce||"mt"!=pd.n?De||"il"!=pd.n||(pd.v=17+(pd.v||0),De=!0):(pd.v=17+(pd.v||0),Ce=!0)}Ce||
+fe.push({s:0,n:"mt",v:17});De||fe.push({s:0,n:"il",v:17})}v.value=m(e);v.style+=b(v.style,e,u,v,G);break;case "PersonRoleBlock":try{ja=ba(e,u);db=p/2;ja=ja.replace("fillColor","swimlaneFillColor");""==ja&&(ja="swimlaneFillColor=#ffffff;");v.value=m(e.Role);v.style+="swimlane;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=0;marginBottom=0;"+ja+"startSize="+db+";spacingLeft=3;spacingRight=3;fontStyle=0;"+a(e.Role,G);v.style+=b(v.style,
e,u,v,G);var Ec=new mxCell("",new mxGeometry(0,p/2,r,p/2),"part=1;html=1;resizeHeight=0;spacingTop=-1;spacingLeft=3;spacingRight=3;");Ec.value=m(e.Name);Ec.vertex=!0;v.insert(Ec);Ec.style+=a(e.Name,G);Ec.style+=b(Ec.style,e,u,Ec,G)}catch(gb){console.log(gb)}}v.style&&0>v.style.indexOf("html")&&(v.style+="html=1;");if(e.Title&&e.Title.t&&e.Text&&e.Text.t)try{var tf=v.geometry,uf=new mxCell(m(e.Title),new mxGeometry(0,tf.height+4,tf.width,10),"strokeColor=none;fillColor=none;whiteSpace=wrap;verticalAlign=top;labelPosition=center;verticalLabelPosition=top;align=center;");
-uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,P=u,r=e,p=0,Z=0;if(-90==D||-270==D){P=e;r=u;var aa=(e-u)/2;p=-aa/u;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=w.style.split(";").filter(function(ja){return 0>ja.indexOf("fillColor=")&&
-0>ja.indexOf("strokeColor=")&&0>ja.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ja){console.log(ja)}}function Je(w,F,D,u,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";
+uf.vertex=!0;v.insert(uf);v.style+=a(e.Title,G)}catch(gb){console.log(gb)}Ge(v,e);pa(v,e,D);e.Hidden&&(v.visible=!1);return v}function Ge(w,F){if(F.Text_TRotation||F.TextRotation)try{var D=mxUtils.toDegree(F.Text_TRotation||0)+mxUtils.toDegree(F.TextRotation||0);if(!isNaN(D)&&0!=D&&w.value){var u=w.geometry.width,e=w.geometry.height,P=u,r=e,p=0,Z=0;if(-90==D||-270==D){P=e;r=u;var aa=(e-u)/2;p=-aa/u;Z=aa/e}D+=mxUtils.toDegree(F.Rotation);var V=w.style.split(";").filter(function(ka){return 0>ka.indexOf("fillColor=")&&
+0>ka.indexOf("strokeColor=")&&0>ka.indexOf("rotation=")}).join(";"),wa=new mxCell(w.value,new mxGeometry(p,Z,P,r),V+"fillColor=none;strokeColor=none;rotation="+D+";");w.value=null;wa.geometry.relative=!0;wa.vertex=!0;w.insert(wa)}}catch(ka){console.log(ka)}}function Je(w,F,D,u,e){function P(Kb,$b){var Xa="";try{for(var pb=0;pb<Kb.text.length;pb++){var Nc=Kb.text[pb];if(Nc[0]=="t_"+$b){for(var Fc in Nc[1]){var Gc=Nc[1][Fc];if(Gc)switch(Fc){case "font":Xa+=y(Gc);break;case "bold":Xa+="font-weight: bold;";
break;case "italic":Xa+="font-style: italic;";break;case "underline":Xa+="text-decoration: underline;";break;case "size":Xa+="font-size:"+z(.75*Gc)+"px;";break;case "color":Xa+="color:"+R(Gc).substring(0,7)+";";break;case "fill":Xa+="background-color:"+R(Gc).substring(0,7)+";";break;case "align":Xa+="text-align:"+Gc+";"}}break}}}catch(Sd){}return Xa}try{var r=function(Kb,$b,Xa){Kb=Aa+Kb;ra[Kb]=$b;$b="";for(var pb=0;pb<V.length;pb++)$b+='<div style="'+ma[pb]+'">'+(Xa[V[pb]]||"&nbsp;")+"</div>";pb=
-mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;u.addCell(Xa,aa)},p=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;u.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ja=F.BlockItemDefaultStyle||
-{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ja.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ja.props,{},aa,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<V.length;w++)ma.push(P(ja,V[w]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];
+mxUtils.getSizeForString($b);Xa=g(Xa.Image||Xa["018__ImageUrl__"])||"https://cdn4.iconfinder.com/data/icons/basic-user-interface-elements/700/user-account-profile-human-avatar-face-head--128.png";Xa=new mxCell($b,new mxGeometry(0,0,pb.width+Ba,pb.height+Pa),ua+(Ca?Xa:""));Xa.vertex=!0;e[Kb]=Xa;u.addCell(Xa,aa)},p=F.OrgChartBlockType,Z=F.Location,aa=new mxCell("",new mxGeometry(.75*Z.x,.75*Z.y,200,100),"group");aa.vertex=!0;u.addCell(aa);var V=F.FieldNames,wa=F.LayoutSettings,ka=F.BlockItemDefaultStyle||
+{props:{}},na=F.EdgeItemDefaultStyle,ra={},Aa=(w||Date.now())+"_";4==p&&(ka.props.LineWidth=0);var ma=[],Ba=25,Pa=40,Ca=!0,ua=b("",ka.props,{},aa,!0);0==p?(ua+="spacingTop=54;imageWidth=54;imageHeight=54;imageAlign=center;imageVerticalAlign=top;image=",Pa+=54):1==p||2==p?(ua+="spacingLeft=54;imageWidth=50;imageHeight=50;imageAlign=left;imageVerticalAlign=top;image=",Ba+=54):3<=p&&(Ca=!1);for(w=0;w<V.length;w++)ma.push(P(ka,V[w]));if(D.Items)for(var Na=D.Items.n,Ka=0;Ka<Na.length;Ka++){var La=Na[Ka];
r(La.pk,La.ie[0]?La.ie[0].nf:null,La.f)}else{var l=F.ContractMap.derivative;if(null==l){var Ia=F.ContractMap.c.People;var bb=Ia.id;bb=bb.substr(0,bb.lastIndexOf("_"));for(w=0;w<V.length;w++)V[w]=Ia.f[V[w]]||V[w]}else for(Ka=0;Ka<l.length;Ka++)if("ForeignKeyGraph"==l[Ka].type)bb=l[Ka].c[0].id,bb=bb.substr(0,bb.lastIndexOf("_"));else if("MappedGraph"==l[Ka].type)for(w=0;w<V.length;w++)V[w]=l[Ka].nfs[V[w]]||V[w];var Ea;for(Ea in D){La=D[Ea].Collections;for(var Ra in La)if(Ra==bb)Na=La[Ra].Items;else if(La[Ra].Properties.ForeignKeys&&
La[Ra].Properties.ForeignKeys[0]){var la=La[Ra].Properties.ForeignKeys[0].SourceFields[0];var Ma=La[Ra].Properties.Schema.PrimaryKey[0]}if(Na)break}F={};for(var ya in Na){La=Na[ya];var za=La[Ma],Pb=La[la];za==Pb?(F[za]=za+Date.now(),za=F[za],La[Ma]=za,r(za,Pb,La)):r(za,F[Pb]||Pb,La)}}for(Ea in ra){var fa=ra[Ea];if(null!=fa){var xb=e[Aa+fa],Va=e[Ea];if(null!=xb&&null!=Va){var rc=new mxCell("",new mxGeometry(0,0,100,100),"");rc.geometry.relative=!0;rc.edge=!0;null!=na&&null!=na.props&&Qb(rc,na.props,
u,null,null,!0);u.addCell(rc,aa,null,xb,Va)}}}var vc=.75*wa.NodeSpacing.LevelSeparation;(new mxOrgChartLayout(u,0,vc,.75*wa.NodeSpacing.NeighborSeparation)).execute(aa);for(Ka=wa=r=0;aa.children&&Ka<aa.children.length;Ka++){var Fb=aa.children[Ka].geometry;r=Math.max(r,Fb.x+Fb.width);wa=Math.max(wa,Fb.y+Fb.height)}var Rb=aa.geometry;Rb.y-=vc;Rb.width=r;Rb.height=wa}catch(Kb){LucidImporter.hasUnknownShapes=!0,LucidImporter.hasOrgChart=!0,console.log(Kb)}}var wc=0,xc=0,ge="text;html=1;resizable=0;labelBackgroundColor=default;align=center;verticalAlign=middle;",
@@ -15383,40 +15387,40 @@ ExtShapeLaptopBlock:"strokeColor=none;shape=mxgraph.citrix.laptop_2;verticalLabe
InfographicsBlock:"mxCompositeShape",FlexiblePolygonBlock:"mxCompositeShape",PersonRoleBlock:"mxCompositeShape"},xf=RegExp("{{(date{.*}|[^%^{^}]+)}}","g");Qd.prototype.getSize=function(){return(this.nurbsValues.length/4|0)-1};Qd.prototype.getX=function(w){return Math.round(100*this.nurbsValues[4*(w+1)])/100};Qd.prototype.getY=function(w){return Math.round(100*this.nurbsValues[4*(w+1)+1])/100};LucidImporter.importState=function(w,F,D){function u(p){null!=p.state&&EditorUi.debug("convertLucidChart addPages",
p);if(p.Properties){for(var Z in p.Properties)"Stencil-"==Z.substr(0,8)&&Ke(Z.substr(8),p.Properties[Z]);LucidImporter.globalProps=p.Properties}for(var aa in p.Pages)Z=p.Pages[aa],Z.id=aa,Z.Data=p.Data,e.push(Z);e.sort(function(V,wa){return V.Properties.Order<wa.Properties.Order?-1:V.Properties.Order>wa.Properties.Order?1:0});for(p=0;p<e.length;p++)LucidImporter.pageIdsMap[e[p].id]=p}xc=wc=0;LucidImporter.stencilsMap={};LucidImporter.imgSrcRepl=F;LucidImporter.advImpConfig=D;LucidImporter.globalProps=
{};LucidImporter.pageIdsMap={};LucidImporter.hasUnknownShapes=!1;LucidImporter.hasOrgChart=!1;LucidImporter.hasTimeLine=!1;LucidImporter.hasExtImgs=!1;F=['<?xml version="1.0" encoding="UTF-8"?>','<mxfile type="Lucidchart-Import" version="'+EditorUi.VERSION+'" host="'+mxUtils.htmlEntities(window.location.hostname)+'" agent="'+mxUtils.htmlEntities(navigator.appVersion)+'" modified="'+mxUtils.htmlEntities((new Date).toISOString())+'">'];D&&D.transparentEdgeLabels&&(ge=ge.replace("labelBackgroundColor=default;",
-"labelBackgroundColor=none;"));var e=[];null!=w.state?u(JSON.parse(w.state)):null==w.Page&&null!=w.Pages?u(w):e.push(w);w=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(w,e[P],!0);var r=D.encode(w.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",T(e[P].Properties.FillColor)),
+"labelBackgroundColor=none;"));var e=[];null!=w.state?u(JSON.parse(w.state)):null==w.Page&&null!=w.Pages?u(w):e.push(w);w=Df();D=new mxCodec;for(var P=0;P<e.length;P++){F.push("<diagram");null!=e[P].Properties&&null!=e[P].Properties.Title&&F.push(' name="'+mxUtils.htmlEntities(e[P].Properties.Title)+'"');F.push(' id="'+P+'"');zf(w,e[P],!0);var r=D.encode(w.getModel());null!=e[P].Properties&&(e[P].Properties.FillColor&&"#ffffff"!=e[P].Properties.FillColor&&r.setAttribute("background",U(e[P].Properties.FillColor)),
e[P].Properties.InfiniteCanvas?r.setAttribute("page",0):null!=e[P].Properties.Size&&(r.setAttribute("page",1),r.setAttribute("pageWidth",.75*e[P].Properties.Size.w),r.setAttribute("pageHeight",.75*e[P].Properties.Size.h)),null!=e[P].Properties.GridSpacing&&(r.setAttribute("grid",1),r.setAttribute("gridSize",.75*e[P].Properties.GridSpacing)));LucidImporter.hasMath&&r.setAttribute("math",1);w.getModel().clear();F.push(">"+Graph.compress(mxUtils.getXml(r))+"</diagram>")}F.push("</mxfile>");LucidImporter.imgSrcRepl=
-null;return F.join("")}})();function VsdxExport(g){function y(H,J){var N={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
+null;return F.join("")}})();function VsdxExport(g){function y(H,J){var M={"[Content_Types].xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Types xmlns='http://schemas.openxmlformats.org/package/2006/content-types'><Default Extension='png' ContentType='image/png'/><Default Extension='jpg' ContentType='image/jpeg'/><Default Extension='jpeg' ContentType='image/jpeg'/><Default Extension='svg' ContentType='image/svg+xml'/><Default Extension='bmp' ContentType='image/bmp'/><Default Extension='gif' ContentType='image/gif'/><Default Extension='emf' ContentType='image/x-emf' /><Default Extension='rels' ContentType='application/vnd.openxmlformats-package.relationships+xml' /><Default Extension='xml' ContentType='application/xml' /><Override PartName='/docProps/app.xml' ContentType='application/vnd.openxmlformats-officedocument.extended-properties+xml' /><Override PartName='/docProps/core.xml' ContentType='application/vnd.openxmlformats-package.core-properties+xml' /><Override PartName='/docProps/custom.xml' ContentType='application/vnd.openxmlformats-officedocument.custom-properties+xml' /><Override PartName='/visio/document.xml' ContentType='application/vnd.ms-visio.drawing.main+xml' /><Override PartName='/visio/masters/masters.xml' ContentType='application/vnd.ms-visio.masters+xml' /><Override PartName='/visio/masters/master1.xml' ContentType='application/vnd.ms-visio.master+xml'/><Override PartName='/visio/pages/page1.xml' ContentType='application/vnd.ms-visio.page+xml' /><Override PartName='/visio/pages/pages.xml' ContentType='application/vnd.ms-visio.pages+xml' /><Override PartName='/visio/windows.xml' ContentType='application/vnd.ms-visio.windows+xml' /></Types>",
"_rels/.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties' Target='docProps/core.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/document' Target='visio/document.xml' /><Relationship Id='rId3' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties' Target='docProps/custom.xml' /><Relationship Id='rId4' Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties' Target='docProps/app.xml' /></Relationships>",
"docProps/app.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\'><Application>Microsoft Visio</Application><AppVersion>15.0000</AppVersion><Template /><Manager /><Company /><HyperlinkBase /></Properties>',"docProps/core.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><cp:coreProperties xmlns:cp='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:dcterms='http://purl.org/dc/terms/' xmlns:dcmitype='http://purl.org/dc/dcmitype/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><dc:title /><dc:subject /><dc:creator /><cp:keywords /><dc:description /><cp:category /><dc:language>en-US</dc:language></cp:coreProperties>",
"docProps/custom.xml":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Properties xmlns=\'http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\' xmlns:vt=\'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\' />',"visio/document.xml":"<?xml version='1.0' encoding='utf-8' ?><VisioDocument xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><DocumentSettings TopPage='0' DefaultTextStyle='3' DefaultLineStyle='3' DefaultFillStyle='3' DefaultGuideStyle='4'><GlueSettings>9</GlueSettings><SnapSettings>65847</SnapSettings><SnapExtensions>34</SnapExtensions><SnapAngles/><DynamicGridEnabled>1</DynamicGridEnabled><ProtectStyles>0</ProtectStyles><ProtectShapes>0</ProtectShapes><ProtectMasters>0</ProtectMasters><ProtectBkgnds>0</ProtectBkgnds></DocumentSettings><Colors><ColorEntry IX='24' RGB='#000000'/><ColorEntry IX='25' RGB='#FFFFFF'/><ColorEntry IX='26' RGB='#FF0000'/><ColorEntry IX='27' RGB='#00FF00'/><ColorEntry IX='28' RGB='#0000FF'/><ColorEntry IX='29' RGB='#FFFF00'/><ColorEntry IX='30' RGB='#FF00FF'/><ColorEntry IX='31' RGB='#00FFFF'/><ColorEntry IX='32' RGB='#800000'/><ColorEntry IX='33' RGB='#008000'/><ColorEntry IX='34' RGB='#000080'/><ColorEntry IX='35' RGB='#808000'/><ColorEntry IX='36' RGB='#800080'/><ColorEntry IX='37' RGB='#008080'/><ColorEntry IX='38' RGB='#C0C0C0'/><ColorEntry IX='39' RGB='#E6E6E6'/><ColorEntry IX='40' RGB='#CDCDCD'/><ColorEntry IX='41' RGB='#B3B3B3'/><ColorEntry IX='42' RGB='#9A9A9A'/><ColorEntry IX='43' RGB='#808080'/><ColorEntry IX='44' RGB='#666666'/><ColorEntry IX='45' RGB='#4D4D4D'/><ColorEntry IX='46' RGB='#333333'/><ColorEntry IX='47' RGB='#1A1A1A'/><ColorEntry IX='48' RGB='#7F7F7F'/><ColorEntry IX='49' RGB='#99004D'/><ColorEntry IX='50' RGB='#FF0080'/><ColorEntry IX='51' RGB='#CC0066'/></Colors><FaceNames><FaceName NameU='Calibri' UnicodeRanges='-536859905 -1073732485 9 0' CharSets='536871423 0' Panose='2 15 5 2 2 2 4 3 2 4' Flags='325'/></FaceNames><StyleSheets><StyleSheet ID='0' NameU='No Style' IsCustomNameU='1' Name='No Style' IsCustomName='1'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0.01041666666666667'/><Cell N='LineColor' V='0'/><Cell N='LinePattern' V='1'/><Cell N='Rounding' V='0'/><Cell N='EndArrowSize' V='2'/><Cell N='BeginArrow' V='0'/><Cell N='EndArrow' V='0'/><Cell N='LineCap' V='0'/><Cell N='BeginArrowSize' V='2'/><Cell N='LineColorTrans' V='0'/><Cell N='CompoundType' V='0'/><Cell N='FillForegnd' V='1'/><Cell N='FillBkgnd' V='0'/><Cell N='FillPattern' V='1'/><Cell N='ShdwForegnd' V='0'/><Cell N='ShdwPattern' V='0'/><Cell N='FillForegndTrans' V='0'/><Cell N='FillBkgndTrans' V='0'/><Cell N='ShdwForegndTrans' V='0'/><Cell N='ShapeShdwType' V='0'/><Cell N='ShapeShdwOffsetX' V='0'/><Cell N='ShapeShdwOffsetY' V='0'/><Cell N='ShapeShdwObliqueAngle' V='0'/><Cell N='ShapeShdwScaleFactor' V='1'/><Cell N='ShapeShdwBlur' V='0'/><Cell N='ShapeShdwShow' V='0'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='1'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5'/><Cell N='TextDirection' V='0'/><Cell N='TextBkgndTrans' V='0'/><Cell N='LockWidth' V='0'/><Cell N='LockHeight' V='0'/><Cell N='LockMoveX' V='0'/><Cell N='LockMoveY' V='0'/><Cell N='LockAspect' V='0'/><Cell N='LockDelete' V='0'/><Cell N='LockBegin' V='0'/><Cell N='LockEnd' V='0'/><Cell N='LockRotate' V='0'/><Cell N='LockCrop' V='0'/><Cell N='LockVtxEdit' V='0'/><Cell N='LockTextEdit' V='0'/><Cell N='LockFormat' V='0'/><Cell N='LockGroup' V='0'/><Cell N='LockCalcWH' V='0'/><Cell N='LockSelect' V='0'/><Cell N='LockCustProp' V='0'/><Cell N='LockFromGroupFormat' V='0'/><Cell N='LockThemeColors' V='0'/><Cell N='LockThemeEffects' V='0'/><Cell N='LockThemeConnectors' V='0'/><Cell N='LockThemeFonts' V='0'/><Cell N='LockThemeIndex' V='0'/><Cell N='LockReplace' V='0'/><Cell N='LockVariation' V='0'/><Cell N='NoObjHandles' V='0'/><Cell N='NonPrinting' V='0'/><Cell N='NoCtlHandles' V='0'/><Cell N='NoAlignBox' V='0'/><Cell N='UpdateAlignBox' V='0'/><Cell N='HideText' V='0'/><Cell N='DynFeedback' V='0'/><Cell N='GlueType' V='0'/><Cell N='WalkPreference' V='0'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0'/><Cell N='Comment' V=''/><Cell N='IsDropSource' V='0'/><Cell N='NoLiveDynamics' V='0'/><Cell N='LocalizeMerge' V='0'/><Cell N='NoProofing' V='0'/><Cell N='Calendar' V='0'/><Cell N='LangID' V='en-US'/><Cell N='ShapeKeywords' V=''/><Cell N='DropOnPageScale' V='1'/><Cell N='TheData' V='0' F='No Formula'/><Cell N='TheText' V='0' F='No Formula'/><Cell N='EventDblClick' V='0' F='No Formula'/><Cell N='EventXFMod' V='0' F='No Formula'/><Cell N='EventDrop' V='0' F='No Formula'/><Cell N='EventMultiDrop' V='0' F='No Formula'/><Cell N='HelpTopic' V=''/><Cell N='Copyright' V=''/><Cell N='LayerMember' V=''/><Cell N='XRulerDensity' V='32'/><Cell N='YRulerDensity' V='32'/><Cell N='XRulerOrigin' V='0'/><Cell N='YRulerOrigin' V='0'/><Cell N='XGridDensity' V='8'/><Cell N='YGridDensity' V='8'/><Cell N='XGridSpacing' V='0'/><Cell N='YGridSpacing' V='0'/><Cell N='XGridOrigin' V='0'/><Cell N='YGridOrigin' V='0'/><Cell N='Gamma' V='1'/><Cell N='Contrast' V='0.5'/><Cell N='Brightness' V='0.5'/><Cell N='Sharpen' V='0'/><Cell N='Blur' V='0'/><Cell N='Denoise' V='0'/><Cell N='Transparency' V='0'/><Cell N='SelectMode' V='1'/><Cell N='DisplayMode' V='2'/><Cell N='IsDropTarget' V='0'/><Cell N='IsSnapTarget' V='1'/><Cell N='IsTextEditTarget' V='1'/><Cell N='DontMoveChildren' V='0'/><Cell N='ShapePermeableX' V='0'/><Cell N='ShapePermeableY' V='0'/><Cell N='ShapePermeablePlace' V='0'/><Cell N='Relationships' V='0'/><Cell N='ShapeFixedCode' V='0'/><Cell N='ShapePlowCode' V='0'/><Cell N='ShapeRouteStyle' V='0'/><Cell N='ShapePlaceStyle' V='0'/><Cell N='ConFixedCode' V='0'/><Cell N='ConLineJumpCode' V='0'/><Cell N='ConLineJumpStyle' V='0'/><Cell N='ConLineJumpDirX' V='0'/><Cell N='ConLineJumpDirY' V='0'/><Cell N='ShapePlaceFlip' V='0'/><Cell N='ConLineRouteExt' V='0'/><Cell N='ShapeSplit' V='0'/><Cell N='ShapeSplittable' V='0'/><Cell N='DisplayLevel' V='0'/><Cell N='ResizePage' V='0'/><Cell N='EnableGrid' V='0'/><Cell N='DynamicsOff' V='0'/><Cell N='CtrlAsInput' V='0'/><Cell N='AvoidPageBreaks' V='0'/><Cell N='PlaceStyle' V='0'/><Cell N='RouteStyle' V='0'/><Cell N='PlaceDepth' V='0'/><Cell N='PlowCode' V='0'/><Cell N='LineJumpCode' V='1'/><Cell N='LineJumpStyle' V='0'/><Cell N='PageLineJumpDirX' V='0'/><Cell N='PageLineJumpDirY' V='0'/><Cell N='LineToNodeX' V='0.125'/><Cell N='LineToNodeY' V='0.125'/><Cell N='BlockSizeX' V='0.25'/><Cell N='BlockSizeY' V='0.25'/><Cell N='AvenueSizeX' V='0.375'/><Cell N='AvenueSizeY' V='0.375'/><Cell N='LineToLineX' V='0.125'/><Cell N='LineToLineY' V='0.125'/><Cell N='LineJumpFactorX' V='0.66666666666667'/><Cell N='LineJumpFactorY' V='0.66666666666667'/><Cell N='LineAdjustFrom' V='0'/><Cell N='LineAdjustTo' V='0'/><Cell N='PlaceFlip' V='0'/><Cell N='LineRouteExt' V='0'/><Cell N='PageShapeSplit' V='0'/><Cell N='PageLeftMargin' V='0.25'/><Cell N='PageRightMargin' V='0.25'/><Cell N='PageTopMargin' V='0.25'/><Cell N='PageBottomMargin' V='0.25'/><Cell N='ScaleX' V='1'/><Cell N='ScaleY' V='1'/><Cell N='PagesX' V='1'/><Cell N='PagesY' V='1'/><Cell N='CenterX' V='0'/><Cell N='CenterY' V='0'/><Cell N='OnPage' V='0'/><Cell N='PrintGrid' V='0'/><Cell N='PrintPageOrientation' V='1'/><Cell N='PaperKind' V='1'/><Cell N='PaperSource' V='7'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineGradientDir' V='0'/><Cell N='LineGradientAngle' V='1.5707963267949'/><Cell N='FillGradientDir' V='0'/><Cell N='FillGradientAngle' V='1.5707963267949'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='1'/><Cell N='UseGroupGradient' V='0'/><Cell N='BevelTopType' V='0'/><Cell N='BevelTopWidth' V='0'/><Cell N='BevelTopHeight' V='0'/><Cell N='BevelBottomType' V='0'/><Cell N='BevelBottomWidth' V='0'/><Cell N='BevelBottomHeight' V='0'/><Cell N='BevelDepthColor' V='1'/><Cell N='BevelDepthSize' V='0'/><Cell N='BevelContourColor' V='0'/><Cell N='BevelContourSize' V='0'/><Cell N='BevelMaterialType' V='0'/><Cell N='BevelLightingType' V='0'/><Cell N='BevelLightingAngle' V='0'/><Cell N='RotationXAngle' V='0'/><Cell N='RotationYAngle' V='0'/><Cell N='RotationZAngle' V='0'/><Cell N='RotationType' V='0'/><Cell N='Perspective' V='0'/><Cell N='DistanceFromGround' V='0'/><Cell N='KeepTextFlat' V='0'/><Cell N='ReflectionTrans' V='0'/><Cell N='ReflectionSize' V='0'/><Cell N='ReflectionDist' V='0'/><Cell N='ReflectionBlur' V='0'/><Cell N='GlowColor' V='1'/><Cell N='GlowColorTrans' V='0'/><Cell N='GlowSize' V='0'/><Cell N='SoftEdgesSize' V='0'/><Cell N='SketchSeed' V='0'/><Cell N='SketchEnabled' V='0'/><Cell N='SketchAmount' V='5'/><Cell N='SketchLineWeight' V='0.04166666666666666' U='PT'/><Cell N='SketchLineChange' V='0.14'/><Cell N='SketchFillChange' V='0.1'/><Cell N='ColorSchemeIndex' V='0'/><Cell N='EffectSchemeIndex' V='0'/><Cell N='ConnectorSchemeIndex' V='0'/><Cell N='FontSchemeIndex' V='0'/><Cell N='ThemeIndex' V='0'/><Cell N='VariationColorIndex' V='0'/><Cell N='VariationStyleIndex' V='0'/><Cell N='EmbellishmentIndex' V='0'/><Cell N='ReplaceLockShapeData' V='0'/><Cell N='ReplaceLockText' V='0'/><Cell N='ReplaceLockFormat' V='0'/><Cell N='ReplaceCopyCells' V='0' U='BOOL' F='No Formula'/><Cell N='PageWidth' V='0' F='No Formula'/><Cell N='PageHeight' V='0' F='No Formula'/><Cell N='ShdwOffsetX' V='0' F='No Formula'/><Cell N='ShdwOffsetY' V='0' F='No Formula'/><Cell N='PageScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingScale' V='0' U='IN_F' F='No Formula'/><Cell N='DrawingSizeType' V='0' F='No Formula'/><Cell N='DrawingScaleType' V='0' F='No Formula'/><Cell N='InhibitSnap' V='0' F='No Formula'/><Cell N='PageLockReplace' V='0' U='BOOL' F='No Formula'/><Cell N='PageLockDuplicate' V='0' U='BOOL' F='No Formula'/><Cell N='UIVisibility' V='0' F='No Formula'/><Cell N='ShdwType' V='0' F='No Formula'/><Cell N='ShdwObliqueAngle' V='0' F='No Formula'/><Cell N='ShdwScaleFactor' V='0' F='No Formula'/><Cell N='DrawingResizeType' V='0' F='No Formula'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Calibri'/><Cell N='Color' V='0'/><Cell N='Style' V='0'/><Cell N='Case' V='0'/><Cell N='Pos' V='0'/><Cell N='FontScale' V='1'/><Cell N='Size' V='0.1666666666666667'/><Cell N='DblUnderline' V='0'/><Cell N='Overline' V='0'/><Cell N='Strikethru' V='0'/><Cell N='DoubleStrikethrough' V='0'/><Cell N='Letterspace' V='0'/><Cell N='ColorTrans' V='0'/><Cell N='AsianFont' V='0'/><Cell N='ComplexScriptFont' V='0'/><Cell N='ComplexScriptSize' V='-1'/><Cell N='LangID' V='en-US'/></Row></Section><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0'/><Cell N='IndLeft' V='0'/><Cell N='IndRight' V='0'/><Cell N='SpLine' V='-1.2'/><Cell N='SpBefore' V='0'/><Cell N='SpAfter' V='0'/><Cell N='HorzAlign' V='1'/><Cell N='Bullet' V='0'/><Cell N='BulletStr' V=''/><Cell N='BulletFont' V='0'/><Cell N='BulletFontSize' V='-1'/><Cell N='TextPosAfterBullet' V='0'/><Cell N='Flags' V='0'/></Row></Section><Section N='Tabs'><Row IX='0'/></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='1'/><Cell N='GradientStopColorTrans' V='0'/><Cell N='GradientStopPosition' V='0'/></Row></Section></StyleSheet><StyleSheet ID='1' NameU='Text Only' IsCustomNameU='1' Name='Text Only' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='Themed' F='Inh'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LeftMargin' V='0'/><Cell N='RightMargin' V='0'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='0'/><Cell N='TextBkgnd' V='0'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='Themed' F='Inh'/><Cell N='FillGradientEnabled' V='Themed' F='Inh'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Section N='Paragraph'><Row IX='0'><Cell N='IndFirst' V='0' F='Inh'/><Cell N='IndLeft' V='0' F='Inh'/><Cell N='IndRight' V='0' F='Inh'/><Cell N='SpLine' V='-1.2' F='Inh'/><Cell N='SpBefore' V='0' F='Inh'/><Cell N='SpAfter' V='0' F='Inh'/><Cell N='HorzAlign' V='0'/><Cell N='Bullet' V='0' F='Inh'/><Cell N='BulletStr' V='' F='Inh'/><Cell N='BulletFont' V='0' F='Inh'/><Cell N='BulletFontSize' V='-1' F='Inh'/><Cell N='TextPosAfterBullet' V='0' F='Inh'/><Cell N='Flags' V='0' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='2' NameU='None' IsCustomNameU='1' Name='None' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='0'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='QuickStyleLineColor' V='100' F='Inh'/><Cell N='QuickStyleFillColor' V='100' F='Inh'/><Cell N='QuickStyleShadowColor' V='100' F='Inh'/><Cell N='QuickStyleFontColor' V='100' F='Inh'/><Cell N='QuickStyleLineMatrix' V='100' F='Inh'/><Cell N='QuickStyleFillMatrix' V='100' F='Inh'/><Cell N='QuickStyleEffectsMatrix' V='0' F='GUARD(0)'/><Cell N='QuickStyleFontMatrix' V='100' F='Inh'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='2'/></StyleSheet><StyleSheet ID='3' NameU='Normal' IsCustomNameU='1' Name='Normal' IsCustomName='1' LineStyle='6' FillStyle='6' TextStyle='6'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT'/><Cell N='RightMargin' V='0.05555555555555555' U='PT'/><Cell N='TopMargin' V='0.05555555555555555' U='PT'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/></StyleSheet><StyleSheet ID='4' NameU='Guide' IsCustomNameU='1' Name='Guide' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='0' U='PT'/><Cell N='LineColor' V='#7f7f7f'/><Cell N='LinePattern' V='23'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Cell N='FillForegnd' V='Themed' F='Inh'/><Cell N='FillBkgnd' V='Themed' F='Inh'/><Cell N='FillPattern' V='0'/><Cell N='ShdwForegnd' V='Themed' F='Inh'/><Cell N='ShdwPattern' V='Themed' F='Inh'/><Cell N='FillForegndTrans' V='Themed' F='Inh'/><Cell N='FillBkgndTrans' V='Themed' F='Inh'/><Cell N='ShdwForegndTrans' V='Themed' F='Inh'/><Cell N='ShapeShdwType' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetX' V='Themed' F='Inh'/><Cell N='ShapeShdwOffsetY' V='Themed' F='Inh'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='Inh'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='Inh'/><Cell N='ShapeShdwBlur' V='Themed' F='Inh'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='Inh'/><Cell N='LineGradientAngle' V='Themed' F='Inh'/><Cell N='FillGradientDir' V='Themed' F='Inh'/><Cell N='FillGradientAngle' V='Themed' F='Inh'/><Cell N='LineGradientEnabled' V='0'/><Cell N='FillGradientEnabled' V='0'/><Cell N='RotateGradientWithShape' V='Themed' F='Inh'/><Cell N='UseGroupGradient' V='Themed' F='Inh'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0'/><Cell N='BottomMargin' V='0'/><Cell N='VerticalAlign' V='2'/><Cell N='TextBkgnd' V='0' F='Inh'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='1'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='ShapePermeableX' V='1'/><Cell N='ShapePermeableY' V='1'/><Cell N='ShapePermeablePlace' V='1'/><Cell N='Relationships' V='0' F='Inh'/><Cell N='ShapeFixedCode' V='0' F='Inh'/><Cell N='ShapePlowCode' V='0' F='Inh'/><Cell N='ShapeRouteStyle' V='0' F='Inh'/><Cell N='ShapePlaceStyle' V='0' F='Inh'/><Cell N='ConFixedCode' V='0' F='Inh'/><Cell N='ConLineJumpCode' V='0' F='Inh'/><Cell N='ConLineJumpStyle' V='0' F='Inh'/><Cell N='ConLineJumpDirX' V='0' F='Inh'/><Cell N='ConLineJumpDirY' V='0' F='Inh'/><Cell N='ShapePlaceFlip' V='0' F='Inh'/><Cell N='ConLineRouteExt' V='0' F='Inh'/><Cell N='ShapeSplit' V='0' F='Inh'/><Cell N='ShapeSplittable' V='0' F='Inh'/><Cell N='DisplayLevel' V='0' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='4'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.125'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet><StyleSheet ID='6' NameU='Theme' IsCustomNameU='1' Name='Theme' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LineWeight' V='Themed' F='THEMEVAL()'/><Cell N='LineColor' V='Themed' F='THEMEVAL()'/><Cell N='LinePattern' V='Themed' F='THEMEVAL()'/><Cell N='Rounding' V='Themed' F='THEMEVAL()'/><Cell N='EndArrowSize' V='2' F='Inh'/><Cell N='BeginArrow' V='0' F='Inh'/><Cell N='EndArrow' V='0' F='Inh'/><Cell N='LineCap' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrowSize' V='2' F='Inh'/><Cell N='LineColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='CompoundType' V='Themed' F='THEMEVAL()'/><Cell N='FillForegnd' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgnd' V='Themed' F='THEMEVAL()'/><Cell N='FillPattern' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegnd' V='Themed' F='THEMEVAL()'/><Cell N='ShdwPattern' V='Themed' F='THEMEVAL()'/><Cell N='FillForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='FillBkgndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShdwForegndTrans' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwType' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetX' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwOffsetY' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwObliqueAngle' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwScaleFactor' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwBlur' V='Themed' F='THEMEVAL()'/><Cell N='ShapeShdwShow' V='0' F='Inh'/><Cell N='LineGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientDir' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientAngle' V='Themed' F='THEMEVAL()'/><Cell N='LineGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='FillGradientEnabled' V='Themed' F='THEMEVAL()'/><Cell N='RotateGradientWithShape' V='Themed' F='THEMEVAL()'/><Cell N='UseGroupGradient' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopType' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopWidth' V='Themed' F='THEMEVAL()'/><Cell N='BevelTopHeight' V='Themed' F='THEMEVAL()'/><Cell N='BevelBottomType' V='0' F='Inh'/><Cell N='BevelBottomWidth' V='0' F='Inh'/><Cell N='BevelBottomHeight' V='0' F='Inh'/><Cell N='BevelDepthColor' V='1' F='Inh'/><Cell N='BevelDepthSize' V='0' F='Inh'/><Cell N='BevelContourColor' V='Themed' F='THEMEVAL()'/><Cell N='BevelContourSize' V='Themed' F='THEMEVAL()'/><Cell N='BevelMaterialType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingType' V='Themed' F='THEMEVAL()'/><Cell N='BevelLightingAngle' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionTrans' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionSize' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionDist' V='Themed' F='THEMEVAL()'/><Cell N='ReflectionBlur' V='Themed' F='THEMEVAL()'/><Cell N='GlowColor' V='Themed' F='THEMEVAL()'/><Cell N='GlowColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GlowSize' V='Themed' F='THEMEVAL()'/><Cell N='SoftEdgesSize' V='Themed' F='THEMEVAL()'/><Cell N='SketchSeed' V='0' F='Inh'/><Cell N='SketchEnabled' V='Themed' F='THEMEVAL()'/><Cell N='SketchAmount' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineWeight' V='Themed' F='THEMEVAL()'/><Cell N='SketchLineChange' V='Themed' F='THEMEVAL()'/><Cell N='SketchFillChange' V='Themed' F='THEMEVAL()'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='100'/><Cell N='QuickStyleFillMatrix' V='100'/><Cell N='QuickStyleEffectsMatrix' V='100'/><Cell N='QuickStyleFontMatrix' V='100'/><Cell N='QuickStyleType' V='0' F='Inh'/><Cell N='QuickStyleVariation' V='0' F='Inh'/><Cell N='ColorSchemeIndex' V='65534'/><Cell N='EffectSchemeIndex' V='65534'/><Cell N='ConnectorSchemeIndex' V='65534'/><Cell N='FontSchemeIndex' V='65534'/><Cell N='ThemeIndex' V='65534'/><Cell N='VariationColorIndex' V='65534'/><Cell N='VariationStyleIndex' V='65534'/><Cell N='EmbellishmentIndex' V='65534'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='THEMEVAL()'/><Cell N='Color' V='Themed' F='THEMEVAL()'/><Cell N='Style' V='Themed' F='THEMEVAL()'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1666666666666667' F='Inh'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptFont' V='Themed' F='THEMEVAL()'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section><Section N='FillGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section><Section N='LineGradient'><Row IX='0'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='1'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='2'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='3'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='4'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='5'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='6'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='7'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='8'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row><Row IX='9'><Cell N='GradientStopColor' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopColorTrans' V='Themed' F='THEMEVAL()'/><Cell N='GradientStopPosition' V='Themed' F='THEMEVAL()'/></Row></Section></StyleSheet><StyleSheet ID='7' NameU='Connector' IsCustomNameU='1' Name='Connector' IsCustomName='1' LineStyle='3' FillStyle='3' TextStyle='3'><Cell N='EnableLineProps' V='1'/><Cell N='EnableFillProps' V='1'/><Cell N='EnableTextProps' V='1'/><Cell N='HideForApply' V='0'/><Cell N='LeftMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='RightMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='TopMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='BottomMargin' V='0.05555555555555555' U='PT' F='Inh'/><Cell N='VerticalAlign' V='1' F='Inh'/><Cell N='TextBkgnd' V='#ffffff' F='THEMEGUARD(THEMEVAL(\"BackgroundColor\")+1)'/><Cell N='DefaultTabStop' V='0.5' F='Inh'/><Cell N='TextDirection' V='0' F='Inh'/><Cell N='TextBkgndTrans' V='0' F='Inh'/><Cell N='NoObjHandles' V='0' F='Inh'/><Cell N='NonPrinting' V='0' F='Inh'/><Cell N='NoCtlHandles' V='0' F='Inh'/><Cell N='NoAlignBox' V='0' F='Inh'/><Cell N='UpdateAlignBox' V='0' F='Inh'/><Cell N='HideText' V='0' F='Inh'/><Cell N='DynFeedback' V='0' F='Inh'/><Cell N='GlueType' V='0' F='Inh'/><Cell N='WalkPreference' V='0' F='Inh'/><Cell N='BegTrigger' V='0' F='No Formula'/><Cell N='EndTrigger' V='0' F='No Formula'/><Cell N='ObjType' V='0' F='Inh'/><Cell N='Comment' V='' F='Inh'/><Cell N='IsDropSource' V='0' F='Inh'/><Cell N='NoLiveDynamics' V='0' F='Inh'/><Cell N='LocalizeMerge' V='0' F='Inh'/><Cell N='NoProofing' V='0' F='Inh'/><Cell N='Calendar' V='0' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/><Cell N='ShapeKeywords' V='' F='Inh'/><Cell N='DropOnPageScale' V='1' F='Inh'/><Cell N='QuickStyleLineColor' V='100'/><Cell N='QuickStyleFillColor' V='100'/><Cell N='QuickStyleShadowColor' V='100'/><Cell N='QuickStyleFontColor' V='100'/><Cell N='QuickStyleLineMatrix' V='1'/><Cell N='QuickStyleFillMatrix' V='1'/><Cell N='QuickStyleEffectsMatrix' V='1'/><Cell N='QuickStyleFontMatrix' V='1'/><Cell N='QuickStyleType' V='0'/><Cell N='QuickStyleVariation' V='0'/><Cell N='LineWeight' V='Themed' F='Inh'/><Cell N='LineColor' V='Themed' F='Inh'/><Cell N='LinePattern' V='Themed' F='Inh'/><Cell N='Rounding' V='Themed' F='Inh'/><Cell N='EndArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='BeginArrow' V='Themed' F='THEMEVAL()'/><Cell N='EndArrow' V='Themed' F='THEMEVAL()'/><Cell N='LineCap' V='Themed' F='Inh'/><Cell N='BeginArrowSize' V='Themed' F='THEMEVAL()'/><Cell N='LineColorTrans' V='Themed' F='Inh'/><Cell N='CompoundType' V='Themed' F='Inh'/><Section N='Character'><Row IX='0'><Cell N='Font' V='Themed' F='Inh'/><Cell N='Color' V='Themed' F='Inh'/><Cell N='Style' V='Themed' F='Inh'/><Cell N='Case' V='0' F='Inh'/><Cell N='Pos' V='0' F='Inh'/><Cell N='FontScale' V='1' F='Inh'/><Cell N='Size' V='0.1111111111111111'/><Cell N='DblUnderline' V='0' F='Inh'/><Cell N='Overline' V='0' F='Inh'/><Cell N='Strikethru' V='0' F='Inh'/><Cell N='DoubleStrikethrough' V='0' F='Inh'/><Cell N='Letterspace' V='0' F='Inh'/><Cell N='ColorTrans' V='0' F='Inh'/><Cell N='AsianFont' V='Themed' F='Inh'/><Cell N='ComplexScriptFont' V='Themed' F='Inh'/><Cell N='ComplexScriptSize' V='-1' F='Inh'/><Cell N='LangID' V='en-US' F='Inh'/></Row></Section></StyleSheet></StyleSheets><DocumentSheet NameU='TheDoc' IsCustomNameU='1' Name='TheDoc' IsCustomName='1' LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='OutputFormat' V='0'/><Cell N='LockPreview' V='0'/><Cell N='AddMarkup' V='0'/><Cell N='ViewMarkup' V='0'/><Cell N='DocLockReplace' V='0' U='BOOL'/><Cell N='NoCoauth' V='0' U='BOOL'/><Cell N='DocLockDuplicatePage' V='0' U='BOOL'/><Cell N='PreviewQuality' V='0'/><Cell N='PreviewScope' V='0'/><Cell N='DocLangID' V='en-US'/><Section N='User'><Row N='msvNoAutoConnect'><Cell N='Value' V='1'/><Cell N='Prompt' V='' F='No Formula'/></Row></Section></DocumentSheet></VisioDocument>",
"visio/windows.xml":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Windows ClientWidth='0' ClientHeight='0' xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve' />","visio/_rels/document.xml.rels":"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Relationships xmlns='http://schemas.openxmlformats.org/package/2006/relationships'><Relationship Id='rId1' Type='http://schemas.microsoft.com/visio/2010/relationships/masters' Target='masters/masters.xml' /><Relationship Id='rId2' Type='http://schemas.microsoft.com/visio/2010/relationships/pages' Target='pages/pages.xml' /><Relationship Id='rId3' Type='http://schemas.microsoft.com/visio/2010/relationships/windows' Target='windows.xml' /></Relationships>",
"visio/masters/_rels/masters.xml.rels":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.microsoft.com/visio/2010/relationships/master" Target="master1.xml"/></Relationships>',"visio/masters/masters.xml":"<?xml version='1.0' encoding='utf-8' ?><Masters xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Master ID='4' NameU='Dynamic connector' IsCustomNameU='1' Name='Dynamic connector' IsCustomName='1' Prompt='This connector automatically routes between the shapes it connects.' IconSize='1' AlignName='2' MatchByName='1' IconUpdate='0' UniqueID='{002A9108-0000-0000-8E40-00608CF305B2}' BaseID='{F7290A45-E3AD-11D2-AE4F-006008C9F5A9}' PatternFlags='0' Hidden='0' MasterType='0'><PageSheet LineStyle='0' FillStyle='0' TextStyle='0'><Cell N='PageWidth' V='3'/><Cell N='PageHeight' V='3'/><Cell N='ShdwOffsetX' V='0.125'/><Cell N='ShdwOffsetY' V='-0.125'/><Cell N='PageScale' V='1' U='IN_F'/><Cell N='DrawingScale' V='1' U='IN_F'/><Cell N='DrawingSizeType' V='4'/><Cell N='DrawingScaleType' V='0'/><Cell N='InhibitSnap' V='0'/><Cell N='PageLockReplace' V='0' U='BOOL'/><Cell N='PageLockDuplicate' V='0' U='BOOL'/><Cell N='UIVisibility' V='0'/><Cell N='ShdwType' V='0'/><Cell N='ShdwObliqueAngle' V='0'/><Cell N='ShdwScaleFactor' V='1'/><Cell N='DrawingResizeType' V='0'/><Section N='Layer'><Row IX='0'><Cell N='Name' V='Connector'/><Cell N='Color' V='255'/><Cell N='Status' V='0'/><Cell N='Visible' V='1'/><Cell N='Print' V='1'/><Cell N='Active' V='0'/><Cell N='Lock' V='0'/><Cell N='Snap' V='1'/><Cell N='Glue' V='1'/><Cell N='NameUniv' V='Connector'/><Cell N='ColorTrans' V='0'/></Row></Section></PageSheet><Rel r:id='rId1'/></Master></Masters>",
"visio/masters/master1.xml":"<?xml version='1.0' encoding='utf-8' ?><MasterContents xmlns='http://schemas.microsoft.com/office/visio/2012/main' xmlns:r='http://schemas.openxmlformats.org/officeDocument/2006/relationships' xml:space='preserve'><Shapes><Shape ID='5' OriginalID='0' Type='Shape' LineStyle='7' FillStyle='7' TextStyle='7'><Cell N='PinX' V='1.5' F='GUARD((BeginX+EndX)/2)'/><Cell N='PinY' V='1.5' F='GUARD((BeginY+EndY)/2)'/><Cell N='Width' V='1' F='GUARD(EndX-BeginX)'/><Cell N='Height' V='-1' F='GUARD(EndY-BeginY)'/><Cell N='LocPinX' V='0.5' F='GUARD(Width*0.5)'/><Cell N='LocPinY' V='-0.5' F='GUARD(Height*0.5)'/><Cell N='Angle' V='0' F='GUARD(0DA)'/><Cell N='FlipX' V='0' F='GUARD(FALSE)'/><Cell N='FlipY' V='0' F='GUARD(FALSE)'/><Cell N='ResizeMode' V='0'/><Cell N='BeginX' V='1'/><Cell N='BeginY' V='2'/><Cell N='EndX' V='2'/><Cell N='EndY' V='1'/><Cell N='TxtPinX' V='0' F='SETATREF(Controls.TextPosition)'/><Cell N='TxtPinY' V='-1' F='SETATREF(Controls.TextPosition.Y)'/><Cell N='TxtWidth' V='0.5555555555555556' F='MAX(TEXTWIDTH(TheText),5*Char.Size)'/><Cell N='TxtHeight' V='0.2444444444444444' F='TEXTHEIGHT(TheText,TxtWidth)'/><Cell N='TxtLocPinX' V='0.2777777777777778' F='TxtWidth*0.5'/><Cell N='TxtLocPinY' V='0.1222222222222222' F='TxtHeight*0.5'/><Cell N='TxtAngle' V='0'/><Cell N='LockHeight' V='1'/><Cell N='LockCalcWH' V='1'/><Cell N='HelpTopic' V='Vis_SE.chm!#20000'/><Cell N='Copyright' V='Copyright 2001 Microsoft Corporation. All rights reserved.'/><Cell N='NoAlignBox' V='1'/><Cell N='DynFeedback' V='2'/><Cell N='GlueType' V='2'/><Cell N='ObjType' V='2'/><Cell N='NoLiveDynamics' V='1'/><Cell N='ShapeSplittable' V='1'/><Cell N='LayerMember' V='0'/><Section N='Control'><Row N='TextPosition'><Cell N='X' V='0'/><Cell N='Y' V='-1'/><Cell N='XDyn' V='0' F='Controls.TextPosition'/><Cell N='YDyn' V='-1' F='Controls.TextPosition.Y'/><Cell N='XCon' V='5' F='IF(OR(STRSAME(SHAPETEXT(TheText),\"\"),HideText),5,0)'/><Cell N='YCon' V='0'/><Cell N='CanGlue' V='0'/><Cell N='Prompt' V='Reposition Text'/></Row></Section><Section N='Geometry' IX='0'><Cell N='NoFill' V='1'/><Cell N='NoLine' V='0'/><Cell N='NoShow' V='0'/><Cell N='NoSnap' V='0'/><Cell N='NoQuickDrag' V='0'/><Row T='MoveTo' IX='1'><Cell N='X' V='0'/><Cell N='Y' V='0'/></Row><Row T='LineTo' IX='2'><Cell N='X' V='0'/><Cell N='Y' V='-1'/></Row></Section></Shape></Shapes></MasterContents>"},
-L;for(L in N)if(1<J&&L==M.CONTENT_TYPES_XML){for(var O=mxUtils.parseXml(N[L]),ba=O.documentElement,W=ba.children,R=null,T=0;T<W.length;T++){var ka=W[T];"/visio/pages/page1.xml"==ka.getAttribute(M.PART_NAME)&&(R=ka)}for(T=2;T<=J;T++)W=R.cloneNode(),W.setAttribute(M.PART_NAME,"/visio/pages/page"+T+".xml"),ba.appendChild(W);A(H,L,O,!0)}else H.file(L,N[L])}function z(H,J,N){return null!=H.createElementNS?H.createElementNS(J,N):H.createElement(N)}function B(H){var J=Q[H];null==J&&(J=S++,Q[H]=J);return J}
-function m(H){var J={};try{var N=H.getGraphBounds().clone(),L=H.view.scale,O=H.view.translate,ba=Math.round(N.x/L)-O.x,W=Math.round(N.y/L)-O.y,R=H.pageFormat.width,T=H.pageFormat.height;0>ba&&(ba+=Math.ceil((O.x-N.x/L)/R)*R);0>W&&(W+=Math.ceil((O.y-N.y/L)/T)*T);var ka=Math.max(1,Math.ceil((N.width/L+ba)/R)),ca=Math.max(1,Math.ceil((N.height/L+W)/T));J.gridEnabled=H.gridEnabled;J.gridSize=H.gridSize;J.guidesEnabled=H.graphHandler.guidesEnabled;J.pageVisible=H.pageVisible;J.pageScale=H.pageScale;J.pageWidth=
-H.pageFormat.width*ka;J.pageHeight=H.pageFormat.height*ca;J.backgroundClr=H.background;J.mathEnabled=H.mathEnabled;J.shadowVisible=H.shadowVisible}catch(qa){}return J}function h(H,J,N,L){return c(H,J/M.CONVERSION_FACTOR,N,L)}function c(H,J,N,L){N=z(N,M.XMLNS,"Cell");N.setAttribute("N",H);N.setAttribute("V",J);L&&N.setAttribute("F",L);return N}function a(H,J,N,L,O){var ba=z(O,M.XMLNS,"Row");ba.setAttribute("T",H);ba.setAttribute("IX",J);ba.appendChild(h("X",N,O));ba.appendChild(h("Y",L,O));return ba}
-function b(H,J,N){var L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(L&&"none"!=L){if(J.appendChild(c("FillForegnd",L,N)),(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=L){J.appendChild(c("FillBkgnd",L,N));L=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var O=28;if(L)switch(L){case mxConstants.DIRECTION_EAST:O=25;break;case mxConstants.DIRECTION_WEST:O=27;break;case mxConstants.DIRECTION_NORTH:O=30}J.appendChild(c("FillPattern",O,N))}}else J.appendChild(c("FillPattern",
-0,N));(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=L?J.appendChild(c("LineColor",L,N)):J.appendChild(c("LinePattern",0,N));(L=H.style[mxConstants.STYLE_STROKEWIDTH])&&J.appendChild(h("LineWeight",L,N));(O=H.style[mxConstants.STYLE_OPACITY])?L=O:(L=H.style[mxConstants.STYLE_FILL_OPACITY],O=H.style[mxConstants.STYLE_STROKE_OPACITY]);L&&J.appendChild(c("FillForegndTrans",1-parseInt(L)/100,N));O&&J.appendChild(c("LineColorTrans",1-parseInt(O)/100,N));if(1==H.style[mxConstants.STYLE_DASHED]){L=
-H.style[mxConstants.STYLE_DASH_PATTERN];O=9;if(L)switch(L){case "1 1":O=10;break;case "1 2":O=3;break;case "1 4":O=17}J.appendChild(c("LinePattern",O,N))}1==H.style[mxConstants.STYLE_SHADOW]&&(J.appendChild(c("ShdwPattern",1,N)),J.appendChild(c("ShdwForegnd","#000000",N)),J.appendChild(c("ShdwForegndTrans",.6,N)),J.appendChild(c("ShapeShdwType",1,N)),J.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",N)),J.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",N)),J.appendChild(c("ShapeShdwScaleFactor",
-"1",N)),J.appendChild(c("ShapeShdwBlur","0.05555555555555555",N)),J.appendChild(c("ShapeShdwShow",2,N)));1==H.style[mxConstants.STYLE_FLIPH]&&J.appendChild(c("FlipX",1,N));1==H.style[mxConstants.STYLE_FLIPV]&&J.appendChild(c("FlipY",1,N));1==H.style[mxConstants.STYLE_ROUNDED]&&J.appendChild(h("Rounding",.1*H.cell.geometry.width,N));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&J.appendChild(c("TextBkgnd",H,N))}function d(H,J,N,L,O,ba){var W=z(L,M.XMLNS,"Shape");W.setAttribute("ID",
-H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=J.width/2;var R=J.height/2;W.appendChild(h("PinX",J.x+H+(ba?0:K.shiftX),L));W.appendChild(h("PinY",O-J.y-R-(ba?0:K.shiftY),L));W.appendChild(h("Width",J.width,L));W.appendChild(h("Height",J.height,L));W.appendChild(h("LocPinX",H,L));W.appendChild(h("LocPinY",R,L));W.appendChild(c("LayerMember",N+"",L));return W}function f(H,J){H=M.ARROWS_MAP[(null==H?"none":H)+"|"+
-(null==J?"1":J)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,J,N,L,O,ba){var W=N.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;N=z(L,M.XMLNS,"Shape");var R=B(H.id);N.setAttribute("ID",R);N.setAttribute("NameU","Dynamic connector."+R);N.setAttribute("Name","Dynamic connector."+R);N.setAttribute("Type","Shape");N.setAttribute("Master","4");var T=K.state;R=W.absolutePoints;var ka=W.cellBounds,ca=
-ka.width/2,qa=ka.height/2;N.appendChild(h("PinX",ka.x+ca+(ba?0:K.shiftX),L));N.appendChild(h("PinY",O-ka.y-qa-(ba?0:K.shiftY),L));N.appendChild(h("Width",ka.width,L));N.appendChild(h("Height",ka.height,L));N.appendChild(h("LocPinX",ca,L));N.appendChild(h("LocPinY",qa,L));K.newEdge(N,W,L);ca=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*T.scale-ka.x+T.dx+(pa||ba?0:K.shiftX);sa=(Fa?0:ka.height)-sa*T.scale+ka.y-T.dy-(pa||ba?0:K.shiftY);return{x:Za,y:sa}};qa=ca(R[0],!0);N.appendChild(h("BeginX",ka.x+qa.x,
-L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));N.appendChild(h("BeginY",O-ka.y+qa.y,L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ca(R[R.length-1],!0);N.appendChild(h("EndX",ka.x+qa.x,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(h("EndY",O-ka.y+qa.y,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));N.appendChild(c("BegTrigger","2",L,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));N.appendChild(c("EndTrigger","2",L,H.target?"_XFTRIGGER(Sheet."+
-B(H.target.id)+"!EventXFMod)":null));N.appendChild(c("ConFixedCode","6",L));N.appendChild(c("LayerMember",J+"",L));b(W,N,L);J=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);N.appendChild(c("BeginArrow",H,L));N.appendChild(c("BeginArrowSize",k(J),L));J=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);N.appendChild(c("EndArrow",H,L));N.appendChild(c("EndArrowSize",k(J),
-L));null!=W.text&&W.text.checkBounds()&&(K.save(),W.text.paint(K),K.restore());W=z(L,M.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)J=ca(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,J.x,J.y,L));W.appendChild(c("NoFill","1",L));W.appendChild(c("NoLine","0",L));N.appendChild(W);return N}function q(H,J,N,L,O,ba,W){var R=H.geometry,T=R;if(null!=R)try{R.relative&&ba&&(T=R.clone(),R.x*=ba.width,R.y*=ba.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,
-R.y+=R.offset.y),R.relative=0);var ka=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ca=d(ka+"10000",R,J,L,O,W);ca.setAttribute("Type","Group");var qa=z(L,M.XMLNS,"Shapes");K.save();K.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=q(H,J,N,L,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(O=0;O<H.getChildCount();O++)Fa=q(H.children[O],J,N,L,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ca.appendChild(qa);
-K.restore();return ca}if(H.vertex){ca=d(ka,R,J,L,O,W);var pa=N.view.getState(H,!0);null!=pa&&(b(pa,ca,L),K.newShape(ca,pa,L),null!=pa.text&&pa.text.checkBounds()&&(K.save(),pa.text.paint(K),K.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(K.save(),pa.shape.paint(K),K.restore()),ca.appendChild(K.getShapeGeo()),K.endShape(),ca.setAttribute("Type",K.getShapeType()));return ca}return n(H,J,N,L,O,W)}finally{H.geometry=T}else return null}function t(H,J){var N=mxUtils.createXmlDocument(),L=z(N,M.XMLNS,
-"PageContents");L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",M.XMLNS_R);var O=z(N,M.XMLNS,"Shapes");L.appendChild(O);var ba=H.model,W=H.view.translate,R=H.view.scale,T=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(T.x/R<W.x||T.y/R<W.y)K.shiftX=Math.ceil((W.x-T.x/R)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((W.y-T.y/R)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-W.x,-W.y);K.scale(1/R);K.newPage();
-R=H.model.getChildCells(H.model.root);W={};for(T=0;T<R.length;T++)W[R[T].id]=T;for(var ka in ba.cells)R=ba.cells[ka],T=null!=R.parent?W[R.parent.id]:null,null!=T&&(R=q(R,T,H,N,J.pageHeight),null!=R&&O.appendChild(R));H=z(N,M.XMLNS,"Connects");L.appendChild(H);for(ka in ba.cells)R=ba.cells[ka],R.edge&&(R.source&&(J=z(N,M.XMLNS,"Connect"),J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","BeginX"),J.setAttribute("ToSheet",B(R.source.id)),H.appendChild(J)),R.target&&(J=z(N,M.XMLNS,"Connect"),
-J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","EndX"),J.setAttribute("ToSheet",B(R.target.id)),H.appendChild(J)));N.appendChild(L);K.restore();return N}function A(H,J,N,L){H.file(J,(L?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(N,"\n"))}function C(H,J,N,L){var O=mxUtils.createXmlDocument(),ba=mxUtils.createXmlDocument(),W=z(O,M.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",M.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",
-"xmlns:r",M.XMLNS_R);var R=z(ba,M.RELS_XMLNS,"Relationships"),T=1,ka;for(ka in J){var ca="page"+T+".xml",qa=z(O,M.XMLNS,"Page");qa.setAttribute("ID",T-1);qa.setAttribute("NameU",ka);qa.setAttribute("Name",ka);var sa=z(O,M.XMLNS,"PageSheet"),Fa=L[ka];sa.appendChild(h("PageWidth",Fa.pageWidth,O));sa.appendChild(h("PageHeight",Fa.pageHeight,O));sa.appendChild(c("PageScale",Fa.pageScale,O));sa.appendChild(c("DrawingScale",1,O));Fa=z(O,M.XMLNS,"Rel");Fa.setAttributeNS(M.XMLNS_R,"r:id","rId"+T);var pa=
-z(O,M.XMLNS,"Section");pa.setAttribute("N","Layer");for(var Za=N[ka],Qb=0;Qb<Za.length;Qb++){var vb=z(O,M.XMLNS,"Row");vb.setAttribute("IX",Qb+"");pa.appendChild(vb);vb.appendChild(c("Name",Za[Qb].name,O));vb.appendChild(c("Color","255",O));vb.appendChild(c("Status","0",O));vb.appendChild(c("Visible",Za[Qb].visible?"1":"0",O));vb.appendChild(c("Print","1",O));vb.appendChild(c("Active","0",O));vb.appendChild(c("Lock",Za[Qb].locked?"1":"0",O));vb.appendChild(c("Snap","1",O));vb.appendChild(c("Glue",
-"1",O));vb.appendChild(c("NameUniv",Za[Qb].name,O));vb.appendChild(c("ColorTrans","0",O))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ba,M.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+T);qa.setAttribute("Type",M.PAGES_TYPE);qa.setAttribute("Target",ca);R.appendChild(qa);A(H,M.VISIO_PAGES+ca,J[ka]);T++}O.appendChild(W);ba.appendChild(R);A(H,M.VISIO_PAGES+"pages.xml",O);A(H,M.VISIO_PAGES+"_rels/pages.xml.rels",ba)}function I(H,J){J=M.VISIO_PAGES_RELS+"page"+
-J+".xml.rels";var N=mxUtils.createXmlDocument(),L=z(N,M.RELS_XMLNS,"Relationships"),O=z(N,M.RELS_XMLNS,"Relationship");O.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");O.setAttribute("Id","rId1");O.setAttribute("Target","../masters/master1.xml");L.appendChild(O);var ba=K.images;if(0<ba.length)for(var W=0;W<ba.length;W++)O=z(N,M.RELS_XMLNS,"Relationship"),O.setAttribute("Type",M.XMLNS_R+"/image"),O.setAttribute("Id","rId"+(W+2)),O.setAttribute("Target","../media/"+
-ba[W]),L.appendChild(O);N.appendChild(L);A(H,J,N)}var M=this,K=new mxVsdxCanvas2D,Q={},S=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var J=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);O[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&O[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},N=new JSZip;K.init(N);Q={};S=1;var L={},O={},ba={},W=null!=
-g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);L[Fa]=t(pa,Za);J(pa,Fa);I(N,ca+1);ba[Fa]=Za},T=g.editor.graph.getSelectionCells(),ka=g.currentPage;if(H)R(ka);else{for(var ca=0;ca<g.pages.length;ca++){var qa=g.pages[ca];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ka!=g.currentPage&&g.selectPage(ka,!0);g.editor.graph.setSelectionCells(T)}}else{R=g.editor.graph;var sa=m(R);L.Page1=t(R,sa);J(R,"Page1");I(N,1);ba.Page1=sa}y(N,W);C(N,L,O,ba);
-H=function(){N.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<K.filesLoading?K.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
+L;for(L in M)if(1<J&&L==N.CONTENT_TYPES_XML){for(var Q=mxUtils.parseXml(M[L]),ca=Q.documentElement,W=ca.children,R=null,U=0;U<W.length;U++){var ia=W[U];"/visio/pages/page1.xml"==ia.getAttribute(N.PART_NAME)&&(R=ia)}for(U=2;U<=J;U++)W=R.cloneNode(),W.setAttribute(N.PART_NAME,"/visio/pages/page"+U+".xml"),ca.appendChild(W);A(H,L,Q,!0)}else H.file(L,M[L])}function z(H,J,M){return null!=H.createElementNS?H.createElementNS(J,M):H.createElement(M)}function B(H){var J=O[H];null==J&&(J=S++,O[H]=J);return J}
+function m(H){var J={};try{var M=H.getGraphBounds().clone(),L=H.view.scale,Q=H.view.translate,ca=Math.round(M.x/L)-Q.x,W=Math.round(M.y/L)-Q.y,R=H.pageFormat.width,U=H.pageFormat.height;0>ca&&(ca+=Math.ceil((Q.x-M.x/L)/R)*R);0>W&&(W+=Math.ceil((Q.y-M.y/L)/U)*U);var ia=Math.max(1,Math.ceil((M.width/L+ca)/R)),ba=Math.max(1,Math.ceil((M.height/L+W)/U));J.gridEnabled=H.gridEnabled;J.gridSize=H.gridSize;J.guidesEnabled=H.graphHandler.guidesEnabled;J.pageVisible=H.pageVisible;J.pageScale=H.pageScale;J.pageWidth=
+H.pageFormat.width*ia;J.pageHeight=H.pageFormat.height*ba;J.backgroundClr=H.background;J.mathEnabled=H.mathEnabled;J.shadowVisible=H.shadowVisible}catch(qa){}return J}function h(H,J,M,L){return c(H,J/N.CONVERSION_FACTOR,M,L)}function c(H,J,M,L){M=z(M,N.XMLNS,"Cell");M.setAttribute("N",H);M.setAttribute("V",J);L&&M.setAttribute("F",L);return M}function a(H,J,M,L,Q){var ca=z(Q,N.XMLNS,"Row");ca.setAttribute("T",H);ca.setAttribute("IX",J);ca.appendChild(h("X",M,Q));ca.appendChild(h("Y",L,Q));return ca}
+function b(H,J,M){var L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_FILLCOLOR]);if(L&&"none"!=L){if(J.appendChild(c("FillForegnd",L,M)),(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_GRADIENTCOLOR]))&&"none"!=L){J.appendChild(c("FillBkgnd",L,M));L=H.style[mxConstants.STYLE_GRADIENT_DIRECTION];var Q=28;if(L)switch(L){case mxConstants.DIRECTION_EAST:Q=25;break;case mxConstants.DIRECTION_WEST:Q=27;break;case mxConstants.DIRECTION_NORTH:Q=30}J.appendChild(c("FillPattern",Q,M))}}else J.appendChild(c("FillPattern",
+0,M));(L=mxUtils.rgba2hex(H.style[mxConstants.STYLE_STROKECOLOR]))&&"none"!=L?J.appendChild(c("LineColor",L,M)):J.appendChild(c("LinePattern",0,M));(L=H.style[mxConstants.STYLE_STROKEWIDTH])&&J.appendChild(h("LineWeight",L,M));(Q=H.style[mxConstants.STYLE_OPACITY])?L=Q:(L=H.style[mxConstants.STYLE_FILL_OPACITY],Q=H.style[mxConstants.STYLE_STROKE_OPACITY]);L&&J.appendChild(c("FillForegndTrans",1-parseInt(L)/100,M));Q&&J.appendChild(c("LineColorTrans",1-parseInt(Q)/100,M));if(1==H.style[mxConstants.STYLE_DASHED]){L=
+H.style[mxConstants.STYLE_DASH_PATTERN];Q=9;if(L)switch(L){case "1 1":Q=10;break;case "1 2":Q=3;break;case "1 4":Q=17}J.appendChild(c("LinePattern",Q,M))}1==H.style[mxConstants.STYLE_SHADOW]&&(J.appendChild(c("ShdwPattern",1,M)),J.appendChild(c("ShdwForegnd","#000000",M)),J.appendChild(c("ShdwForegndTrans",.6,M)),J.appendChild(c("ShapeShdwType",1,M)),J.appendChild(c("ShapeShdwOffsetX","0.02946278254943948",M)),J.appendChild(c("ShapeShdwOffsetY","-0.02946278254943948",M)),J.appendChild(c("ShapeShdwScaleFactor",
+"1",M)),J.appendChild(c("ShapeShdwBlur","0.05555555555555555",M)),J.appendChild(c("ShapeShdwShow",2,M)));1==H.style[mxConstants.STYLE_FLIPH]&&J.appendChild(c("FlipX",1,M));1==H.style[mxConstants.STYLE_FLIPV]&&J.appendChild(c("FlipY",1,M));1==H.style[mxConstants.STYLE_ROUNDED]&&J.appendChild(h("Rounding",.1*H.cell.geometry.width,M));(H=mxUtils.rgba2hex(H.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR]))&&J.appendChild(c("TextBkgnd",H,M))}function d(H,J,M,L,Q,ca){var W=z(L,N.XMLNS,"Shape");W.setAttribute("ID",
+H);W.setAttribute("NameU","Shape"+H);W.setAttribute("LineStyle","0");W.setAttribute("FillStyle","0");W.setAttribute("TextStyle","0");H=J.width/2;var R=J.height/2;W.appendChild(h("PinX",J.x+H+(ca?0:K.shiftX),L));W.appendChild(h("PinY",Q-J.y-R-(ca?0:K.shiftY),L));W.appendChild(h("Width",J.width,L));W.appendChild(h("Height",J.height,L));W.appendChild(h("LocPinX",H,L));W.appendChild(h("LocPinY",R,L));W.appendChild(c("LayerMember",M+"",L));return W}function f(H,J){H=N.ARROWS_MAP[(null==H?"none":H)+"|"+
+(null==J?"1":J)];return null!=H?H:1}function k(H){return null==H?2:2>=H?0:3>=H?1:5>=H?2:7>=H?3:9>=H?4:22>=H?5:6}function n(H,J,M,L,Q,ca){var W=M.view.getState(H,!0);if(null==W||null==W.absolutePoints||null==W.cellBounds)return null;M=z(L,N.XMLNS,"Shape");var R=B(H.id);M.setAttribute("ID",R);M.setAttribute("NameU","Dynamic connector."+R);M.setAttribute("Name","Dynamic connector."+R);M.setAttribute("Type","Shape");M.setAttribute("Master","4");var U=K.state;R=W.absolutePoints;var ia=W.cellBounds,ba=
+ia.width/2,qa=ia.height/2;M.appendChild(h("PinX",ia.x+ba+(ca?0:K.shiftX),L));M.appendChild(h("PinY",Q-ia.y-qa-(ca?0:K.shiftY),L));M.appendChild(h("Width",ia.width,L));M.appendChild(h("Height",ia.height,L));M.appendChild(h("LocPinX",ba,L));M.appendChild(h("LocPinY",qa,L));K.newEdge(M,W,L);ba=function(sa,Fa,pa){var Za=sa.x;sa=sa.y;Za=Za*U.scale-ia.x+U.dx+(pa||ca?0:K.shiftX);sa=(Fa?0:ia.height)-sa*U.scale+ia.y-U.dy-(pa||ca?0:K.shiftY);return{x:Za,y:sa}};qa=ba(R[0],!0);M.appendChild(h("BeginX",ia.x+qa.x,
+L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));M.appendChild(h("BeginY",Q-ia.y+qa.y,L,"_WALKGLUE(BegTrigger,EndTrigger,WalkPreference)"));qa=ba(R[R.length-1],!0);M.appendChild(h("EndX",ia.x+qa.x,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));M.appendChild(h("EndY",Q-ia.y+qa.y,L,"_WALKGLUE(EndTrigger,BegTrigger,WalkPreference)"));M.appendChild(c("BegTrigger","2",L,H.source?"_XFTRIGGER(Sheet."+B(H.source.id)+"!EventXFMod)":null));M.appendChild(c("EndTrigger","2",L,H.target?"_XFTRIGGER(Sheet."+
+B(H.target.id)+"!EventXFMod)":null));M.appendChild(c("ConFixedCode","6",L));M.appendChild(c("LayerMember",J+"",L));b(W,M,L);J=W.style[mxConstants.STYLE_STARTSIZE];H=f(W.style[mxConstants.STYLE_STARTARROW],W.style[mxConstants.STYLE_STARTFILL]);M.appendChild(c("BeginArrow",H,L));M.appendChild(c("BeginArrowSize",k(J),L));J=W.style[mxConstants.STYLE_ENDSIZE];H=f(W.style[mxConstants.STYLE_ENDARROW],W.style[mxConstants.STYLE_ENDFILL]);M.appendChild(c("EndArrow",H,L));M.appendChild(c("EndArrowSize",k(J),
+L));null!=W.text&&W.text.checkBounds()&&(K.save(),W.text.paint(K),K.restore());W=z(L,N.XMLNS,"Section");W.setAttribute("N","Geometry");W.setAttribute("IX","0");for(H=0;H<R.length;H++)J=ba(R[H],!1,!0),W.appendChild(a(0==H?"MoveTo":"LineTo",H+1,J.x,J.y,L));W.appendChild(c("NoFill","1",L));W.appendChild(c("NoLine","0",L));M.appendChild(W);return M}function q(H,J,M,L,Q,ca,W){var R=H.geometry,U=R;if(null!=R)try{R.relative&&ca&&(U=R.clone(),R.x*=ca.width,R.y*=ca.height,H.vertex&&null!=R.offset&&(R.x+=R.offset.x,
+R.y+=R.offset.y),R.relative=0);var ia=B(H.id);if(!H.treatAsSingle&&0<H.getChildCount()){var ba=d(ia+"10000",R,J,L,Q,W);ba.setAttribute("Type","Group");var qa=z(L,N.XMLNS,"Shapes");K.save();K.translate(-R.x,-R.y);var sa=R.clone();sa.x=0;sa.y=0;H.setGeometry(sa);H.treatAsSingle=!0;var Fa=q(H,J,M,L,R.height,R,!0);delete H.treatAsSingle;H.setGeometry(R);null!=Fa&&qa.appendChild(Fa);for(Q=0;Q<H.getChildCount();Q++)Fa=q(H.children[Q],J,M,L,R.height,R,!0),null!=Fa&&qa.appendChild(Fa);ba.appendChild(qa);
+K.restore();return ba}if(H.vertex){ba=d(ia,R,J,L,Q,W);var pa=M.view.getState(H,!0);null!=pa&&(b(pa,ba,L),K.newShape(ba,pa,L),null!=pa.text&&pa.text.checkBounds()&&(K.save(),pa.text.paint(K),K.restore()),null!=pa.shape&&pa.shape.checkBounds()&&(K.save(),pa.shape.paint(K),K.restore()),ba.appendChild(K.getShapeGeo()),K.endShape(),ba.setAttribute("Type",K.getShapeType()));return ba}return n(H,J,M,L,Q,W)}finally{H.geometry=U}else return null}function t(H,J){var M=mxUtils.createXmlDocument(),L=z(M,N.XMLNS,
+"PageContents");L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",N.XMLNS);L.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:r",N.XMLNS_R);var Q=z(M,N.XMLNS,"Shapes");L.appendChild(Q);var ca=H.model,W=H.view.translate,R=H.view.scale,U=H.getGraphBounds();K.shiftX=0;K.shiftY=0;if(U.x/R<W.x||U.y/R<W.y)K.shiftX=Math.ceil((W.x-U.x/R)/H.pageFormat.width)*H.pageFormat.width,K.shiftY=Math.ceil((W.y-U.y/R)/H.pageFormat.height)*H.pageFormat.height;K.save();K.translate(-W.x,-W.y);K.scale(1/R);K.newPage();
+R=H.model.getChildCells(H.model.root);W={};for(U=0;U<R.length;U++)W[R[U].id]=U;for(var ia in ca.cells)R=ca.cells[ia],U=null!=R.parent?W[R.parent.id]:null,null!=U&&(R=q(R,U,H,M,J.pageHeight),null!=R&&Q.appendChild(R));H=z(M,N.XMLNS,"Connects");L.appendChild(H);for(ia in ca.cells)R=ca.cells[ia],R.edge&&(R.source&&(J=z(M,N.XMLNS,"Connect"),J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","BeginX"),J.setAttribute("ToSheet",B(R.source.id)),H.appendChild(J)),R.target&&(J=z(M,N.XMLNS,"Connect"),
+J.setAttribute("FromSheet",B(R.id)),J.setAttribute("FromCell","EndX"),J.setAttribute("ToSheet",B(R.target.id)),H.appendChild(J)));M.appendChild(L);K.restore();return M}function A(H,J,M,L){H.file(J,(L?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>')+mxUtils.getXml(M,"\n"))}function C(H,J,M,L){var Q=mxUtils.createXmlDocument(),ca=mxUtils.createXmlDocument(),W=z(Q,N.XMLNS,"Pages");W.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns",N.XMLNS);W.setAttributeNS("http://www.w3.org/2000/xmlns/",
+"xmlns:r",N.XMLNS_R);var R=z(ca,N.RELS_XMLNS,"Relationships"),U=1,ia;for(ia in J){var ba="page"+U+".xml",qa=z(Q,N.XMLNS,"Page");qa.setAttribute("ID",U-1);qa.setAttribute("NameU",ia);qa.setAttribute("Name",ia);var sa=z(Q,N.XMLNS,"PageSheet"),Fa=L[ia];sa.appendChild(h("PageWidth",Fa.pageWidth,Q));sa.appendChild(h("PageHeight",Fa.pageHeight,Q));sa.appendChild(c("PageScale",Fa.pageScale,Q));sa.appendChild(c("DrawingScale",1,Q));Fa=z(Q,N.XMLNS,"Rel");Fa.setAttributeNS(N.XMLNS_R,"r:id","rId"+U);var pa=
+z(Q,N.XMLNS,"Section");pa.setAttribute("N","Layer");for(var Za=M[ia],Qb=0;Qb<Za.length;Qb++){var vb=z(Q,N.XMLNS,"Row");vb.setAttribute("IX",Qb+"");pa.appendChild(vb);vb.appendChild(c("Name",Za[Qb].name,Q));vb.appendChild(c("Color","255",Q));vb.appendChild(c("Status","0",Q));vb.appendChild(c("Visible",Za[Qb].visible?"1":"0",Q));vb.appendChild(c("Print","1",Q));vb.appendChild(c("Active","0",Q));vb.appendChild(c("Lock",Za[Qb].locked?"1":"0",Q));vb.appendChild(c("Snap","1",Q));vb.appendChild(c("Glue",
+"1",Q));vb.appendChild(c("NameUniv",Za[Qb].name,Q));vb.appendChild(c("ColorTrans","0",Q))}sa.appendChild(pa);qa.appendChild(sa);qa.appendChild(Fa);W.appendChild(qa);qa=z(ca,N.RELS_XMLNS,"Relationship");qa.setAttribute("Id","rId"+U);qa.setAttribute("Type",N.PAGES_TYPE);qa.setAttribute("Target",ba);R.appendChild(qa);A(H,N.VISIO_PAGES+ba,J[ia]);U++}Q.appendChild(W);ca.appendChild(R);A(H,N.VISIO_PAGES+"pages.xml",Q);A(H,N.VISIO_PAGES+"_rels/pages.xml.rels",ca)}function I(H,J){J=N.VISIO_PAGES_RELS+"page"+
+J+".xml.rels";var M=mxUtils.createXmlDocument(),L=z(M,N.RELS_XMLNS,"Relationships"),Q=z(M,N.RELS_XMLNS,"Relationship");Q.setAttribute("Type","http://schemas.microsoft.com/visio/2010/relationships/master");Q.setAttribute("Id","rId1");Q.setAttribute("Target","../masters/master1.xml");L.appendChild(Q);var ca=K.images;if(0<ca.length)for(var W=0;W<ca.length;W++)Q=z(M,N.RELS_XMLNS,"Relationship"),Q.setAttribute("Type",N.XMLNS_R+"/image"),Q.setAttribute("Id","rId"+(W+2)),Q.setAttribute("Target","../media/"+
+ca[W]),L.appendChild(Q);M.appendChild(L);A(H,J,M)}var N=this,K=new mxVsdxCanvas2D,O={},S=1;this.exportCurrentDiagrams=function(H){try{if(g.spinner.spin(document.body,mxResources.get("exporting"))){var J=function(Fa,pa){Fa=Fa.model.getChildCells(Fa.model.root);Q[pa]=[];for(var Za=0;Za<Fa.length;Za++)Fa[Za].visible&&Q[pa].push({name:Fa[Za].value||"Background",visible:Fa[Za].visible,locked:Fa[Za].style&&0<=Fa[Za].style.indexOf("locked=1")})},M=new JSZip;K.init(M);O={};S=1;var L={},Q={},ca={},W=null!=
+g.pages?g.pages.length:1;if(null!=g.pages){var R=function(Fa){Fa=Fa.getName();var pa=g.editor.graph,Za=m(pa);L[Fa]=t(pa,Za);J(pa,Fa);I(M,ba+1);ca[Fa]=Za},U=g.editor.graph.getSelectionCells(),ia=g.currentPage;if(H)R(ia);else{for(var ba=0;ba<g.pages.length;ba++){var qa=g.pages[ba];g.currentPage!=qa&&g.selectPage(qa,!0);R(qa)}ia!=g.currentPage&&g.selectPage(ia,!0);g.editor.graph.setSelectionCells(U)}}else{R=g.editor.graph;var sa=m(R);L.Page1=t(R,sa);J(R,"Page1");I(M,1);ca.Page1=sa}y(M,W);C(M,L,Q,ca);
+H=function(){M.generateAsync({type:"base64"}).then(function(Fa){g.spinner.stop();var pa=g.getBaseFilename();g.saveData(pa+".vsdx","vsdx",Fa,"application/vnd.visio2013",!0)})};0<K.filesLoading?K.onFilesLoaded=H:H()}return!0}catch(Fa){return console.log(Fa),g.spinner.stop(),!1}}}VsdxExport.prototype.CONVERSION_FACTOR=101.6;VsdxExport.prototype.PAGES_TYPE="http://schemas.microsoft.com/visio/2010/relationships/page";VsdxExport.prototype.RELS_XMLNS="http://schemas.openxmlformats.org/package/2006/relationships";
VsdxExport.prototype.XML_SPACE="preserve";VsdxExport.prototype.XMLNS_R="http://schemas.openxmlformats.org/officeDocument/2006/relationships";VsdxExport.prototype.XMLNS="http://schemas.microsoft.com/office/visio/2012/main";VsdxExport.prototype.VISIO_PAGES="visio/pages/";VsdxExport.prototype.PREFEX="com/mxgraph/io/vsdx/resources/export/";VsdxExport.prototype.VSDX_ENC="ISO-8859-1";VsdxExport.prototype.PART_NAME="PartName";VsdxExport.prototype.CONTENT_TYPES_XML="[Content_Types].xml";
VsdxExport.prototype.VISIO_PAGES_RELS="visio/pages/_rels/";
VsdxExport.prototype.ARROWS_MAP={"none|1":0,"none|0":0,"open|1":1,"open|0":1,"block|1":4,"block|0":14,"classic|1":5,"classic|0":17,"oval|1":10,"oval|0":20,"diamond|1":11,"diamond|0":22,"blockThin|1":2,"blockThin|0":15,"dash|1":23,"dash|0":23,"ERone|1":24,"ERone|0":24,"ERmandOne|1":25,"ERmandOne|0":25,"ERmany|1":27,"ERmany|0":27,"ERoneToMany|1":28,"ERoneToMany|0":28,"ERzeroToMany|1":29,"ERzeroToMany|0":29,"ERzeroToOne|1":30,"ERzeroToOne|0":30,"openAsync|1":9,"openAsync|0":9};function mxVsdxCanvas2D(){mxAbstractCanvas2D.call(this)}mxUtils.extend(mxVsdxCanvas2D,mxAbstractCanvas2D);mxVsdxCanvas2D.prototype.textEnabled=!0;mxVsdxCanvas2D.prototype.init=function(g){this.filesLoading=0;this.zip=g};mxVsdxCanvas2D.prototype.onFilesLoaded=function(){};mxVsdxCanvas2D.prototype.createElt=function(g){return null!=this.xmlDoc.createElementNS?this.xmlDoc.createElementNS(VsdxExport.prototype.XMLNS,g):this.xmlDoc.createElement(g)};
@@ -15440,15 +15444,15 @@ mxVsdxCanvas2D.prototype.image=function(g,y,z,B,m,h,c,a){var b=this,d="image"+(t
var k=!1;0==f.indexOf("svg")&&(f="png",k=!0);d+=f;h=new XMLHttpRequest;h.open("GET",m,!0);h.responseType="arraybuffer";h.onreadystatechange=function(n){if(4==this.readyState&&(200==this.status&&(k?b.convertSvg2Png(this.response,!1,function(q){b.zip.file("visio/media/"+d,q.substring(22),{base64:!0})}):b.zip.file("visio/media/"+d,this.response)),b.filesLoading--,0==b.filesLoading))b.onFilesLoaded()};h.send()}this.images.push(d);this.shapeImg={type:f,id:this.images.length+1};m=this.state;z*=m.scale;
B*=m.scale;f=this.xmGeo;g=(g-f.x+m.dx)*m.scale;y=(f.height-y+f.y-m.dy)*m.scale;this.shape.appendChild(this.createCellElemScaled("ImgOffsetX",g));this.shape.appendChild(this.createCellElemScaled("ImgOffsetY",y-B));this.shape.appendChild(this.createCellElemScaled("ImgWidth",z));this.shape.appendChild(this.createCellElemScaled("ImgHeight",B))};
mxVsdxCanvas2D.prototype.text=function(g,y,z,B,m,h,c,a,b,d,f,k,n){var q=this;if(this.textEnabled&&null!=m){mxUtils.isNode(m)&&(m=mxUtils.getOuterHtml(m));0==z&&0==B&&(B=mxUtils.getSizeForString(m,q.cellState.style.fontSize,q.cellState.style.fontFamily),z=2*B.width,B=2*B.height);"html"==b&&("0"!=mxUtils.getValue(this.cellState.style,"nl2Br","1")&&(m=m.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n")),null==this.html2txtDiv&&(this.html2txtDiv=document.createElement("div")),this.html2txtDiv.innerHTML=Graph.sanitizeHtml(m),
-m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,M=0,K=0,Q=0,S=0,H=0,J=0,N=function(R,T,ka,ca,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(S+=pa.width,K=Math.min(Math.max(K,S),
-z),S=0,H=Math.max(H,pa.height),Q+=H+J,J=H,H=0):(S+=pa.width,K=Math.min(Math.max(K,S),z),H=Math.max(H,pa.height),Q=Math.max(Q,H));pa=q.createElt("Row");pa.setAttribute("IX",I);R.fontColor&&pa.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(q.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(q.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(q.createCellElem("Style",sa));pa.appendChild(q.createCellElem("Case",
-"0"));pa.appendChild(q.createCellElem("Pos","0"));pa.appendChild(q.createCellElem("FontScale","1"));pa.appendChild(q.createCellElem("Letterspace","0"));T.appendChild(pa);T=q.createElt("Row");T.setAttribute("IX",M);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}T.appendChild(q.createCellElem("HorzAlign",sa));ka.appendChild(T);ka=q.createElt("cp");ka.setAttribute("IX",I++);ca.appendChild(ka);
-R=q.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ca.appendChild(R)},L=function(R,T){T=T||{};for(var ka=0;ka<R.length;ka++){var ca=R[ka];if(3==ca.nodeType){var qa=q.cellState.style.fontStyle;qa={fontColor:T.fontColor||q.cellState.style.fontColor,fontSize:T.fontSize||q.cellState.style.fontSize,fontFamily:T.fontFamily||q.cellState.style.fontFamily,align:T.align||q.cellState.style.align,bold:T.bold||qa&1,italic:T.italic||qa&2,underline:T.underline||qa&4};var sa=!1;ka+1<R.length&&"BR"==R[ka+1].nodeName.toUpperCase()&&
-(sa=!0,ka++);N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent+(sa?"\n":""))}else if(1==ca.nodeType){sa=ca.nodeName.toUpperCase();var Fa=ca.childNodes.length;qa=window.getComputedStyle(ca,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||T.bold,italic:"italic"==qa.getPropertyValue("font-style")||T.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||T.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),
-fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:T.OL,LiIndex:T.LiIndex};if("UL"==sa){var pa=q.createElt("Row");pa.setAttribute("IX",M);pa.appendChild(q.createCellElem("HorzAlign","0"));pa.appendChild(q.createCellElem("Bullet","1"));A.appendChild(pa);pa=q.createElt("pp");pa.setAttribute("IX",M++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ka+1);0<Fa?(L(ca.childNodes,qa),"UL"==sa&&(pa=q.createElt("Row"),
-pa.setAttribute("IX",M),pa.appendChild(q.createCellElem("Bullet","0")),A.appendChild(pa),pa=q.createElt("pp"),pa.setAttribute("IX",M++),C.appendChild(pa)),N(qa,t,A,C,"")):N(qa,t,A,C,(T.OL?T.LiIndex+". ":"")+ca.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&L(m.childNodes,{})):N({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,
-Q);z=Math.max(z,K);n=z/2;var O=B/2,ba=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ba*Math.PI/180;switch(h){case "right":0!=ba?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=K/2;break;case "left":0!=ba?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-K/2}switch(c){case "top":0!=ba?(g+=O*Math.sin(W),y+=O*Math.cos(W)):b=Q/2;break;case "bottom":0!=ba?(g-=O*Math.sin(W),y-=O*Math.cos(W)):b=-Q/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",
-g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",O+b));k-=ba;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};
+m=mxUtils.extractTextWithWhitespace(this.html2txtDiv.childNodes));d=this.state;f=this.xmGeo;z*=d.scale;B*=d.scale;var t=this.createElt("Section");t.setAttribute("N","Character");var A=this.createElt("Section");A.setAttribute("N","Paragraph");var C=this.createElt("Text"),I=0,N=0,K=0,O=0,S=0,H=0,J=0,M=function(R,U,ia,ba,qa){var sa=R.fontSize,Fa=R.fontFamily,pa=mxUtils.getSizeForString(qa,sa,Fa);a&&pa.width>z&&(pa=mxUtils.getSizeForString(qa,sa,Fa,z));R.blockElem?(S+=pa.width,K=Math.min(Math.max(K,S),
+z),S=0,H=Math.max(H,pa.height),O+=H+J,J=H,H=0):(S+=pa.width,K=Math.min(Math.max(K,S),z),H=Math.max(H,pa.height),O=Math.max(O,H));pa=q.createElt("Row");pa.setAttribute("IX",I);R.fontColor&&pa.appendChild(q.createCellElem("Color",mxUtils.rgba2hex(R.fontColor)));sa&&pa.appendChild(q.createCellElemScaled("Size",.97*sa));Fa&&pa.appendChild(q.createCellElem("Font",Fa));sa=0;R.bold&&(sa|=17);R.italic&&(sa|=34);R.underline&&(sa|=4);pa.appendChild(q.createCellElem("Style",sa));pa.appendChild(q.createCellElem("Case",
+"0"));pa.appendChild(q.createCellElem("Pos","0"));pa.appendChild(q.createCellElem("FontScale","1"));pa.appendChild(q.createCellElem("Letterspace","0"));U.appendChild(pa);U=q.createElt("Row");U.setAttribute("IX",N);switch(R.align){case "left":sa=0;break;case "center":sa=1;break;case "right":sa=2;break;case "start":sa=0;break;case "end":sa=2;break;case "justify":sa=0;break;default:sa=1}U.appendChild(q.createCellElem("HorzAlign",sa));ia.appendChild(U);ia=q.createElt("cp");ia.setAttribute("IX",I++);ba.appendChild(ia);
+R=q.xmlDoc.createTextNode(qa+(R.blockElem?"\n":""));ba.appendChild(R)},L=function(R,U){U=U||{};for(var ia=0;ia<R.length;ia++){var ba=R[ia];if(3==ba.nodeType){var qa=q.cellState.style.fontStyle;qa={fontColor:U.fontColor||q.cellState.style.fontColor,fontSize:U.fontSize||q.cellState.style.fontSize,fontFamily:U.fontFamily||q.cellState.style.fontFamily,align:U.align||q.cellState.style.align,bold:U.bold||qa&1,italic:U.italic||qa&2,underline:U.underline||qa&4};var sa=!1;ia+1<R.length&&"BR"==R[ia+1].nodeName.toUpperCase()&&
+(sa=!0,ia++);M(qa,t,A,C,(U.OL?U.LiIndex+". ":"")+ba.textContent+(sa?"\n":""))}else if(1==ba.nodeType){sa=ba.nodeName.toUpperCase();var Fa=ba.childNodes.length;qa=window.getComputedStyle(ba,null);qa={bold:"bold"==qa.getPropertyValue("font-weight")||U.bold,italic:"italic"==qa.getPropertyValue("font-style")||U.italic,underline:0<=qa.getPropertyValue("text-decoration").indexOf("underline")||U.underline,align:qa.getPropertyValue("text-align"),fontColor:qa.getPropertyValue("color"),fontSize:parseFloat(qa.getPropertyValue("font-size")),
+fontFamily:qa.getPropertyValue("font-family").replace(/"/g,""),blockElem:"block"==qa.getPropertyValue("display")||"BR"==sa||"LI"==sa,OL:U.OL,LiIndex:U.LiIndex};if("UL"==sa){var pa=q.createElt("Row");pa.setAttribute("IX",N);pa.appendChild(q.createCellElem("HorzAlign","0"));pa.appendChild(q.createCellElem("Bullet","1"));A.appendChild(pa);pa=q.createElt("pp");pa.setAttribute("IX",N++);C.appendChild(pa)}else"OL"==sa?qa.OL=!0:"LI"==sa&&(qa.LiIndex=ia+1);0<Fa?(L(ba.childNodes,qa),"UL"==sa&&(pa=q.createElt("Row"),
+pa.setAttribute("IX",N),pa.appendChild(q.createCellElem("Bullet","0")),A.appendChild(pa),pa=q.createElt("pp"),pa.setAttribute("IX",N++),C.appendChild(pa)),M(qa,t,A,C,"")):M(qa,t,A,C,(U.OL?U.LiIndex+". ":"")+ba.textContent)}}};"html"==b&&mxClient.IS_SVG?(m=this.cellState.text.node.getElementsByTagName("div")[mxClient.NO_FO?0:1],null!=m&&L(m.childNodes,{})):M({fontColor:q.cellState.style.fontColor,fontSize:q.cellState.style.fontSize,fontFamily:q.cellState.style.fontFamily},t,A,C,m);b=m=0;B=Math.max(B,
+O);z=Math.max(z,K);n=z/2;var Q=B/2,ca=parseInt(mxUtils.getValue(this.cellState.style,"rotation","0")),W=ca*Math.PI/180;switch(h){case "right":0!=ca?(g-=n*Math.cos(W),y-=n*Math.sin(W)):m=K/2;break;case "left":0!=ca?(g+=n*Math.cos(W),y+=n*Math.sin(W)):m=-K/2}switch(c){case "top":0!=ca?(g+=Q*Math.sin(W),y+=Q*Math.cos(W)):b=O/2;break;case "bottom":0!=ca?(g-=Q*Math.sin(W),y-=Q*Math.cos(W)):b=-O/2}g=(g-f.x+d.dx)*d.scale;y=(f.height-y+f.y-d.dy)*d.scale;this.shape.appendChild(this.createCellElemScaled("TxtPinX",
+g));this.shape.appendChild(this.createCellElemScaled("TxtPinY",y));this.shape.appendChild(this.createCellElemScaled("TxtWidth",z));this.shape.appendChild(this.createCellElemScaled("TxtHeight",B));this.shape.appendChild(this.createCellElemScaled("TxtLocPinX",n+m));this.shape.appendChild(this.createCellElemScaled("TxtLocPinY",Q+b));k-=ca;0!=k&&this.shape.appendChild(this.createCellElem("TxtAngle",(360-k)*Math.PI/180));this.shape.appendChild(t);this.shape.appendChild(A);this.shape.appendChild(C)}};
mxVsdxCanvas2D.prototype.rotate=function(g,y,z,B,m){0!=g&&(y=this.state,B+=y.dx,m+=y.dy,B*=y.scale,m*=y.scale,this.shape.appendChild(this.createCellElem("Angle",(360-g)*Math.PI/180)),y.rotation+=g,y.rotationCx=B,y.rotationCy=m)};mxVsdxCanvas2D.prototype.stroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","1"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};
mxVsdxCanvas2D.prototype.fill=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","1"))};mxVsdxCanvas2D.prototype.fillAndStroke=function(){this.geoSec.appendChild(this.createCellElem("NoFill","0"));this.geoSec.appendChild(this.createCellElem("NoLine","0"))};function BmpDecoder(g,y){this.pos=0;this.buffer=g;this.is_with_alpha=!!y;if(66!=this.buffer[0]&&77!=this.buffer[1])throw Error("Invalid BMP File");this.pos+=2;this.parseHeader();this.parseBGR()}
BmpDecoder.prototype.parseHeader=function(){var g=this.buffer;this.fileSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.reserved=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.offset=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.headerSize=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];this.pos+=4;this.width=g[this.pos+3]<<24|g[this.pos+2]<<16|g[this.pos+1]<<8|g[this.pos];
@@ -15465,54 +15469,54 @@ BmpDecoder.prototype.bit32=function(){for(var g=this.height-1;0<=g;g--)for(var y
(function(g){(function(y){(function(z){var B=function(){function m(c){this.RESPONSE_END="</mxfile>";this.RESPONSE_DIAGRAM_START="";this.RESPONSE_DIAGRAM_END="</diagram>";this.RESPONSE_HEADER='<?xml version="1.0" encoding="UTF-8"?><mxfile>';this.vertexMap={};this.edgeShapeMap={};this.vertexShapeMap={};this.parentsMap={};this.layerNames=[];this.debugPaths=!1;this.vsdxModel=null;this.editorUi=c;this.shapeIndexShift=0}function h(c,a,b,d,f){c=b.createLabelSubShape(c,a);null!=c&&(0!==d&&(a=c.getStyle().match(/;rotation=(\d+\.*\d+)/),
null!=a&&(d+=parseFloat(a[1])),c.setStyle(c.getStyle().replace(/;rotation=(\d+\.*\d+)/,"")+";rotation="+(60<d&&240>d?(d+180)%360:d))),d=c.getGeometry(),d.x=0,d.y=0,d.relative=!0,f=f||new mxPoint(0,0),d.offset=new mxPoint(f.x-d.width/2,f.y-d.height/2))}m.vsdxPlaceholder_$LI$=function(){null==m.vsdxPlaceholder&&(m.vsdxPlaceholder=window.atob?atob("dmlzaW8="):Base64.decode("dmlzaW8=",!0));return m.vsdxPlaceholder};m.parsererrorNS_$LI$=function(){m.parsererrorNS=mxConstants.NS_XHTML;return m.parsererrorNS};
m.parseXml=function(c){try{var a=mxUtils.parseXml(c);return 0<a.getElementsByTagNameNS(m.parsererrorNS,"parsererror").length?null:a}catch(b){return null}};m.decodeUTF16LE=function(c){for(var a="",b=0;b<c.length;b+=2)a+=String.fromCharCode(c.charCodeAt(b)|c.charCodeAt(b+1)<<8);return a};m.prototype.scaleGraph=function(c,a){if(1!==a){c=c.getModel();for(var b in c.cells){var d=c.cells[b],f=c.getGeometry(d);if(null!=f&&(this.scaleRect(f,a),this.scaleRect(f.alternateBounds,a),c.isEdge(d)&&(this.scalePoint(f.sourcePoint,
-a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&amp;"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,Q,S){function H(){C++;I();Q++;Q==J&&f(K,Q,S)}for(var J=Math.min(Q+M,K.length),N=Q;N<J;N++)(function(L){function O(W){var R=new FormData;R.append("img",W,L.name);R.append("inputformat","emf");R.append("outputformat","png");var T=new XMLHttpRequest;
-T.open("POST",EMF_CONVERT_URL);T.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(T);T.onreadystatechange=mxUtils.bind(this,function(){if(4==T.readyState)if(200<=T.status&&299>=T.status)try{var ka=new FileReader;ka.readAsDataURL(T.response);ka.onloadend=function(){var ca=ka.result.indexOf(",")+1;S[L.name]=ka.result.substr(ca);H()}}catch(ca){console.log(ca),H()}else ba++,3>ba?O(W):H()});T.send(R)}var ba=0;L.async("blob").then(O)})(K[N])}var k=this,n={},q={},t=function(){function K(){J=
-J.concat(k.RESPONSE_END);a&&a(J)}for(var Q=m.vsdxPlaceholder+"/document.xml",S=n[Q]?n[Q]:null,H=S.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(S,H,Q,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);Q=k.vsdxModel.getPages();var J=k.RESPONSE_HEADER;var N=function(ba){null==ba.entries&&(ba.entries=[]);return ba.entries}(Q),L=function(ba,W){var R=N[ba].getValue(),T=O.createMxGraph();T.getModel().beginUpdate();O.importPage(R,T,T.getDefaultParent(),
-!0);O.scaleGraph(T,R.getPageScale()/R.getDrawingScale());T.getModel().endUpdate();O.postImportPage(R,T,function(){O.sanitiseGraph(T);J=J.concat(k.RESPONSE_DIAGRAM_START);J=J.concat(k.processPage(T,R));J=J.concat(k.RESPONSE_DIAGRAM_END);ba<N.length-1?L(ba+1,W):W()})},O=k;0<N.length?L(0,K):K()},A=0,C=0,I=function(){if(C==A)try{t()}catch(K){console.log(K),null!=d?d(K):a("")}},M=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var Q=[];
-K.forEach(function(S,H){var J=H.name;S=J.toLowerCase();var N=S.length;S.indexOf(".xml")==N-4||S.indexOf(".rels")==N-5?(A++,H.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var O=m.parseXml(L);if(null==O)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))O=m.parseXml(m.decodeUTF16LE(L));else{for(O=0;O<m.incorrectXMLReqExp.length;O++)m.incorrectXMLReqExp[O].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[O].regExp,m.incorrectXMLReqExp[O].repl));
-O=m.parseXml(L)}null!=O&&(O.vsdxFileName=J,n[J]=O)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?Q.push(H):(C++,I()):function(L,O){var ba=L.length-O.length;L=L.indexOf(O,ba);return-1!==L&&L===ba}(S,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(L){L=new BmpDecoder(L);var O=document.createElement("canvas");O.width=L.width;O.height=L.height;
-O.getContext("2d").putImageData(L.imageData,0,0);L=O.toDataURL("image/jpeg");q[J]=L.substr(23);C++;I()}):H.async("base64").then(function(L){q[J]=L;C++;I()}))});f(Q,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");
-c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&
-(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=a.item(f),n=function(C,I){return C[I]?C[I]:null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=
-t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),
-c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;
-for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=c.next(),n=this.addConnectedEdge(a,n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var M=0;M<
-C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries.splice(M,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),n.getKey().getPageNumber()===q&&(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var M=
-0;M<C.entries.length;M++)if(null!=C.entries[M].key.equals&&C.entries[M].key.equals(I)||C.entries[M].key===I)return C.entries[M].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,this.layerNames[n])){q=!0;break}q&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),
-b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,M=function(Q,S){null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)if(null!=Q.entries[H].key.equals&&
-Q.entries[H].key.equals(S)||Q.entries[H].key===S)return Q.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var Q=I.iData,S=I.iType;try{var H=K.width/I.imgWidth,J=K.height/I.imgHeight,N=-I.imgOffsetX*H,L=(I.imgHeight-I.height+I.imgOffsetY)*J,O=document.createElement("canvas");O.width=I.width*H;O.height=I.height*J;var ba=O.getContext("2d");ba.fillStyle="#FFFFFF";ba.fillRect(0,0,O.width,O.height);ba.drawImage(K,N,L,O.width,O.height,
-0,0,O.width,O.height);Q=O.toDataURL("image/jpeg").substr(23);S="jpg"}catch(W){console.log(W)}M.style+=";image=data:image/"+S+","+Q;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){M.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());if(null!=k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||
-function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,
-value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.extLink?c.setLinkForCell(k,b.extLink):b.pageLink&&c.setLinkForCell(k,"data:page/id,"+b.pageLink.replace(/\s/g,"_"));a=a.getProperties();for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,
-a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=
-q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";
-if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*
-n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var Q=0;return{next:function(){return Q<K.length?K[Q++]:null},hasNext:function(){return Q<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var M=
-g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=M&&(function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,Q){return K&&K.equals?K.equals(Q):K===Q}(M,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(M=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&M.geometry&&(b=Math.max(M.geometry.height,
-b)));null==q&&function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&
-K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,Q,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},
-getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,Q,S){null==
-K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(Q)||K.entries[H].key===Q){K.entries[H].value=S;return}K.entries.push({key:Q,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*
-f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]="none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]=
-"wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,M){null==C.entries&&(C.entries=
-[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=M;return}C.entries.push({key:I,value:M,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,
-b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,f);var k=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===
-N)return J.entries[L].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());
-this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,I)):null;var M=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*
-t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),Q=I.geometry;C=new mxPoint((K.x+t.x-C.x)/Q.width,(K.y+t.y-C.y)/Q.height)}else M=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(J,N){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(N)||J.entries[L].key===N)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,
-a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),Q=a.geometry,t=new mxPoint((t.x+A.x-b.x)/Q.width,(t.y+A.y-b.y)/Q.height)):K=!1;b=k.getStyleFromEdgeShape(d);Q=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==Q,H=k.getLblEdgeOffset(c.getView(),q);S||(A=
-k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,Q,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));M&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();M=c.getModel().getGeometry(A);if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=
-0;n<q.length;n++)q[n].x+=C,q[n].y+=a}M.points=q;b.hasOwnProperty("curved")&&function(J,N){return J&&J.equals?J.equals(N):J===N}(function(J,N){return J[N]?J[N]:null}(b,"curved"),"1")&&(M=c.getModel().getGeometry(A),d=k.getControlPoints(d),M.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),
-n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=
-I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(M,K){return M&&M.equals?M.equals(K):M===K}(function(M,K){return M[K]?M[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&
-null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);
-f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class=
-"com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
-(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(Q){var S=0;return{next:function(){return S<Q.length?Q[S++]:null},hasNext:function(){return S<Q.length}}}(function(Q){var S=
-[];null==Q.entries&&(Q.entries=[]);for(var H=0;H<Q.entries.length;H++)S.push(Q.entries[H].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(Q){return Object.keys(Q).map(function(S){return Q[S]})}(q);n=function(Q){Q=I[Q];var S=M.createMxGraph(),H=1;if(null!=Q.pageSheet){var J=H=1,N=Q.pageSheet.DrawingScale;null!=N&&(H=parseFloat(N.getAttribute("V"))||1);N=Q.pageSheet.PageScale;null!=N&&(J=parseFloat(N.getAttribute("V"))||
-1);H=J/H}J=!1;for(N=0;null!=Q.firstLevelShapes&&N<Q.firstLevelShapes.length;N++){var L=Q.firstLevelShapes[N].getShape(),O=new g.mxgraph.io.vsdx.VsdxShape(t,L,!t.isEdge(L),q,null,M.vsdxModel);L=null;if(O.isVertex()){M.edgeShapeMap.entries=[];M.parentsMap.entries=[];L=M.addShape(S,O,S.getDefaultParent(),0,1169);O=function(T){null==T.entries&&(T.entries=[]);return T.entries}(M.edgeShapeMap);for(var ba=0;ba<O.length;ba++){var W=O[ba],R=function(T,ka){null==T.entries&&(T.entries=[]);for(var ca=0;ca<T.entries.length;ca++)if(null!=
-T.entries[ca].key.equals&&T.entries[ca].key.equals(ka)||T.entries[ca].key===ka)return T.entries[ca].value;return null}(M.parentsMap,W.getKey());M.addUnconnectedEdge(S,R,W.getValue(),1169)}}else L=M.addUnconnectedEdge(S,null,O,1169);J|=null!=L}if(J){M.scaleGraph(S,H);H=M.normalizeGraph(S);M.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(M,S,null);A.str=A.str.concat(S);A.str=
-A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');Q=Q.getName();null==Q&&(Q="");Q=mxUtils.htmlEntities(JSON.stringify(Q));A.str=A.str.concat(Q);A.str=A.str.concat("}");C=","}};for(var M=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(Q){null!=d?d(Q):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=
+a),this.scalePoint(f.targetPoint,a),this.scalePoint(f.offset,a),d=f.points,null!=d)))for(f=0;f<d.length;f++)this.scalePoint(d[f],a)}}};m.incorrectXMLReqExp=[{regExp:/&(?!amp;|lt;|gt;|quot;|#)/g,repl:"&amp;"}];m.prototype.decodeVsdx=function(c,a,b,d){function f(K,O,S){function H(){C++;I();O++;O==J&&f(K,O,S)}for(var J=Math.min(O+N,K.length),M=O;M<J;M++)(function(L){function Q(W){var R=new FormData;R.append("img",W,L.name);R.append("inputformat","emf");R.append("outputformat","png");var U=new XMLHttpRequest;
+U.open("POST",EMF_CONVERT_URL);U.responseType="blob";k.editorUi.addRemoteServiceSecurityCheck(U);U.onreadystatechange=mxUtils.bind(this,function(){if(4==U.readyState)if(200<=U.status&&299>=U.status)try{var ia=new FileReader;ia.readAsDataURL(U.response);ia.onloadend=function(){var ba=ia.result.indexOf(",")+1;S[L.name]=ia.result.substr(ba);H()}}catch(ba){console.log(ba),H()}else ca++,3>ca?Q(W):H()});U.send(R)}var ca=0;L.async("blob").then(Q)})(K[M])}var k=this,n={},q={},t=function(){function K(){J=
+J.concat(k.RESPONSE_END);a&&a(J)}for(var O=m.vsdxPlaceholder+"/document.xml",S=n[O]?n[O]:null,H=S.firstChild;null!=H&&1!=H.nodeType;)H=H.nextSibling;if(null!=H&&1==H.nodeType)k.importNodes(S,H,O,n);else return null;k.vsdxModel=new g.mxgraph.io.vsdx.mxVsdxModel(S,n,q);O=k.vsdxModel.getPages();var J=k.RESPONSE_HEADER;var M=function(W){null==W.entries&&(W.entries=[]);return W.entries}(O);m.pageTitleMap={};m.pageIdsSet={};try{for(O=0;O<M.length;O++){var L=M[O].getValue();m.pageTitleMap[L.getPageName()]=
+L.getPageNameU();m.pageIdsSet[L.getPageNameU()]=!0}}catch(W){}var Q=function(W,R){var U=M[W].getValue(),ia=ca.createMxGraph();ia.getModel().beginUpdate();ca.importPage(U,ia,ia.getDefaultParent(),!0);ca.scaleGraph(ia,U.getPageScale()/U.getDrawingScale());ia.getModel().endUpdate();ca.postImportPage(U,ia,function(){ca.sanitiseGraph(ia);J=J.concat(k.RESPONSE_DIAGRAM_START);J=J.concat(k.processPage(ia,U));J=J.concat(k.RESPONSE_DIAGRAM_END);W<M.length-1?Q(W+1,R):R()})},ca=k;0<M.length?Q(0,K):K()},A=0,C=
+0,I=function(){if(C==A)try{t()}catch(K){console.log(K),null!=d?d(K):a("")}},N=window.EMF_CHUNK_SIZE||10;JSZip.loadAsync(c).then(function(K){if(0==Object.keys(K.files).length)null!=d&&d();else{var O=[];K.forEach(function(S,H){var J=H.name;S=J.toLowerCase();var M=S.length;S.indexOf(".xml")==M-4||S.indexOf(".rels")==M-5?(A++,H.async("string").then(function(L){if(0!==L.length){65279==L.charCodeAt(0)&&(L=L.substring(1));var Q=m.parseXml(L);if(null==Q)if(0===L.charCodeAt(1)&&0===L.charCodeAt(3)&&0===L.charCodeAt(5))Q=
+m.parseXml(m.decodeUTF16LE(L));else{for(Q=0;Q<m.incorrectXMLReqExp.length;Q++)m.incorrectXMLReqExp[Q].regExp.test(L)&&(L=L.replace(m.incorrectXMLReqExp[Q].regExp,m.incorrectXMLReqExp[Q].repl));Q=m.parseXml(L)}null!=Q&&(Q.vsdxFileName=J,n[J]=Q)}C++;I()})):0===S.indexOf(m.vsdxPlaceholder+"/media")&&(A++,function(L,Q){var ca=L.length-Q.length;L=L.indexOf(Q,ca);return-1!==L&&L===ca}(S,".emf")?JSZip.support.blob&&window.EMF_CONVERT_URL?O.push(H):(C++,I()):function(L,Q){var ca=L.length-Q.length;L=L.indexOf(Q,
+ca);return-1!==L&&L===ca}(S,".bmp")?JSZip.support.uint8array&&H.async("uint8array").then(function(L){L=new BmpDecoder(L);var Q=document.createElement("canvas");Q.width=L.width;Q.height=L.height;Q.getContext("2d").putImageData(L.imageData,0,0);L=Q.toDataURL("image/jpeg");q[J]=L.substr(23);C++;I()}):H.async("base64").then(function(L){q[J]=L;C++;I()}))});f(O,0,q)}},function(K){null!=d&&d(K)})};m.prototype.createMxGraph=function(){var c=new Graph;c.setExtendParents(!1);c.setExtendParentsOnAdd(!1);c.setConstrainChildren(!1);
+c.setHtmlLabels(!0);c.getModel().maintainEdgeParent=!1;return c};m.prototype.processPage=function(c,a){c=(new mxCodec).encode(c.getModel());c.setAttribute("style","default-style2");c=mxUtils.getXml(c);var b="";if(null!=a){var d=mxUtils.htmlEntities(a.getPageName())+(a.isBackground()?" (Background)":"");a=mxUtils.htmlEntities(a.getPageNameU());b+='<diagram name="'+d+'" id="'+a.replace(/\s/g,"_")+'">'}return b+=Graph.compress(c)};m.prototype.scalePoint=function(c,a){null!=c&&(c.x*=a,c.y*=a);return c};
+m.prototype.scaleRect=function(c,a){null!=c&&(c.x*=a,c.y*=a,c.height*=a,c.width*=a);return c};m.prototype.importNodes=function(c,a,b,d){var f=b.lastIndexOf("/"),k=b,n=b;if(-1!==f&&(k=b.substring(0,f),n=b.substring(f+1,b.length),b=function(C,I){return C[I]?C[I]:null}(d,k+"/_rels/"+n+".rels"),null!=b)){var q=b.getElementsByTagName("Relationship");b={};for(f=0;f<q.length;f++){n=q.item(f);var t=n.getAttribute("Id");n=n.getAttribute("Target");b[t]=n}a=a.getElementsByTagName("Rel");for(f=0;f<a.length;f++)if(q=
+a.item(f),n=function(C,I){return C[I]?C[I]:null}(b,q.getAttribute("r:id")),n=k+"/"+n,null!=n&&(t=d[n]?d[n]:null,null!=t)){q=q.parentNode;for(t=t.firstChild;null!=t&&1!=t.nodeType;)t=t.nextSibling;if(null!=t&&1==t.nodeType)for(t=t.firstChild;null!=t;){if(null!=t&&1==t.nodeType){var A=q.appendChild(c.importNode(t,!0));this.importNodes(c,A,n,d)}t=t.nextSibling}}}};m.prototype.layerIndexToNames=function(c){var a=[];if(c)for(var b=0;b<c.length;b++){var d=parseInt(c[b]);d<this.layerNames.length&&a.push(this.layerNames[d])}return 0<
+a.length?a:[mxResources.get("background")]};m.prototype.importPage=function(c,a,b,d){var f=c.getBackPage();if(null!=f){a.getModel().setValue(a.getDefaultParent(),c.getPageName());var k=new mxCell(f.getPageName());a.addCell(k,a.getModel().getRoot(),0,null,null);this.importPage(f,a,a.getDefaultParent())}var n=c.getLayers();k=c.getShapes();f=[];for(var q=0;q<n.length;q++){var t=n[q],A=t.Name.replace(/\s/g,"_");this.layerNames.push(A);0==t.Visible&&f.push(A)}t=function(C){var I=0;return{next:function(){return I<
+C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(k));k=c.getPageDimensions().y;for(q=c.getId();t.hasNext();)n=t.next(),n=n.getValue(),A=this.addShape(a,n,b,q,k),n=this.layerIndexToNames(n.layerMember),null!=A&&null!=n&&a.addTagsForCells([A],n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(c.getConnects()));c.hasNext();)n=
+c.next(),n=this.addConnectedEdge(a,n.getValue(),q,k),null!=n&&function(C,I){null==C.entries&&(C.entries=[]);for(var N=0;N<C.entries.length;N++)if(null!=C.entries[N].key.equals&&C.entries[N].key.equals(I)||C.entries[N].key===I)return C.entries.splice(N,1)[0]}(this.edgeShapeMap,n);for(c=function(C){var I=0;return{next:function(){return I<C.length?C[I++]:null},hasNext:function(){return I<C.length}}}(function(C){null==C.entries&&(C.entries=[]);return C.entries}(this.edgeShapeMap));c.hasNext();)n=c.next(),
+n.getKey().getPageNumber()===q&&(t=this.addUnconnectedEdge(a,function(C,I){null==C.entries&&(C.entries=[]);for(var N=0;N<C.entries.length;N++)if(null!=C.entries[N].key.equals&&C.entries[N].key.equals(I)||C.entries[N].key===I)return C.entries[N].value;return null}(this.parentsMap,n.getKey()),n.getValue(),k),n=this.layerIndexToNames(n.getValue().layerMember),null!=n&&a.addTagsForCells([t],n));if(0<this.layerNames.length){c=a.getAllTags();q=!1;for(n=0;n<this.layerNames.length;n++)if(0>mxUtils.indexOf(c,
+this.layerNames[n])){q=!0;break}q&&(b=a.insertVertex(b,null,null,0,0,0,0),a.addTagsForCells([b],this.layerNames),b.setVisible(!1));a.setHiddenTags(f)}d||this.sanitiseGraph(a);return k};m.prototype.postImportPage=function(c,a,b){try{var d=function(q){if(null!=q){q=q.entries||[];for(var t=0;t<q.length;t++){var A=q[t].value||{};A.toBeCroppedImg&&k.push(A);d(A.getChildShapes())}}},f=this,k=[];d(c.getShapes());if(0<k.length){var n=function(q,t){function A(){q<k.length-1?n(q+1,t):t()}var C=k[q],I=C.toBeCroppedImg,
+N=function(O,S){null==O.entries&&(O.entries=[]);for(var H=0;H<O.entries.length;H++)if(null!=O.entries[H].key.equals&&O.entries[H].key.equals(S)||O.entries[H].key===S)return O.entries[H].value;return null}(f.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(c.Id,C.Id)),K=new Image;K.onload=function(){var O=I.iData,S=I.iType;try{var H=K.width/I.imgWidth,J=K.height/I.imgHeight,M=-I.imgOffsetX*H,L=(I.imgHeight-I.height+I.imgOffsetY)*J,Q=document.createElement("canvas");Q.width=I.width*H;Q.height=I.height*J;
+var ca=Q.getContext("2d");ca.fillStyle="#FFFFFF";ca.fillRect(0,0,Q.width,Q.height);ca.drawImage(K,M,L,Q.width,Q.height,0,0,Q.width,Q.height);O=Q.toDataURL("image/jpeg").substr(23);S="jpg"}catch(W){console.log(W)}N.style+=";image=data:image/"+S+","+O;A()};K.src="data:image/"+I.iType+";base64,"+I.iData;K.onerror=function(){N.style+=";image=data:image/"+I.iType+","+I.iData;A()}};n(0,b)}else b()}catch(q){console.log(q),b()}};m.prototype.addShape=function(c,a,b,d,f){a.parentHeight=f;var k=g.mxgraph.io.vsdx.VsdxShape.getType(a.getShape());
+if(null!=k&&(function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(q,t){return q&&q.equals?q.equals(t):q===t}(k,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))){var n=a.getId();if(a.isVertex()){k=null;k=a.isGroup()?this.addGroup(c,a,b,d,f):this.addVertex(c,a,b,d,f);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=
+q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);b=a.getHyperlink();b.pageLink?(d=b.pageLink,m.pageIdsSet[d]||null==m.pageTitleMap[d]||(d=m.pageTitleMap[d]+""),c.setLinkForCell(k,"data:page/id,"+d.replace(/\s/g,"_"))):b.extLink&&c.setLinkForCell(k,b.extLink);a=a.getProperties();
+for(b=0;b<a.length;b++)try{c.setAttributeForCell(k,a[b].key,a[b].val)}catch(q){console.log('Attribute: "',a[b].key,'" with value "',a[b].val,'" not allowed in HTML')}return k}a.isGroup()&&this.addGroup(c,a,b,d,f,!0);a.setShapeIndex(c.getModel().getChildCount(b));(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},
+getValue:function(){return this.value}})})(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),a);(function(q,t,A){null==q.entries&&(q.entries=[]);for(var C=0;C<q.entries.length;C++)if(null!=q.entries[C].key.equals&&q.entries[C].key.equals(t)||q.entries[C].key===t){q.entries[C].value=A;return}q.entries.push({key:t,value:A,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,n),b)}return null};m.prototype.addGroup=function(c,
+a,b,d,f,k){var n=a.getDimensions(),q=a.getMaster(),t=a.getStyleFromShape(),A=a.getGeomList();if(A.isNoFill()||k)t[mxConstants.STYLE_FILLCOLOR]="none",t[mxConstants.STYLE_GRADIENTCOLOR]="none";if(A.isNoLine()||k)t[mxConstants.STYLE_STROKECOLOR]="none";t.html="1";t[mxConstants.STYLE_WHITE_SPACE]="wrap";var C=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"=");k=null;A=a.getChildShapes();k=null!=A&&0<function(K){null==K.entries&&(K.entries=[]);return K.entries.length}(A);t=a.isDisplacedLabel()||a.isRotatedLabel()||
+k;k=a.getOriginPoint(f,!0);if(t)k=c.insertVertex(b,null,null,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C);else{var I=a.noLabelGroup?null:a.getTextLabel();k=c.insertVertex(b,null,I,Math.floor(Math.round(100*k.x)/100),Math.floor(Math.round(100*k.y)/100),Math.floor(Math.round(100*n.x)/100),Math.floor(Math.round(100*n.y)/100),C)}b=k.geometry.height;for(A=function(K){var O=0;return{next:function(){return O<
+K.length?K[O++]:null},hasNext:function(){return O<K.length}}}(function(K){null==K.entries&&(K.entries=[]);return K.entries}(A));A.hasNext();)if(C=A.next().getValue(),I=C.getId(),C.isVertex()){var N=g.mxgraph.io.vsdx.VsdxShape.getType(C.getShape());null!=N&&(function(K,O){return K&&K.equals?K.equals(O):K===O}(N,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_SHAPE)||function(K,O){return K&&K.equals?K.equals(O):K===O}(N,g.mxgraph.io.vsdx.mxVsdxConstants.TYPE_GROUP)||function(K,O){return K&&K.equals?K.equals(O):
+K===O}(N,g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN))&&C.isVertex()&&(C.propagateRotation(a.getRotation()),(N=C.isGroup()?this.addGroup(c,C,k,d,n.y):this.addVertex(c,C,k,d,n.y))&&N.geometry&&(b=Math.max(N.geometry.height,b)));null==q&&function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexShapeMap,
+new g.mxgraph.io.vsdx.ShapePageId(d,I),C)}else null==q?(function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.edgeShapeMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),C),function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=
+K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(d,I),k)):this.addUnconnectedEdge(c,k,C,f);if(k.children&&0==k.geometry.height&&0<b)for(k.geometry.height=b,f=0;f<k.children.length;f++)n=k.children[f],n.geometry&&(n.geometry.y+=b);t&&a.createLabelSubShape(c,k);c=a.getRotation();if(0!==c)for(f=
+k.getGeometry(),q=f.width/2,t=f.height/2,f=0;f<k.getChildCount();f++)n=k.getChildAt(f),g.mxgraph.online.Utils.rotatedGeometry(n.getGeometry(),c,q,t);(function(K,O,S){null==K.entries&&(K.entries=[]);for(var H=0;H<K.entries.length;H++)if(null!=K.entries[H].key.equals&&K.entries[H].key.equals(O)||K.entries[H].key===O){K.entries[H].value=S;return}K.entries.push({key:O,value:S,getKey:function(){return this.key},getValue:function(){return this.value}})})(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,
+a.getId()),k);return k};m.rotatedEdgePoint=function(c,a,b,d){a=a*Math.PI/180;var f=Math.cos(a);a=Math.sin(a);var k=c.x-b,n=c.y-d;c.x=Math.round(k*f-n*a+b);c.y=Math.round(n*f+k*a+d)};m.prototype.addVertex=function(c,a,b,d,f){var k="",n=a.isDisplacedLabel()||a.isRotatedLabel();n||(k=a.getTextLabel());var q=a.getDimensions(),t=a.getStyleFromShape();t.html="1";var A=t.hasOwnProperty(mxConstants.STYLE_SHAPE)||t.hasOwnProperty("stencil");t.hasOwnProperty(mxConstants.STYLE_FILLCOLOR)&&A||(t[mxConstants.STYLE_FILLCOLOR]=
+"none");A||(t[mxConstants.STYLE_STROKECOLOR]="none");t.hasOwnProperty(mxConstants.STYLE_GRADIENTCOLOR)&&A||(t[mxConstants.STYLE_GRADIENTCOLOR]="none");t[mxConstants.STYLE_WHITE_SPACE]="wrap";f=a.getOriginPoint(f,!0);return A||null!=k?(t=g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(t,"="),A=null,A=n?c.insertVertex(b,null,null,Math.floor(Math.round(100*f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t):c.insertVertex(b,null,k,Math.floor(Math.round(100*
+f.x)/100),Math.floor(Math.round(100*f.y)/100),Math.floor(Math.round(100*q.x)/100),Math.floor(Math.round(100*q.y)/100),t),function(C,I,N){null==C.entries&&(C.entries=[]);for(var K=0;K<C.entries.length;K++)if(null!=C.entries[K].key.equals&&C.entries[K].key.equals(I)||C.entries[K].key===I){C.entries[K].value=N;return}C.entries.push({key:I,value:N,getKey:function(){return this.key},getValue:function(){return this.value}})}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(d,a.getId()),A),a.setLabelOffset(A,
+t),n&&a.createLabelSubShape(c,A),A):null};m.calculateAbsolutePoint=function(c){for(var a=0,b=0;null!=c;){var d=c.geometry;null!=d&&(a+=d.x,b+=d.y);c=c.parent}return new mxPoint(a,b)};m.prototype.processEdgeGeo=function(c,a){try{var b=c.geomList.geomList[0].rows;for(c=0;c<b.length;c++)if(b[c]instanceof g.mxgraph.io.vsdx.geometry.ArcTo){a.style+="jumpStyle=arc;";break}for(c=0;c<b.length;c++);}catch(d){}};m.prototype.addConnectedEdge=function(c,a,b,d){var f=a.getFromSheet();f=new g.mxgraph.io.vsdx.ShapePageId(b,
+f);var k=function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.edgeShapeMap,f);if(null==k)return null;var n=function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.parentsMap,new g.mxgraph.io.vsdx.ShapePageId(b,
+k.getId()));if(null!=n){var q=c.getModel().getGeometry(n);null!=q&&(d=q.height)}var t=k.getStartXY(d),A=k.getEndXY(d);q=k.getRoutingPoints(d,t,k.getRotation());this.rotateChildEdge(c.getModel(),n,t,A,q);var C=null,I=a.getSourceToSheet();I=null!=I?function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,
+I)):null;var N=!0;if(null==I||0==I.geometry.width||0==I.geometry.height)I=c.insertVertex(n,null,null,Math.floor(Math.round(100*t.x)/100),Math.floor(Math.round(100*t.y)/100),0,0);else if(I.style&&-1==I.style.indexOf(";rotation=")){C=m.calculateAbsolutePoint(I);var K=m.calculateAbsolutePoint(n),O=I.geometry;C=new mxPoint((K.x+t.x-C.x)/O.width,(K.y+t.y-C.y)/O.height)}else N=!1;t=null;a=a.getTargetToSheet();a=null!=a?function(J,M){null==J.entries&&(J.entries=[]);for(var L=0;L<J.entries.length;L++)if(null!=
+J.entries[L].key.equals&&J.entries[L].key.equals(M)||J.entries[L].key===M)return J.entries[L].value;return null}(this.vertexMap,new g.mxgraph.io.vsdx.ShapePageId(b,a)):null;K=!0;null==a||0==a.geometry.width||0==a.geometry.height?a=c.insertVertex(n,null,null,Math.floor(Math.round(100*A.x)/100),Math.floor(Math.round(100*A.y)/100),0,0):a.style&&-1==a.style.indexOf(";rotation=")?(b=m.calculateAbsolutePoint(a),t=m.calculateAbsolutePoint(n),O=a.geometry,t=new mxPoint((t.x+A.x-b.x)/O.width,(t.y+A.y-b.y)/
+O.height)):K=!1;b=k.getStyleFromEdgeShape(d);O=k.getRotation();A="";var S=k.isDisplacedLabel()||k.isRotatedLabel()||0!==O,H=k.getLblEdgeOffset(c.getView(),q);S||(A=k.getTextLabel(!0));A=c.insertEdge(n,null,A,I,a,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,"="));S?h(c,A,k,O,H):A.getGeometry().offset=H;null!=C&&c.setConnectionConstraint(A,I,!0,new mxConnectionConstraint(C,!1));N&&q.shift();null!=t&&c.setConnectionConstraint(A,a,!1,new mxConnectionConstraint(t,!1));K&&q.pop();N=c.getModel().getGeometry(A);
+if(I.parent!=a.parent&&null!=n&&1!=n.id&&1==I.parent.id){a=C=0;do t=n.geometry,null!=t&&(C+=t.x,a+=t.y),n=n.parent;while(null!=n);A.parent=I.parent;for(n=0;n<q.length;n++)q[n].x+=C,q[n].y+=a}N.points=q;b.hasOwnProperty("curved")&&function(J,M){return J&&J.equals?J.equals(M):J===M}(function(J,M){return J[M]?J[M]:null}(b,"curved"),"1")&&(N=c.getModel().getGeometry(A),d=k.getControlPoints(d),N.points=d);this.processEdgeGeo(k,A);k=this.layerIndexToNames(k.layerMember);null!=k&&c.addTagsForCells([A],k);
+return f};m.prototype.addUnconnectedEdge=function(c,a,b,d){if(null!=a){var f=c.getModel().getGeometry(a);null!=f&&(d=f.height)}f=b.getStartXY(d);var k=b.getEndXY(d),n=b.getStyleFromEdgeShape(d),q=b.getRoutingPoints(d,f,b.getRotation()),t=b.getRotation();var A="";var C=b.isDisplacedLabel()||b.isRotatedLabel()||0!==t,I=b.getLblEdgeOffset(c.getView(),q);C||(A=b.getTextLabel(!0));0===b.getShapeIndex()?A=c.insertEdge(a,null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")):(A=c.createEdge(a,
+null,A,null,null,g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(n,"=")),A=c.addEdge(A,a,null,null,b.getShapeIndex()+this.shapeIndexShift++));C?h(c,A,b,t,I):A.getGeometry().offset=I;this.rotateChildEdge(c.getModel(),a,f,k,q);a=c.getModel().getGeometry(A);q.pop();q.shift();a.points=q;a.setTerminalPoint(f,!0);a.setTerminalPoint(k,!1);n.hasOwnProperty("curved")&&function(N,K){return N&&N.equals?N.equals(K):N===K}(function(N,K){return N[K]?N[K]:null}(n,"curved"),"1")&&(a=c.getModel().getGeometry(A),c=b.getControlPoints(d),
+a.points=c);this.processEdgeGeo(b,A);return A};m.prototype.rotateChildEdge=function(c,a,b,d,f){if(null!=a){var k=c.getGeometry(a);c=c.getStyle(a);if(null!=k&&null!=c&&(a=c.indexOf("rotation="),-1<a))for(c=parseFloat(c.substring(a+9,c.indexOf(";",a))),a=k.width/2,k=k.height/2,m.rotatedEdgePoint(b,c,a,k),m.rotatedEdgePoint(d,c,a,k),b=0;b<f.length;b++)m.rotatedEdgePoint(f[b],c,a,k)}};m.prototype.sanitiseGraph=function(c){var a=c.getModel().getRoot();this.sanitiseCell(c,a)};m.prototype.sanitiseCell=function(c,
+a){for(var b=c.getModel(),d=b.getChildCount(a),f=[],k=0;k<d;k++){var n=b.getChildAt(a,k);this.sanitiseCell(c,n)&&f.push(n)}for(c=0;c<f.length;c++)b.remove(f[c]);f=a.geometry;null!=f&&(0>f.height&&(f.height=Math.abs(f.height),f.y-=f.height,a.style+=";flipV=1;"),0>f.width&&(f.width=Math.abs(f.width),f.x-=f.width,a.style+=";flipH=1;"));0<d&&(d=b.getChildCount(a));f=(new String(b.getValue(a))).toString();c=b.getStyle(a);return 0!==d||!b.isVertex(a)||null!=b.getValue(a)&&0!==f.length||null==c||-1==c.indexOf(mxConstants.STYLE_FILLCOLOR+
+"=none")||-1==c.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=c.indexOf("image=")?!1:!0};return m}();z.mxVsdxCodec=B;B.__class="com.mxgraph.io.mxVsdxCodec"})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
+(function(g){(function(y){(function(z){var B=function(m){function h(c){var a=m.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=c;return a}__extends(h,m);h.prototype.decodeVssx=function(c,a,b,d){var f=this,k="<mxlibrary>[";this.decodeVsdx(c,function(n){k=k.concat(n);var q=f.vsdxModel.getMasterShapes(),t=function(O){var S=0;return{next:function(){return S<O.length?O[S++]:null},hasNext:function(){return S<O.length}}}(function(O){var S=
+[];null==O.entries&&(O.entries=[]);for(var H=0;H<O.entries.length;H++)S.push(O.entries[H].value);return S}(f.vsdxModel.getPages())).next();if(null!=q){var A={str:"",toString:function(){return this.str}},C=0===n.length?"":",",I=function(O){return Object.keys(O).map(function(S){return O[S]})}(q);n=function(O){O=I[O];var S=N.createMxGraph(),H=1;if(null!=O.pageSheet){var J=H=1,M=O.pageSheet.DrawingScale;null!=M&&(H=parseFloat(M.getAttribute("V"))||1);M=O.pageSheet.PageScale;null!=M&&(J=parseFloat(M.getAttribute("V"))||
+1);H=J/H}J=!1;for(M=0;null!=O.firstLevelShapes&&M<O.firstLevelShapes.length;M++){var L=O.firstLevelShapes[M].getShape(),Q=new g.mxgraph.io.vsdx.VsdxShape(t,L,!t.isEdge(L),q,null,N.vsdxModel);L=null;if(Q.isVertex()){N.edgeShapeMap.entries=[];N.parentsMap.entries=[];L=N.addShape(S,Q,S.getDefaultParent(),0,1169);Q=function(U){null==U.entries&&(U.entries=[]);return U.entries}(N.edgeShapeMap);for(var ca=0;ca<Q.length;ca++){var W=Q[ca],R=function(U,ia){null==U.entries&&(U.entries=[]);for(var ba=0;ba<U.entries.length;ba++)if(null!=
+U.entries[ba].key.equals&&U.entries[ba].key.equals(ia)||U.entries[ba].key===ia)return U.entries[ba].value;return null}(N.parentsMap,W.getKey());N.addUnconnectedEdge(S,R,W.getValue(),1169)}}else L=N.addUnconnectedEdge(S,null,Q,1169);J|=null!=L}if(J){N.scaleGraph(S,H);H=N.normalizeGraph(S);N.sanitiseGraph(S);if(0===S.getModel().getChildCount(S.getDefaultParent()))return"continue";A.str=A.str.concat(C);A.str=A.str.concat('{"xml":"');S=m.prototype.processPage.call(N,S,null);A.str=A.str.concat(S);A.str=
+A.str.concat('","w":');A.str=A.str.concat(H.width);A.str=A.str.concat(',"h":');A.str=A.str.concat(H.height);A.str=A.str.concat(',"title":');O=O.getName();null==O&&(O="");O=mxUtils.htmlEntities(JSON.stringify(O));A.str=A.str.concat(O);A.str=A.str.concat("}");C=","}};for(var N=f,K=0;K<I.length;K++)n(K);k=k.concat(A)}k=k.concat("]</mxlibrary>");if(a)try{a(k)}catch(O){null!=d?d(O):a("")}},b)};h.prototype.normalizeGeo=function(c){var a=c.getGeometry();a.x=0;a.y=0;var b=a.sourcePoint;if(c.isEdge()&&null!=
b){this.transPoint(a.targetPoint,b);this.transPoint(a.offset,b);c=a.points;if(null!=c)for(var d=0;d<c.length;d++)this.transPoint(c[d],b);this.transPoint(b,b)}return a};h.prototype.normalizeGraph=function(c){function a(C){null!=C&&(null==b?(b=C.x,d=C.y,f=C.x+(C.width||0),k=C.y+(C.height||0)):(b=Math.min(C.x,b),d=Math.min(C.y,d),f=Math.max(C.x+(C.width||0),f),k=Math.max(C.y+(C.height||0),k)))}var b,d,f,k,n;for(n in c.model.cells){var q=c.model.cells[n],t=q.geometry;if(null!=t&&1==q.parent.id)if(q.vertex)a(t);
else for(a(t.sourcePoint),a(t.targetPoint),q=t.points,t=0;null!=q&&t<q.length;t++)a(q[t])}var A={x:b,y:d};for(n in c.model.cells)if(q=c.model.cells[n],t=q.geometry,null!=t&&1==q.parent.id&&(t.x-=b,t.y-=d,q.isEdge()))for(this.transPoint(t.sourcePoint,A),this.transPoint(t.targetPoint,A),this.transPoint(t.offset,A),q=t.points,t=0;null!=q&&t<q.length;t++)this.transPoint(q[t],A);return{width:f-b,height:k-d}};h.prototype.transPoint=function(c,a){null!=c&&(c.x-=a.x,c.y-=a.y)};h.prototype.processPage=function(c,
a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefaultParent()===b.getParent(k)){d=d.concat(f);d=d.concat('{"xml":"');var n=this.createMxGraph();n.addCell(k);this.sanitiseGraph(n);if(0===n.getModel().getChildCount(n.getDefaultParent()))return"continue";f=this.normalizeGeo(k);n=m.prototype.processPage.call(this,n,null);d=d.concat(n);d=d.concat('","w":');d=d.concat(f.width);d=d.concat(',"h":');d=d.concat(f.height);d=d.concat(',"title":"');f=b.getStyle(k);k="";if(null!=f&&
@@ -15521,9 +15525,9 @@ a){var b=c.getModel(),d="",f="";for(q in b.cells){var k=b.cells[q];if(c.getDefau
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(a,b,d){this.formulaE=this.formulaA=this.d=this.c=this.b=this.a=this.y=this.x=null;this.index=0;this.index=a;this.x=b;this.y=d}c.prototype.getX=function(){return this.x};c.prototype.getY=function(){return this.y};c.prototype.getA=function(){return this.a};c.prototype.getB=function(){return this.b};c.prototype.getC=function(){return this.c};c.prototype.getD=function(){return this.d};c.prototype.getFormulaA=
function(){return this.formulaA};c.prototype.getFormulaE=function(){return this.formulaE};c.prototype.getIndex=function(){return this.index};return c}();m.Row=h;h.__class="com.mxgraph.io.vsdx.geometry.Row"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(){function c(){}c.getIndex=function(a){try{return parseInt(a.getAttribute("IX"))||1}catch(b){return 1}};c.getDoubleVal=function(a){try{if(null!=a&&0!==a.length){var b=parseFloat(a);if(isFinite(b))return b}}catch(d){}return null};c.getRowObj=function(a,b){var d=a.getAttribute("T"),f=c.getIndex(a);var k=(k=a.getAttribute("Del"))&&k.equals?k.equals("1"):"1"===k;if(!k){var n=null;f<=b.length&&(n=b[f-1]);var q=k=b=null,t=null,
-A=null,C=null,I=null,M=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),M=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],Q=K.getAttribute("N"),S=K.getAttribute("V");switch(Q){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);M=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);
+A=null,C=null,I=null,N=null;null!=n&&(b=n.x,k=n.y,q=n.getA(),t=n.getB(),A=n.getC(),C=n.getD(),N=n.getFormulaA(),I=n.getFormulaE());a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a);for(n=0;n<a.length;n++){var K=a[n],O=K.getAttribute("N"),S=K.getAttribute("V");switch(O){case "X":b=c.getDoubleVal(S);break;case "Y":k=c.getDoubleVal(S);break;case "A":q=c.getDoubleVal(S);N=K.getAttribute("V");break;case "B":t=c.getDoubleVal(S);break;case "C":A=c.getDoubleVal(S);break;case "D":C=c.getDoubleVal(S);
break;case "E":I=S}}switch(d){case "MoveTo":return new g.mxgraph.io.vsdx.geometry.MoveTo(f,b,k);case "LineTo":return new g.mxgraph.io.vsdx.geometry.LineTo(f,b,k);case "ArcTo":return new g.mxgraph.io.vsdx.geometry.ArcTo(f,b,k,q);case "Ellipse":return new g.mxgraph.io.vsdx.geometry.Ellipse(f,b,k,q,t,A,C);case "EllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.EllipticalArcTo(f,b,k,q,t,A,C);case "InfiniteLine":return new g.mxgraph.io.vsdx.geometry.InfiniteLine(f,b,k,q,t);case "NURBSTo":return new g.mxgraph.io.vsdx.geometry.NURBSTo(f,
-b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,M);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,
+b,k,q,t,A,C,I);case "PolylineTo":return new g.mxgraph.io.vsdx.geometry.PolylineTo(f,b,k,N);case "RelCubBezTo":return new g.mxgraph.io.vsdx.geometry.RelCubBezTo(f,b,k,q,t,A,C);case "RelEllipticalArcTo":return new g.mxgraph.io.vsdx.geometry.RelEllipticalArcTo(f,b,k,q,t,A,C);case "RelLineTo":return new g.mxgraph.io.vsdx.geometry.RelLineTo(f,b,k);case "RelMoveTo":return new g.mxgraph.io.vsdx.geometry.RelMoveTo(f,b,k);case "RelQuadBezTo":return new g.mxgraph.io.vsdx.geometry.RelQuadBezTo(f,b,k,q,t);case "SplineKnot":return new g.mxgraph.io.vsdx.geometry.SplineKnot(f,
b,k,q);case "SplineStart":return new g.mxgraph.io.vsdx.geometry.SplineStart(f,b,k,q,t,A,C)}}return new g.mxgraph.io.vsdx.geometry.DelRow(f)};return c}();m.RowFactory=h;h.__class="com.mxgraph.io.vsdx.geometry.RowFactory"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){var m=function(){function h(){this.colorElementMap={};this.fontElementMap={}}h.__static_initialize=function(){h.__static_initialized||(h.__static_initialized=!0,h.__static_initializer_0())};h.defaultColors_$LI$=function(){h.__static_initialize();null==h.defaultColors&&(h.defaultColors={});return h.defaultColors};h.__static_initializer_0=function(){h.defaultColors_$LI$()["0"]="#000000";h.defaultColors_$LI$()["1"]="#FFFFFF";h.defaultColors_$LI$()["2"]=
"#FF0000";h.defaultColors_$LI$()["3"]="#00FF00";h.defaultColors_$LI$()["4"]="#0000FF";h.defaultColors_$LI$()["5"]="#FFFF00";h.defaultColors_$LI$()["6"]="#FF00FF";h.defaultColors_$LI$()["7"]="#00FFFF";h.defaultColors_$LI$()["8"]="#800000";h.defaultColors_$LI$()["9"]="#008000";h.defaultColors_$LI$()["10"]="#000080";h.defaultColors_$LI$()["11"]="#808000";h.defaultColors_$LI$()["12"]="#800080";h.defaultColors_$LI$()["13"]="#008080";h.defaultColors_$LI$()["14"]="#C0C0C0";h.defaultColors_$LI$()["15"]="#E6E6E6";
@@ -15709,8 +15713,8 @@ q=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();q=b-q;var t=this.
'" y="'+(new String(b)).toString()+'"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(k)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/><arc rx="'+(new String(f)).toString()+'" ry="'+(new String(A)).toString()+'" x="'+(new String(t)).toString()+'" y="'+(new String(b)).toString()+'" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0"/>'}return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.Ellipse=
h;h.__class="com.mxgraph.io.vsdx.geometry.Ellipse"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n,q,t){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;b.c=q;b.d=t;return b}__extends(a,c);a.prototype.handle=function(b,d){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var f=d.getHeight(),k=d.getWidth();b=this.x*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();var n=this.y*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();n=f-n;var q=this.a*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),
-t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,M=d.getLastY()*f/100,K=b*k/100,Q=n*f/100,S=f-t,H=-A;A=Math.sqrt(I*I+M*M)*Math.cos(Math.atan2(M,I)-H);t=Math.sqrt(I*I+M*M)*Math.sin(Math.atan2(M,I)-H);var J=Math.sqrt(K*K+Q*Q)*Math.cos(Math.atan2(Q,K)-H),N=Math.sqrt(K*K+Q*Q)*Math.sin(Math.atan2(Q,K)-H),L=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-H),O=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-H),ba=((A-J)*(A+J)*(N-O)-(J-
-L)*(J+L)*(t-N)+C*C*(t-N)*(N-O)*(t-O))/(2*((A-J)*(N-O)-(J-L)*(t-N))),W=((A-J)*(J-L)*(A-L)/(C*C)+(J-L)*(t-N)*(t+N)-(A-J)*(N-O)*(N+O))/(2*((J-L)*(t-N)-(A-J)*(N-O))),R=A-ba,T=t-W;R=Math.sqrt(R*R+T*T*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-I)*(S-M)-(Q-M)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ba,W,A,t,J,N,L,O)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+
+t=this.b*g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),A=this.c,C=this.d;b=100*b/k;n=100*n/f;var I=d.getLastX()*k/100,N=d.getLastY()*f/100,K=b*k/100,O=n*f/100,S=f-t,H=-A;A=Math.sqrt(I*I+N*N)*Math.cos(Math.atan2(N,I)-H);t=Math.sqrt(I*I+N*N)*Math.sin(Math.atan2(N,I)-H);var J=Math.sqrt(K*K+O*O)*Math.cos(Math.atan2(O,K)-H),M=Math.sqrt(K*K+O*O)*Math.sin(Math.atan2(O,K)-H),L=Math.sqrt(q*q+S*S)*Math.cos(Math.atan2(S,q)-H),Q=Math.sqrt(q*q+S*S)*Math.sin(Math.atan2(S,q)-H),ca=((A-J)*(A+J)*(M-Q)-(J-
+L)*(J+L)*(t-M)+C*C*(t-M)*(M-Q)*(t-Q))/(2*((A-J)*(M-Q)-(J-L)*(t-M))),W=((A-J)*(J-L)*(A-L)/(C*C)+(J-L)*(t-M)*(t+M)-(A-J)*(M-Q)*(M+Q))/(2*((J-L)*(t-M)-(A-J)*(M-Q))),R=A-ca,U=t-W;R=Math.sqrt(R*R+U*U*C*C);C=R/C;H=180*H/Math.PI;b=Math.round(100*b)/100;n=Math.round(100*n)/100;R=Math.round(100*R/k*100)/100;C=Math.round(100*C/f*100)/100;H=Math.round(100*H)/100;f=0<(K-I)*(S-N)-(O-N)*(q-I)?"0":"1";k="0";g.mxgraph.io.vsdx.mxVsdxUtils.isInsideTriangle(ca,W,A,t,J,M,L,Q)&&(k="1");d.setLastX(b);d.setLastY(n);return'<arc rx="'+
(new String(R)).toString()+'" ry="'+(new String(C)).toString()+'" x="'+(new String(b)).toString()+'" y="'+(new String(n)).toString()+'" x-axis-rotation="'+(new String(H)).toString()+'" large-arc-flag="'+k+'" sweep-flag="'+f+'"/>'}return""};a.prototype.isReflexAngle=function(b,d,f,k,n,q,t,A){f-=b;k-=d;q-=d;n=t-b;A-=d;d=b=0;f=180*(Math.atan2(k,f)-Math.atan2(d,b))/Math.PI;n=180*(Math.atan2(q,n)-Math.atan2(d,b))/Math.PI;b=180*(Math.atan2(A,t)-Math.atan2(d,b))/Math.PI;f=(f-b)%360;n=(n-b)%360;180<f?f-=
360:-180>f&&(f+=360);180<n?n-=360:-180>n&&(n+=360);return(0<f&&0>n||0>f&&0<n)&&180<Math.abs(f-n)?!0:!1};return a}(g.mxgraph.io.vsdx.geometry.Row);m.EllipticalArcTo=h;h.__class="com.mxgraph.io.vsdx.geometry.EllipticalArcTo"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
(function(g){(function(y){(function(z){(function(B){(function(m){var h=function(c){function a(b,d,f,k,n){b=c.call(this,b,d,f)||this;b.a=k;b.b=n;return b}__extends(a,c);a.prototype.handle=function(b,d){return""};return a}(g.mxgraph.io.vsdx.geometry.Row);m.InfiniteLine=h;h.__class="com.mxgraph.io.vsdx.geometry.InfiniteLine"})(B.geometry||(B.geometry={}))})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
@@ -15795,18 +15799,18 @@ b,d)};return a}(g.mxgraph.io.vsdx.geometry.EllipticalArcTo);m.RelEllipticalArcTo
(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b){var d=this;d.text=null;d.fields=null;d.geom=null;d.imageData=null;d.theme=null;d.quickStyleVals=null;d=h.call(this,a,b)||this;d.paragraphs=null;d.styleMap={};d.width=0;d.height=0;d.rotation=0;d.lastX=0;d.lastY=0;d.lastMoveX=0;d.lastMoveY=0;d.lastKnot=-1;d.geomList=null;d.geomListProcessed=!1;d.themeVariant=0;d.cp="0";d.pp="0";d.tp="0";d.fld="0";d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,
k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0);d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(function(f,k){return f[k]?f[k]:null}(d.cellElements,g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),0);return d}__extends(c,h);c.UNICODE_LINE_SEP_$LI$=function(){null==c.UNICODE_LINE_SEP&&(c.ERROR_IMAGE="PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+DQo8IS0tIENyZWF0ZWQgd2l0aCBJbmtzY2FwZSAoaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvKSAtLT4NCjxzdmcNCiAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyINCiAgIHhtbG5zOmNjPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyMiDQogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiDQogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIg0KICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIg0KICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiDQogICB3aWR0aD0iMjUwIg0KICAgaGVpZ2h0PSIyNTAiDQogICBpZD0ic3ZnMzMxOSINCiAgIHNvZGlwb2RpOnZlcnNpb249IjAuMzIiDQogICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjQ2Ig0KICAgdmVyc2lvbj0iMS4wIg0KICAgc29kaXBvZGk6ZG9jbmFtZT0ibm9waG90b19pLnN2ZyINCiAgIGlua3NjYXBlOm91dHB1dF9leHRlbnNpb249Im9yZy5pbmtzY2FwZS5vdXRwdXQuc3ZnLmlua3NjYXBlIj4NCiAgPGRlZnMNCiAgICAgaWQ9ImRlZnMzMzIxIj4NCiAgICA8aW5rc2NhcGU6cGVyc3BlY3RpdmUNCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIg0KICAgICAgIGlua3NjYXBlOnZwX3g9IjAgOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnBlcnNwM2Qtb3JpZ2luPSIzNzIuMDQ3MjQgOiAzNTAuNzg3MzkgOiAxIg0KICAgICAgIGlkPSJwZXJzcGVjdGl2ZTMzMjciIC8+DQogICAgPGlua3NjYXBlOnBlcnNwZWN0aXZlDQogICAgICAgaWQ9InBlcnNwZWN0aXZlMzM0MiINCiAgICAgICBpbmtzY2FwZTpwZXJzcDNkLW9yaWdpbj0iMzcyLjA0NzI0IDogMzUwLjc4NzM5IDogMSINCiAgICAgICBpbmtzY2FwZTp2cF96PSI3NDQuMDk0NDggOiA1MjYuMTgxMDkgOiAxIg0KICAgICAgIGlua3NjYXBlOnZwX3k9IjAgOiAxMDAwIDogMCINCiAgICAgICBpbmtzY2FwZTp2cF94PSIwIDogNTI2LjE4MTA5IDogMSINCiAgICAgICBzb2RpcG9kaTp0eXBlPSJpbmtzY2FwZTpwZXJzcDNkIiAvPg0KICA8L2RlZnM+DQogIDxzb2RpcG9kaTpuYW1lZHZpZXcNCiAgICAgaWQ9ImJhc2UiDQogICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiINCiAgICAgYm9yZGVyY29sb3I9IiM2NjY2NjYiDQogICAgIGJvcmRlcm9wYWNpdHk9IjEuMCINCiAgICAgaW5rc2NhcGU6cGFnZW9wYWNpdHk9IjAuMCINCiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiINCiAgICAgaW5rc2NhcGU6em9vbT0iMi4yNDI5NDI3Ig0KICAgICBpbmtzY2FwZTpjeD0iMTIxLjk3NjQ4Ig0KICAgICBpbmtzY2FwZTpjeT0iMTIyLjQ0MTk4Ig0KICAgICBpbmtzY2FwZTpkb2N1bWVudC11bml0cz0icHgiDQogICAgIGlua3NjYXBlOmN1cnJlbnQtbGF5ZXI9ImxheWVyMSINCiAgICAgc2hvd2dyaWQ9ImZhbHNlIg0KICAgICBpbmtzY2FwZTp3aW5kb3ctd2lkdGg9IjE2NjQiDQogICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijg0NCINCiAgICAgaW5rc2NhcGU6d2luZG93LXg9Ii0zIg0KICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTE4IiAvPg0KICA8bWV0YWRhdGENCiAgICAgaWQ9Im1ldGFkYXRhMzMyNCI+DQogICAgPHJkZjpSREY+DQogICAgICA8Y2M6V29yaw0KICAgICAgICAgcmRmOmFib3V0PSIiPg0KICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4NCiAgICAgICAgPGRjOnR5cGUNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vcHVybC5vcmcvZGMvZGNtaXR5cGUvU3RpbGxJbWFnZSIgLz4NCiAgICAgICAgPGRjOnRpdGxlPkZvdG9ncmFmaWVydmVyYm90PC9kYzp0aXRsZT4NCiAgICAgICAgPGRjOmRhdGU+MjAwOC0wNi0yOTwvZGM6ZGF0ZT4NCiAgICAgICAgPGRjOmNyZWF0b3I+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnJzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOmNyZWF0b3I+DQogICAgICAgIDxkYzpyaWdodHM+DQogICAgICAgICAgPGNjOkFnZW50Pg0KICAgICAgICAgICAgPGRjOnRpdGxlPlRvcnN0ZW4gU2tvbXA8L2RjOnRpdGxlPg0KICAgICAgICAgIDwvY2M6QWdlbnQ+DQogICAgICAgIDwvZGM6cmlnaHRzPg0KICAgICAgICA8ZGM6cHVibGlzaGVyPg0KICAgICAgICAgIDxjYzpBZ2VudD4NCiAgICAgICAgICAgIDxkYzp0aXRsZT5Ub3JzdGVuIFNrb21wPC9kYzp0aXRsZT4NCiAgICAgICAgICA8L2NjOkFnZW50Pg0KICAgICAgICA8L2RjOnB1Ymxpc2hlcj4NCiAgICAgICAgPGRjOmxhbmd1YWdlPmRlX0RFPC9kYzpsYW5ndWFnZT4NCiAgICAgICAgPGRjOnN1YmplY3Q+DQogICAgICAgICAgPHJkZjpCYWc+DQogICAgICAgICAgICA8cmRmOmxpPlBpa3RvZ3JhbW07IEZvdG9ncmFmaWVydmVyYm90PC9yZGY6bGk+DQogICAgICAgICAgPC9yZGY6QmFnPg0KICAgICAgICA8L2RjOnN1YmplY3Q+DQogICAgICAgIDxkYzpkZXNjcmlwdGlvbj5Gb3RvZ3JhZmllcnZlcmJvdCBhbHMgUGlrdG9ncmFtbSA8L2RjOmRlc2NyaXB0aW9uPg0KICAgICAgICA8Y2M6bGljZW5zZQ0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL3B1YmxpY2RvbWFpbi8iIC8+DQogICAgICA8L2NjOldvcms+DQogICAgICA8Y2M6TGljZW5zZQ0KICAgICAgICAgcmRmOmFib3V0PSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9saWNlbnNlcy9wdWJsaWNkb21haW4vIj4NCiAgICAgICAgPGNjOnBlcm1pdHMNCiAgICAgICAgICAgcmRmOnJlc291cmNlPSJodHRwOi8vY3JlYXRpdmVjb21tb25zLm9yZy9ucyNSZXByb2R1Y3Rpb24iIC8+DQogICAgICAgIDxjYzpwZXJtaXRzDQogICAgICAgICAgIHJkZjpyZXNvdXJjZT0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjRGlzdHJpYnV0aW9uIiAvPg0KICAgICAgICA8Y2M6cGVybWl0cw0KICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL25zI0Rlcml2YXRpdmVXb3JrcyIgLz4NCiAgICAgIDwvY2M6TGljZW5zZT4NCiAgICA8L3JkZjpSREY+DQogIDwvbWV0YWRhdGE+DQogIDxnDQogICAgIGlua3NjYXBlOmxhYmVsPSJFYmVuZSAxIg0KICAgICBpbmtzY2FwZTpncm91cG1vZGU9ImxheWVyIg0KICAgICBpZD0ibGF5ZXIxIj4NCiAgICA8cGF0aA0KICAgICAgIHN0eWxlPSJmaWxsOiMwMDAwMDA7ZmlsbC1vcGFjaXR5OjEiDQogICAgICAgZD0iTSAxNjQuNTMxMjUgNjIuNjg3NSBDIDE2Mi43OTExNSA2Mi42ODc1MDEgMTYxLjM3NSA2NC4wNzI0MTYgMTYxLjM3NSA2NS44MTI1IEwgMTYxLjM3NSA2OC43NSBMIDM4LjM3NSA2OC43NSBDIDM1LjA5MjI5OCA2OC43NDk5OTkgMzIuNDY4NzUgNzEuMzczNTQ4IDMyLjQ2ODc1IDc0LjY1NjI1IEwgMzIuNDY4NzUgMTgxLjM3NSBDIDMyLjQ2ODc1IDE4NC42NTc3IDM1LjA5MjMwNyAxODcuMzEyNTEgMzguMzc1IDE4Ny4zMTI1IEwgMjExLjYyNSAxODcuMzEyNSBDIDIxNC45MDc2OSAxODcuMzEyNSAyMTcuNTMxMjcgMTg0LjY1NzcgMjE3LjUzMTI1IDE4MS4zNzUgTCAyMTcuNTMxMjUgNzQuNjU2MjUgQyAyMTcuNTMxMjUgNzEuMzczNTUxIDIxNC45MDc2OCA2OC43NSAyMTEuNjI1IDY4Ljc1IEwgMjAyLjA2MjUgNjguNzUgTCAyMDIuMDYyNSA2NS44MTI1IEMgMjAyLjA2MjUgNjQuMDcyNDEgMjAwLjY0NjM1IDYyLjY4NzUgMTk4LjkwNjI1IDYyLjY4NzUgTCAxNjQuNTMxMjUgNjIuNjg3NSB6IE0gNDYuODEyNSA3OCBMIDg4LjY1NjI1IDc4IEMgOTAuMzk2MzQyIDc4IDkxLjgxMjUgNzkuMzg0OTA3IDkxLjgxMjUgODEuMTI1IEwgOTEuODEyNSA5Ni4zMTI1IEMgOTEuODEyNSA5OC4wNTI1OTIgOTAuMzk2MzQzIDk5LjQzNzUgODguNjU2MjUgOTkuNDM3NSBMIDQ2LjgxMjUgOTkuNDM3NSBDIDQ1LjA3MjQwOCA5OS40Mzc1IDQzLjY4NzUgOTguMDUyNTkzIDQzLjY4NzUgOTYuMzEyNSBMIDQzLjY4NzUgODEuMTI1IEMgNDMuNjg3NSA3OS4zODQ5MDggNDUuMDcyNDA3IDc4IDQ2LjgxMjUgNzggeiBNIDE0NiA4OC4yMTg3NSBDIDE2Ny43MzQ3NSA4OC4yMTg3NTMgMTg1LjM3NSAxMDYuMTUwNzEgMTg1LjM3NSAxMjguMjUgQyAxODUuMzc0OTkgMTUwLjM0OTI4IDE2Ny43MzQ3NCAxNjguMjgxMjUgMTQ2IDE2OC4yODEyNSBDIDEyNC4yNjUyNyAxNjguMjgxMjYgMTA2LjYyNSAxNTAuMzQ5MjkgMTA2LjYyNSAxMjguMjUgQyAxMDYuNjI1IDEwNi4xNTA3MSAxMjQuMjY1MjYgODguMjE4NzUgMTQ2IDg4LjIxODc1IHogTSAxNDYgOTEuNzE4NzUgQyAxMjYuMTY1NTcgOTEuNzE4NzUgMTEwLjA2MjUgMTA4LjA4Mjg5IDExMC4wNjI1IDEyOC4yNSBDIDExMC4wNjI1IDE0OC40MTcxMSAxMjYuMTY1NTcgMTY0Ljc4MTI2IDE0NiAxNjQuNzgxMjUgQyAxNjUuODM0NDMgMTY0Ljc4MTI1IDE4MS45Mzc1IDE0OC40MTcxIDE4MS45Mzc1IDEyOC4yNSBDIDE4MS45Mzc1IDEwOC4wODI4OSAxNjUuODM0NDMgOTEuNzE4NzUgMTQ2IDkxLjcxODc1IHogTSAxNDYgOTYuNTkzNzUgQyAxNjMuMTc3NjggOTYuNTkzNzUyIDE3Ny4xMjUgMTEwLjc4NDIgMTc3LjEyNSAxMjguMjUgQyAxNzcuMTI0OTkgMTQ1LjcxNTggMTYzLjE3NzY5IDE1OS44NzUgMTQ2IDE1OS44NzUgQyAxMjguODIyMzEgMTU5Ljg3NSAxMTQuODc1IDE0NS43MTU4IDExNC44NzUgMTI4LjI1IEMgMTE0Ljg3NSAxMTAuNzg0MTkgMTI4LjgyMjMxIDk2LjU5Mzc1IDE0NiA5Ni41OTM3NSB6IE0gMTc2LjUgMTcyLjcxODc1IEwgMjA2LjE4NzUgMTcyLjcxODc1IEMgMjA3LjQyMTM4IDE3Mi43MTg3NSAyMDguNDA2MjUgMTczLjEyNzgzIDIwOC40MDYyNSAxNzMuNjI1IEwgMjA4LjQwNjI1IDE3Ny45Njg3NSBDIDIwOC40MDYyNSAxNzguNDY1OTIgMjA3LjQyMTM4IDE3OC44NDM3NSAyMDYuMTg3NSAxNzguODQzNzUgTCAxNzYuNSAxNzguODQzNzUgQyAxNzUuMjY2MTEgMTc4Ljg0Mzc1IDE3NC4yODEyNSAxNzguNDY1OTIgMTc0LjI4MTI1IDE3Ny45Njg3NSBMIDE3NC4yODEyNSAxNzMuNjI1IEMgMTc0LjI4MTI1IDE3My4xMjc4MyAxNzUuMjY2MTIgMTcyLjcxODc1IDE3Ni41IDE3Mi43MTg3NSB6ICINCiAgICAgICBpZD0icmVjdDMyMDkiIC8+DQogICAgPHBhdGgNCiAgICAgICBzdHlsZT0iZmlsbDojYzQyNjFkO2ZpbGwtb3BhY2l0eToxIg0KICAgICAgIGQ9Ik0gMjAgMCBDIDE4LjU1OTkzOCAwIDE3LjE2NDc0NyAwLjE1MDk4NjY2IDE1LjgxMjUgMC40Mzc1IEMgMTUuMjEwMjkxIDAuNTY1MTk1NzggMTQuNjExOTEzIDAuNzI2MjExMjYgMTQuMDMxMjUgMC45MDYyNSBDIDEzLjU1NDc3MyAxLjA1Mzk4NTIgMTMuMDg1MzQ5IDEuMjI0ODUzNiAxMi42MjUgMS40MDYyNSBDIDEyLjMyODc2NiAxLjUyMzA3MzkgMTIuMDM5MDMzIDEuNjUwOTE4MiAxMS43NSAxLjc4MTI1IEMgMTEuMzQ3Mjc4IDEuOTYyMzU5OCAxMC45NTA0MDYgMi4xMzc0MTY1IDEwLjU2MjUgMi4zNDM3NSBDIDEwLjUyMTU1NSAyLjM2NTU2ODggMTAuNDc4MjczIDIuMzg0MTU1NSAxMC40Mzc1IDIuNDA2MjUgQyAxMC40MTY5MzQgMi40MTczNzU0IDEwLjM5NTUyMiAyLjQyNjMwNDkgMTAuMzc1IDIuNDM3NSBDIDkuODMyNjg2MSAyLjczMzM0NDYgOS4zMjI2NDQ4IDMuMDYzMjQ1MiA4LjgxMjUgMy40MDYyNSBDIDguMjgzMTIyMSAzLjc2MjE4NjUgNy43NzI3NzI4IDQuMTU4OTIwOSA3LjI4MTI1IDQuNTYyNSBDIDcuMjc1MDU1IDQuNTY3NTg2NiA3LjI1NjE4ODggNC41NTc0MDYxIDcuMjUgNC41NjI1IEMgNy4yMzg1NDc5IDQuNTcxOTQzNCA3LjIzMDE4MDYgNC41ODQyODE2IDcuMjE4NzUgNC41OTM3NSBDIDcuMTA0NzM1MiA0LjY4ODAxNTkgNi45ODY4NTA3IDQuNzc4MjY4NyA2Ljg3NSA0Ljg3NSBDIDYuNTE1NzAyMSA1LjE4NjQyNjQgNi4xNzk3OTA5IDUuNTA3NzA5MSA1Ljg0Mzc1IDUuODQzNzUgQyA1LjQwNDQwMjUgNi4yODE4MDc4IDQuOTkwNzQ0OSA2Ljc0MTM1NTQgNC41OTM3NSA3LjIxODc1IEMgNC41NzkwMDg2IDcuMjM2NTQ2MiA0LjU3NzE4MDYgNy4yNjM0MDE1IDQuNTYyNSA3LjI4MTI1IEMgMy43Njc0ODk4IDguMjQzOTE4MSAzLjA0MjI3MjEgOS4yNzE4NzA1IDIuNDM3NSAxMC4zNzUgQyAyLjQyNjIyMzIgMTAuMzk1NjM1IDIuNDE3NDU2MSAxMC40MTY4MiAyLjQwNjI1IDEwLjQzNzUgQyAyLjEwODM5MDggMTAuOTg1MzQ4IDEuODQwMjIzMyAxMS41NDcyMTQgMS41OTM3NSAxMi4xMjUgQyAxLjU3NTU4NjUgMTIuMTY3NjY1IDEuNTQ5MTI1NSAxMi4yMDcxODIgMS41MzEyNSAxMi4yNSBDIDEuMjg3NzEzMSAxMi44MzI0MzMgMS4wOTQ2NzU0IDEzLjQyMTgyMiAwLjkwNjI1IDE0LjAzMTI1IEMgMC43Mjk2MzAxNCAxNC42MDI0OTUgMC41NjMwOTYzNCAxNS4xODg4MjggMC40Mzc1IDE1Ljc4MTI1IEMgMC4xNDY5MTQwNCAxNy4xNDI1NzggLTQuMzkwNjEzM2UtMTggMTguNTQ5NDY2IDAgMjAgTCAwIDIzMCBDIDAgMjQxLjA4IDguOTIgMjUwIDIwIDI1MCBMIDIzMCAyNTAgQyAyMzEuNDQwMDYgMjUwIDIzMi44MzUyNSAyNDkuODQ5MDEgMjM0LjE4NzUgMjQ5LjU2MjUgQyAyMzQuNzg5MDMgMjQ5LjQzNDk3IDIzNS4zODg2NiAyNDkuMjczODEgMjM1Ljk2ODc1IDI0OS4wOTM3NSBDIDIzNi40NDQ3NiAyNDguOTQ2IDIzNi45MTUwNSAyNDguNzc1MjYgMjM3LjM3NSAyNDguNTkzNzUgQyAyMzcuNjcxMjMgMjQ4LjQ3NjkzIDIzNy45NjA5NyAyNDguMzQ5MDggMjM4LjI1IDI0OC4yMTg3NSBDIDIzOC4yNzk4MSAyNDguMjA1MzEgMjM4LjMxNDAyIDI0OC4yMDEwOSAyMzguMzQzNzUgMjQ4LjE4NzUgQyAyMzguNzU4MzYgMjQ3Ljk5ODMgMjM5LjE2Mzc0IDI0Ny44MDk4MSAyMzkuNTYyNSAyNDcuNTkzNzUgQyAyMzkuNTgzMTggMjQ3LjU4MjU0IDIzOS42MDQzNiAyNDcuNTczNzggMjM5LjYyNSAyNDcuNTYyNSBDIDI0MC4xNjkyNSAyNDcuMjY1MTIgMjQwLjY3NTU4IDI0Ni45Mzg3MyAyNDEuMTg3NSAyNDYuNTkzNzUgQyAyNDEuNjY4NzggMjQ2LjI2OTQxIDI0Mi4xNDM1OSAyNDUuOTI2MzkgMjQyLjU5Mzc1IDI0NS41NjI1IEMgMjQyLjY0NDc0IDI0NS41MjEyOCAyNDIuNjk5NDMgMjQ1LjQ3OTIxIDI0Mi43NSAyNDUuNDM3NSBDIDI0Mi44NzY1MSAyNDUuMzMzMTggMjQzLjAwMTE1IDI0NS4yMzIzNSAyNDMuMTI1IDI0NS4xMjUgQyAyNDMuNDgyNjUgMjQ0LjgxNTM4IDI0My44MjE1NSAyNDQuNDkwMTkgMjQ0LjE1NjI1IDI0NC4xNTYyNSBDIDI0NC40OTIyOSAyNDMuODIwMjEgMjQ0LjgxMzU3IDI0My40ODQzIDI0NS4xMjUgMjQzLjEyNSBDIDI0NS4yMzE2NyAyNDMuMDAyMzQgMjQ1LjMzMzgxIDI0Mi44NzUyNyAyNDUuNDM3NSAyNDIuNzUgQyAyNDUuNDQyNzYgMjQyLjc0MzYyIDI0NS40MzIyNSAyNDIuNzI1MTMgMjQ1LjQzNzUgMjQyLjcxODc1IEMgMjQ1Ljg0MjQ5IDI0Mi4yMjgzIDI0Ni4yMzY0IDI0MS43MTU3NiAyNDYuNTkzNzUgMjQxLjE4NzUgQyAyNDYuOTM4MTIgMjQwLjY3ODQzIDI0Ny4yNjUzNiAyNDAuMTY2MjIgMjQ3LjU2MjUgMjM5LjYyNSBDIDI0Ny41NzM2MyAyMzkuNjA0NzIgMjQ3LjU4MjY4IDIzOS41ODI4MiAyNDcuNTkzNzUgMjM5LjU2MjUgQyAyNDcuODkxOTcgMjM5LjAxNDggMjQ4LjE1OTMxIDIzOC40NTIzOSAyNDguNDA2MjUgMjM3Ljg3NSBDIDI0OC40MTU1NCAyMzcuODUzMjggMjQ4LjQyODI5IDIzNy44MzQyNiAyNDguNDM3NSAyMzcuODEyNSBDIDI0OC40NDY0NCAyMzcuNzkxMjkgMjQ4LjQ1OTg4IDIzNy43NzEyNSAyNDguNDY4NzUgMjM3Ljc1IEMgMjQ4LjcwOTkyIDIzNy4xNzQ3NiAyNDguOTA2MjggMjM2LjU3MDA4IDI0OS4wOTM3NSAyMzUuOTY4NzUgQyAyNDkuMjczNzUgMjM1LjM5MTM3IDI0OS40MzQ2OCAyMzQuODE3NTQgMjQ5LjU2MjUgMjM0LjIxODc1IEMgMjQ5Ljg1MzA5IDIzMi44NTc0MiAyNTAgMjMxLjQ1MDUzIDI1MCAyMzAgTCAyNTAgMjAgQyAyNTAgOC45MiAyNDEuMDggLTMuMzUzNzk4N2UtMTcgMjMwIDAgTCAyMCAwIHogTSAzNC43ODEyNSAxOS40MDYyNSBMIDIyNS40Njg3NSAxOS40MDYyNSBDIDIyOC4zMDk0NiAxOS40MDYyNSAyMzAuNTkzNzUgMjEuNjkwNTQ0IDIzMC41OTM3NSAyNC41MzEyNSBMIDIzMC41OTM3NSAyMTUuMjUgTCAzNC43ODEyNSAxOS40MDYyNSB6IE0gMTkuNDA2MjUgMzQuNzUgTCAyMTUuMjE4NzUgMjMwLjU5Mzc1IEwgMjQuNTMxMjUgMjMwLjU5Mzc1IEMgMjEuNjkwNTQ0IDIzMC41OTM3NiAxOS40MDYyNSAyMjguMzA5NDYgMTkuNDA2MjUgMjI1LjQ2ODc1IEwgMTkuNDA2MjUgMzQuNzUgeiAiDQogICAgICAgaWQ9InBhdGgzMTk2IiAvPg0KICA8L2c+DQo8L3N2Zz4NCg==",
c.UNICODE_LINE_SEP=String.fromCharCode(8232));return c.UNICODE_LINE_SEP};c.prototype.setThemeAndVariant=function(a,b){this.theme=a;this.themeVariant=b};c.prototype.getTheme=function(){null!=this.theme&&this.theme.setVariant(this.themeVariant);return this.theme};c.prototype.getQuickStyleVals=function(){return this.quickStyleVals};c.prototype.processGeomList=function(a){if(!this.geomListProcessed){this.geomList=new g.mxgraph.io.vsdx.mxVsdxGeometryList(a);if(null!=this.geom)for(a=0;a<this.geom.length;a++)this.geomList.addGeometry(this.geom[a]);
-this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var M="",K="";try{M=C.substring(0,A),K=C.substring(A,C.length)}catch(Q){break}A=b.getRelationship(I,M+"/_rels"+K+".rels");
-if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(Q){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?
+this.geomListProcessed=!0}};c.prototype.parseShapeElem=function(a,b){h.prototype.parseShapeElem.call(this,a,b);var d=a.nodeName;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"ForeignData")){d=function(A,C){for(A=A.firstChild;null!=A;){if(1==A.nodeType){var I=A;if("rel"==I.nodeName.toLowerCase()&&(I=I.getAttribute("r:id"),null!=I&&0!==I.length)){A=C.lastIndexOf("/");var N="",K="";try{N=C.substring(0,A),K=C.substring(A,C.length)}catch(O){break}A=b.getRelationship(I,N+"/_rels"+K+".rels");
+if(null!=A){C=A.getAttribute("Target")||"";I=A.getAttribute("Type");A=C.lastIndexOf("/");try{C=C.substring(A+1,C.length)}catch(O){break}return{type:I,target:C}}break}}A=A.nextSibling}};var f=a.ownerDocument.vsdxFileName,k=a.getAttribute("ForeignType"),n=a.getAttribute("CompressionType")||"",q=null;if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"Bitmap"))n=n.toLowerCase();else if(function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"MetaFile"))n="png";else if(function(A,C){return A&&A.equals?
A.equals(C):A===C}(k,"Enhanced Metafile")||function(A,C){return A&&A.equals?A.equals(C):A===C}(k,"EnhMetaFile"))n="png";else if("Object"==k){if(q=d(a,f),0<q.type.indexOf("/oleObject"))if(n=b.getRelationship("rId1","visio/embeddings/_rels/"+q.target+".rels"),null!=n){q=n.getAttribute("Target");k=n.getAttribute("Type");try{var t=q.lastIndexOf("/");q=q.substring(t+1,q.length)}catch(A){return}n="png";q={type:k,target:q}}else return}else return;null==q&&(q=d(a,f));k=q.type;q=q.target;null!=k&&function(A,
C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(k,"image")&&(this.imageData={},(a=b.getMedia(g.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+q))?(this.imageData.iData=a,function(A,C){var I=A.length-C.length;A=A.indexOf(C,I);return-1!==A&&A===I}(q.toLowerCase(),".bmp")&&(n="jpg"),this.imageData.iType=n):(this.imageData.iData=c.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,g.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=
-a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,M){return I&&I.equals?I.equals(M):I===M}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,M){return I&&I.equals?I.equals(M):I===M}("1",
+a)};c.prototype.parseSection=function(a){var b=a.getAttribute("N");if(function(I,N){return I&&I.equals?I.equals(N):I===N}(b,"Geometry"))null==this.geom&&(this.geom=[]),this.geom.push(a);else if(function(I,N){return I&&I.equals?I.equals(N):I===N}(b,"Field")){a=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var d=0;d<a.length;d++){b=a[d];var f=b.getAttribute("IX")||"";if(0!==f.length)if(null==this.fields&&(this.fields={}),function(I,N){return I&&I.equals?I.equals(N):I===N}("1",
b.getAttribute("Del")))this.fields[f]="";else{for(var k=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(b,"Cell"),n="",q="",t=0;t<k.length;t++){var A=k[t];b=A.getAttribute("N");A=A.getAttribute("V")||A.textContent||"";switch(b){case "Value":n=A;break;case "Format":q=A}}if("esc(0)"==q)this.fields[f]=n;else if(0!==n.length){try{var C=isNaN(n)?new Date(n):new Date(c.VSDX_START_TIME+Math.floor(864E5*parseFloat(n)));q="c"==q?0==C.getHours()+C.getMinutes()+C.getSeconds()+C.getMilliseconds()?"m/d/yyyy":
"m/d/yyyy h:MM:ss tt":"ddddd"==q?"m/d/yyyy":"dddddd"==q?"dddd, mmmm dd, yyyy":"C"==q?"dddd, mmmm dd, yyyy h:MM:ss tt":"T"==q?"h:MM:ss tt":q.replace(/am\/pm/g,"tt").replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M");n=Graph.prototype.formatDate(C,"UTC:"+q.replace(RegExp("\\{|\\}","g"),""))}catch(I){}this.fields[f]=n}}}}else h.prototype.parseSection.call(this,a)};c.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};c.prototype.getText=function(){return null!=
this.text?this.text.textContent:null};c.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};c.prototype.getWidth=function(){if(1>this.width&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.width=Math.max(this.childShapes.entries[a].value.width,this.width)}catch(b){}return 0===this.width&&0<this.height?1:this.width};c.prototype.getHeight=function(){if(1>this.height&&null!=this.childShapes)try{for(var a=0;a<this.childShapes.entries.length;a++)this.height=
Math.max(this.childShapes.entries[a].value.height,this.height)}catch(b){}return 0===this.height&&0<this.width?1:this.height};c.prototype.getRotation=function(){return this.rotation};c.prototype.getStyleMap=function(){return this.styleMap};c.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};c.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};c.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};c.prototype.getTextParagraphFormated=function(a){var b="",d={};d["text-align"]=this.getHorizontalAlign(this.pp,!0);d["margin-left"]=this.getIndentLeft(this.pp);d["margin-right"]=this.getIndentRight(this.pp);d["margin-top"]=this.getSpBefore(this.pp)+"px";d["margin-bottom"]=this.getSpAfter(this.pp)+"px";d["text-indent"]=this.getIndentFirst(this.pp);d["vertical-align"]=this.getAlignVertical();d.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,
-d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,M){return I&&I.equals?I.equals(M):
-I===M})(C,"1")?a=a.toUpperCase():function(I,M){return I&&I.equals?I.equals(M):I===M}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,M){return I&&I.equals?I.equals(M):I===M})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,M){return I&&I.equals?I.equals(M):I===M}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
+d)};c.prototype.getTextCharFormated=function(a){var b="color:"+this.getTextColor(this.cp)+";",d="font-size:"+parseFloat(this.getTextSize(this.cp))+"px;",f="font-family:"+this.getTextFont(this.cp)+";",k="direction:"+this.getRtlText(this.cp)+";",n="letter-spacing:"+parseFloat(this.getLetterSpace(this.cp))/.71+"px;",q="line-height:"+this.getSpcLine(this.pp),t=";opacity:"+this.getTextOpacity(this.cp),A=this.getTextPos(this.cp),C=this.getTextCase(this.cp);(function(I,N){return I&&I.equals?I.equals(N):
+I===N})(C,"1")?a=a.toUpperCase():function(I,N){return I&&I.equals?I.equals(N):I===N}(C,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.toInitialCapital(a));(function(I,N){return I&&I.equals?I.equals(N):I===N})(A,"1")?a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sup"):function(I,N){return I&&I.equals?I.equals(N):I===N}(A,"2")&&(a=g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"sub"));a=this.isBold(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"b"):a;a=this.isItalic(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,
"i"):a;a=this.isUnderline(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"u"):a;a=this.getTextStrike(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.surroundByTags(a,"s"):a;a=this.isSmallCaps(this.cp)?g.mxgraph.io.vsdx.mxVsdxUtils.toSmallCaps(a,this.getTextSize(this.cp)):a;return'<font style="'+d+f+b+k+n+q+t+'">'+a+"</font>"};c.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):
b===d}(a,"1")&&(a="rtl");return a};c.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0<a?a*=g.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$():(a=0===a?100:100*Math.abs(a),b=!0);return(new String(a)).toString()+(b?"%":"px")};c.prototype.getSpcBefore=function(a){return this.getSpBefore(a)};c.prototype.insertAttributes=function(a,b){if(-1!=a.indexOf(">")){var d=a.indexOf(">"),f=a.substring(d);a=a.substring(0,d);b=' style="'+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return a+
b+f}return a};c.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,g.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(b,d){return b&&b.equals?b.equals(d):b===d})(a,"0")?a="ltr":function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1")&&(a="rtl");return a};c.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(d,f){return d&&d.equals?d.equals(f):d===f})(a,
@@ -15817,9 +15821,9 @@ a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(ne
a};c.prototype.setLastMoveX=function(a){this.lastMoveX=a};c.prototype.setLastMoveY=function(a){this.lastMoveY=a};c.prototype.setLastKnot=function(a){this.lastKnot=a};c.prototype.getConnections=function(){var a=[];if(this.sections&&this.sections.Connection)for(var b=this.getHeight(),d=this.getWidth(),f=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(this.sections.Connection.elem,"Row"),k=0;k<f.length;k++){for(var n=g.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(f[k]),q,t,A=0;A<n.length;A++){var C=
n[A],I=C.getAttribute("N");C=this.getScreenNumericalValue$org_w3c_dom_Element$double(C,0);"X"==I?q=mxUtils.format(C/d):"Y"==I&&(t=mxUtils.format(1-C/b))}null!=q&&null!=t&&a.push({x:q,y:t})}0==a.length&&this.master&&this.master.masterShape&&(a=this.master.masterShape.getConnections());return a};return c}(g.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=(new Date("1899-12-30T00:00:00Z")).getTime();B.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph=
{}))})(com||(com={}));
-(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var M=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,Q=M.fields?Object.values(M.fields).join(""):M.text.textContent;K==Q&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}
+(function(g){(function(y){(function(z){(function(B){var m=function(h){function c(a,b,d,f,k,n){function q(){var I;if(I=2!=a.connectsMap[t.Id])if(I=null!=t.childShapes)I=t.childShapes,null==I.entries&&(I.entries=[]),I=0!=I.entries.length;try{if(1==t.childShapes.entries.length){var N=t.childShapes.entries[0].value,K=t.fields?Object.values(t.fields).join(""):t.text.textContent,O=N.fields?Object.values(N.fields).join(""):N.text.textContent;K==O&&(I=!1,t.childShapes.entries=[],t.noLabelGroup=!0)}}catch(S){console.log(S)}return I}
var t=this;t.masterShape=null;t.master=null;t.parentHeight=0;t=h.call(this,b,n)||this;t.htmlLabels=!0;t.rootShape=t;t.shapeName=null;t.shapeIndex=0;t.vertex=!0;t.childShapes={};var A=t.getMasterId(),C=t.getShapeMasterId();t.master=null!=A?f[A]?f[A]:null:k;null!=t.master&&(t.masterShape=null==A&&null!=C?t.master.getSubShape(C):t.master.getMasterShape());f=t.getNameU();k=f.lastIndexOf(".");-1!==k&&(f=f.substring(0,k));t.shapeName=f;b=b.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);
-null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,M){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(M)||I.entries[K].key===M)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&
+null!=b&&0<b.length&&(b=b.item(0),t.childShapes=a.parseShapes(b,t.master,!1));b=t.calcRotation();t.rotation=100*b/100;t.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(t.getValue(t.getCellElement$java_lang_String("ThemeIndex"),"0")));n=function(I,N){null==I.entries&&(I.entries=[]);for(var K=0;K<I.entries.length;K++)if(null!=I.entries[K].key.equals&&I.entries[K].key.equals(N)||I.entries[K].key===N)return I.entries[K].value;return null}(n.getThemes(),b);null==n&&"1"==urlParams.dev&&
console.log("No theme found for index "+b);b=a.getCellIntValue("VariationColorIndex",0);t.setThemeAndVariant(n,b);f=function(I){null==I.entries&&(I.entries=[]);return I.entries}(t.childShapes);for(k=0;k<f.length;k++)A=f[k].getValue(),A.setRootShape(t),null==A.theme&&A.setThemeAndVariant(n,b);t.quickStyleVals=new g.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillColor"),
"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleShadowColor"),
"1")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(t.getValue(t.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=t.masterShape?(t.masterShape.processGeomList(null),t.processGeomList(t.masterShape.getGeomList()),0===t.width&&(t.width=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===t.height&&(t.height=t.getScreenNumericalValue$org_w3c_dom_Element$double(t.getCellElement$java_lang_String(g.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
@@ -15896,10 +15900,10 @@ if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Organiz
f=f.hasAttribute("F")?f.getAttribute("F"):f.textContent);k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");(function(A,C){return A&&A.equals?A.equals(C):A===C})(d,"Inh")&&(d="0.0");(function(A,C){return A&&A.equals?A.equals(C):A===C})(f,"Inh")&&(f="-0.4");-1!=f.indexOf("txtHeight")&&(f="-0.4");b=b.split(";");for(var n="",q=0;q<b.length;q++){var t=b[q];t=t.trim();(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C})(t,"tabHeight=")&&
(n=t.split("tabHeight=").join(""))}(function(A,C){return A&&A.equals?A.equals(C):A===C})(n,"")&&(n="20");b=parseFloat(n);d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f-b/2);a.getGeometry().offset=d}else if(function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(d,"Domain 3D")||function(A,C,I){void 0===I&&(I=0);return A.substr(I,C.length)===C}(f,"Domain 3D")){k=this.shape.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.CONTROL).item(0);d=null;
d="0.0";f=null;f="-0.4";null!=k&&(d=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.X).item(0),d=d.getAttribute("F")||"",f=k.getElementsByTagName(g.mxgraph.io.vsdx.mxVsdxConstants.Y).item(0),f=f.getAttribute("F")||"");k=a.getGeometry();d=d.split("Width/2+").join("");d=d.split("DL").join("");f=f.split("Height*").join("");if(function(A,C){return A&&A.equals?A.equals(C):A===C}(d,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(d,""))d="0.0";if(function(A,C){return A&&A.equals?A.equals(C):
-A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&
-null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(Q,S){return Q[S]?Q[S]:null}(d,"iType"),k=function(Q,S){return Q[S]?Q[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),
-"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var M=this.parseGeom();if(function(Q,S){return Q&&Q.equals?Q.equals(S):Q===S}(M,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(M);a[mxConstants.STYLE_SHAPE]=
-"stencil("+K+")"}catch(Q){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+
+A===C}(f,"Inh")||function(A,C){return A&&A.equals?A.equals(C):A===C}(f,""))f="-0.4";-1!=f.indexOf("txtHeight")&&(f="-0.4");d=parseFloat(d);f=parseFloat(f);n=k.height;d=.1*k.width+100*d;d=new mxPoint(d,n-n*f);a.getGeometry().offset=d}};c.prototype.getForm=function(){var a={};if(this.isVertex())try{var b=c.getType(this.getShape());this.styleDebug("shape type = "+b);if(null!=this.imageData||function(O,S){return O&&O.equals?O.equals(S):O===S}(g.mxgraph.io.vsdx.mxVsdxConstants.FOREIGN,b)&&null!=this.masterShape&&
+null!=this.masterShape.imageData){var d=null!=this.imageData?this.imageData:this.masterShape.imageData;a.shape="image";a.aspect="fixed";var f=function(O,S){return O[S]?O[S]:null}(d,"iType"),k=function(O,S){return O[S]?O[S]:null}(d,"iData"),n=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetX"),"0")),q=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgOffsetY"),"0")),t=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgWidth"),"0")),A=parseFloat(this.getValue(this.getCellElement$java_lang_String("ImgHeight"),
+"0")),C=parseFloat(this.getValue(this.getCellElement$java_lang_String("Width"),"0")),I=parseFloat(this.getValue(this.getCellElement$java_lang_String("Height"),"0"));0!=n||0!=q||t!=C||A!=I?this.toBeCroppedImg={imgOffsetX:n,imgOffsetY:q,imgWidth:t,imgHeight:A,width:C,height:I,iType:f,iData:k}:a.image="data:image/"+f+","+k;return a}var N=this.parseGeom();if(function(O,S){return O&&O.equals?O.equals(S):O===S}(N,""))return this.styleDebug("No geom found"),a;var K=Graph.compress(N);a[mxConstants.STYLE_SHAPE]=
+"stencil("+K+")"}catch(O){}else return this.getEdgeStyle();return a};c.prototype.isOff_page_reference=function(){var a=this.getNameU();return function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Off-page reference")||function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"Lined/Shaded process")?!0:!1};c.prototype.isExternal_process=function(){var a=(a=this.shapeName)&&a.equals?a.equals("External process"):"External process"===a;return a};c.prototype.getDirection=function(a){a=mxResources.get("mxOffset"+
this.shapeName);if(null!=a&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"0")&&!function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"")){if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"1"))return mxConstants.DIRECTION_SOUTH;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"2"))return mxConstants.DIRECTION_WEST;if(function(b,d){return b&&b.equals?b.equals(d):b===d}(a,"3"))return mxConstants.DIRECTION_NORTH}return mxConstants.DIRECTION_EAST};c.prototype.isSubproces=function(){var a=
(a=this.shapeName)&&a.equals?a.equals("Subproces"):"Subproces"===a;return a};c.prototype.getEdgeStyle$=function(){return{edgeStyle:"none"}};c.prototype.getChildShapes=function(){return this.childShapes};c.prototype.setChildShapes=function(a){this.childShapes=a};c.prototype.isDisplacedLabel=function(){var a=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F",""),b=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F",""),d=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH,
"F",""),f=this.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT,"F","");if(null!=this.masterShape){if(""===a||function(k,n){return k&&k.equals?k.equals(n):k===n}(a.toLowerCase(),"inh"))a=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X,"F","");if(""===b||function(k,n){return k&&k.equals?k.equals(n):k===n}(b.toLowerCase(),"inh"))b=this.masterShape.getAttribute(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y,"F","");if(""===d||function(k,n){return k&&k.equals?k.equals(n):
@@ -15921,8 +15925,8 @@ k.entries[q].key.equals&&k.entries[q].key.equals(n)||k.entries[q].key===n)return
a,b,d);return null==f&&null!=this.masterShape?this.masterShape.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d):f};c.prototype.getCellElement=function(a,b,d){if("string"!==typeof a&&null!==a||"string"!==typeof b&&null!==b||"string"!==typeof d&&null!==d){if("string"!==typeof a&&null!==a||void 0!==b||void 0!==d)throw Error("invalid overload");return this.getCellElement$java_lang_String(a)}return this.getCellElement$java_lang_String$java_lang_String$java_lang_String(a,b,d)};c.prototype.createLabelSubShape=
function(a,b){var d=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),this.getWidth()),f=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),d/2),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),
f/2),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),k),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),n),A=this.getValueAsDouble(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_ANGLE),0),C=this.getTextLabel(1>d||1>f);if(null!=C&&0!==C.length){var I=mxUtils.clone(this.getStyleMap())||{};I[mxConstants.STYLE_FILLCOLOR]=mxConstants.NONE;I[mxConstants.STYLE_STROKECOLOR]=
-mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var M=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+M)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height-
-(t+f-n);k=q-k;0<M&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,M,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),
+mxConstants.NONE;I[mxConstants.STYLE_GRADIENTCOLOR]=mxConstants.NONE;I.hasOwnProperty("align")||(I.align="center");I.hasOwnProperty("verticalAlign")||(I.verticalAlign="middle");I.hasOwnProperty("whiteSpace")||(I.whiteSpace="wrap");delete I.shape;delete I.image;this.isVerticalLabel()&&(A+=Math.PI+.01,I.horizontal="0");var N=this.getRotation();0!==A&&(A=360-180*A/Math.PI,A=Math.round((A+N)%360*100)/100,0!==A&&(I.rotation=""+A));I="text;"+g.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(I,"=");n=b.getGeometry().height-
+(t+f-n);k=q-k;0<N&&(q=new mxGeometry(k,n,d,f),k=b.getGeometry(),g.mxgraph.online.Utils.rotatedGeometry(q,N,k.width/2,k.height/2),k=q.x,n=q.y);return a.insertVertex(b,null,C,Math.round(100*k)/100,Math.round(100*n)/100,Math.round(100*d)/100,Math.round(100*f)/100,I+";html=1;")}return null};c.prototype.getLblEdgeOffset=function(a,b){if(null!=b&&1<b.length){var d=new mxCellState;d.absolutePoints=b;a.updateEdgeBounds(d);a=a.getPoint(d);d=b[0];var f=b[b.length-1];b=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_WIDTH),
this.getWidth());var k=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_HEIGHT),this.getHeight()),n=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_X),0),q=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_LOC_PIN_Y),0),t=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_X),
0),A=this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getShapeNode(g.mxgraph.io.vsdx.mxVsdxConstants.TXT_PIN_Y),0);f=(this.getHeight()-(d.y-f.y))/2+d.y-a.y-(A-q+k/2);a=t-n+b/2+(d.x-a.x);return 1E11<Math.abs(a)?null:new mxPoint(Math.floor(Math.round(100*a)/100),Math.floor(Math.round(100*f)/100))}return null};c.prototype.getShapeIndex=function(){return this.shapeIndex};c.prototype.setShapeIndex=function(a){this.shapeIndex=a};return c}(g.mxgraph.io.vsdx.Shape);m.__static_initialized=!1;m.ARROW_NO_FILL_MARKER=
"0";m.maxDp=2;m.USE_SHAPE_MATCH=!1;m.stencilTemplate='<shape h="htemplate" w="wtemplate" aspect="variable" strokewidth="inherit"><connections></connections><background></background><foreground></foreground></shape>';B.VsdxShape=m;m.__class="com.mxgraph.io.vsdx.VsdxShape"})(z.vsdx||(z.vsdx={}))})(y.io||(y.io={}))})(g.mxgraph||(g.mxgraph={}))})(com||(com={}));
@@ -15944,8 +15948,8 @@ com.mxgraph.io.vsdx.VsdxShape.arrowTypes_$LI$();com.mxgraph.io.vsdx.VsdxShape.ar
com.mxgraph.io.vsdx.mxVsdxTheme.colorIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.themesIds_$LI$();com.mxgraph.io.vsdx.mxVsdxTheme.__static_initialize();com.mxgraph.io.vsdx.mxVsdxConstants.MY_SET_$LI$();com.mxgraph.io.vsdx.mxVsdxConstants.SET_VALUES_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.defaultColors_$LI$();com.mxgraph.io.vsdx.mxPropertiesManager.__static_initialize();com.mxgraph.io.mxVsdxCodec.vsdxPlaceholder_$LI$();com.mxgraph.io.mxVsdxCodec.parsererrorNS_$LI$();
EditorUi.prototype.doImportVisio=function(g,y,z,B){B=B||g.name;null!=B&&/(\.vs(x|sx?))($|\?)/i.test(B)?(new com.mxgraph.io.mxVssxCodec(this)).decodeVssx(g,y,null,z):(new com.mxgraph.io.mxVsdxCodec(this)).decodeVsdx(g,y,null,z)};function mxGraphMlCodec(){this.cachedRefObj={}}mxGraphMlCodec.prototype.refRegexp=/^\{y:GraphMLReference\s+(\d+)\}$/;mxGraphMlCodec.prototype.staticRegexp=/^\{x:Static\s+(.+)\.(.+)\}$/;
mxGraphMlCodec.prototype.decode=function(g,y,z){try{var B=mxUtils.parseXml(g),m=this.getDirectChildNamedElements(B.documentElement,mxGraphMlConstants.GRAPH);this.initializeKeys(B.documentElement);g='<?xml version="1.0" encoding="UTF-8"?><mxfile>';for(B=0;B<m.length;B++){var h=m[B],c=this.createMxGraph(),a=c.getModel();a.beginUpdate();try{for(this.nodesMap={},this.edges=[],this.importGraph(h,c,c.getDefaultParent()),B=0;B<this.edges.length;B++)for(var b=this.edges[B],d=b.edges,f=b.parent,k=b.dx,n=b.dy,
-q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var M=c.view.getState(C),K=M.absolutePoints,Q=K[0],S=K[K.length-1],H=I.x,J=I.y;k=S.x-Q.x;n=S.y-Q.y;var N=Q.x+H*k,L=Q.y+H*n,O=Math.sqrt(k*k+n*n);k/=O;n/=O;N-=J*n;L+=J*k;var ba=c.view.getRelativePoint(M,N,L);I.x=ba.x;I.y=
-ba.y}}}}catch(W){throw console.log(W),W;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(W){z&&z(W)}};
+q=0;q<d.length;q++)this.importEdge(d[q],c,f,k,n)}catch(W){throw console.log(W),W;}finally{a.endUpdate()}a.beginUpdate();try{var t=c.getModel().cells,A;for(A in t){var C=t[A];if(C.edge&&0<C.getChildCount())for(B=0;B<C.getChildCount();B++){var I=C.children[B].geometry;if(I.adjustIt){var N=c.view.getState(C),K=N.absolutePoints,O=K[0],S=K[K.length-1],H=I.x,J=I.y;k=S.x-O.x;n=S.y-O.y;var M=O.x+H*k,L=O.y+H*n,Q=Math.sqrt(k*k+n*n);k/=Q;n/=Q;M-=J*n;L+=J*k;var ca=c.view.getRelativePoint(N,M,L);I.x=ca.x;I.y=
+ca.y}}}}catch(W){throw console.log(W),W;}finally{a.endUpdate()}g+=this.processPage(c,B+1)}y&&y(g+"</mxfile>")}catch(W){z&&z(W)}};
mxGraphMlCodec.prototype.initializeKeys=function(g){var y=this.getDirectChildNamedElements(g,mxGraphMlConstants.KEY);this.nodesKeys={};this.edgesKeys={};this.portsKeys={};this.sharedData={};this.nodesKeys[mxGraphMlConstants.NODE_GEOMETRY]={};this.nodesKeys[mxGraphMlConstants.USER_TAGS]={};this.nodesKeys[mxGraphMlConstants.NODE_STYLE]={};this.nodesKeys[mxGraphMlConstants.NODE_LABELS]={};this.nodesKeys[mxGraphMlConstants.NODE_GRAPHICS]={};this.edgesKeys[mxGraphMlConstants.EDGE_GEOMETRY]={};this.edgesKeys[mxGraphMlConstants.EDGE_STYLE]=
{};this.edgesKeys[mxGraphMlConstants.EDGE_LABELS]={};this.portsKeys[mxGraphMlConstants.PORT_LOCATION_PARAMETER]={};this.portsKeys[mxGraphMlConstants.PORT_STYLE]={};this.portsKeys[mxGraphMlConstants.PORT_VIEW_STATE]={};for(var z,B=0;B<y.length;B++){var m=this.dataElem2Obj(y[B]),h=m[mxGraphMlConstants.ID],c=m[mxGraphMlConstants.KEY_FOR],a=m[mxGraphMlConstants.KEY_NAME],b=m[mxGraphMlConstants.KEY_YTYPE];a==mxGraphMlConstants.SHARED_DATA&&(z=h);a=a?a:b;switch(c){case mxGraphMlConstants.NODE:this.nodesKeys[a]=
{key:h,keyObj:m};break;case mxGraphMlConstants.EDGE:this.edgesKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.PORT:this.portsKeys[a]={key:h,keyObj:m};break;case mxGraphMlConstants.ALL:m={key:h,keyObj:m},this.nodesKeys[a]=m,this.edgesKeys[a]=m,this.portsKeys[a]=m}}g=this.getDirectChildNamedElements(g,mxGraphMlConstants.DATA);for(B=0;B<g.length;B++)if(g[B].getAttribute(mxGraphMlConstants.KEY)==z)for(c=this.getDirectChildNamedElements(g[B],mxGraphMlConstants.Y_SHARED_DATA),y=0;y<c.length;y++)for(a=
@@ -15969,10 +15973,10 @@ type:g},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,
var c=mxUtils.clone(g);c.defaults={shape:"hexagon",strokeColor:"#007000"};var a=mxUtils.clone(g);a.defaults={shape:"mxgraph.bpmn.shape;perimeter=ellipsePerimeter;symbol=general",outline:"standard"};a.characteristic={key:"outline",mod:"bpmnOutline"};var b=mxUtils.clone(g);b.defaults={shape:"js:bpmnDataObject"};var d=mxUtils.clone(g);d.defaults={shape:"datastore"};var f=mxUtils.clone(g);f.defaults={shape:"swimlane;swimlaneLine=0;startSize=20;dashed=1;dashPattern=3 1 1 1;collapsible=0;rounded=1"};var k=
mxUtils.clone(g);k.defaults={shape:"js:BpmnChoreography"};var n=mxUtils.clone(g);n.defaults={rounded:"1",glass:"1",strokeColor:"#FFFFFF"};n.inset="strokeWidth";n.radius="arcSize";n.drawShadow={key:"shadow",mod:"bool"};n.color={key:"fillColor",mod:"color",addGradient:"north"};n["color.yjs:Color.value"]=n.color;var q=mxUtils.clone(g);q.defaults={rounded:"1",arcSize:10,glass:"1",shadow:"1",strokeColor:"none"};q.drawShadow={key:"shadow",mod:"bool"};var t=mxUtils.clone(g);t.defaults={shape:"swimlane",
startSize:20,strokeWidth:4,spacingLeft:10};t.isCollapsible={key:"collapsible",mod:"bool"};t.borderColor={key:"strokeColor",mod:"color"};t.folderFrontColor={key:"fillColor",mod:"color"};var A=mxUtils.clone(g);A.defaults={shape:"swimlane",startSize:20,spacingLeft:10};A["yjs:PanelNodeStyle"]={color:{key:"swimlaneFillColor",mod:"color"},"color.yjs:Color.value":{key:"swimlaneFillColor",mod:"color"},labelInsetsColor:{key:"fillColor",mod:"color"},"labelInsetsColor.yjs:Color.value":{key:"fillColor",mod:"color"}};
-var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(H,J){J.image=H};var M=mxUtils.clone(g);M.defaults={shape:"image"};M["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,J){J.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(H,J){"roundrectangle"==H&&(J.rounded=1,J.arcSize=5)};var Q=mxUtils.clone(g);Q.defaults={shape:"js:table2"};
+var C=mxUtils.clone(g);C.defaults={shape:"js:table"};var I=mxUtils.clone(g);I.defaults={shape:"image"};I.image=function(H,J){J.image=H};var N=mxUtils.clone(g);N.defaults={shape:"image"};N["y:SVGModel.y:SVGContent.y:Resource.#text"]=function(H,J){J.image="data:image/svg+xml,"+(window.btoa?btoa(H):Base64.encode(H))};var K=mxUtils.clone(g);K.defaults={shape:"swimlane",startSize:20};K["y:Shape.type"]=function(H,J){"roundrectangle"==H&&(J.rounded=1,J.arcSize=5)};var O=mxUtils.clone(g);O.defaults={shape:"js:table2"};
var S=mxUtils.clone(g);S.defaults={gradientDirection:"east"};S["y:Fill"].color2={key:"gradientColor",mod:"color"};S["y:StyleProperties.y:Property"]={"com.yworks.bpmn.characteristic":{key:"outline",mod:"bpmnOutline"},"com.yworks.bpmn.icon.fill":{key:"gradientColor",mod:"color"},"com.yworks.bpmn.icon.fill2":{key:"fillColor",mod:"color"},"com.yworks.bpmn.type":{key:"symbol",mod:"bpmnSymbol"},"y.view.ShadowNodePainter.SHADOW_PAINTING":{key:"shadow",mod:"bool"},doubleBorder:{key:"double",mod:"bool"},"com.yworks.sbgn.style.radius":{key:"arcSize",
mod:"scale",scale:2},"com.yworks.sbgn.style.inverse":{key:"flipV",mod:"bool"}};this.mapObject(y,{"yjs:ShapeNodeStyle":g,"demostyle:FlowchartNodeStyle":g,"demostyle:AssetNodeStyle":B,"bpmn:ActivityNodeStyle":m,"bpmn:GatewayNodeStyle":h,"bpmn:ConversationNodeStyle":c,"bpmn:EventNodeStyle":a,"bpmn:DataObjectNodeStyle":b,"bpmn:DataStoreNodeStyle":d,"bpmn:GroupNodeStyle":f,"bpmn:ChoreographyNodeStyle":k,"yjs:BevelNodeStyle":n,"yjs:ShinyPlateNodeStyle":q,"demostyle:DemoGroupStyle":t,"yjs:CollapsibleNodeStyleDecorator":A,
-"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":Q,"y:SVGNode":M,"y:GroupNode":K},z)};
+"bpmn:PoolNodeStyle":C,"yjs:TableNodeStyle":C,"demotablestyle:DemoTableStyle":C,"yjs:ImageNodeStyle":I,"y:ShapeNode":g,"y:GenericNode":S,"y:GenericGroupNode":S,"y:TableNode":O,"y:SVGNode":N,"y:GroupNode":K},z)};
mxGraphMlCodec.prototype.handleTemplates=function(g,y,z,B){if(g){var m=z.geometry.width,h=z.geometry.height;z='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 '+m+" "+h+'"><g>';for(var c,a=[],b=/\{TemplateBinding\s+([^}]+)\}/g;null!=(c=b.exec(g));){var d="";switch(c[1]){case "width":d=m;break;case "height":d=h}a.push({match:c[0],repl:d})}if(y&&y["y:Json"])for(y=JSON.parse(y["y:Json"]["#text"]),m=/\{Binding\s+([^}]+)\}/g;null!=(c=m.exec(g));)if(h=c[1].split(","),
b=y[h[0]])1<h.length&&h[1].indexOf("Converter=")&&(d=mxGraphMlConverters[h[1].substr(11)])&&(b=[b],h[2]&&b.push(h[2].substr(11)),b=d.apply(null,b)),a.push({match:c[0],repl:mxUtils.htmlEntities(b)});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);a=[];for(y=/<text.+data-content="([^"]+).+<\/text>/g;null!=(c=y.exec(g));)b=c[0].substr(0,c[0].length-7)+c[1]+"</text>",a.push({match:c[0],repl:b});for(c=0;c<a.length;c++)g=g.replace(a[c].match,a[c].repl);g=z+g+"</g></svg>";B.shape="image";B.image=
"data:image/svg+xml,"+(window.btoa?btoa(g):Base64.encode(g))}};
@@ -16015,16 +16019,16 @@ mxGraphMlCodec.prototype.addEdgeStyle=function(g,y,z){g=function(a,b){b.dashed=1
h={defaults:{rounded:0,endArrow:"none"},configuration:{key:"shape",mod:"shape"},"y:LineStyle":{color:{key:"strokeColor",mod:"color"},type:function(a,b){"line"!=a&&(b.dashed=1);var d=null;switch(a){case "dashed":d="3 1";break;case "dotted":d="1 1";break;case "dashed_dotted":d="3 2 1 2"}d&&(b.dashPattern=d)},width:"strokeWidth"},"y:Arrows":{source:function(a,b){b.startArrow=mxGraphMlArrowsMap[a]||"classic";m(a,b)},target:function(a,b){b.endArrow=mxGraphMlArrowsMap[a]||"classic";B(a,b)}},"y:BendStyle":{smoothed:{key:"rounded",
mod:"bool"}}},c=mxUtils.clone(h);c.defaults.curved="1";this.mapObject(y,{"yjs:PolylineEdgeStyle":{defaults:{endArrow:"none",rounded:0},smoothingLength:function(a,b){b.rounded=a&&0<parseFloat(a)?"1":"0"},stroke:{key:"strokeColor",mod:"color"},"stroke.yjs:Stroke":{dashStyle:g,"dashStyle.yjs:DashStyle.dashes":g,fill:{key:"strokeColor",mod:"color"},"fill.yjs:SolidColorFill.color":{key:"strokeColor",mod:"color"},"thickness.sys:Double":"strokeWidth",thickness:"strokeWidth"},targetArrow:{key:"endArrow",
mod:"arrow"},"targetArrow.yjs:Arrow":{defaults:{endArrow:"classic",endFill:"1",endSize:"6"},fill:B,scale:{key:"endSize",mod:"scale",scale:5},type:{key:"endArrow",mod:"arrow"}},sourceArrow:{key:"startArrow",mod:"arrow"},"sourceArrow.yjs:Arrow":{defaults:{startArrow:"classic",startFill:"1",startSize:"6"},fill:m,scale:{key:"startSize",mod:"scale",scale:5},type:{key:"startArrow",mod:"arrow"}}},"y:PolyLineEdge":h,"y:GenericEdge":h,"y:ArcEdge":c,"y:BezierEdge":c,"y:QuadCurveEdge":c,"y:SplineEdge":c},z)};
-mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,Q){K&&(K=K.toUpperCase());var S=Q.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}Q.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",
-mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,Q){K&&(Q.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
-fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,Q){Q.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,Q){var S=Q.fontStyle||0;"true"==K&&(S|=4);Q.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=
+mxGraphMlCodec.prototype.addLabels=function(g,y,z,B,m){z=g.getChildCount();var h=y[mxGraphMlConstants.Y_LABEL]||y;y=[];var c=[],a=[];if(h){h instanceof Array||(h=[h]);for(var b=0;b<h.length;b++){var d=h[b],f={},k=d[mxGraphMlConstants.TEXT]||d;k&&(k=k["#text"]);var n=d[mxGraphMlConstants.LAYOUTPARAMETER]||d||{},q=function(K,O){K&&(K=K.toUpperCase());var S=O.fontStyle||0;switch(K){case "ITALIC":S|=2;break;case "BOLD":S|=1;break;case "UNDERLINE":S|=4}O.fontStyle=S};this.mapObject(d,{"Style.yjs:DefaultLabelStyle":{backgroundFill:{key:"labelBackgroundColor",
+mod:"color"},"backgroundFill.yjs:SolidColorFill.color":{key:"labelBackgroundColor",mod:"color"},backgroundStroke:{key:"labelBorderColor",mod:"color"},"backgroundStroke.yjs:Stroke.fill":{key:"labelBorderColor",mod:"color"},textFill:{key:"fontColor",mod:"color"},"textFill.yjs:SolidColorFill.color":{key:"fontColor",mod:"color"},textSize:"fontSize",horizontalTextAlignment:"align",verticalTextAlignment:"verticalAlign",wrapping:function(K,O){K&&(O.whiteSpace="wrap")},"font.yjs:Font":{fontFamily:"fontFamily",
+fontSize:"fontSize",fontStyle:q,fontWeight:q,textDecoration:q}},"Style.y:VoidLabelStyle":function(K,O){O.VoidLbl=!0},alignment:"align",fontFamily:"fontFamily",fontSize:"fontSize",fontStyle:q,underlinedText:function(K,O){var S=O.fontStyle||0;"true"==K&&(S|=4);O.fontStyle=S},horizontalTextPosition:"",textColor:{key:"fontColor",mod:"color"},verticalTextPosition:"verticalAlign",hasText:{key:"hasText",mod:"bool"},rotationAngle:"rotation"},f);f.VoidLbl||"0"==f.hasText||(y.push(k),c.push(f),a.push(n))}}for(b=
0;b<y.length;b++)if(y[b]&&(!a[b]||!a[b]["bpmn:ParticipantParameter"])){y[b]=mxUtils.htmlEntities(y[b],!1).replace(/\n/g,"<br/>");n=g.geometry;f=new mxCell(y[b],new mxGeometry(0,0,n.width,n.height),"text;html=1;spacing=0;"+this.styleMap2Str(c[b]));f.vertex=!0;g.insert(f,z);h=f.geometry;if(a[b]["y:RatioAnchoredLabelModelParameter"])n=mxUtils.getSizeForString(y[b],c[b].fontSize,c[b].fontFamily),(d=a[b]["y:RatioAnchoredLabelModelParameter"].LayoutOffset)?(d=d.split(","),h.x=parseFloat(d[0]),h.y=parseFloat(d[1]),
h.width=n.width,h.height=n.height,f.style+=";spacingTop=-4;"):f.style+=";align=center;";else if(a[b]["y:InteriorLabelModel"]){switch(a[b]["y:InteriorLabelModel"]){case "Center":f.style+=";verticalAlign=middle;";break;case "North":h.height=1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90"}f.style+=";align=center;"}else if(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"])switch(a[b]["y:StretchStripeLabelModel"]||a[b]["y:StripeLabelModelParameter"].Position){case "North":h.height=
1;break;case "West":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}else if(a[b]["bpmn:PoolHeaderLabelModel"]){switch(a[b]["bpmn:PoolHeaderLabelModel"]){case "NORTH":h.height=1;break;case "WEST":h.width=n.height,h.height=n.width,h.y=n.height/2-n.width/2,h.x=-h.y,f.style+=";rotation=-90;"}f.style+=";align=center;"}else if(a[b]["y:InteriorStretchLabelModelParameter"])f.style+=";align=center;";else if(a[b]["y:ExteriorLabelModel"])switch(a[b]["y:ExteriorLabelModel"]){case "East":f.style+=
";labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;";break;case "South":f.style+=";labelPosition=center;verticalLabelPosition=bottom;align=center;verticalAlign=top;";break;case "North":f.style+=";labelPosition=center;verticalLabelPosition=top;align=center;verticalAlign=bottom;";break;case "West":f.style+=";labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;"}else if(a[b]["y:FreeEdgeLabelModelParameter"]){h.relative=!0;h.adjustIt=!0;n=a[b]["y:FreeEdgeLabelModelParameter"];
d=n.Ratio;q=n.Distance;var t=n.Angle;d&&(h.x=parseFloat(d));q&&(h.y=parseFloat(q));t&&(f.style+=";rotation="+parseFloat(t)*(180/Math.PI));f.style+=";verticalAlign=middle;"}else if(a[b]["y:EdgePathLabelModelParameter"]){h.relative=!0;n=a[b]["y:EdgePathLabelModelParameter"];k=n.SideOfEdge;d=n.SegmentRatio;h.x=d?2*parseFloat(d)-1:0;if(k)switch(k){case "RightOfEdge":h.y=-15;break;case "LeftOfEdge":h.y=15}f.style+=";verticalAlign=middle;"}else if(n=parseFloat(a[b].x),d=parseFloat(a[b].y),a[b].width&&(h.width=
parseFloat(a[b].width)),a[b].height&&(h.height=parseFloat(a[b].height)),g.edge)if(h.relative=!0,h.x=0,h.y=0,f=g.source.geometry.getCenterX()-g.target.geometry.getCenterX(),k=g.source.geometry.getCenterY()-g.target.geometry.getCenterY(),B&&m&&a[b]["y:ModelParameter"]&&a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"]){n=a[b]["y:ModelParameter"]["y:SmartEdgeLabelModelParameter"];t=parseFloat(n.angle);q=parseFloat(n.distance);var A=n.position;d=parseFloat(n.ratio);n=parseFloat(n.segment);var C=
-new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var M=t=0;M<n;M++)t+=C.segments[M];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,
+new mxCellState;C.absolutePoints=m;B.view.updateEdgeBounds(C);var I="left"==A?1:-1;if(-1==n&&6.283185307179586==t)h.offset=new mxPoint(1>Math.abs(d)?C.segments[0]*d:d,I*q);else{-1==n&&(n=0);for(var N=t=0;N<n;N++)t+=C.segments[N];t+=C.segments[n]*d;h.x=t/C.length*2-1;h.y=(("center"==A?0:q)+h.height/2*I*(Math.abs(f)>Math.abs(k)?1:-1))*I}}else isNaN(n)||isNaN(d)||(h.offset=new mxPoint(n+f/2+(0<f?-h.width:h.width),d));else h.x=n||0,h.y=d||0;c[b].rotation&&270==c[b].rotation&&(h.x-=h.height/2)}return{lblTxts:y,
lblStyles:c}};mxGraphMlCodec.prototype.processPage=function(g,y){g=(new mxCodec).encode(g.getModel());g.setAttribute("style","default-style2");g=mxUtils.getXml(g);y='<diagram name="Page '+y+'">'+Graph.compress(g);return y+"</diagram>"};mxGraphMlCodec.prototype.getDirectChildNamedElements=function(g,y){var z=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y==g.nodeName&&z.push(g);return z};
mxGraphMlCodec.prototype.getDirectFirstChildNamedElements=function(g,y){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType&&y==g.nodeName)return g;return null};mxGraphMlCodec.prototype.getDirectChildElements=function(g){var y=[];for(g=g.firstChild;null!=g;g=g.nextSibling)null!=g&&1==g.nodeType&&y.push(g);return y};mxGraphMlCodec.prototype.getDirectFirstChildElement=function(g){for(g=g.firstChild;null!=g;g=g.nextSibling)if(null!=g&&1==g.nodeType)return g;return null};
var mxGraphMlConverters={"orgchartconverters.linebreakconverter":function(g,y){if("string"===typeof g){for(var z=g;20<z.length&&-1<z.indexOf(" ");)z=z.substring(0,z.lastIndexOf(" "));return"true"===y?z:g.substring(z.length)}return""},"orgchartconverters.borderconverter":function(g,y){return"boolean"===typeof g?g?"#FFBB33":"rgba(0,0,0,0)":"#FFF"},"orgchartconverters.addhashconverter":function(g,y){return"string"===typeof g?"string"===typeof y?"#"+g+y:"#"+g:g},"orgchartconverters.intermediateconverter":function(g,
diff --git a/src/main/webapp/js/sanitizer/purify.min.js b/src/main/webapp/js/sanitizer/purify.min.js
index 4d12880ca..b9d442cd4 100644
--- a/src/main/webapp/js/sanitizer/purify.min.js
+++ b/src/main/webapp/js/sanitizer/purify.min.js
@@ -1,2 +1,2 @@
-/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(S,t)});var S;function b(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function N(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function w(t){const n=l(null);for(const[o,r]of e(t)){E(t,o)&&(Array.isArray(r)?n[o]=R(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=w(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return b(n.get);if("function"==typeof n.value)return b(n.value)}e=o(e)}return function(){return null}}const D=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),v=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),I=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\$\{[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:q,ERB_EXPR:F,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,MUSTACHE_EXPR:H,TMPLIT_EXPR:B});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.2.3",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:S,Node:b,Element:R,NodeFilter:H,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=O(j,"cloneNode"),$=O(j,"remove"),ne=O(j,"nextSibling"),oe=O(j,"childNodes"),re=O(j,"parentNode");if("function"==typeof S){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Ae}=K;let{IS_ALLOWED_URI:_e}=K,Se=null;const be=N({},[...D,...L,...v,...x,...k]);let Ne=null;const Re=N({},[...I,...U,...z,...P]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,De=null,Le=!0,ve=!0,Ce=!1,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=N({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=N({},[Je,Qe,et],d);let it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["annotation-xml"]);const lt=N({},["title","style","font","a","script"]);let ct=null;const st=["application/xhtml+xml","text/html"];let ut=null,mt=null;const pt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=w(e),ct=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?d:f,Se=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,ut):be,Ne=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,ut):Re,ot=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?N(w(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?N(w(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,ut):qe,Oe=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,ut):{},De=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,ut):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ve=!1),He&&(Pe=!0),je&&(Se=N({},k),Ne=[],!0===je.html&&(N(Se,D),N(Ne,I)),!0===je.svg&&(N(Se,L),N(Ne,U),N(Ne,P)),!0===je.svgFilters&&(N(Se,v),N(Ne,U),N(Ne,P)),!0===je.mathMl&&(N(Se,x),N(Ne,z),N(Ne,P))),e.ADD_TAGS&&(Se===be&&(Se=w(Se)),N(Se,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ne===Re&&(Ne=w(Ne)),N(Ne,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&N(Ve,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),N(Xe,e.FORBID_CONTENTS,ut)),Ge&&(Se["#text"]=!0),Ie&&N(Se,["html","head","body"]),Se.table&&(N(Se,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),mt=e}},ht=N({},[...L,...v,...C]),gt=N({},[...x,...M]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(ze)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,ct)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},At=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof b&&e instanceof b};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,mt)}))}const Nt=function(e){let t=null;if(bt(pe.beforeSanitizeElements,e,null),_t(e))return Tt(e),!0;const n=ut(e.nodeName);if(bt(pe.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(ke&&e.nodeType===Q&&A(/<[/\w]/g,e.data))return Tt(e),!0;if(!Se[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[o])&&!(t.namespaceURI===Je&&!it[o])&&!gt[n]&&(lt[n]||!ht[n]):!("application/xhtml+xml"!==ct||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(pe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in pt))return!1;if(ve&&!De[t]&&A(ge,t));else if(Le&&A(Te,t));else if(!Ne[t]||De[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(A(_e,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Ce&&!A(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,Ae)},Ot=function(e){bt(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ut(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(pe.uponSanitizeAttribute,e,n),p=n.attrValue,!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ke&&A(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,p)){yt(a,e);continue}Me&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=ut(e.nodeName);if(Rt(f,s,p)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),_t(e)?Tt(e):m(o.removed)}catch(e){}}}bt(pe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=At(t);for(bt(pe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(pe.uponSanitizeShadowNode,n,null),Nt(n),Ot(n),n.content instanceof s&&e(n.content);bt(pe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||dt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Se[t]||Oe[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Pe&&!Me&&!Ie&&-1===e.indexOf("<"))return ie&&Fe?ie.createHTML(e):e;if(n=Et(e),!n)return Pe?null:Fe?ae:""}n&&ze&&Tt(n.firstChild);const c=At(Ye?e:n);for(;i=c.nextNode();)Nt(i),Ot(i),i.content instanceof s&&Dt(i.content);if(Ye)return e;if(Pe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Me&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&Fe?ie.createHTML(m):m},o.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){mt=null,Ue=!1},o.isValidAttribute=function(e,t,n){mt||dt({});const o=ut(e),r=ut(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&p(pe[e],t)},o.removeHook=function(e){return m(pe[e])},o.removeHooks=function(e){pe[e]=[]},o.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return ne}));
+/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...k,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,k),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...M]),yt=w({},[...k,...I]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Me&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!ke&&S(/\/>/i,m)){At(a,e);continue}Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Ie&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index be47571f7..183b16593 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -2,8 +2,8 @@ window.PROXY_URL=window.PROXY_URL||"https://viewer.diagrams.net/proxy";window.ST
window.mxImageBasePath=window.mxImageBasePath||"https://viewer.diagrams.net/mxgraph/images";window.mxBasePath=window.mxBasePath||"https://viewer.diagrams.net/mxgraph/";window.mxLoadStylesheets=window.mxLoadStylesheets||!1;
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(S,t)});var S;function b(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function N(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function w(t){const n=l(null);for(const[o,r]of e(t)){E(t,o)&&(Array.isArray(r)?n[o]=R(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=w(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return b(n.get);if("function"==typeof n.value)return b(n.value)}e=o(e)}return function(){return null}}const D=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),v=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),I=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\$\{[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:q,ERB_EXPR:F,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,MUSTACHE_EXPR:H,TMPLIT_EXPR:B});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.2.3",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:S,Node:b,Element:R,NodeFilter:H,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=O(j,"cloneNode"),$=O(j,"remove"),ne=O(j,"nextSibling"),oe=O(j,"childNodes"),re=O(j,"parentNode");if("function"==typeof S){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Ae}=K;let{IS_ALLOWED_URI:_e}=K,Se=null;const be=N({},[...D,...L,...v,...x,...k]);let Ne=null;const Re=N({},[...I,...U,...z,...P]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,De=null,Le=!0,ve=!0,Ce=!1,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=N({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=N({},[Je,Qe,et],d);let it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["annotation-xml"]);const lt=N({},["title","style","font","a","script"]);let ct=null;const st=["application/xhtml+xml","text/html"];let ut=null,mt=null;const pt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=w(e),ct=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?d:f,Se=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,ut):be,Ne=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,ut):Re,ot=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?N(w(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?N(w(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,ut):qe,Oe=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,ut):{},De=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,ut):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ve=!1),He&&(Pe=!0),je&&(Se=N({},k),Ne=[],!0===je.html&&(N(Se,D),N(Ne,I)),!0===je.svg&&(N(Se,L),N(Ne,U),N(Ne,P)),!0===je.svgFilters&&(N(Se,v),N(Ne,U),N(Ne,P)),!0===je.mathMl&&(N(Se,x),N(Ne,z),N(Ne,P))),e.ADD_TAGS&&(Se===be&&(Se=w(Se)),N(Se,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ne===Re&&(Ne=w(Ne)),N(Ne,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&N(Ve,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),N(Xe,e.FORBID_CONTENTS,ut)),Ge&&(Se["#text"]=!0),Ie&&N(Se,["html","head","body"]),Se.table&&(N(Se,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),mt=e}},ht=N({},[...L,...v,...C]),gt=N({},[...x,...M]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(ze)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,ct)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},At=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof b&&e instanceof b};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,mt)}))}const Nt=function(e){let t=null;if(bt(pe.beforeSanitizeElements,e,null),_t(e))return Tt(e),!0;const n=ut(e.nodeName);if(bt(pe.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(ke&&e.nodeType===Q&&A(/<[/\w]/g,e.data))return Tt(e),!0;if(!Se[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[o])&&!(t.namespaceURI===Je&&!it[o])&&!gt[n]&&(lt[n]||!ht[n]):!("application/xhtml+xml"!==ct||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(pe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in pt))return!1;if(ve&&!De[t]&&A(ge,t));else if(Le&&A(Te,t));else if(!Ne[t]||De[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(A(_e,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Ce&&!A(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,Ae)},Ot=function(e){bt(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ut(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(pe.uponSanitizeAttribute,e,n),p=n.attrValue,!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ke&&A(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,p)){yt(a,e);continue}Me&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=ut(e.nodeName);if(Rt(f,s,p)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),_t(e)?Tt(e):m(o.removed)}catch(e){}}}bt(pe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=At(t);for(bt(pe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(pe.uponSanitizeShadowNode,n,null),Nt(n),Ot(n),n.content instanceof s&&e(n.content);bt(pe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||dt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Se[t]||Oe[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Pe&&!Me&&!Ie&&-1===e.indexOf("<"))return ie&&Fe?ie.createHTML(e):e;if(n=Et(e),!n)return Pe?null:Fe?ae:""}n&&ze&&Tt(n.firstChild);const c=At(Ye?e:n);for(;i=c.nextNode();)Nt(i),Ot(i),i.content instanceof s&&Dt(i.content);if(Ye)return e;if(Pe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Me&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&Fe?ie.createHTML(m):m},o.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){mt=null,Ue=!1},o.isValidAttribute=function(e,t,n){mt||dt({});const o=ut(e),r=ut(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&p(pe[e],t)},o.removeHook=function(e){return m(pe[e])},o.removeHooks=function(e){pe[e]=[]},o.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return ne}));
+/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...k,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,k),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...M]),yt=w({},[...k,...I]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Me&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!ke&&S(/\/>/i,m)){At(a,e);continue}Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Ie&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,i=30,r=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);var _=new Array(60);e(_);var f=new Array(512);e(f);var u=new Array(256);e(u);var c=new Array(29);e(c);var w,m,b,g=new Array(i);function p(t,e,a,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(g);var k=function(t){return t<256?f[t]:f[256+(t>>>7)]},y=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},z=function(t,e,a){x(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,i,s=new Array(16),o=0;for(n=1;n<=r;n++)o=o+a[n-1]<<1,s[n]=o;for(i=0;i<=e;i++){var l=t[2*i+1];0!==l&&(t[2*i]=A(s[l]++,l))}},R=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Z=function(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var i=2*e,r=2*a;return t[i]<t[r]||t[i]===t[r]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],i=a<<1;i<=t.heap_len&&(i<t.heap_len&&S(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!S(e,n,t.heap[i],t.depth));)t.heap[a]=t.heap[i],a=i,i<<=1;t.heap[a]=n},D=function(t,e,n){var i,r,l,h,d=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+d++],i+=(255&t.pending_buf[t.sym_buf+d++])<<8,r=t.pending_buf[t.sym_buf+d++],0===i?z(t,r,e):(l=u[r],z(t,l+a+1,e),0!==(h=s[l])&&(r-=c[l],x(t,r,h)),i--,l=k(i),z(t,l,n),0!==(h=o[l])&&(i-=g[l],x(t,i,h)))}while(d<t.sym_next);z(t,256,e)},T=function(t,e){var a,n,i,s=e.dyn_tree,o=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.elems,d=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==s[2*a]?(t.heap[++t.heap_len]=d=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=d<2?++d:0)]=1,t.depth[i]=0,t.opt_len--,l&&(t.static_len-=o[2*i+1]);for(e.max_code=d,a=t.heap_len>>1;a>=1;a--)U(t,s,a);i=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*i]=s[2*a]+s[2*n],t.depth[i]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=i,t.heap[1]=i++,U(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,i,s,o,l,h=e.dyn_tree,d=e.max_code,_=e.stat_desc.static_tree,f=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,w=e.stat_desc.max_length,m=0;for(s=0;s<=r;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=h[2*h[2*(n=t.heap[a])+1]+1]+1)>w&&(s=w,m++),h[2*n+1]=s,n>d||(t.bl_count[s]++,o=0,n>=c&&(o=u[n-c]),l=h[2*n],t.opt_len+=l*(s+o),f&&(t.static_len+=l*(_[2*n+1]+o)));if(0!==m){do{for(s=w-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[w]--,m-=2}while(m>0);for(s=w;0!==s;s--)for(n=t.bl_count[s];0!==n;)(i=t.heap[--a])>d||(h[2*i+1]!==s&&(t.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(t,e),E(s,d,t.bl_count)},O=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)i=s,s=e[2*(n+1)+1],++o<l&&i===s||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==r&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4))},I=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),n=0;n<=a;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(o<h)do{z(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==r&&(z(t,i,t.bl_tree),o--),z(t,16,t.bl_tree),x(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),x(t,o-3,3)):(z(t,18,t.bl_tree),x(t,o-11,7));o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4)}},F=!1,L=function(t,e,a,n){x(t,0+(n?1:0),3),Z(t),y(t,a),y(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a},N=function(t,e,n,i){var r,s,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),T(t,t.l_desc),T(t,t.d_desc),o=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=n+5,n+4<=r&&-1!==e?L(t,e,n,i):4===t.strategy||s===r?(x(t,2+(i?1:0),3),D(t,d,_)):(x(t,4+(i?1:0),3),function(t,e,a,n){var i;for(x(t,e-257,5),x(t,a-1,5),x(t,n-4,4),i=0;i<n;i++)x(t,t.bl_tree[2*h[i]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),D(t,t.dyn_ltree,t.dyn_dtree)),R(t),i&&Z(t)},B={_tr_init:function(t){F||(!function(){var t,e,a,h,v,k=new Array(16);for(a=0,h=0;h<28;h++)for(c[h]=a,t=0;t<1<<s[h];t++)u[a++]=h;for(u[a-1]=h,v=0,h=0;h<16;h++)for(g[h]=v,t=0;t<1<<o[h];t++)f[v++]=h;for(v>>=7;h<i;h++)for(g[h]=v<<7,t=0;t<1<<o[h]-7;t++)f[256+v++]=h;for(e=0;e<=r;e++)k[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,k[8]++;for(;t<=255;)d[2*t+1]=9,t++,k[9]++;for(;t<=279;)d[2*t+1]=7,t++,k[7]++;for(;t<=287;)d[2*t+1]=8,t++,k[8]++;for(E(d,287,k),t=0;t<i;t++)_[2*t+1]=5,_[2*t]=A(t,5);w=new p(d,s,257,n,r),m=new p(_,o,0,i,r),b=new p(new Array(0),l,0,19,7)}(),F=!0),t.l_desc=new v(t.dyn_ltree,w),t.d_desc=new v(t.dyn_dtree,m),t.bl_desc=new v(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,R(t)},_tr_stored_block:L,_tr_flush_block:N,_tr_tally:function(t,e,n){return t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(u[n]+a+1)]++,t.dyn_dtree[2*k(e)]++),t.sym_next===t.sym_end},_tr_align:function(t){x(t,2,3),z(t,256,d),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var i=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{r=r+(i=i+e[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0},M=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),H=function(t,e,a,n){var i=M,r=n+a;t^=-1;for(var s=n;s<r;s++)t=t>>>8^i[255&(t^e[s])];return-1^t},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,Y=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,it=K.Z_BUF_ERROR,rt=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,ot=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,ht=K.Z_FIXED,dt=K.Z_DEFAULT_STRATEGY,_t=K.Z_UNKNOWN,ft=K.Z_DEFLATED,ut=258,ct=262,wt=42,mt=113,bt=666,gt=function(t,e){return t.msg=j[e],e},pt=function(t){return 2*t-(t>4?9:0)},vt=function(t){for(var e=t.length;--e>=0;)t[e]=0},kt=function(t){var e,a,n,i=t.w_size;n=e=t.hash_size;do{a=t.head[--n],t.head[n]=a>=i?a-i:0}while(--e);n=e=i;do{a=t.prev[--n],t.prev[n]=a>=i?a-i:0}while(--e)},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},xt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},At=function(t,e){t.pending_buf[t.pending++]=e},Et=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Rt=function(t,e,a,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),a),1===t.state.wrap?t.adler=C(t.adler,e,i,a):2===t.state.wrap&&(t.adler=H(t.adler,e,i,a)),t.next_in+=i,t.total_in+=i,i)},Zt=function(t,e){var a,n,i=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ut,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<f);if(n=ut-(f-r),r=f-ut,n>s){if(t.match_start=e,s=n,n>=o)break;u=h[r+s-1],c=h[r+s]}}}while((e=_[e&d])>l&&0!=--i);return s<=t.lookahead?s:t.lookahead},St=function(t){var e,a,n,i=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=i+(i-ct)&&(t.window.set(t.window.subarray(i,i+i-a),0),t.match_start-=i,t.strstart-=i,t.block_start-=i,t.insert>t.strstart&&(t.insert=t.strstart),kt(t),a+=i),0===t.strm.avail_in)break;if(e=Rt(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=e,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=yt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){var a,n,i,r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,o=t.strm.avail_in;do{if(a=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,a>(n=t.strstart-t.block_start)+t.strm.avail_in&&(a=n+t.strm.avail_in),a>i&&(a=i),a<r&&(0===a&&e!==V||e===q||a!==n+t.strm.avail_in))break;s=e===V&&a===n+t.strm.avail_in?1:0,Y(t,0,0,s),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),n&&(n>a&&(n=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,a-=n),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===s);return(o-=t.strm.avail_in)&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==q&&e!==V&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Rt(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,r=(i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i)>t.w_size?t.w_size:i,((n=t.strstart-t.block_start)>=r||(n||e===V)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(a=n>i?i:n,s=e===V&&0===t.strm.avail_in&&a===n?1:0,Y(t,t.block_start,a,s),t.block_start+=a,xt(t.strm)),s?3:1)},Dt=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2},Tt=function(t,e){for(var a,n,i;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,e,a,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=i}var It=[new Ot(0,0,0,0,Ut),new Ot(4,4,8,4,Dt),new Ot(4,5,16,8,Dt),new Ot(4,6,32,32,Dt),new Ot(4,4,16,16,Tt),new Ot(8,16,32,32,Tt),new Ot(8,16,128,128,Tt),new Ot(8,32,128,256,Tt),new Ot(32,128,258,1024,Tt),new Ot(32,258,258,4096,Tt)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Lt=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==wt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==bt?1:0},Nt=function(t){if(Lt(t))return gt(t,at);t.total_in=t.total_out=0,t.data_type=_t;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?wt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,P(e),tt},Bt=function(t){var e,a=Nt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,vt(e.head),e.max_lazy_match=It[e.level].max_lazy,e.good_match=It[e.level].good_length,e.nice_match=It[e.level].nice_length,e.max_chain_length=It[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ct=function(t,e,a,n,i,r){if(!t)return at;var s=1;if(e===rt&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||a!==ft||n<8||n>15||e<0||e>9||r<0||r>ht||8===n&&1!==s)return gt(t,at);8===n&&(n=9);var o=new Ft;return t.state=o,o.strm=t,o.status=wt,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=r,o.method=a,Bt(t)},Mt={deflateInit:function(t,e){return Ct(t,e,ft,15,8,dt)},deflateInit2:Ct,deflateReset:Bt,deflateResetKeep:Nt,deflateSetHeader:function(t,e){return Lt(t)||2!==t.state.wrap?at:(t.state.gzhead=e,tt)},deflate:function(t,e){if(Lt(t)||e>$||e<0)return t?gt(t,at):at;var a=t.state;if(!t.output||0!==t.avail_in&&!t.input||a.status===bt&&e!==V)return gt(t,0===t.avail_out?it:at);var n=a.last_flush;if(a.last_flush=e,0!==a.pending){if(xt(t),0===t.avail_out)return a.last_flush=-1,tt}else if(0===t.avail_in&&pt(e)<=pt(n)&&e!==V)return gt(t,it);if(a.status===bt&&0!==t.avail_in)return gt(t,it);if(a.status===wt&&0===a.wrap&&(a.status=mt),a.status===wt){var i=ft+(a.w_bits-8<<4)<<8;if(i|=(a.strategy>=ot||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(i|=32),Et(a,i+=31-i%31),0!==a.strstart&&(Et(a,t.adler>>>16),Et(a,65535&t.adler)),t.adler=1,a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(57===a.status)if(t.adler=0,At(a,31),At(a,139),At(a,8),a.gzhead)At(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),At(a,255&a.gzhead.time),At(a,a.gzhead.time>>8&255),At(a,a.gzhead.time>>16&255),At(a,a.gzhead.time>>24&255),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(At(a,255&a.gzhead.extra.length),At(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=H(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(At(a,0),At(a,0),At(a,0),At(a,0),At(a,0),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,3),a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;if(69===a.status){if(a.gzhead.extra){for(var r=a.pending,s=(65535&a.gzhead.extra.length)-a.gzindex;a.pending+s>a.pending_buf_size;){var o=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+o),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex+=o,xt(t),0!==a.pending)return a.last_flush=-1,tt;r=0,s-=o}var l=new Uint8Array(a.gzhead.extra);a.pending_buf.set(l.subarray(a.gzindex,a.gzindex+s),a.pending),a.pending+=s,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){var h,d=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),xt(t),0!==a.pending)return a.last_flush=-1,tt;d=0}h=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,At(a,h)}while(0!==h);a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){var _,f=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f)),xt(t),0!==a.pending)return a.last_flush=-1,tt;f=0}_=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,At(a,_)}while(0!==_);a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(xt(t),0!==a.pending))return a.last_flush=-1,tt;At(a,255&t.adler),At(a,t.adler>>8&255),t.adler=0}if(a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(0!==t.avail_in||0!==a.lookahead||e!==q&&a.status!==bt){var u=0===a.level?Ut(a,e):a.strategy===ot?function(t,e){for(var a;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):a.strategy===lt?function(t,e){for(var a,n,i,r,s=t.window;;){if(t.lookahead<=ut){if(St(t),t.lookahead<=ut&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){r=t.strstart+ut;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<r);t.match_length=ut-(r-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):It[a.level].func(a,e);if(3!==u&&4!==u||(a.status=bt),1===u||3===u)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===u&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(vt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et)},deflateEnd:function(t){if(Lt(t))return at;var e=t.state.status;return t.state=null,e===mt?gt(t,nt):tt},deflateSetDictionary:function(t,e){var a=e.length;if(Lt(t))return at;var n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==wt||n.lookahead)return at;if(1===i&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var r=new Uint8Array(n.w_size);r.set(e.subarray(a-n.w_size,a),0),e=r,a=n.w_size}var s=t.avail_in,o=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,St(n);n.lookahead>=3;){var h=n.strstart,d=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[h+3-1]),n.prev[h&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=h,h++}while(--d);n.strstart=h,n.lookahead=2,St(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=l,t.avail_in=s,n.wrap=i,tt},deflateInfo:"pako deflate (from Nodeca project)"};function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}var jt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Kt=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!==Ht(a))throw new TypeError(a+"must be non-object");for(var n in a)jt(a,n)&&(t[n]=a[n])}}return t},Pt=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var i=new Uint8Array(e),r=0,s=0,o=t.length;r<o;r++){var l=t[r];i.set(l,s),s+=l.length}return i},Yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Yt=!1}for(var Gt=new Uint8Array(256),Xt=0;Xt<256;Xt++)Gt[Xt]=Xt>=252?6:Xt>=248?5:Xt>=240?4:Xt>=224?3:Xt>=192?2:1;Gt[254]=Gt[254]=1;var Wt=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,i,r,s=t.length,o=0;for(i=0;i<s;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),r=0,i=0;r<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),a<128?e[r++]=a:a<2048?(e[r++]=192|a>>>6,e[r++]=128|63&a):a<65536?(e[r++]=224|a>>>12,e[r++]=128|a>>>6&63,e[r++]=128|63&a):(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63,e[r++]=128|a>>>6&63,e[r++]=128|63&a);return e},qt=function(t,e){var a,n,i=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));var r=new Array(2*i);for(n=0,a=0;a<i;){var s=t[a++];if(s<128)r[n++]=s;else{var o=Gt[s];if(o>4)r[n++]=65533,a+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&a<i;)s=s<<6|63&t[a++],o--;o>1?r[n++]=65533:s<65536?r[n++]=s:(s-=65536,r[n++]=55296|s>>10&1023,r[n++]=56320|1023&s)}}}return function(t,e){if(e<65534&&t.subarray&&Yt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}(r,n)},Jt=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Gt[t[a]]>e?a:e};var Qt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Vt=Object.prototype.toString,$t=K.Z_NO_FLUSH,te=K.Z_SYNC_FLUSH,ee=K.Z_FULL_FLUSH,ae=K.Z_FINISH,ne=K.Z_OK,ie=K.Z_STREAM_END,re=K.Z_DEFAULT_COMPRESSION,se=K.Z_DEFAULT_STRATEGY,oe=K.Z_DEFLATED;function le(t){this.options=Kt({level:re,method:oe,chunkSize:16384,windowBits:15,memLevel:8,strategy:se},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ne)throw new Error(j[a]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Wt(e.dictionary):"[object ArrayBuffer]"===Vt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=Mt.deflateSetDictionary(this.strm,n))!==ne)throw new Error(j[a]);this._dict_set=!0}}function he(t,e){var a=new le(e);if(a.push(t,!0),a.err)throw a.msg||j[a.err];return a.result}le.prototype.push=function(t,e){var a,n,i=this.strm,r=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ae:$t,"string"==typeof t?i.input=Wt(t):"[object ArrayBuffer]"===Vt.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(r),i.next_out=0,i.avail_out=r),(n===te||n===ee)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((a=Mt.deflate(i,n))===ie)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),a=Mt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ne;if(0!==i.avail_out){if(n>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},le.prototype.onData=function(t){this.chunks.push(t)},le.prototype.onEnd=function(t){t===ne&&(this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var de={Deflate:le,deflate:he,deflateRaw:function(t,e){return(e=e||{}).raw=!0,he(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,he(t,e)},constants:K},_e=16209,fe=function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=t.state;a=t.next_in,z=t.input,n=a+(t.avail_in-5),i=t.next_out,A=t.output,r=i-(e-t.avail_out),s=i+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,u=E.bits,c=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=c[f&m];e:for(;;){if(f>>>=p=g>>>24,u-=p,0===(p=g>>>16&255))A[i++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=c[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=_e;break t}v=65535&g,(p&=15)&&(u<p&&(f+=z[a++]<<u,u+=8),v+=f&(1<<p)-1,f>>>=p,u-=p),u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=w[f&b];a:for(;;){if(f>>>=p=g>>>24,u-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=_e;break t}if(k=65535&g,u<(p&=15)&&(f+=z[a++]<<u,(u+=8)<p&&(f+=z[a++]<<u,u+=8)),(k+=f&(1<<p)-1)>o){t.msg="invalid distance too far back",E.mode=_e;break t}if(f>>>=p,u-=p,k>(p=i-r)){if((p=k-p)>h&&E.sane){t.msg="invalid distance too far back",E.mode=_e;break t}if(y=0,x=_,0===d){if(y+=l-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}else if(d<p){if(y+=l+d-p,(p-=d)<v){v-=p;do{A[i++]=_[y++]}while(--p);if(y=0,d<v){v-=p=d;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}}else if(y+=d-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}for(;v>2;)A[i++]=x[y++],A[i++]=x[y++],A[i++]=x[y++],v-=3;v&&(A[i++]=x[y++],v>1&&(A[i++]=x[y++]))}else{y=i-k;do{A[i++]=A[y++],A[i++]=A[y++],A[i++]=A[y++],v-=3}while(v>2);v&&(A[i++]=A[y++],v>1&&(A[i++]=A[y++]))}break}}break}}while(a<n&&i<s);a-=v=u>>3,f&=(1<<(u-=v<<3))-1,t.next_in=a,t.next_out=i,t.avail_in=a<n?n-a+5:5-(a-n),t.avail_out=i<s?s-i+257:257-(i-s),E.hold=f,E.bits=u},ue=15,ce=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),we=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),me=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),be=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),ge=function(t,e,a,n,i,r,s,o){var l,h,d,_,f,u,c,w,m,b=o.bits,g=0,p=0,v=0,k=0,y=0,x=0,z=0,A=0,E=0,R=0,Z=null,S=new Uint16Array(16),U=new Uint16Array(16),D=null;for(g=0;g<=ue;g++)S[g]=0;for(p=0;p<n;p++)S[e[a+p]]++;for(y=b,k=ue;k>=1&&0===S[k];k--);if(y>k&&(y=k),0===k)return i[r++]=20971520,i[r++]=20971520,o.bits=1,0;for(v=1;v<k&&0===S[v];v++);for(y<v&&(y=v),A=1,g=1;g<=ue;g++)if(A<<=1,(A-=S[g])<0)return-1;if(A>0&&(0===t||1!==k))return-1;for(U[1]=0,g=1;g<ue;g++)U[g+1]=U[g]+S[g];for(p=0;p<n;p++)0!==e[a+p]&&(s[U[e[a+p]]++]=p);if(0===t?(Z=D=s,u=20):1===t?(Z=ce,D=we,u=257):(Z=me,D=be,u=0),R=0,p=0,g=v,f=r,x=y,z=0,d=-1,_=(E=1<<y)-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){c=g-z,s[p]+1<u?(w=0,m=s[p]):s[p]>=u?(w=D[s[p]-u],m=Z[s[p]-u]):(w=96,m=0),l=1<<g-z,v=h=1<<x;do{i[f+(R>>z)+(h-=l)]=c<<24|w<<16|m|0}while(0!==h);for(l=1<<g-1;R&l;)l>>=1;if(0!==l?(R&=l-1,R+=l):R=0,p++,0==--S[g]){if(g===k)break;g=e[a+s[p]]}if(g>y&&(R&_)!==d){for(0===z&&(z=y),f+=v,A=1<<(x=g-z);x+z<k&&!((A-=S[x+z])<=0);)x++,A<<=1;if(E+=1<<x,1===t&&E>852||2===t&&E>592)return 1;i[d=R&_]=y<<24|x<<16|f-r|0}}return 0!==R&&(i[f+R]=g-z<<24|64<<16|0),o.bits=y,0},pe=K.Z_FINISH,ve=K.Z_BLOCK,ke=K.Z_TREES,ye=K.Z_OK,xe=K.Z_STREAM_END,ze=K.Z_NEED_DICT,Ae=K.Z_STREAM_ERROR,Ee=K.Z_DATA_ERROR,Re=K.Z_MEM_ERROR,Ze=K.Z_BUF_ERROR,Se=K.Z_DEFLATED,Ue=16180,De=16190,Te=16191,Oe=16192,Ie=16194,Fe=16199,Le=16200,Ne=16206,Be=16209,Ce=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function Me(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var He,je,Ke=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode<Ue||e.mode>16211?1:0},Pe=function(t){if(Ke(t))return Ae;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ue,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ye},Ye=function(t){if(Ke(t))return Ae;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Pe(t)},Ge=function(t,e){var a;if(Ke(t))return Ae;var n=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Ae:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=a,n.wbits=e,Ye(t))},Xe=function(t,e){if(!t)return Ae;var a=new Me;t.state=a,a.strm=t,a.window=null,a.mode=Ue;var n=Ge(t,e);return n!==ye&&(t.state=null),n},We=!0,qe=function(t){if(We){He=new Int32Array(512),je=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ge(1,t.lens,0,288,He,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ge(2,t.lens,0,32,je,0,t.work,{bits:5}),We=!1}t.lencode=He,t.lenbits=9,t.distcode=je,t.distbits=5},Je=function(t,e,a,n){var i,r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),n>=r.wsize?(r.window.set(e.subarray(a-r.wsize,a),0),r.wnext=0,r.whave=r.wsize):((i=r.wsize-r.wnext)>n&&(i=n),r.window.set(e.subarray(a-n,a-n+i),r.wnext),(n-=i)?(r.window.set(e.subarray(a-n,a),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},Qe={inflateReset:Ye,inflateReset2:Ge,inflateResetKeep:Pe,inflateInit:function(t){return Xe(t,15)},inflateInit2:Xe,inflate:function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=0,R=new Uint8Array(4),Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ke(t)||!t.output||!t.input&&0!==t.avail_in)return Ae;(a=t.state).mode===Te&&(a.mode=Oe),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=ye;t:for(;;)switch(a.mode){case Ue:if(0===a.wrap){a.mode=Oe;break}for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=Be;break}if((15&h)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=Be;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:Te,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=Be;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,a.check=H(a.check,R,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&((u=a.length)>o&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(n.subarray(r,r+u),y)),512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=Be;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=Te;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}t.adler=a.check=Ce(h),h=0,d=0,a.mode=De;case De:if(0===a.havedict)return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,ze;t.adler=a.check=1,a.mode=Te;case Te:if(e===ve||e===ke)break t;case Oe:if(a.last){h>>>=7&d,d-=7&d,a.mode=Ne;break}for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}switch(a.last=1&h,d-=1,3&(h>>>=1)){case 0:a.mode=16193;break;case 1:if(qe(a),a.mode=Fe,e===ke){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=Be}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Be;break}if(a.length=65535&h,h=0,d=0,a.mode=Ie,e===ke)break t;case Ie:a.mode=16195;case 16195:if(u=a.length){if(u>o&&(u=o),u>l&&(u=l),0===u)break t;i.set(n.subarray(r,r+u),s),o-=u,r+=u,l-=u,s+=u,a.length-=u;break}a.mode=Te;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Be;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=ge(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=Be;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(A=m+2;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=Be;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===g){for(A=m+3;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=3+(7&(h>>>=m)),h>>>=3,d-=3}else{for(A=m+7;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=11+(127&(h>>>=m)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Be;break}for(;u--;)a.lens[a.have++]=y}}if(a.mode===Be)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Be;break}if(a.lenbits=9,z={bits:a.lenbits},x=ge(1,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=Be;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=ge(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=Be;break}if(a.mode=Fe,e===ke)break t;case Fe:a.mode=Le;case Le:if(o>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,fe(t,f),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,a.mode===Te&&(a.back=-1);break}for(a.back=0;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,v=b,k=g;b=(E=a.lencode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=Te;break}if(64&b){t.msg="invalid literal/length code",a.mode=Be;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;b=(E=a.distcode[h&(1<<a.distbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(0==(240&b)){for(p=m,v=b,k=g;b=(E=a.distcode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=Be;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Be;break}a.mode=16204;case 16204:if(0===l)break t;if(u=f-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Be;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),w=a.window}else w=i,c=s-a.offset,u=a.length;u>l&&(u=l),l-=u,a.length-=u;do{i[s++]=w[c++]}while(--u);0===a.length&&(a.mode=Le);break;case 16205:if(0===l)break t;i[s++]=a.length,l--,a.mode=Le;break;case Ne:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=n[r++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,s-f):C(a.check,i,f,s-f)),f=l,4&a.wrap&&(a.flags?h:Ce(h))!==a.check){t.msg="incorrect data check",a.mode=Be;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=Be;break}h=0,d=0}a.mode=16208;case 16208:x=xe;break t;case Be:x=Ee;break t;case 16210:return Re;default:return Ae}return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<Be&&(a.mode<Ne||e!==pe))&&Je(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,t.next_out-f):C(a.check,i,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(a.mode===Te?128:0)+(a.mode===Fe||a.mode===Ie?256:0),(0===_&&0===f||e===pe)&&x===ye&&(x=Ze),x},inflateEnd:function(t){if(Ke(t))return Ae;var e=t.state;return e.window&&(e.window=null),t.state=null,ye},inflateGetHeader:function(t,e){if(Ke(t))return Ae;var a=t.state;return 0==(2&a.wrap)?Ae:(a.head=e,e.done=!1,ye)},inflateSetDictionary:function(t,e){var a,n=e.length;return Ke(t)||0!==(a=t.state).wrap&&a.mode!==De?Ae:a.mode===De&&C(1,e,n,0)!==a.check?Ee:Je(t,e,n,n)?(a.mode=16210,Re):(a.havedict=1,ye)},inflateInfo:"pako inflate (from Nodeca project)"};var Ve=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},$e=Object.prototype.toString,ta=K.Z_NO_FLUSH,ea=K.Z_FINISH,aa=K.Z_OK,na=K.Z_STREAM_END,ia=K.Z_NEED_DICT,ra=K.Z_STREAM_ERROR,sa=K.Z_DATA_ERROR,oa=K.Z_MEM_ERROR;function la(t){this.options=Kt({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Qe.inflateInit2(this.strm,e.windowBits);if(a!==aa)throw new Error(j[a]);if(this.header=new Ve,Qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Wt(e.dictionary):"[object ArrayBuffer]"===$e.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Qe.inflateSetDictionary(this.strm,e.dictionary))!==aa))throw new Error(j[a])}function ha(t,e){var a=new la(e);if(a.push(t),a.err)throw a.msg||j[a.err];return a.result}la.prototype.push=function(t,e){var a,n,i,r=this.strm,s=this.options.chunkSize,o=this.options.dictionary;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ea:ta,"[object ArrayBuffer]"===$e.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(a=Qe.inflate(r,n))===ia&&o&&((a=Qe.inflateSetDictionary(r,o))===aa?a=Qe.inflate(r,n):a===sa&&(a=ia));r.avail_in>0&&a===na&&r.state.wrap>0&&0!==t[r.next_in];)Qe.inflateReset(r),a=Qe.inflate(r,n);switch(a){case ra:case sa:case ia:case oa:return this.onEnd(a),this.ended=!0,!1}if(i=r.avail_out,r.next_out&&(0===r.avail_out||a===na))if("string"===this.options.to){var l=Jt(r.output,r.next_out),h=r.next_out-l,d=qt(r.output,l);r.next_out=h,r.avail_out=s-h,h&&r.output.set(r.output.subarray(l,l+h),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==aa||0!==i){if(a===na)return a=Qe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},la.prototype.onData=function(t){this.chunks.push(t)},la.prototype.onEnd=function(t){t===aa&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var da={Inflate:la,inflate:ha,inflateRaw:function(t,e){return(e=e||{}).raw=!0,ha(t,e)},ungzip:ha,constants:K},_a=de.Deflate,fa=de.deflate,ua=de.deflateRaw,ca=de.gzip,wa=da.Inflate,ma=da.inflate,ba=da.inflateRaw,ga=da.ungzip,pa=K,va={Deflate:_a,deflate:fa,deflateRaw:ua,gzip:ca,Inflate:wa,inflate:ma,inflateRaw:ba,ungzip:ga,constants:pa};t.Deflate=_a,t.Inflate=wa,t.constants=pa,t.default=va,t.deflate=fa,t.deflateRaw=ua,t.gzip=ca,t.inflate=ma,t.inflateRaw=ba,t.ungzip=ga,Object.defineProperty(t,"__esModule",{value:!0})}));
var rough=function(){"use strict";function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&"number"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;e<t.length-1;e++){const s=t[e],n=t[e+1];if(s[1]!==n[1]){const t=Math.min(s[1],n[1]);h.push({ymin:t,ymax:Math.max(s[1],n[1]),x:t===s[1]?s[0]:n[0],islope:(n[0]-s[0])/(n[1]-s[1])})}}if(h.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;e<h.length&&!(h[e].ymin>i);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t<r.length;t+=2){const e=t+1;if(e>=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:"fillSketch",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t<c;t++){const a=p+l+t*n,r=u-h+2*Math.random()*h,i=a-h+2*Math.random()*h,c=this.helper.ellipse(r,i,o,o,e);s.push(...c.ops)}}return{type:"fillSketch",ops:s}}}class c{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){const s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,n=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach((t=>{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t<r;t++){const a=t*(s+n),h=a+s,r=[c[0]+a*Math.cos(u)+i*Math.cos(u),c[1]+a*Math.sin(u)+i*Math.sin(u)],l=[c[0]+h*Math.cos(u)+i*Math.cos(u),c[1]+h*Math.sin(u)+i*Math.sin(u)];o.push(...this.helper.doubleLineOps(r[0],r[1],l[0],l[1],e))}})),o}}class l{constructor(t){this.helper=t}fillPolygons(t,e){const s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,o=e.zigzagOffset<0?s:e.zigzagOffset,a=n(t,e=Object.assign({},e,{hachureGap:s+o}));return{type:"fillSketch",ops:this.zigzagLines(a,o,e)}}zigzagLines(t,e,s){const n=[];return t.forEach((t=>{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;t<h;t++){const o=2*t*e,a=2*(t+1)*e,h=Math.sqrt(2*Math.pow(e,2)),i=[r[0]+o*Math.cos(c),r[1]+o*Math.sin(c)],l=[r[0]+a*Math.cos(c),r[1]+a*Math.sin(c)],u=[i[0]+h*Math.cos(c+Math.PI/4),i[1]+h*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(i[0],i[1],u[0],u[1],s),...this.helper.doubleLineOps(u[0],u[1],l[0],l[1],s))}})),n}}const u={};class p{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f=0,d=1,g=2,M={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function k(t,e){return t.type===e}function b(t){const e=[],s=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:f,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:d,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:g,text:""},e}(t);let n="BOD",o=0,a=s[o];for(;!k(a,g);){let h=0;const r=[];if("BOD"===n){if("M"!==a.text&&"m"!==a.text)return b("M0,0"+t);o++,h=M[a.text],n=a.text}else k(a,d)?h=M[n]:(o++,h=M[a.text],n=a.text);if(!(o+h<s.length))throw new Error("Path data ended short");for(let t=o;t<o+h;t++){const e=s[t];if(!k(e,d))throw new Error("Param not a number: "+n+","+e.text);r[r.length]=+e.text}if("number"!=typeof M[n])throw new Error("Bad segment: "+n);{const t={key:n,data:r};e.push(t),o+=h,a=s[o],"M"===n&&(n="L"),"m"===n&&(n="l")}}return e}function y(t){let e=0,s=0,n=0,o=0;const a=[];for(const{key:h,data:r}of t)switch(h){case"M":a.push({key:"M",data:[...r]}),[e,s]=r,[n,o]=r;break;case"m":e+=r[0],s+=r[1],a.push({key:"M",data:[e,s]}),n=e,o=s;break;case"L":a.push({key:"L",data:[...r]}),[e,s]=r;break;case"l":e+=r[0],s+=r[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...r]}),e=r[4],s=r[5];break;case"c":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...r]}),e=r[2],s=r[3];break;case"q":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...r]}),e=r[5],s=r[6];break;case"a":e+=r[5],s+=r[6],a.push({key:"A",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case"H":a.push({key:"H",data:[...r]}),e=r[0];break;case"h":e+=r[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...r]}),s=r[0];break;case"v":s+=r[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...r]}),e=r[2],s=r[3];break;case"s":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...r]}),e=r[0],s=r[1];break;case"t":e+=r[0],s+=r[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s="",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case"M":e.push({key:"M",data:[...l]}),[n,o]=l,[a,h]=l;break;case"C":e.push({key:"C",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case"L":e.push({key:"L",data:[...l]}),[n,o]=l;break;case"H":n=l[0],e.push({key:"L",data:[n,o]});break;case"V":o=l[0],e.push({key:"L",data:[n,o]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:"C",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case"T":{const[t,a]=l;let h=0,c=0;"Q"===s||"T"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:"C",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case"Q":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:"C",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case"A":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:"C",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:"C",data:t})})),n=i,o=c}break}case"Z":e.push({key:"Z",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),t<g&&(f=Math.PI-f),s<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),i&&f>d&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e<p.length;e+=3){const s=w(p[e][0],p[e][1],l),n=w(p[e+1][0],p[e+1][1],l),o=w(p[e+2][0],p[e+2][1],l);t.push([s[0],s[1],n[0],n[1],o[0],o[1]])}return t}}const P={randOffset:function(t,e){return G(t,e)},randOffsetWithRange:function(t,e,s){return E(t,e,s)},ellipse:function(t,e,s,n,o){const a=T(s,n,o);return D(t,e,o,a).opset},doubleLineOps:function(t,e,s,n,o){return $(t,e,s,n,o,!0)}};function v(t,e,s,n,o){return{type:"path",ops:$(t,e,s,n,o)}}function S(t,e,s){const n=(t||[]).length;if(n>2){const o=[];for(let e=0;e<n-1;e++)o.push(...$(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&o.push(...$(t[n-1][0],t[n-1][1],t[0][0],t[0][1],s)),{type:"path",ops:o}}return 2===n?v(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function O(t,e,s,n,o){return function(t,e){return S(t,!0,e)}([[t,e],[t+s,e],[t+s,e+n],[t,e+n]],o)}function L(t,e){if(t.length){const s="number"==typeof t[0][0]?[t]:t,n=j(s[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:j(s[0],1.5*(1+.22*e.roughness),z(e));for(let t=1;t<s.length;t++){const a=s[t];if(a.length){const t=j(a,1*(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:j(a,1.5*(1+.22*e.roughness),z(e));for(const e of t)"move"!==e.op&&n.push(e);for(const t of s)"move"!==t.op&&o.push(t)}}return{type:"path",ops:n.concat(o)}}return{type:"path",ops:[]}}function T(t,e,s){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/o;let h=Math.abs(t/2),r=Math.abs(e/2);const i=1-s.curveFitting;return h+=G(h*i,s),r+=G(r*i,s),{increment:a,rx:h,ry:r}}function D(t,e,s,n){const[o,a]=F(n.increment,t,e,n.rx,n.ry,1,n.increment*E(.1,E(.4,1,s),s),s);let h=q(o,null,s);if(!s.disableMultiStroke&&0!==s.roughness){const[o]=F(n.increment,t,e,n.rx,n.ry,1.5,0,s),a=q(o,null,s);h=h.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function A(t,e,s,n,o,a,h,r,i){const c=t,l=e;let u=Math.abs(s/2),p=Math.abs(n/2);u+=G(.01*u,i),p+=G(.01*p,i);let f=o,d=a;for(;f<0;)f+=2*Math.PI,d+=2*Math.PI;d-f>2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:"path",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case"M":a=[h[0],h[1]],o=[h[0],h[1]];break;case"L":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case"C":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case"Z":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:"move",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a<o;a++)s.push({op:"lineTo",data:[n[a][0]+G(t,e),n[a][1]+G(t,e)]})}}return{type:"fillPath",ops:s}}function C(t,e){return function(t,e){let s=t.fillStyle||"hachure";if(!u[s])switch(s){case"zigzag":u[s]||(u[s]=new h(e));break;case"cross-hatch":u[s]||(u[s]=new r(e));break;case"dots":u[s]||(u[s]=new i(e));break;case"dashed":u[s]||(u[s]=new c(e));break;case"zigzag-line":u[s]||(u[s]=new l(e));break;default:s="hachure",u[s]||(u[s]=new o(e))}return u[s]}(e,P).fillPolygons(t,e)}function z(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function W(t){return t.randomizer||(t.randomizer=new p(t.seed||0)),t.randomizer.next()}function E(t,e,s,n=1){return s.roughness*n*(W(s)*(e-t)+t)}function G(t,e,s=1){return E(-t,t,e,s)}function $(t,e,s,n,o,a=!1){const h=a?o.disableMultiStrokeFill:o.disableMultiStroke,r=R(t,e,s,n,o,!0,!1);if(h)return r;const i=R(t,e,s,n,o,!0,!0);return r.concat(i)}function R(t,e,s,n,o,a,h){const r=Math.pow(t-s,2)+Math.pow(e-n,2),i=Math.sqrt(r);let c=1;c=i<200?1:i>500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:"move",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:"move",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:"bcurveTo",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o<t.length;o++)n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]),o===t.length-1&&n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]);return q(n,null,s)}function q(t,e,s){const n=t.length,o=[];if(n>3){const a=[],h=1-s.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;e++){const s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(h*t[e+1][0]-h*t[e-1][0])/6,s[1]+(h*t[e+1][1]-h*t[e-1][1])/6],a[2]=[t[e+1][0]+(h*t[e][0]-h*t[e+2][0])/6,t[e+1][1]+(h*t[e][1]-h*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=s.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+G(t,s),e[1]+G(t,s)]})}}else 3===n?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return o}function F(t,e,s,n,o,a,h,r){const i=[],c=[];if(0===r.roughness){t/=4,c.push([e+n*Math.cos(-t),s+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+n*Math.cos(a),s+o*Math.sin(a)];i.push(t),c.push(t)}c.push([e+n*Math.cos(0),s+o*Math.sin(0)]),c.push([e+n*Math.cos(t),s+o*Math.sin(t)])}else{const l=G(.5,r)-Math.PI/2;c.push([G(a,r)+e+.9*n*Math.cos(l-t),G(a,r)+s+.9*o*Math.sin(l-t)]);const u=2*Math.PI+l-.01;for(let h=l;h<u;h+=t){const t=[G(a,r)+e+n*Math.cos(h),G(a,r)+s+o*Math.sin(h)];i.push(t),c.push(t)}c.push([G(a,r)+e+n*Math.cos(l+2*Math.PI+.5*h),G(a,r)+s+o*Math.sin(l+2*Math.PI+.5*h)]),c.push([G(a,r)+e+.98*n*Math.cos(l+h),G(a,r)+s+.98*o*Math.sin(l+h)]),c.push([G(a,r)+e+.9*n*Math.cos(l+.5*h),G(a,r)+s+.9*o*Math.sin(l+.5*h)])}return[c,i]}function V(t,e,s,n,o,a,h,r,i){const c=a+G(.1,i),l=[];l.push([G(r,i)+e+.9*n*Math.cos(c-t),G(r,i)+s+.9*o*Math.sin(c-t)]);for(let a=c;a<=h;a+=t)l.push([G(r,i)+e+n*Math.cos(a),G(r,i)+s+o*Math.sin(a)]);return l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),q(l,null,i)}function Z(t,e,s,n,o,a,h,r){const i=[],c=[r.maxRandomnessOffset||1,(r.maxRandomnessOffset||1)+.3];let l=[0,0];const u=r.disableMultiStroke?1:2,p=r.preserveVertices;for(let f=0;f<u;f++)0===f?i.push({op:"move",data:[h[0],h[1]]}):i.push({op:"move",data:[h[0]+(p?0:G(c[0],r)),h[1]+(p?0:G(c[0],r))]}),l=p?[o,a]:[o+G(c[f],r),a+G(c[f],r)],i.push({op:"bcurveTo",data:[t+G(c[f],r),e+G(c[f],r),s+G(c[f],r),n+G(c[f],r),l[0],l[1]]});return i}function Q(t){return[...t]}function H(t,e=0){const s=t.length;if(s<3)throw new Error("A curve must have at least three points.");const n=[];if(3===s)n.push(Q(t[0]),Q(t[1]),Q(t[2]),Q(t[2]));else{const s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);const o=[],a=1-e;n.push(Q(s[0]));for(let t=1;t+2<s.length;t++){const e=s[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],o[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],o[3]=[s[t+1][0],s[t+1][1]],n.push(o[1],o[2],o[3])}}return n}function N(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function B(t,e,s){const n=N(e,s);if(0===n)return N(t,e);let o=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/n;return o=Math.max(0,Math.min(1,o)),N(t,J(e,s,o))}function J(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function K(t,e,s,n){const o=n||[];if(function(t,e){const s=t[e+0],n=t[e+1],o=t[e+2],a=t[e+3];let h=3*n[0]-2*s[0]-a[0];h*=h;let r=3*n[1]-2*s[1]-a[1];r*=r;let i=3*o[0]-2*a[0]-s[0];i*=i;let c=3*o[1]-2*a[1]-s[1];return c*=c,h<i&&(h=i),r<c&&(r=c),h+r}(t,e)<s){const s=t[e+0];if(o.length){(a=o[o.length-1],h=s,Math.sqrt(N(a,h)))>1&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;n<s-1;++n){const e=B(t[n],h,r);e>i&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s<o;s++){K(t,3*s,e,n)}return s&&s>0?X(n,0,n.length,s):n}const tt="none";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d("line",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];"solid"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d("rectangle",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if("solid"===a.fillStyle){const s=D(t,e,a,r).opset;s.type="fillPath",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d("ellipse",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape="circle",o}linearPath(t,e){const s=this._o(e);return this._d("linearPath",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if("solid"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type="fillPath",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d("arc",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if("solid"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d("curve",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&("solid"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d("polygon",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d("path",n,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=s.fill&&"transparent"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case"M":c(),h=[e[0],e[1]],a.push(h);break;case"L":i(),a.push([e[0],e[1]]);break;case"C":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case"Z":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if("solid"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d("path",n,s)}opsToPath(t,e){let s="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case"fillPath":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case"fillSketch":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===s.stroke?"transparent":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=s.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,o,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||"",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n="nonzero"){t.beginPath();for(const n of e.ops){const e="number"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt="http://www.w3.org/2000/svg";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case"path":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke",s.stroke),e.setAttribute("stroke-width",s.strokeWidth+""),e.setAttribute("fill","none"),s.strokeLineDash&&e.setAttribute("stroke-dasharray",s.strokeLineDash.join(" ").trim()),s.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${s.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",s.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,"path");return o.setAttribute("d",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute("stroke",s.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),s.fillLineDash&&o.setAttribute("stroke-dasharray",s.fillLineDash.join(" ").trim()),s.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}return{canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()}}();
@@ -30,7 +30,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.13",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -89,17 +89,17 @@ b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=
isRgbColor:function(a){return mxUtils.rgbaColorRegex.test(a)},isValidColor:function(a){if(null==a)return!1;a=String(a).replace(/\s/g,"");if(a.toLowerCase()==mxUtils.normalizedValidInvalidColor)return!0;mxUtils.canvasContext.fillStyle=mxUtils.validInvalidColor;mxUtils.canvasContext.fillStyle=a;return mxUtils.canvasContext.fillStyle!=mxUtils.validInvalidColor},isDarkColor:function(a){a=mxUtils.parseColor(a);return null!=a?128>.213*a.r+.715*a.g+.072*a.b:!1},parseLightDarkColor:function(a,b,c){var d=
a,e=null;null!=a&&(a=a.match(mxUtils.lightDarkColorRegex))&&3===a.length&&(d=mxUtils.trim(a[1]),e=mxUtils.trim(a[2]));null==e&&(c||mxUtils.isVarColor(d))&&(e=d);e=null!=e?e:null!=b?b:mxUtils.getInverseColor(d);return{light:d,dark:e}},getInverseColor:function(a,b,c){function d(m){return Math.round(b/100*(255-m)+m*(1-b/100))}function e(m){return Math.round(Math.max(0,Math.min(255,m)))}c=null!=c?c:180;b=null!=b?b:93;var f=0,g=0,k=0;if("transparent"==a.toLowerCase())return a;k=mxUtils.parseColor(a);if(null==
k)return a;f=k.r;g=k.g;k=k.b;f=d(f);g=d(g);k=d(k);a=[1,0,0,0,1,0,0,0,1];var l=Math.cos(c*Math.PI/180);c=Math.sin(c*Math.PI/180);a[0]=.2126+.7874*l-.2126*c;a[1]=.7152-.7152*l-.7152*c;a[2]=.0722-.0722*l+.9278*c;a[3]=.2126-.2126*l+.143*c;a[4]=.7152+(1-.7152)*l+.14*c;a[5]=.0722-.0722*l-.283*c;a[6]=.2126-.2126*l-.7874*c;a[7]=.7152-.7152*l+.7152*c;a[8]=.0722+.9278*l+.0722*c;c=e(a[0]*f+a[1]*g+a[2]*k);l=e(a[3]*f+a[4]*g+a[5]*k);f=e(a[6]*f+a[7]*g+a[8]*k);return"#"+(16777216|c<<16|l<<8|f).toString(16).slice(1)},
-addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?"light-dark("+e.light+", "+e.dark+")":mxUtils.preferDarkColor?
-e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText="light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===Element)d=a.cloneNode(null!=c?!c:!1);else{d=
-new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/
-180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
+addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?e.light==e.dark?e.light:"light-dark("+e.light+
+", "+e.dark+")":mxUtils.preferDarkColor?e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText=b.light==b.dark?b.light:"light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===
+Element)d=a.cloneNode(null!=c?!c:!1);else{d=new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);
+d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);
+d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
reversePortConstraints:function(a){var 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,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,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=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,
@@ -1973,9 +1973,9 @@ OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.
function Dialog(b,e,g,m,u,p,B,H,S,G,O){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&
(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);
u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),
-p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(I){K=!0}),null,mxUtils.bind(this,function(I){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var I=G();null!=I&&(c=g=I.w,f=m=I.h)}I=Editor.inlineFullscreen||
-null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=I.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);I=Math.max(1,Math.round((I.width-g-l)/2));var ca=Math.max(1,Math.round((z-m-b.footerHeight)/3));ca=this.getPosition(I,ca,g,m);I=ca.x;ca=ca.y;var da=mxUtils.getDocumentScrollOrigin(document);I+=da.x;
-ca+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ca+=b.embedViewport.y,I+=b.embedViewport.x);N.style.left=I+"px";N.style.top=ca+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=I+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=
+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||
+null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var ea=Math.max(1,Math.round((z-m-b.footerHeight)/3));ea=this.getPosition(J,ea,g,m);J=ea.x;ea=ea.y;var da=mxUtils.getDocumentScrollOrigin(document);J+=da.x;
+ea+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ea+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=ea+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ea+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=
B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2006,10 +2006,10 @@ PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=documen
B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));
H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var O=document.createElement("input");O.setAttribute("size","7");O.setAttribute("title",mxResources.get("width"));O.style.textAlign="right";G.appendChild(O);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);
var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display=
-"none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var I=C[K];null!=I.format&&("a4"==I.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==I.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=
-583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==I.format.width&&g.height==I.format.height?(B.value=I.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==I.format.height&&g.height==I.format.width&&(B.value=I.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?
-(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,I){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",
-H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));I||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});
+"none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var J=C[K];null!=J.format&&("a4"==J.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==J.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=
+583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==J.format.width&&g.height==J.format.height?(B.value=J.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==J.format.height&&g.height==J.format.width&&(B.value=J.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?
+(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",
+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});
mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(O,"blur",N);mxEvent.addListener(O,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){O.value=Editor.toUnit(Editor.fromUnit(O.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,
Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:O,heightInput:R}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
@@ -2031,41 +2031,42 @@ B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.is
mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var O=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=O&&this.gridColor!=O.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(O=G.background);if(G.isGridEnabled()||G.gridVisible){l=
10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*
this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=O,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=
-"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=
-function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
-H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();
-H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,I=0;I<=K;I++){var ca=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),
-Math.round(f.y+(I+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(I+1)*l.height))]:[new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(F))];null!=N[I]?(N[I].points=ca,N[I].redraw()):(ca=new mxPolyline(ca,this.pageBreakColor),ca.dialect=this.dialect,ca.isDashed=this.pageBreakDashed,ca.pointerEvents=!1,ca.init(this.view.backgroundPane),ca.redraw(),N[I]=ca)}for(I=K;I<N.length;I++)null!=N[I]&&N[I].destroy();N.splice(K,N.length-K)}});
-B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,
-O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||
-this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var X=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return X};u.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
-0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(X){for(var ba=X.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{u.getModel().isEdge(X)?
-S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(X,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(X)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[X],"force",!0));u.getModel().isEdge(X)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=
-u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(X,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(X,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(X){null==X&&(X=window.event);return u.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||
+"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,
+G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+
+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;
+mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=
+this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=
+0;J<=K;J++){var ea=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=ea,N[J].redraw()):(ea=new mxPolyline(ea,this.pageBreakColor),ea.dialect=this.dialect,ea.isDashed=this.pageBreakDashed,ea.pointerEvents=!1,ea.init(this.view.backgroundPane),ea.redraw(),N[J]=ea)}for(J=
+K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=
+mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/
+this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,
+H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=
+mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),
+O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);
+O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return W};u.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
+0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(W){try{u.getModel().isEdge(W)?
+S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=
+u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(W,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(W,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(W){null==W&&(W=window.event);return u.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||
this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&
-(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",
-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ba=mxEvent.getSource(X);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||
+(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var W=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",
+"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||
9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var O=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();O.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,
-"mousemove",mxUtils.bind(this,function(X){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,
-function(X){16==X.which?this.shiftDown=!0:32!=X.which||u.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(X)!=u.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(X){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(X){return f.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&
-mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ba=[];null!=X;){var ha=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ba.push(X));
-X=ha}X=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=X;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var X=!1,ba=function(){X||(X=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();
-null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));X=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var I=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(X,ba){try{I.apply(this,
-arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(X){}var ca=u.fireMouseEvent;u.fireMouseEvent=function(X,ba,ha){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(X,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=
-!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ba,ha){this.menus.createPopupMenu(X,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(X,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=
-m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ba){X=ba.getProperty("force");(this.updateDefaultStyle||X)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||
+"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,
+function(W){16==W.which?this.shiftDown=!0:32!=W.which||u.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(W)!=u.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
+var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(W){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(W){return f.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&
+mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ha=W.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,W)&&(W.parentNode.removeChild(W),ba.push(W));
+W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();
+null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));W=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(W,ba){try{J.apply(this,
+arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var ea=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(W,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=
+!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ha){this.menus.createPopupMenu(W,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=
+m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||
Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||
null==u.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==u.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+
")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(ba=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("+
-Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(X=ha.style[mxConstants.STYLE_FONTFAMILY]||X,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,
-b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(X,ba){X=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=X&&0<X.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var X=u.getLayerForCells(u.getSelectionCells());null!=X&&u.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,
-function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ea=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ea&&window.clearTimeout(ea);ea=window.setTimeout(mxUtils.bind(this,function(){ea=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,
+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var W=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(W=ha.style[mxConstants.STYLE_FONTFAMILY]||W,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<W.length&&(W=W.substring(0,8)+"..."));this.toolbar.setFontName(W);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,
+b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(W,ba){W=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=W&&0<W.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var W=u.getLayerForCells(u.getSelectionCells());null!=W&&u.setDefaultParent(W)}});this.gestureHandler=mxUtils.bind(this,
+function(W){null!=this.currentMenu&&mxEvent.getSource(W)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,
"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,
function(){u.view.validateBackground()}));u.addListener("gridSizeChanged",mxUtils.bind(this,function(){u.isGridEnabled()&&u.view.validateBackground()}));this.editor.resetGraph()}this.init();u.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,g){function m(H,S){var G=p;p+=S;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2120,42 +2121,42 @@ EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipb
0),c=0;c<G.length;c++){O.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!O.isEdge(B[c])&&null==S[mxObjectIdentity.get(O.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*T.width),this.scale*(this.translate.y+P.y*T.height),this.scale*P.width*T.width,
-this.scale*P.height*T.height)};b.getPreferredPageSize=function(P,T,W){P=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,P.width*T.width,P.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,T,W,aa){if(null!=b.container&&!b.isViewer()){W=null!=W?W:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,
-wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(T||1,Ea/wa.width)):qa;T=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(T=Math.max(T,0),ra=Math.max(ra,
-0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(T-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=W||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+W/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*U.width),this.scale*(this.translate.y+P.y*U.height),this.scale*P.width*U.width,
+this.scale*P.height*U.height)};b.getPreferredPageSize=function(P,U,X){P=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,P.width*U.width,P.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,U,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,
+wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(U||1,Ea/wa.width)):qa;U=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(U=Math.max(U,0),ra=Math.max(ra,
+0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(U-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,T,W){B++;
-var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=W&&aa.setAttribute("title",W);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",T);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,U,X){B++;
+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=X&&aa.setAttribute("title",X);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",U);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=
H;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=
mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var O=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,P+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());
S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());O.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";O.style.paddingLeft="4px";O.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(O.style.display="",S.style.display="",G.style.display="inline-block"):
-(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var T=new mxPopupMenu(f.funct);T.div.className+=" geMenubarMenu";T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var W=mxUtils.getOffset(G);T.popup(W.x,W.y+G.offsetHeight,null,P);mxEvent.addListener(T.div,
-"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?
+(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var U=new mxPopupMenu(f.funct);U.div.className+=" geMenubarMenu";U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var X=mxUtils.getOffset(G);U.popup(X.x,X.y+G.offsetHeight,null,P);mxEvent.addListener(U.div,
+"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),
600)}),P||200)}),C=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
-T.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var I=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=
-I?window.location.href=I:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
+U.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=
+J?window.location.href=J:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
document.body))&&p(mxUtils.bind(this,function(P){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||
(mxEvent.isShiftDown(P)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?z():C(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ca=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,T){},mouseUp:function(P,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ca&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ca&&Math.abs(this.startX-T.getGraphX())<ca&&Math.abs(this.startY-T.getGraphY())<ca&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ea=new mxPoint,X=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;X=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
-!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ea,1);var T=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var W=b.getPageSize();P=T.x-(this.x0||0)*W.width;T=T.y-(this.y0||0)*W.height;if(this.translate.x!=P||this.translate.y!=T)this.invalidate(),this.translate.x=P,this.translate.y=T}da.apply(this,arguments)};
-if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),W=this.getDefaultTranslate(T),aa=this.view.translate.x,ja=this.view.translate.y;if(W.x!=aa||W.y!=ja){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(W.x,W.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((W.x-aa)*this.view.scale),this.container.scrollTop+=
-Math.round((W.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,J=null,U=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&
+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ea=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,U){},mouseUp:function(P,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ea&&Math.abs(this.scrollTop-b.container.scrollTop)<
+ea&&Math.abs(this.startX-U.getGraphX())<ea&&Math.abs(this.startY-U.getGraphY())<ea&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
+!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ca,1);var U=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var X=b.getPageSize();P=U.x-(this.x0||0)*X.width;U=U.y-(this.y0||0)*X.height;if(this.translate.x!=P||this.translate.y!=U)this.invalidate(),this.translate.x=P,this.translate.y=U}da.apply(this,arguments)};
+if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),X=this.getDefaultTranslate(U),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=
+Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,I=null,T=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&
(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",ma.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",ma.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";ma.style.transform=""},0)):(Y.style.transform="",ma.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=
-"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),W=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+W.x,pa=b.container.offsetHeight/2-Z.y+W.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=T.x-k.x,pa+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=
-ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=J&&Y.setAttribute("filter",J);b.cumulativeZoomFactor=1;J=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,T,W,aa){aa=null!=aa?aa:this.zoomFactor;(T=T||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+"");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=U.x-k.x,pa+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=
+ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,U,X,aa){aa=null!=aa?aa:this.zoomFactor;(U=U||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,
-160))/this.view.scale;if(b.isFastZoomEnabled()){null==J&&""!=Y.getAttribute("filter")&&(J=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=T||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=T||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-
-b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(T||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Z?b.container.clientHeight/
-2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}U(b.isFastZoomEnabled()?W:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},
-null,function(P){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,T,W,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!W&&b.isScrollWheelEvent(P))W=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(W.x+(T?-aa:aa),W.y):b.view.setTranslate(W.x,W.y+(T?
-aa:-aa));else if(W||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=W,W=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?W=1+Math.abs(P.deltaY)/20*(W-1):null!=P.movementY&&"pointermove"==P.type&&(W=1+Math.max(1,Math.abs(P.movementY))/20*(W-1),aa=-1),b.lazyZoom(T,null,aa,W),mxEvent.consume(P),
+160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=U||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=U||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-
+b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(U||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(U||null==Z?b.container.clientHeight/
+2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}T(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},
+null,function(P){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,U,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(P))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(X.x+(U?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(U?
+aa:-aa));else if(X||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=X,X=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?X=1+Math.abs(P.deltaY)/20*(X-1):null!=P.movementY&&"pointermove"==P.type&&(X=1+Math.max(1,Math.abs(P.movementY))/20*(X-1),aa=-1),b.lazyZoom(U,null,aa,X),mxEvent.consume(P),
!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};
EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2246,8 +2247,8 @@ EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76
EditorUi.prototype.createKeyHandler=function(b){function e(R,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==R?z.width=Math.max(0,z.width-c):38==R?z.height=Math.max(0,z.height-c):39==R?z.width+=c:40==R&&(z.height+=c),m.getModel().setGeometry(l[t],
z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==R||38==R?m.model.add(z,t,Math.max(0,c-1)):(39==R||40==R)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=
l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||
-90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&(null==
-g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?
+90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode&&83!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&
+(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?
c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],
!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},
c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,O=u.escape;u.escape=function(R){O.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,
@@ -2271,33 +2272,33 @@ mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("d
(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();
(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var O=G.getElementsByTagName("img");0<O.length&&(O[0].className="geToolbarButton geAdaptiveAsset",O[0].style.margin="4px",O[0].style.width="18px")}return G}})();
Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);
-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var J=this.selectionCellsHandler.getHandler(A.cell);
-if(null==J||null==J.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;J=P+2;U.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()-J)&&mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()+J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()+
-J,Z.getGraphY()-J))){var T=this.model.getParent(A.cell);J=this.model.getParent(T);if(!this.isCellSelected(J)){P*=k;var W=2*P;if(this.model.getChildAt(J,0)!=T&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-P,A.width,W))||this.model.getChildAt(T,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-P,A.y,W,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-P,A.width,W))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-P,A.y,W,A.height)))T=this.selectionCellsHandler.isHandled(J),this.selectCellForEvent(J,
-Z.getEvent()),J=this.selectionCellsHandler.getHandler(J),null!=J&&(P=J.getHandleForEvent(Z),null!=P&&(J.start(Z.getGraphX(),Z.getGraphY(),P),J.blockDelayedSelection=!T,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(J=this.getActualStartSize(A.cell),(0<J.x||0<J.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(J.x-J.width-1)*k+(0==J.x?A.width:0),A.y,1,A.height))||(0<J.y||
-0<J.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(J.y-J.height-1)*k+(0==J.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),J=this.selectionCellsHandler.getHandler(A.cell),null!=J&&null!=J.customHandles&&(P=mxEvent.CUSTOM_HANDLE-J.customHandles.length+1,J.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&
+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);
+if(null==I||null==I.getHandleForEvent(Z)){var T=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=P+2;T.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+
+I,Z.getGraphY()-I))){var U=this.model.getParent(A.cell);I=this.model.getParent(U);if(!this.isCellSelected(I)){P*=k;var X=2*P;if(this.model.getChildAt(I,0)!=U&&mxUtils.intersects(T,new mxRectangle(A.x,A.y-P,A.width,X))||this.model.getChildAt(U,0)!=A.cell&&mxUtils.intersects(T,new mxRectangle(A.x-P,A.y,X,A.height))||mxUtils.intersects(T,new mxRectangle(A.x,A.y+A.height-P,A.width,X))||mxUtils.intersects(T,new mxRectangle(A.x+A.width-P,A.y,X,A.height)))U=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,
+Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(P=I.getHandleForEvent(Z),null!=P&&(I.start(Z.getGraphX(),Z.getGraphY(),P),I.blockDelayedSelection=!U,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(T,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||
+0<I.height)&&mxUtils.intersects(T,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(P=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&
this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),O=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));
-this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var J=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>J||Math.abs(B.y-k.getGraphY())>J){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=
-U.bends&&0<U.bends.length){U.redrawHandles();var P=null!=G?G:U.getHandleForEvent(H),T=this.view.getEdgeStyle(A),W=T==mxEdgeStyle.EntityRelation;J=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=J&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,J[0].x,J[0].y)?P=0:mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?P=U.bends.length-1:null!=J&&(null==T&&null==P||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&
-(null!=T&&(2==J.length||3==J.length&&(0==Math.round(J[0].x-J[1].x)&&0==Math.round(J[1].x-J[2].x)||0==Math.round(J[0].y-J[1].y)&&0==Math.round(J[1].y-J[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==T?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==U.bends.length-1;if(!W&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?
-this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==
-Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),J=A.absolutePoints,null!=J)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,J[0].x,J[0].y)||mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(A),T==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&
-T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<J.length-1&&0<=k&&(U=0==Math.round(J[k].x-J[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){J=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(J);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),J=this.model.getParent(k),!this.isCellSelected(J)))if(mxUtils.intersects(Z,new mxRectangle(A.x,
-A.y-2,A.width,4))&&this.model.getChildAt(J,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(J=this.getActualStartSize(k.cell),
-P=this.view.scale,(0<J.x||0<J.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(J.x-J.width-1)*P+(0==J.x?k.width*P:0),k.y,1,k.height))?U="col-resize":(0<J.y||0<J.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(J.y-J.height-1)*P+(0==J.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=
+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var T=null;mxEvent.isShiftDown(k.getEvent())||(T=this.selectionCellsHandler.getHandler(A.cell));if(null!=T&&null!=
+T.bends&&0<T.bends.length){T.redrawHandles();var P=null!=G?G:T.getHandleForEvent(H),U=this.view.getEdgeStyle(A),X=U==mxEdgeStyle.EntityRelation;I=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=I&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?P=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?P=T.bends.length-1:null!=I&&(null==U&&null==P||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
+(null!=U&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==U?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==T.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)T.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,T),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||T.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);T=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==
+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?T="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(A),U==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
+U!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(T=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,
+A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))T="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))T="col-resize";for(k=A;null==T&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),
+P=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*P+(0==I.x?k.width*P:0),k.y,1,k.height))?T="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*P+(0==I.y?k.height:0),k.width,1))&&(T="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=T&&A.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=
function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,J=this.graph.pageScale,U=A.width*J;A=A.height*J;J=this.graph.view.translate;for(var P=this.graph.view.scale,T=this.graph.getPageLayout(),W=0;W<T.width;W++)k.push(new mxRectangle(((T.x+W)*U+J.x)*P,(T.y*A+J.y)*P,U*P,A*P));for(W=1;W<T.height;W++)k.push(new mxRectangle((T.x*U+J.x)*P,((T.y+W)*A+J.y)*P,U*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,J=[],U=0;U<k.length;U++){var P=
-this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==P||A.get(P)||(A.put(P,!0),J.push(P))}return J};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,J){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&
-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,J,U,P){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=J&&this.graph.applyNewEdgeStyle(J,[T]);return T};var z=new mxRubberband(this);this.getRubberband=function(){return z};
+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,T=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var P=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)k.push(new mxRectangle(((U.x+X)*T+I.x)*P,(U.y*A+I.y)*P,T*P,A*P));for(X=1;X<U.height;X++)k.push(new mxRectangle((U.x*T+I.x)*P,((U.y+X)*A+I.y)*P,T*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],T=0;T<k.length;T++){var P=
+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[T])&&this.graph.isCellSelected(k[T])?this.graph.model.getParent(k[T]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[T])&&this.graph.isCellSelected(k[T])?k[T]:this.graph.getCompositeParent(k[T]);null==P||A.get(P)||(A.put(P,!0),I.push(P))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var T=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?T=!0:Z=this.graph.model.getParent(Z));T||this.graph.isTableRow(Z)&&
+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,T,P){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[U]);return U};var z=new mxRubberband(this);this.getRubberband=function(){return z};
var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||
-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var I=this.isToggleEvent;this.isToggleEvent=function(Z){return I.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ca=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ca.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};
-var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ea=this.click;this.click=function(Z){var k=null==Z.state&&
-null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ea.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var J=this.getClickableLinkForCell(A);null!=J?this.isCustomLink(J)?this.customLinkClicked(J,A):this.openLink(J):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ea=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ea.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};
+var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&
+null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);
if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||
this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
-function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,J){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):
+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):
Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),la=null==Z||this.isSelectionEmpty()||
this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);la=null;k.consume()}}));this.connectionHandler.selectCells=
function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));
@@ -2328,14 +2329,14 @@ Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof p
Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};
Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(O,R){if(O.getModel().isVertex(R)){var c=O.container.scrollWidth/2,f=O.container.scrollHeight/2;O.rootCell=R.referenceCell||R;O.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&
!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=O.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,O.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var I=K[F].getChildAt(t);null!=I.geometry&&I.geometry.relative&&(I.setStyle(I.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),I.geometry.offset=new mxPoint(0,0),I.geometry.y=0,I.geometry.x=.5>I.geometry.x?-.8:.5<I.geometry.x?.8:0)}if(0<R.startIndex){var ca=O.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ca.referenceCell=l;ca.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ca)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ea in O.getModel().cells){var X=O.getModel().getCell(ea);X!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,X)&&O.getModel().isVertex(X)&&O.removeCells([X])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ea in O.getModel().cells)X=O.getModel().getCell(ea),X!=O.rootCell&&O.getModel().isVertex(X)&&
-O.getModel().getParent(X)==O.getDefaultParent()&&(R.push(X),ba=O.getModel().getGeometry(X),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var ea=O.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ea.referenceCell=l;ea.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ea)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
+da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ca in O.getModel().cells){var W=O.getModel().getCell(ca);W!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,W)&&O.getModel().isVertex(W)&&O.removeCells([W])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ca in O.getModel().cells)W=O.getModel().getCell(ca),W!=O.rootCell&&O.getModel().isVertex(W)&&
+O.getModel().getParent(W)==O.getDefaultParent()&&(R.push(W),ba=O.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=
"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=
"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(O){27==O.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(O){if(mxClient.isBrowserSupported()){var R=new Graph(O);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=
function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);O.parentNode.removeChild(O);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];
-t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(I){N.spacing=Math.min(60,Math.max(30,60-5*I.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=
+t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=
!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};
Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==
g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};
@@ -2364,8 +2365,8 @@ Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},O;for(O in B){va
0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(O){return 0>mxUtils.indexOf(S,O)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=
function(B,H,S,G,O,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete O[H[t]]:O[H[t]]=S[t]};Graph.prototype.includeDescendants=
function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,O){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;O=null!=O?O:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=
-null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),I=mxUtils.indexOf(t,K);0<=I&&t.splice(I,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ca=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ca,K))for(var da=0;da<ca.length;da++){var ea=mxUtils.indexOf(t,ca[da]);0<=ea&&t.splice(ea,1)}}}}var X=this.model.isEdge(c);l=X?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=
-mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),X&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=
+null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ea=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ea,K))for(var da=0;da<ea.length;da++){var ca=mxUtils.indexOf(t,ea[da]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=
+mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),W&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=
this.getCellStyle(H[S],!1),O=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,O,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};
Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,G,O,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,O,R){G=null!=G?G:!0;O=null!=O?O:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));
if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,O,R);if(null!=l)return l;if(this.isCellVisible(f)&&(O&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,
@@ -2428,9 +2429,9 @@ Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&n
Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),O=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(O.x+=G.geometry.width/2,O.y-=g):e==
mxConstants.DIRECTION_SOUTH?(O.x+=G.geometry.width/2,O.y+=G.geometry.height+g):(O.x=e==mxConstants.DIRECTION_WEST?O.x-g:O.x+(G.geometry.width+g),O.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(O.x+=b.parent.geometry.x,O.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+O.x*g,c+O.y*g)).grow(40*g);p=null!=p?
this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var I=this.getAbsoluteParent(null!=K?K:b);I=S?b:this.getCompositeParent(I);N=null!=K?K:this.duplicateCells([I],
-!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ca=this.getCellGeometry(N);null!=ca&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ca.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ca.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ca.width/2:O.x+ca.width/2),ca.x=O.x-ca.width/2,ca.y=O.y-ca.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ea=b.parent.getIndex(b);this.model.add(b.parent,N,ea)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",
+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],
+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ea=this.getCellGeometry(N);null!=ea&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ea.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ea.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ea.width/2:O.x+ea.width/2),ea.x=O.x-ea.width/2,ea.y=O.y-ea.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&
+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",
"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+O.x*g,c+O.y*g,u)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),
@@ -2525,12 +2526,12 @@ arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.styl
R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;
mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);
this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,la,Z){var k=new mxPoint(la,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=la||k.y!=Z},z=.5*this.scale;
-f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],I=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,I.x,I.y,F.x,F.y)<1*this.scale*this.scale;)F=I,C++,I=c[C+2];f=t(0,N.x,N.y)||f;for(var ca=0;ca<this.validEdges.length;ca++){var da=this.validEdges[ca],ea=da.absolutePoints;if(null!=ea&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var X=null;for(da=0;da<ea.length-1;da++){var ba=ea[da+1],ha=ea[da];for(I=ea[da+2];da<ea.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,I.x,I.y,ba.x,ba.y)<1*this.scale*
-this.scale;)ba=I,da++,I=ea[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==X||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,X.x,X.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==I||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,I.x,I.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){I=ma.x-N.x;X=ma.y-N.y;ma={distSq:I*I+X*X,x:ma.x,y:ma.y};for(I=0;I<K.length;I++)if(K[I].distSq>
-ma.distSq){K.splice(I,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}X=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,
-arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],I=null;R.begin();for(var ca=0;ca<this.state.routedPoints.length;ca++){var da=this.state.routedPoints[ca],ea=new mxPoint(da.x/this.scale,da.y/this.scale);0==ca?ea=c[0]:ca==this.state.routedPoints.length-1&&(ea=c[c.length-1]);var X=
-!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ca+1];da=ba.x/this.scale-ea.x;ba=ba.y/this.scale-ea.y;da=da*da+ba*ba;null==I&&(I=new mxPoint(ea.x-F.x,ea.y-F.y),N=Math.sqrt(I.x*I.x+I.y*I.y),0<N?(I.x=I.x*t/N,I.y=I.y*t/N):I=null);da>t*t&&0<N&&(da=F.x-ea.x,ba=F.y-ea.y,da=da*da+ba*ba,da>t*t&&(X=new mxPoint(ea.x-I.x,ea.y-I.y),da=new mxPoint(ea.x+I.x,ea.y+I.y),K.push(X),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(I.x)||0==Math.round(I.x)&&0>=Math.round(I.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(X.x-
-I.y*K,X.y+I.x*K),R.lineTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(X.x+I.y*K,X.y-I.x*K),R.lineTo(X.x-I.y*K,X.y+I.x*K),R.moveTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x+I.y*K,da.y-I.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(X.x-I.y*K,X.y+I.x*K,da.x-I.y*K,da.y+I.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],X=!0))}else I=null;X||(K.push(ea),F=ea)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var ea=0;ea<this.validEdges.length;ea++){var da=this.validEdges[ea],ca=da.absolutePoints;if(null!=ca&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var W=null;for(da=0;da<ca.length-1;da++){var ba=ca[da+1],ha=ca[da];for(J=ca[da+2];da<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*
+this.scale;)ba=J,da++,J=ca[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=ma.x-N.x;W=ma.y-N.y;ma={distSq:J*J+W*W,x:ma.x,y:ma.y};for(J=0;J<K.length;J++)if(K[J].distSq>
+ma.distSq){K.splice(J,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}W=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,
+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var ea=0;ea<this.state.routedPoints.length;ea++){var da=this.state.routedPoints[ea],ca=new mxPoint(da.x/this.scale,da.y/this.scale);0==ea?ca=c[0]:ea==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=
+!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ea+1];da=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;da=da*da+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);da>t*t&&0<N&&(da=F.x-ca.x,ba=F.y-ca.y,da=da*da+ba*ba,da>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),da=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x-
+J.y*K,W.y+J.x*K),R.lineTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x+J.y*K,da.y-J.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,da.x-J.y*K,da.y+J.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||
"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=
function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,
@@ -2660,14 +2661,14 @@ Math.round(ta)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textare
Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,M){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);
var Q=this.graph.getEditingValue(x.cell,M);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,M){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var M=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(M=M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<M.length&&("<br/>"==M.substring(M.length-5)||"<br>"==M.substring(M.length-4))&&(M=M.substring(0,M.lastIndexOf("<br"))+"<div><br/></div>")):
-M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&
+M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&
0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=
function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||
this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ca=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ca.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ea=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ea.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=
parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=da.apply(this,
-arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ea=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ea.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
-function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
+function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};
mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var ma=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ma.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?
this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||la.apply(this,arguments)&&
@@ -2679,19 +2680,19 @@ V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=
cb)V.setTableRowHeight(this.state.cell,cb,!Ya);else if(!Q.blockDelayedSelection){var hb=V.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(hb,gb)}cb=0};Qa.reset=function(){cb=0}}x.push(Qa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Oa=V.view.getState(Na[ab]),Qa=V.getCellGeometry(Na[ab]),kb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Oa&&(Oa=new mxCellState(V.view,Na[ab],V.getCellStyle(Na[ab])),Oa.x=oa.x+Qa.x*ka,Oa.y=oa.y+Qa.y*ka,
Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Qa=ab<Na.length-1?Na[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa):null;var cb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Qa);Oa.tableHandle=!0;var Ya=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);
Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Wa[ab],Ya,0),this.shape.updateBoundsFromLine();else{var hb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Ya)*ka;this.shape.bounds.y=oa.y+(ab==Na.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Na.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Ya=
-Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var J=
-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){J.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
+Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var I=
+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){I.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.isMoveHandlesVisible();x&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():x||null==this.moveHandles||this.destroyMoveHandles();if(x&&null==this.moveHandles){for(x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var x=
this.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,
mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),
null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=
-function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();
x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=
this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=
this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=P.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/
x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
-"")};var T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var W=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){W.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
+"")};var U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=
this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*
Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
@@ -2736,10 +2737,10 @@ this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var La=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function O(){mxCylinder.call(this)}function R(){mxShape.call(this)}
-function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function I(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(d,n){this.canvas=d;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ea.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ea.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ea.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ea.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,ea.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ea.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxEllipse.call(this)}
-function P(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);
+function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ca.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ca.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ca.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ca.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function T(){mxEllipse.call(this)}
+function P(){mxShape.call(this)}function U(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==
@@ -2776,20 +2777,20 @@ function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.get
function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,
.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};z.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*
this.scale,0,0,0):null};O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(d,
-n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",I);mxUtils.extend(ca,mxActor);
-ca.prototype.size=.5;ca.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ca);mxUtils.extend(da,mxActor);
-da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ea.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ea.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
-arguments));this.originalClose.apply(this.canvas,arguments)};ea.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ea.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ea.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ea.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===
+"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(d,
+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(ea,mxActor);
+ea.prototype.size=.5;ea.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ea);mxUtils.extend(da,mxActor);
+da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
+arguments));this.originalClose.apply(this.canvas,arguments)};ca.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ca.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ca.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ca.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===
typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=d;this.lastY=n};ea.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ea(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ea)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||
+arguments);this.lastX=d;this.lastY=n};ca.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ca(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ca)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||
null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,v*D)),d.moveTo(n+
-D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};X.prototype.paintForeground=
+D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(W,mxRectangleShape);W.prototype.size=.1;W.prototype.fixedSize=!1;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};W.prototype.paintForeground=
function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,
+arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.fixedSize=20;ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,
n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",
@@ -2800,20 +2801,20 @@ mxCellRenderer.registerShape("plus",la);var db=mxRhombus.prototype.paintVertexSh
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||
Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/
-2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};J.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-J);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(T,mxShape);
-T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};T.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(W,mxRectangleShape);W.prototype.size=
-40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};W.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,
-y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=W&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};W.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,
-D))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,
+2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+I);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(U,mxShape);
+U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};U.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(X,mxRectangleShape);X.prototype.size=
+40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};X.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,
+y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};X.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,
+D))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,
0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),fa=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),L=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);L!=mxConstants.NONE&&
(d.setFillColor(L),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,fa-1.5*D));d.lineTo(n+Math.max(0,E-D),y+fa);d.lineTo(n,y+fa);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);
-d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=W.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&
+d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=X.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&
(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;null!=n.style.backboneSize&&
(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,
new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ha.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,
mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]):(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]);va=d.getCenterX();
-d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?I.prototype.fixedSize:I.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,
+d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,
mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,
Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",
mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?ma.prototype.fixedSize:ma.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,
@@ -2929,9 +2930,9 @@ va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLine
(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(wb(d,
y/2))}n.push(jb(d,[mxConstants.STYLE_STARTSIZE],function(q){var v=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,v))):new mxPoint(q.x+Math.max(0,Math.min(q.width,v)),q.getCenterY())},function(q,v){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],fa=0;fa<D.length;fa++)D[fa]!=d.cell&&v.isSwimlane(D[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[fa]))==q&&E.push(D[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,
-d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,
+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,
Math.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=
-"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,
+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,
["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,
"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,
n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,
@@ -2948,7 +2949,7 @@ Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){r
return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),
offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));
return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(ma.prototype.size,!0,null,
-!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ca.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,I.prototype.size,I.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
+!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ea.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}return d};mxEdgeHandler.prototype.createCustomHandles=
function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,
n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?
@@ -2988,7 +2989,7 @@ mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),n
[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
+.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return d};Aa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
@@ -3000,7 +3001,7 @@ mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),n
0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),v=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-v)/2;var D=q+v,E=(n-v)/2;v=E+v;d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,E,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};W.prototype.constraints=
+0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};X.prototype.constraints=
null;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.cellLabelChanged(G[O],"")}finally{p.getModel().endUpdate()}}}function g(G,O,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,
@@ -3061,9 +3062,9 @@ G[O];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R])
null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,
mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",O=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=O&&(R=O.style[mxConstants.STYLE_IMAGE]||R,c=O.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();
-m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var I=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ca=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ca.x;K[0].geometry.y=
-ca.y;null!=C&&g(K[0],C,F,N,p);I=K;p.fireEvent(new mxEventObject("cellsInserted","cells",I))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ea=K[l];if("0"!=p.getCurrentCellStyle(ea).expand){var X=
-p.getModel().getGeometry(ea);null!=X&&(X=X.clone(),X.width=t,X.height=z,p.getModel().setGeometry(ea,X))}null!=C&&g(ea,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=I&&(p.setSelectionCells(I),p.scrollCellToVisible(I[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],
+m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ea=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ea.x;K[0].geometry.y=
+ea.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=
+p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],
c=O[mxConstants.STYLE_SHAPE];R&&"image"==c&&(O=new CropImageDialog(m,R,O[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(O.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",
function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,
null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),
@@ -3233,214 +3234,214 @@ type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float
dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(k,A){return A.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,A){return 0<k.vertices.length&&0==k.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},
{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},
{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&A.isSwimlane(k)},isVisible:function(k,A){return 1==k.vertices.length&&
-0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&(A.isSwimlane(k)||0<A.model.getChildCount(k))},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,A){var J=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;
-return null!=J&&(A.isContainer(J)&&"0"!=k.style.collapsible||!A.isContainer(J)&&"1"==k.style.collapsible)},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length&&!A.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",
+0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&(A.isSwimlane(k)||0<A.model.getChildCount(k))},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,A){var I=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;
+return null!=I&&(A.isContainer(I)&&"0"!=k.style.collapsible||!A.isContainer(I)&&"1"==k.style.collapsible)},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length&&!A.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",
type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;return 0<k.vertices.length?A.isVertex(A.getParent(k.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(k,A){k=
0<k.vertices.length?A.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",
defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",
-type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==J||J==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(J){var U=J.sets||[];J=J.options||this.getDefaultOptions();for(var P=0;P<U.length;P++){var T=U[P];switch(T.type){case "path":null!=J.stroke&&this._drawToContext(k,T,J);break;case "fillPath":this._drawToContext(k,T,J);break;case "fillSketch":this.fillSketch(k,T,J)}}};A.fillSketch=function(J,U,P){var T=k.state.strokeColor,W=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;
-0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(J,U,P);k.setDashed(ja);k.setStrokeWidth(W);k.setStrokeColor(T);k.setStrokeAlpha(aa)};A._drawToContext=function(J,U,P){J.begin();for(var T=0;T<U.ops.length;T++){var W=U.ops[T],aa=W.data;switch(W.op){case "move":J.moveTo(aa[0],aa[1]);break;case "bcurveTo":J.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":J.lineTo(aa[0],aa[1])}}J.end();
-"fillPath"===U.type&&P.filled?J.fill():J.stroke()};return A};(function(){function k(T,W,aa){this.canvas=T;this.rc=W;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var T=I.sets||[];I=I.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var U=T[P];switch(U.type){case "path":null!=I.stroke&&this._drawToContext(k,U,I);break;case "fillPath":this._drawToContext(k,U,I);break;case "fillSketch":this.fillSketch(k,U,I)}}};A.fillSketch=function(I,T,P){var U=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;
+0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,T,P);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(U);k.setStrokeAlpha(aa)};A._drawToContext=function(I,T,P){I.begin();for(var U=0;U<T.ops.length;U++){var X=T.ops[U],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();
+"fillPath"===T.type&&P.filled?I.fill():I.stroke()};return A};(function(){function k(U,X,aa){this.canvas=U;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,W){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=T?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;T=null;(aa.filled=W)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);
-aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);W=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==W?-1:W;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-W);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",W);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",W);W=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==W?-1:W;W=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==W&&(W="auto");"auto"==W&&(W=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&W.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&W.push(mxUtils.hex2rgb(Editor.darkColor)),W=
-null!=aa.fill&&(null!=T||0<=mxUtils.indexOf(W,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=W;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],
-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(T,W){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,W),this.lastX=T,this.lastY=W)};k.prototype.moveTo=function(T,W){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,W),this.lastX=T,this.lastY=W,this.firstX=T,this.firstY=W)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,
-arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,W,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,W,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,W,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(T,W,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);
-else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,T,W,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(T,W,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,W,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,W,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+aa/2,W+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+pa,W),this.lineTo(T+aa-pa,W),this.quadTo(T+aa,W,T+aa,W+sa),this.lineTo(T+aa,W+ja-sa),this.quadTo(T+aa,W+ja,T+aa-pa,W+ja),this.lineTo(T+pa,W+ja),this.quadTo(T,W+ja,T,W+ja-sa),this.lineTo(T,W+sa),this.quadTo(T,W,T+pa,W))};k.prototype.drawPath=function(T){if(0<
-this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var W in T)this.nextShape.options[W]=T[W];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=U?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);
+aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==X?-1:X;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+X);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",X);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=
+null!=aa.fill&&(null!=U||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],
+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,X),this.lastX=U,this.lastY=X)};k.prototype.moveTo=function(U,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,X),this.lastX=U,this.lastY=X,this.firstX=U,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,
+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(U,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);
+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,U,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(U,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+pa,X),this.lineTo(U+aa-pa,X),this.quadTo(U+aa,X,U+aa,X+sa),this.lineTo(U+aa,X+ja-sa),this.quadTo(U+aa,X+ja,U+aa-pa,X+ja),this.lineTo(U+pa,X+ja),this.quadTo(U,X+ja,U,X+ja-sa),this.lineTo(U,X+sa),this.quadTo(U,X,U+pa,X))};k.prototype.drawPath=function(U){if(0<
+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in U)this.nextShape.options[X]=U[X];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;
-this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(T){return new k(T,Editor.createRoughCanvas(T),this)};var A=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,W,aa,ja,pa){null!=T.handJiggle&&T.handJiggle.passThrough||J.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=
-function(T){var W=T.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var wa=T.setFillColor;T.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,
-arguments);T.handJiggle.passThrough=!1;T.setFillColor=wa;T.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;T.restore();aa&&null!=ja&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=W};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,W,aa,ja,pa,sa){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=
-function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,J){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){P.push(U[T]);
-break}0<P.length&&(U=P[0].getAttribute("data-mxgraph"),null!=U?(P=JSON.parse(U),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(U=mxUtils.getTextContent(P[0]),U=Graph.decompress(U,null,J),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&
-(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(P=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,J)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,J){Editor.validateDiagramNode(k);
-var U=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],J&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),J=null;0<A.length?J=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),
-null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,J=new mxGraphModel;k.appendChild(A.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var U=k.indexOf("stream",
-J)+9;if(0<k.substring(J,U).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"})}}for(J=k.indexOf("/ObjStm");0<J;){U=k.indexOf("stream",J)+9;P=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"});P=U.indexOf("/Subject <");if(0<P){J=U.substring(P+14,U.indexOf(">",P));if(null!=J){A=J;J=[];for(U=0;U<A.length;U+=2)P=A.substr(U,2),"00"!=P&&J.push(String.fromCharCode(parseInt(P,
-16)));A=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){J="";P=U=0;for(var T=[],W=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(J+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==J?W=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(W=[],T[J.split(" ")[0]]=W):null!=W&&W.push(J),J="")}}null==A&&null!=
-T&&(A=Editor.extractGraphModelFromXref(T));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,J=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,A){var J=null;k=
-null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(J=mxUtils.getTextContent(A[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=
+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new k(U,Editor.createRoughCanvas(U),this)};var A=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,X,aa,ja,pa){null!=U.handJiggle&&U.handJiggle.passThrough||I.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=
+function(U){var X=U.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var wa=U.setFillColor;U.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,
+arguments);U.handJiggle.passThrough=!1;U.setFillColor=wa;U.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;U.restore();aa&&null!=ja&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=X};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,X,aa,ja,pa,sa){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,P.apply(this,arguments),U.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=
+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){P.push(T[U]);
+break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,I),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&
+(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);
+var T=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<T.length?(A=Graph.decompress(T,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],I&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),
+null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var T=k.indexOf("stream",
+I)+9;if(0<k.substring(I,T).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){T=k.indexOf("stream",I)+9;P=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"});P=T.indexOf("/Subject <");if(0<P){I=T.substring(P+14,T.indexOf(">",P));if(null!=I){A=I;I=[];for(T=0;T<A.length;T+=2)P=A.substr(T,2),"00"!=P&&I.push(String.fromCharCode(parseInt(P,
+16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";P=T=0;for(var U=[],X=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],U[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=
+U&&(A=Editor.extractGraphModelFromXref(U));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=
+null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(I=mxUtils.getTextContent(A[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=
k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);
null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&
-(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?
-"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));
-null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(k.css));var J=document.getElementsByTagName("script")[0];J.parentNode.insertBefore(A,J)}null!=
-k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);
-null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);
-null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(A=parseFloat(k.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(A=parseInt(k.defaultGridSize),!isNaN(A)&&0<A?mxGraph.prototype.gridSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(A=parseInt(k.gridSteps),!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=k.pageFormat&&(A=parseInt(k.pageFormat.width),J=parseInt(k.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(J)&&0<J?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,J),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(A=parseInt(k.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
-null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(A=parseInt(k.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&
-(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);
-null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));A.parentNode.insertBefore(J,A);k=k.split("url(");for(J=1;J<k.length;J++){var U=k[J].indexOf(")");U=Editor.trimCssUrl(k[J].substring(0,U));var P=document.createElement("link");
-P.setAttribute("rel","preload");P.setAttribute("href",U);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
-20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],J=0;J<k;J++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
-{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;
-Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(J=null!=this.graph.themes?
-this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=J&&(U=new mxCodec(J.ownerDocument),U.decode(J,this.graph.getStylesheet())));else{var J=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=J){var U=new mxCodec(J.ownerDocument);U.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));
-A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),J=0;J<A.length;J++)this.graph.addExtFont(A[J].name,
-A[J].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var J=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",
-this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&J.setAttribute("backgroundImage",JSON.stringify(U));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?J.setAttribute("adaptiveColors",this.graph.adaptiveColors):J.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(P){return P.name+
-"^"+P.url}),J.setAttribute("extFonts",U.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var J=mxUtils.parseXml(A).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=
-function(k,A,J){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var J=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=
-function(W){try{null==U?(MathJax.typesetClear([W]),MathJax.typeset([W]),J()):U!=W&&Editor.mathJaxQueue.push(W)}catch(aa){MathJax.typesetClear([W]),null!=aa.retry?(U=W,aa.retry.then(function(){MathJax.typesetPromise([W]).then(J)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());J()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=
-A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var W=0;W<Editor.mathJaxQueue.length;W++)Editor.doMathJaxRender(Editor.mathJaxQueue[W])}}};Editor.MathJaxRender=function(W){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(W):Editor.mathJaxQueue.push(W)};Editor.onMathJaxDone=function(){};
-var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var W=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,W);this.graph.addListener(mxEvent.REFRESH,W)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);A[0].parentNode.appendChild(T)}}};
-Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",J=[""],U=0,P=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(P&&T===A&&(J[U]+=T),P=!P):","===T&&P?T=J[++U]="":J[U]+=T,A=T;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var J=
-"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||
-"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,J=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL+
-"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,J,U,P){try{var T=!0,W=window.setTimeout(mxUtils.bind(this,function(){T=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,J,U,!0):A(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(W);T&&(200>pa.getStatus()||
-299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(W);T&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(W);if(T)try{U=null!=U&&P?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(W);T&&(null!=
-J?J():A(k))};ja.src=k}}catch(pa){null!=J?J():A(k)}};Editor.prototype.convertImages=function(k,A,J,U){function P(){0<T.length?T.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var T=[],W=J||{};J=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){T.push(mxUtils.bind(this,function(){try{if(null!=sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=W[qa];null==wa?this.convertImageToDataUri(qa,
-function(Ba){null!=Ba&&(W[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});J("image","xlink:href");J("img","src");P()};Editor.base64Encode=function(k){for(var A="",J=0,U=k.length,P,T,W;J<U;){P=k.charCodeAt(J++)&255;if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4);A+="==";break}T=k.charCodeAt(J++);if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);A+="=";break}W=k.charCodeAt(J++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(W&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(W&63)}return A};Editor.prototype.loadUrl=function(k,A,J,U,P,T,W,aa){try{var ja=!W&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&
-299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}T=null!=T?T:"data:image/png;base64,";qa=T+Editor.base64Encode(qa)}A(qa)}}else null!=J&&(0==sa.getStatus()?J({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?
-J({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):J({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=J&&J({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=J&&J(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),U=JSON.parse(J);null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message+
-" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var J=k.split("url(");if(0<J.length){A=[J[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var P=null;null!=U&&0<U.length&&(P=U[0].getAttribute("href"));for(var T=1;T<J.length;T++)if(U=J[T].indexOf(")"),0<U){var W=Editor.trimCssUrl(J[T].substring(0,U));this.graph.isRelativeUrl(W)&&(W=null!=P?P+W:window.location.protocol+
-"//"+window.location.hostname+("/"==W.charAt(0)?"":k)+W);A.push('url("'+W+'"'+J[T].substring(U))}else A.push(J[T])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,J){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));J(k,A)};Editor.prototype.embedCssFonts=function(k,A){var J=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==U){for(var ja=[J[0]],pa=1;pa<J.length;pa++){var sa=
-J[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(J[pa].substring(0,sa))]);ja.push('"'+J[pa].substring(sa))}A(ja.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var T=J[k].indexOf(")"),W=null,aa=J[k].indexOf("format(",T);0<aa&&(W=Editor.trimCssUrl(J[k].substring(aa+7,J[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var pa="application/x-font-ttf";if("svg"==W||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";
-else if("otf"==W||"embedded-opentype"==W||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==W||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==W||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==W||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==W||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=
-wa;U--;P()}),mxUtils.bind(this,function(wa){U--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,T)),W)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);
-return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var J=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(J.join(""),k)}),T=0;T<A.length;T++)mxUtils.bind(this,function(W,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;J.push(ja+
-"\n");U--;P()}),mxUtils.bind(this,function(ja){U--;J.push("@import url("+aa+");\n");P()}))):J.push(this.cachedGoogleFonts[aa]+"\n"):J.push('@font-face {font-family: "'+W+'";src: url("'+aa+'")}\n')})(A[T].name,A[T].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),J=0;J<A.length;J++){var U=mxUtils.getTextContent(A[J]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[J].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var J=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var P=[],T=0;T<U.length;T++)"@import"==U[T].substring(0,7)?A.push(U[T]):P.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,A.join("\n")),J.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,
-P.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,J){var U=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{T=null!=T?T:!0;W=null!=W?W:!0;qa=null!=qa?qa:this.graph;wa=null!=wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==
-Ca&&0==ja&&(Ca="dark"==Ea?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,W,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&
-(aa=T?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),
-ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);
-var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),J,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=
-p;Editor.updateCRC=function(k,A,J,U){for(var P=0;P<U;P++)k=Editor.crcTable[(k^A.charCodeAt(J+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,J=0;J<k.length;J++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(J))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,J,U,P){function T(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function W(sa){sa=T(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>
-24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(k,4),"IHDR"!=T(k,4))null!=P&&P();else{T(k,17);P=k.substring(0,ja);do{var pa=W(k);if("IDAT"==T(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==J?(J=Math.round(U/.0254),J=aa(J)+aa(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=
-Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,J,0,J.length);P+=aa(J.length)+A+J+aa(U^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);T(k,pa);T(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var J=null;null!=k.editor.graph.getModel().getParent(A)?J=A.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,
-arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
-function(k){k=R.apply(this,arguments);var A=this.editorUi,J=A.editor.graph;if(J.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(W){A.editor.setAutosave(W);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(W){this.listener=function(){W(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&
-J.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(W){A.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(J.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var T=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");
-T.style.position="absolute";T.style.left="85%";P.appendChild(T)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",
-dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",
-type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",
-dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,
-isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];
-mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",
-dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",
-dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
-min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",
-type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
-type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",
-type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(k,A,J,U){if(null!=A){var P=mxUtils.bind(this,function(W){if(null!=W)if(J)for(var aa=0;aa<W.length;aa++){if("function"!==typeof W[aa].isVisible||W[aa].isVisible(U,this))A[W[aa].name]=W[aa]}else for(var ja in A){var pa=!1;for(aa=
-0;aa<W.length;aa++)if(W[aa].name==ja&&W[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),T=this.editorUi.editor.graph.view.getState(k);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),P(T.shape.customProperties));k=k.getAttribute("customProperties");
-if(null!=k)try{P(JSON.parse(k))}catch(W){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},J=k.vertices,U=k.edges,P=0;P<J.length;P++)this.findCommonProperties(J[P],A,
-0==P,k);for(P=0;P<U.length;P++)this.findCommonProperties(U[P],A,0==J.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,
-arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,J,U){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,
-M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());
-V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function T(Da,x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function W(Da,x,
-M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background="linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle=
-"solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",
-mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];
-for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";
-oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(W(Da,
-x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;T(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,
-null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,
-M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,
-"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");T(xa,
-Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height=
-"16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat=
-"no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage=
-"url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==J.vertices.length&&0==J.edges.length?Ea=J.vertices[0].id:0==J.vertices.length&&1==
-J.edges.length&&(Ea=J.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(J,this)){var Aa=null!=U.getValue?U.getValue():null!=J.style[Ha]?mxUtils.htmlEntities(J.style[Ha]+""):null!=U.getDefaultValue?U.getDefaultValue(J,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(J.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=
-U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=J.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],A=U.parentRow,J=0;J<U.values.length;J++)Ha=sa(U.name,U.values[J],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:J,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==J%2,
-U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",function(){Ba.style.opacity="0.5"})},J=this.editorUi,U=J.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft=
-"16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var W=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background=
-"transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);W.push(ja);T.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=W[Ba]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),
-sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=
-mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=J.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,
-ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,
-mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage=
-"linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+
-Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor=
-"transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
-aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
-var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&
-(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};
+(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=
+k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);
+null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(k.css));
+var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(A,I)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));
+null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);
+null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(A=parseFloat(k.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(A=parseInt(k.defaultGridSize),!isNaN(A)&&0<A?mxGraph.prototype.gridSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(A=parseInt(k.gridSteps),
+!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=k.pageFormat&&(A=parseInt(k.pageFormat.width),I=parseInt(k.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,I),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=
+k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&
+(A=parseInt(k.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(A=parseInt(k.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&
+(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=
+k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&
+(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));
+A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var T=k[I].indexOf(")");T=Editor.trimCssUrl(k[I].substring(0,T));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
+Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],I=0;I<k;I++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",
+extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=
+25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+
+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(T=new mxCodec(I.ownerDocument),T.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var T=new mxCodec(I.ownerDocument);
+T.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==
+k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;
+Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=T&&I.setAttribute("backgroundImage",JSON.stringify(T));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",
+this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),I.setAttribute("extFonts",T.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),
+null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());
+else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=function(X){try{null==T?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):T!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(T=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+
+ja.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&
+"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var U=
+document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);A[0].parentNode.appendChild(U)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],T=0,P=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(P&&U===A&&(I[T]+=U),P=!P):","===U&&P?U=I[++T]="":I[T]+=U,A=U;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
+!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&
+I.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=A.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,T,P){try{var U=!0,X=window.setTimeout(mxUtils.bind(this,function(){U=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,A,I,T,!0):A(k)});
+if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);U&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);U&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(U)try{T=null!=T&&P?T:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(T,T);pa.height=ja.height*T;pa.width=
+ja.width*T;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);U&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,T){function P(){0<U.length?U.shift()():A(k)}null==T&&(T=this.createImageUrlConverter());var U=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){U.push(mxUtils.bind(this,function(){try{if(null!=
+sa){var qa=T.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});I("image","xlink:href");I("img","src");P()};Editor.base64Encode=function(k){for(var A="",I=0,T=k.length,P,U,X;I<T;){P=k.charCodeAt(I++)&255;if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>
+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);A+="==";break}U=k.charCodeAt(I++);if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>
+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,T,P,U,X,aa){try{var ja=!X&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,
+function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}U=null!=U?U:"data:image/png;base64,";qa=U+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?
+I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),T=JSON.parse(I);
+null!=T&&null!=T.error&&null!=T.error.message&&(A=T.error.message+" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var U=1;U<I.length;U++)if(T=I[U].indexOf(")"),0<T){var X=Editor.trimCssUrl(I[U].substring(0,
+T));this.graph.isRelativeUrl(X)&&(X=null!=P?P+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[U].substring(T))}else A.push(I[U])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=
+mxUtils.bind(this,function(){if(0==T){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var U=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",U);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;T++;
+var pa="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==X||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,
+ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;T--;P()}),mxUtils.bind(this,function(wa){T--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,U)),X)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=
+function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(I.join(""),k)}),U=0;U<A.length;U++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),
+mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");T--;P()}),mxUtils.bind(this,function(ja){T--;I.push("@import url("+aa+");\n");P()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[U].name,A[U].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var T=mxUtils.getTextContent(A[I]);
+0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),T=A.split("\n");A=[];for(var P=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?A.push(T[U]):P.push(T[U]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,
+A.join("\n")),I.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var T=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(T/k,T/A))};Editor.prototype.exportToCanvas=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{U=null!=U?U:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=
+wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),
+La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=U?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));
+x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=
+function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),I,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=
+[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,T){for(var P=0;P<T;P++)k=Editor.crcTable[(k^A.charCodeAt(I+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,T,P){function U(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=U(sa,4);return sa.charCodeAt(3)+
+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(U(k,4),"IHDR"!=U(k,4))null!=P&&P();else{U(k,17);P=k.substring(0,ja);do{var pa=X(k);if("IDAT"==U(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(T/.0254),I=aa(I)+
+aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,A,0,4);T=Editor.updateCRC(T,I,0,I.length);P+=aa(I.length)+A+I+aa(T^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);U(k,pa);U(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;
+ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());
+return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||
+"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var T=A.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};
+A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});
+k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var U=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");U.style.position="absolute";U.style.left="85%";P.appendChild(U)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=
+[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
+type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",
+min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",
+dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=
+mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",
+min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",
+dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(k,A,I,T){if(null!=A){var P=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(T,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),U=this.editorUi.editor.graph.view.getState(k);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||
+[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),P(U.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{P(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&
+!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,T=k.edges,P=0;P<I.length;P++)this.findCommonProperties(I[P],A,0==P,k);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],A,0==I.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,T){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=
+[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<
+M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function U(Da,
+x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function X(Da,x,M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background=
+"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=
+"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,
+Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==
+x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);
+mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(X(Da,x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",
+mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;U(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=
+null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",
+V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<
+M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");U(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,
+"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=
+"geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage=
+"url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";
+Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||T||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(T=A[Ha],"function"!=typeof T.isVisible||T.isVisible(I,this)){var Aa=null!=T.getValue?T.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]+
+""):null!=T.getDefaultValue?T.getDefaultValue(I,this):T.defVal;if("separator"==T.type)Ma=!Ma;else{if("staticArr"==T.type)T.size=parseInt(I.style[T.sizeProperty]||A[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Ra=T.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}T.dependentPropsDefVal=La;T.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,T,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(T=Ba[Ea],
+A=T.parentRow,I=0;I<T.values.length;I++)Ha=sa(T.name,T.values[I],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,index:I,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==I%2,T.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",
+function(){Ba.style.opacity="0.5"})},I=this.editorUi,T=I.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.position="relative";U.style.textAlign="center";U.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");
+ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);U.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&
+(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(T.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:
+"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";T.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){T.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=T.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):
+mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!T.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||
+null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),T.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));T.getModel().setStyle(Ra[Za],La)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";
+Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=
+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=
+Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+
+mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?
+1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(U)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};
Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=
-function(k,A){var J=Graph.fontMapping[A];null==J&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,J){if(null!=k&&0<k.length&&null!=
-A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var P=Graph.customFontElements[U];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[U]=P,A=document.getElementsByTagName("head")[0],null!=J&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=J,P.elt.onerror=J):J()),null!=A&&A.appendChild(P.elt)):
-null!=J&&J()}else null!=J&&J()}else null!=J&&J();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var J=k[A].getAttribute("data-font-src");if(null!=J){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,J)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",
-null);if(null!=A){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=
+function(k,A){var I=Graph.fontMapping[A];null==I&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,I){if(null!=k&&0<k.length&&null!=
+A&&0<A.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var P=Graph.customFontElements[T];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[T]=P,A=document.getElementsByTagName("head")[0],null!=I&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=I,P.elt.onerror=I):I()),null!=A&&A.appendChild(P.elt)):
+null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var T="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=T&&Graph.addFont(T,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",
+null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(T){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=
"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(P){A=P}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){A=null});this.isMouseInsertPoint=function(){return null!=
-A};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):J.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var W=new mxStackLayout(this.graph,!1);W.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;W.marginLeft=T.marginLeft||0;W.marginRight=T.marginRight||0;W.marginTop=
-T.marginTop||0;W.marginBottom=T.marginBottom||0;W.allowGaps=T.allowGaps||0;W.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");W.resizeParent=!1;W.fill=!0;return W}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,J,U,P,T,W,aa,ja,
-pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,J,U){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function T(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}
-function W(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),
+A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var U=this.graph.getCellStyle(P);if(null!=U&&"rack"==U.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=U.marginLeft||0;X.marginRight=U.marginRight||0;X.marginTop=
+U.marginTop||0;X.marginBottom=U.marginBottom||0;X.allowGaps=U.allowGaps||0;X.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,T,P,U,X,aa,ja,
+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,I,T){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function U(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}
+function X(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),
La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?
-T(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=
-"invert(100%)";mxEvent.addListener($a,"click",function(x){T(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,
-"click",function(x){if(mxEvent.isShiftDown(x))T(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)T(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);
+U(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=
+"invert(100%)";mxEvent.addListener($a,"click",function(x){U(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,
+"click",function(x){if(mxEvent.isShiftDown(x))U(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)U(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);
$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");
Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);
sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=
-aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?W(ja):W(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=
+aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?X(ja):X(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=
"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=
-"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=J&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+
-")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){J(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var J=Graph.customFontElements[A];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var J=
-Editor.guid();document.execCommand("fontname",!1,J);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==J&&(P=!0,U[T].setAttribute("face",k),null!=A?U[T].setAttribute("data-font-src",A):U[T].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=
-function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=
-function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,
-arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=
-Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),
-null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var I=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){I.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ca=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ca.apply(this,arguments);this.enumerationState=
-0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=
-function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var J=k.view.scale,U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?
-new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==J||(A.bounds=k,A.value=U,A.scale=J,A.redraw())}};var ea=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ea.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};
-var X=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){X.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),
-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,P=0,T=0,W=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(T<k.length){var sa=this.stoppingCustomActions,qa=k[T++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,
-J))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,
-!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(W(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){W();var Ba=this.getCellsForAction(qa.show,
-!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(W(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(W(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(W(),this.setCellStyles(qa.style.key,
-qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,
-J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,
-this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var J=this.getLinkForCell(A);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,J));if(this.isHtmlLabel(A)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=U.getElementsByTagName("a"),T=!1,
-W=0;W<P.length;W++)J=P[W].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(P[W].setAttribute("href",this.updateCustomLink(k,J)),T=!0);T&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var J=JSON.parse(A.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),A="data:action/json,"+JSON.stringify(J))}catch(U){}return A};Graph.prototype.updateCustomLinkActions=function(k,A){for(var J=
-0;J<A.length;J++){var U=A[J],P;for(P in U)this.updateCustomLinkAction(k,U[P],"cells"),this.updateCustomLinkAction(k,U[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,J){if(null!=A&&null!=A[J]){for(var U=[],P=0;P<A[J].length;P++)if("*"==A[J][P])U.push(A[J][P]);else{var T=k[A[J][P]];null!=T?""!=T&&U.push(T):U.push(A[J][P])}A[J]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,A));if(null!=k.excludeCells){for(var J=
-[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&J.push(A[U]);A=J}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(T){return T!=U},U))}else{var P=this.model.getCell(k[J]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};
-Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var A=0;A<k.length;A++)if(0>
-mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,J,U){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var T=0,W={},aa=0;aa<k.length;aa++)0<k[aa].length&&(W[k[aa]]=!0,T++);for(aa=0;aa<A.length;aa++)if(J&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=k.length)){for(var sa=pa=
-0;sa<ja.length&&pa<T;sa++)null!=W[ja[sa]]&&pa++;pa=pa==T}pa&&(1!=U||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,J=[],U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);J=[];if(0<P.length){P=P.split(" ");for(var T={},W=0;W<P.length;W++)if(null==A||null!=A[P[W]])T[P[W]]=!0,J.push(P[W]);A=T}else return[]}return J};
-Graph.prototype.getTagsForCells=function(k){for(var A=[],J={},U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==J[P[T]]&&(J[P[T]]=!0,A.push(P[T]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var U=this.getTagsForCell(k[J]),P=U.split(" "),T=!1,W=0;W<
-A.length;W++){var aa=mxUtils.trim(A[W]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(U=0<U.length?U+" "+aa:aa,T=!0)}T&&this.setAttributeForCell(k[J],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var U=this.getTagsForCell(k[J]);if(0<U.length){for(var P=U.split(" "),T=!1,W=0;W<A.length;W++){var aa=mxUtils.indexOf(P,A[W]);0<=aa&&(P.splice(aa,1),T=!0)}T&&this.setAttributeForCell(k[J],
-"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,J,U){for(var P=0;P<k.length;P++)this.highlightCell(k[P],
-A,J,U)};Graph.prototype.highlightCell=function(k,A,J,U,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var T=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,A,P,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},
-1200)},J));return T};Graph.prototype.addSvgShadow=function(k,A,J,U){J=null!=J?J:!1;U=null!=U?U:!0;var P=k.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");W.setAttribute("in","SourceAlpha");W.setAttribute("stdDeviation",this.svgShadowBlur);W.setAttribute("result","blur");T.appendChild(W);
-W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");W.setAttribute("in","blur");W.setAttribute("dx",this.svgShadowSize);W.setAttribute("dy",this.svgShadowSize);W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");W.setAttribute("flood-color",this.svgShadowColor);W.setAttribute("flood-opacity",this.svgShadowOpacity);W.setAttribute("result","offsetColor");
-T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");W.setAttribute("in","offsetColor");W.setAttribute("in2","offsetBlur");W.setAttribute("operator","in");W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");W.setAttribute("in","SourceGraphic");W.setAttribute("in2","offsetBlur");T.appendChild(W);W=k.getElementsByTagName("defs");
-0==W.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=W[0];P.appendChild(T);J||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),
-null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==
-this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var J=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(J),"locked","0"));null!=J&&this.setDefaultParent(J)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=
+"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+
+")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=T&&wa.appendChild(T);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=
+Editor.guid();document.execCommand("fontname",!1,I);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==I&&(P=!0,T[U].setAttribute("face",k),null!=A?T[U].setAttribute("data-font-src",A):T[U].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=
+function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=
+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,
+arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");
+for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),
+ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=
+function(){ea.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+
+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var I=k.view.scale,
+T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==T&&A.scale==I||(A.bounds=k,A.value=T,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),
+this.view.validateBackgroundImage())};var W=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){W.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&
+window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,P=0,U=0,X=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(U<k.length){var sa=this.stoppingCustomActions,qa=
+k[U++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,
+!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&
+(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var Ba=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(X(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:
+"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&
+this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,
+Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var T=document.createElement("div");
+T.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=T.getElementsByTagName("a"),U=!1,X=0;X<P.length;X++)I=P[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(P[X].setAttribute("href",this.updateCustomLink(k,I)),U=!0);U&&this.labelChanged(A,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(T){}return A};
+Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var T=A[I],P;for(P in T)this.updateCustomLinkAction(k,T[P],"cells"),this.updateCustomLinkAction(k,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var T=[],P=0;P<A[I].length;P++)if("*"==A[I][P])T.push(A[I][P]);else{var U=k[A[I][P]];null!=U?""!=U&&T.push(U):T.push(A[I][P])}A[I]=T}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,
+null,A));if(null!=k.excludeCells){for(var I=[],T=0;T<A.length;T++)0>k.excludeCells.indexOf(A[T].id)&&I.push(A[T]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var T=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(U){return U!=T},T))}else{var P=this.model.getCell(k[I]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;
+for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,T){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var U=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,U++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=
+k.length)){for(var sa=pa=0;sa<ja.length&&pa<U;sa++)null!=X[ja[sa]]&&pa++;pa=pa==U}pa&&(1!=T||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);I=[];if(0<P.length){P=P.split(" ");for(var U={},X=0;X<P.length;X++)if(null==A||null!=A[P[X]])U[P[X]]=!0,I.push(P[X]);
+A=U}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);if(0<P.length){P=P.split(" ");for(var U=0;U<P.length;U++)null==I[P[U]]&&(I[P[U]]=!0,A.push(P[U]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var T=this.getTagsForCell(k[I]),
+P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(T=0<T.length?T+" "+aa:aa,U=!0)}U&&this.setAttributeForCell(k[I],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var T=this.getTagsForCell(k[I]);if(0<T.length){for(var P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(P,A[X]);0<=aa&&(P.splice(aa,1),U=!0)}U&&this.setAttributeForCell(k[I],
+"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,T){for(var P=0;P<k.length;P++)this.highlightCell(k[P],
+A,I,T)};Graph.prototype.highlightCell=function(k,A,I,T,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var U=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),U=new mxCellHighlight(this,A,P,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},
+1200)},I));return U};Graph.prototype.addSvgShadow=function(k,A,I,T){I=null!=I?I:!1;T=null!=T?T:!0;var P=k.ownerDocument,U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");U.setAttribute("id",this.shadowId);var X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");U.appendChild(X);
+X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");
+U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");U.appendChild(X);X=k.getElementsByTagName("defs");
+0==X.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=X[0];P.appendChild(U);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),
+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==
+this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var I=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=
[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+
"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=
[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=
@@ -3452,33 +3453,33 @@ this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultPar
"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=
[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];
mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=
-[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,J,U,P,T,W,aa,ja,pa){if(null!=J&&null==mxMarker.markers[J]){var sa=this.getPackageForType(J);
-null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,J,U,P,T){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,J){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,
+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,T,P,U,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);
+null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,T,P,U){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function T(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,
Math.min(parseInt(Ba.value),parseInt(wa.value))))}function P(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=
ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=
-Ca.checked;return null!=J?J(!ua,Fa):k.print(!ua,Fa)}var T=k.editor.graph,W=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));W.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",
+Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var U=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",
"pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",
-"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=
+"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ba,"change",T);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=
za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";
-za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&W.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";T.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");T.isEnabled()&&
-(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(T.isEnabled()||1<pa)&&W.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!T.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;T.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});T=document.createElement("div");T.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=
-"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");T.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ra.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");
-T.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ya.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=
-"2px";A.appendChild(Ca);T.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(T,"click",function(ua){mxEvent.getSource(ua)!=
+za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";U.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");U.isEnabled()&&
+(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(U.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=
+"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");U.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ra.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");
+U.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ya.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=
+"2px";A.appendChild(Ca);U.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=
Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);
mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);
-aa.appendChild(za);T.appendChild(aa);W.appendChild(T);T=document.createElement("div");T.style.borderTop="1px solid lightGray";T.style.whiteSpace="nowrap";T.style.paddingTop="12px";T.style.marginTop="12px";T.style.paddingLeft="8px";mxUtils.write(T,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;
-T.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");T.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";T.appendChild(V);mxUtils.br(T);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;T.appendChild(ia);A=document.createElement("span");
-A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));T.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(T.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),T.appendChild(A),
-mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(T),T.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),T.appendChild(A),mxEvent.addListener(A,
-"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));W.appendChild(T);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=J||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));T=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});T.className="geBtn";k.editor.cancelFirst&&A.appendChild(T);PrintDialog.previewEnabled&&null==J&&(aa=mxUtils.button(mxResources.get("preview"),
-function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=J?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(T);W.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(W.classList.add("geDarkMode"),W.style.colorScheme="dark"):
-(W.classList.remove("geDarkMode"),W.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");W.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=W};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+aa.appendChild(za);U.appendChild(aa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;
+U.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");U.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(V);mxUtils.br(U);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(ia);A=document.createElement("span");
+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));U.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),U.appendChild(A),
+mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(A),mxEvent.addListener(A,
+"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&A.appendChild(U);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),
+function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(U);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):
+(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,
arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{la.getContext("2d").drawImage(Z,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
@@ -3488,7 +3489,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");
for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily=
"initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),
-z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var I=K.selectorText.split(","),ca=0;ca<I.length;ca++)I[ca]="#"+l+" "+I[ca];K.selectorText=I.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var J=K.selectorText.split(","),ea=0;ea<J.length;ea++)J[ea]="#"+l+" "+J[ea];K.selectorText=J.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),
@@ -3498,10 +3499,10 @@ f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDat
EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();
f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=
function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,I=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ea,X,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=X&&(N=window.setTimeout(function(){z.stop();N=null;X({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ea&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/
2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,
-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ea.substring(ea.length-3,ea.length)&&"!"!=ea.charAt(ea.length-1)&&(ea+="..."),ha.innerHTML=mxUtils.htmlEntities(ea),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=I;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ea,X,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ea,
-X,ba);try{la()}catch(Z){null!=X&&X(Z)}})}catch(Z){null!=X&&X(Z)}}));this.stop();return Y});ha=!0}return ha};var ca=z.stop;z.stop=function(){ca.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return I};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=
+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ca,W,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ca,
+W,ba);try{la()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var ea=z.stop;z.stop=function(){ea.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=
l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==
c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=
function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<
@@ -3510,13 +3511,13 @@ mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMet
C=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",
f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==
F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,
-l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ca=null!=ca?ca:!Editor.defaultCompressed;var X=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=
-"_blank";else X=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ca){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());
-mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}I?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),
-ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ea&&
-(ha=ha.cloneNode(!0),ha.setAttribute("border",ea));c=ca?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,X);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,X,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=
-function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var I=K.getElementsByTagName("mxGraphModel"),ca=0<I.length?I[0]:null;I=K;null==ca&&l?(ca=mxUtils.getNodeValue(K),0<ca.length&&(ca=Graph.decompress(ca),null!=ca&&0<ca.length&&(I=K.cloneNode(!1),I.appendChild(mxUtils.parseXml(ca).documentElement)))):null==ca||l?I=K.cloneNode(!0):(I=K.cloneNode(!1),mxUtils.setTextContent(I,
-Graph.compressNode(ca)));z.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&
+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ea=null!=ea?ea:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=
+"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ea){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());
+mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),
+ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ca&&
+(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=ea?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=
+function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),ea=0<J.length?J[0]:null;J=K;null==ea&&l?(ea=mxUtils.getNodeValue(K),0<ea.length&&(ea=Graph.decompress(ea),null!=ea&&0<ea.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(ea).documentElement)))):null==ea||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,
+Graph.compressNode(ea)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&
(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),
this.editor.graph.saveViewState(C.viewState,N,null,t),F=F.cloneNode(!1),F.appendChild(N)));c(F)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var z=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?l.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*
Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var t in c[EditorUi.DIFF_UPDATE]){var z=
@@ -3524,9 +3525,9 @@ c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));n
delete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=
function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",
f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){z=null!=z?z:!0;C=null!=C?C:!1;I=null!=I?I:!Editor.defaultCompressed;var X=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=
-this.pages[0]){var ba=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());X.setBackgroundImage=this.editor.graph.setBackgroundImage;X.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?X.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&X.setBackgroundImage(ha.viewState.backgroundImage);X.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:
-ba.apply(this,arguments)};document.body.appendChild(X.container);null!=ha&&X.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,I,ca);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,X,K,window.location.href,c,f,l,t,z,N,I,da,ea);X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());
+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=
+this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:
+ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,ea);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,da,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());
var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&amp;"));c=
null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+
(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};
@@ -3535,21 +3536,21 @@ EditorUi.prototype.getHtml2=function(c,f,l,t,z){f=window.DRAWIO_VIEWER_URL||Edit
z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+
" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||
null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);
-this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var I=K[C];N.setVisible(I,f[I.id]||!1)}}catch(ca){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();
+this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(ea){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();
f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,
-C,F,N,K,I,ca,da,ea,X,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ca?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,P){try{return this.createDownloadRequest(U,c,t,P,F,z,N,K,I,ca,da,void 0,void 0,!C,ea,X,ba,ha)}catch(T){this.handleError(T)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;
-if(F||A==mxConstants.NONE)A=null;var J=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(J);this.editor.convertImages(J,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,
-I,ca,da,ea,X,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,J=null;if(!EditorUi.isElectronApp&&
-(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};I=I?"1":"0";"pdf"==f&&(null!=ca?(k=ca.from,A=ca.to):0==C&&(J="1"));"xmlpng"==f&&(I="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};
-K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:J,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:I,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ea&&isFinite(ea)?ea:null,crop:null!=X&&X?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,
+C,F,N,K,J,ea,da,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ea?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(T,P){try{return this.createDownloadRequest(T,c,t,P,F,z,N,K,J,ea,da,void 0,void 0,!C,ca,W,ba,ha)}catch(U){this.handleError(U)}}));else{var Z=null,k=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;
+if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();k(T)}),t)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,
+J,ea,da,ca,W,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&
+(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=ea?(k=ea.from,A=ea.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};
+K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,
sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=
function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?
-window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ea){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,I=null,ca=mxUtils.bind(this,function(){var ea=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(X){ea===this.currentPage&&(200<=X.getStatus()&&300>=X.getStatus()?(this.updateDiagram(X.getText()),da()):this.handleError({message:mxResources.get("error")+" "+X.getStatus()}))}),mxUtils.bind(this,
-function(X){this.handleError(X)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(ca,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ca()}));da();ca()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||
-z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,J){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var I=mxUtils.parseXml(K).documentElement;
-if(null!=I)if("1"==I.getAttribute("replace-value"))C.setValue(N,I);else for(var ca=I.attributes,da=0;da<ca.length;da++)z.setAttributeForCell(N,ca[da].nodeName,0<ca[da].nodeValue.length?ca[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ea=c.getAttribute("style");null!=ea&&z.model.setStyle(N,ea)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var X=c.getAttribute("icon");if(null!=X){var ba=0<X.length?JSON.parse(X):
+window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,ea=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),da()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,
+function(W){this.handleError(W)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(ea,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ea()}));da();ea()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||
+z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,I){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var J=mxUtils.parseXml(K).documentElement;
+if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var ea=J.attributes,da=0;da<ea.length;da++)z.setAttributeForCell(N,ea[da].nodeName,0<ea[da].nodeValue.length?ea[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):
null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var ma=z.getCellGeometry(N);if(null!=ma){ma=ma.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?ma.x+=Y:"dy"==key?ma.y+=Y:"dw"==key?ma.width+=Y:"dh"==key?ma.height+=Y:ma[key]=parseFloat(ha[key])}z.model.setGeometry(N,ma)}}}catch(Z){null!=window.console&&console.log("Error in icon for "+
N.id+": "+Z)}}}else if("model"==c.nodeName){for(var la=c.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(c.firstChild)).decode(la,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",
@@ -3560,7 +3561,7 @@ mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxRe
c.getMode()){var F="1"==urlParams.sketch?"sketch":uiTheme;if(null==F)F="default";else if("sketch"==F||"min"==F)F+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||C():C()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,N.fallbackFileData,this.defaultFilename,
!0);this.fileLoaded(K)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var F=c[C].node.cloneNode(!1);F.removeAttribute("name");t.root=c[C].root;var N=z.encode(t);this.editor.graph.saveViewState(c[C].viewState,N,!0);N.removeAttribute("pageWidth");
-N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,I,ca,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=I&&"y"!=I&&"width"!=I&&"height"!=I?da&&"mxCell"==K.nodeName&&"previous"==I?null:ca:Math.round(ca)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&
+N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,J,ea,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?da&&"mxCell"==K.nodeName&&"previous"==J?null:ea:Math.round(ea)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&
"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,F=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=F&&(t^=this.hashValue(C,f,l)+this.hashValue(F,f,l))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)t=(t<<5)-t+this.hashValue(c.childNodes[z],f,l)<<0}else if(null!=c&&"function"!==
typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,z,C,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));
@@ -3569,50 +3570,50 @@ f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries
this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||
".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,la){0==Y.length&&c.isEditable()?
(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),la.appendChild(F)):this.addLibraryEntries(Y,la)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;
-l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var I=document.createElement("div");I.style.backgroundColor="inherit";t.style.position="relative";var ca=document.createElement("img");ca.className="geAdaptiveAsset";ca.setAttribute("src",Editor.crossImage);ca.setAttribute("title",mxResources.get("close"));ca.setAttribute("valign","absmiddle");ca.setAttribute("border","0");ca.style.position="relative";ca.style.top="2px";
-ca.style.width="14px";ca.style.cursor="pointer";ca.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)I.appendChild(ca),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ea=
-this.editor.graph,X=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=ca.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",I.insertBefore(X,I.firstChild),this.saveLibrary(c.getTitle(),
-f,c,c.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X)})):null==da&&(da=ca.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),I.insertBefore(da,I.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,
-function(Y,la,Z,k){Y=ea.cloneCells(mxUtils.sortCells(ea.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var J=ea.getCellGeometry(Y[A]);null!=J&&J.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),
-F=null)}),ma=mxUtils.bind(this,function(Y){if(ea.isSelectionEmpty())ea.getRubberband().isActive()?(ea.getRubberband().execute(Y),ea.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ea.getSelectionCells(),Z=ea.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ea.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ea.view.translate.x;Z.y-=ea.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),
-mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler.first&&(ea.graphHandler.suspend(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ea.panningManager.stop(),ea.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ea.isMouseDown&&
-null!=ea.panningManager&&null!=ea.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ea.panningManager.stop(),ea.graphHandler.reset(),ea.isMouseDown=!1,ea.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.graphHandler.first&&(ea.graphHandler.resume(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",
-ea.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,
-Z,k,A,J,U,P,T,W){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,J,U),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,J,U),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==
+l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var ea=document.createElement("img");ea.className="geAdaptiveAsset";ea.setAttribute("src",Editor.crossImage);ea.setAttribute("title",mxResources.get("close"));ea.setAttribute("valign","absmiddle");ea.setAttribute("border","0");ea.style.position="relative";ea.style.top="2px";
+ea.style.width="14px";ea.style.cursor="pointer";ea.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(ea),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=
+this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=ea.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),
+f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==da&&(da=ea.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),J.insertBefore(da,J.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,
+function(Y,la,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),
+F=null)}),ma=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ca.getSelectionCells(),Z=ca.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),
+mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ca.isMouseDown&&
+null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",
+ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,
+Z,k,A,I,T,P,U,X){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,I,T),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,I,T),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==
sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);
-null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=W&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(W,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=W?this.isExternalDataComms()?
-this.parseFile(W,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=
-"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ca=ca.cloneNode(!1);ca.setAttribute("src",Editor.editImage);ca.setAttribute("title",mxResources.get("edit"));I.insertBefore(ca,I.firstChild);mxEvent.addListener(ca,"click",l);l=ca.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));I.insertBefore(l,I.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=
-c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",I.insertBefore(l,I.firstChild))}t.appendChild(I);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=X?this.isExternalDataComms()?
+this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=
+"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ea=ea.cloneNode(!1);ea.setAttribute("src",Editor.editImage);ea.setAttribute("title",mxResources.get("edit"));J.insertBefore(ea,J.firstChild);mxEvent.addListener(ea,"click",l);l=ea.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=
+c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),
C=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=
"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,z,C,F){c=new ImageDialog(this,c,f,l,t,z,C,F);this.showDialog(c.container,
-Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,z,C){var F=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=C&&C(N),N==F)this.hideDialog();else{if(0<N.length){var K=JSON.parse(N);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(I){this.handleError(I)}}),
+Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,z,C){var F=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=C&&C(N),N==F)this.hideDialog();else{if(0<N.length){var K=JSON.parse(N);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(J){this.handleError(J)}}),
null,mxResources.get("close"),null,null,null,!0,null,null,z,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(z,C,F,N){C||(z=new ChangePageSetup(this,t?F:null,z),z.ignoreColor=!t,null!=N&&t&&(z.shadowVisible=N),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,
f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,
-t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ea){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),
-!1);var I=mxResources.get("ok"),ca=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(I=mxResources.get("cancel"),ca=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=
+t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),
+!1);var J=mxResources.get("ok"),ea=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),ea=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=
C?C:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),
-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ca,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ea(){ma.innerText="";for(var Y=0;Y<X.length;Y++){var la=document.createElement("option");mxUtils.write(la,X[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(la,"<"+X[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=
-document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=X.length;ma.appendChild(la)}var X=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ea();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=X.length!=Y;la&&this.drive.setUser(X[Y]);
-this.drive.authorize(la,mxUtils.bind(this,function(){la||(X=this.drive.getUsersList(),ea())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,
+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ea,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){ma.innerText="";for(var Y=0;Y<W.length;Y++){var la=document.createElement("option");mxUtils.write(la,W[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(la,"<"+W[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=
+document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=W.length;ma.appendChild(la)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ca();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=W.length!=Y;la&&this.drive.setUser(W[Y]);
+this.drive.authorize(la,mxUtils.bind(this,function(){la||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,
!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):
-null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,I,l,ca,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
-l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var I=!1;if(!(this.bannerShowing||this["hideBanner"+
-c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ca=z?500:1E3;I=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+
-";"+I;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ca+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ea=document.createElement("img");ea.setAttribute("src",IMAGE_PATH+"/logo.png");ea.setAttribute("border","0");ea.setAttribute("align","absmiddle");ea.style.cssText=
-"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ea);ea=document.createElement("img");ea.setAttribute("src",Dialog.prototype.closeImage);ea.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ea.setAttribute("border","0");ea.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ea)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=
-!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var X=document.createElement("input");X.setAttribute("type","checkbox");X.setAttribute("id","geDoNotShowAgainCheckbox");X.style.marginRight="6px";if(!t){f.appendChild(X);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);
-da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,X.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ea&&mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,
-function(){ha()}),ca)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=X&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ca/2);window.setTimeout(ma,z?4E3:3E4);I=!0}return I};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,ea,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
+l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var J=!1;if(!(this.bannerShowing||this["hideBanner"+
+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ea=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+
+";"+J;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ea+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText=
+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ca)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=
+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var W=document.createElement("input");W.setAttribute("type","checkbox");W.setAttribute("id","geDoNotShowAgainCheckbox");W.style.marginRight="6px";if(!t){f.appendChild(W);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);
+da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,
+function(){ha()}),ea)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=W&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ea/2);window.setTimeout(ma,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,
f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),
l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):
!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
-l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ca,da,ea,X){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,
-450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ca,l,t,null,N);else if(null!=ca&&0<ca.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ca,l,t,da,Y)}catch(la){this.handleError(la)}});null!=X?ma(X):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||
-z.push("_blank");var I=new SaveDialog(this,f,mxUtils.bind(this,function(ca,da,ea){K(ca.value,da,ca,ea);this.hideDialog(null,null,I.container)}),z,c,l,t);this.showDialog(I.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));I.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;
+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ea,da,ca,W){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,
+450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ea,l,t,null,N);else if(null!=ea&&0<ea.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ea,l,t,da,Y)}catch(la){this.handleError(la)}});null!=W?ma(W):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||
+z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(ea,da,ca){K(ea.value,da,ea,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;
""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
@@ -3626,18 +3627,18 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(
speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";
N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,
-function(I,ca,da,ea){if("_blank"==ca||null!=I&&0<I.length){var X=l("_blank"==ca?null:I,ca==App.MODE_DEVICE||"download"==ca||null==ca||"_blank"==ca?"0":"1");null!=X&&(ca==App.MODE_DEVICE||"download"==ca||"_blank"==ca?X.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&X.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=X.getStatus()&&299>=X.getStatus())try{this.exportFile(X.getText(),I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ea?da(ea):this.pickFolder(ca,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(I,ca,da){N(I.value,ca,I,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");
+function(J,ea,da,ca){if("_blank"==ea||null!=J&&0<J.length){var W=l("_blank"==ea?null:J,ea==App.MODE_DEVICE||"download"==ea||null==ea||"_blank"==ea?"0":"1");null!=W&&(ea==App.MODE_DEVICE||"download"==ea||"_blank"==ea?W.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?da(ca):this.pickFolder(ea,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,ea,da){N(J.value,ea,J,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");
this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=
-function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X)}));this.handleError(U)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;
-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==I?"_blank":"self"==I?"_top":null,null,!ea,ca,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",U,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var k=mxUtils.bind(this,function(U){this.spinner.stop();z&&U.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));X(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(U){Editor.replaceSvgDataUris&&
-C&&EditorUi.embedSvgImages(U);Editor.foreignObjectImages&&ea?this.replaceAlternateContent(U,ca,k):k(U)}),J=mxUtils.bind(this,function(U){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,A,this.thumbImageCache)):A(U)});ea?this.embedFonts(la,J):(this.editor.addFontCss(la),J(la))}catch(U){this.handleError(U)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ea,X,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,
-mxConstants.NS_SVG,"image");ma.setAttribute("x",ea);ma.setAttribute("y",X+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ca.length)ca[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,
-function(){counter--;0==counter&&l(c)}),K={},I={},ca=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ea=da.getElementsByTagName("div");if(0<ea.length)try{var X=ea[0].cloneNode(!0),ba=parseInt(X.style.marginLeft),ha=parseInt(X.style.paddingTop),ma=X.getElementsByTagName("div")[1],Y=ea=!1,la=X.style.alignItems,Z=X.style.justifyContent;if(null!=X.style.writingMode){var k=X.style.writingMode;Y="vertical-"==k.substring(0,9);ea="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==X.style.width||
-Y&&"1px"==X.style.height;if(!Y&&"1px"==X.style.height||Y&&"1px"==X.style.width)X.style.alignItems=Y&&ea?"unsafe flex-end":"unsafe flex-start";A&&(X.style.justifyContent="unsafe flex-start");X.style.paddingTop="";X.style.marginLeft="";var J=X.outerHTML,U=K[J];null==U&&(X.style.position="absolute",X.style.visibility="hidden",document.body.appendChild(X),k=1,k="1px"==X.style.width?ma.offsetWidth:parseInt(X.style.width),A=1,A="1px"==X.style.height?ma.offsetHeight:parseInt(X.style.height),document.body.removeChild(X),
-U=new mxRectangle(ba,ha,k,A),K[J]=U);"1px"==X.style.height&&("unsafe center"==la?ha-=U.height/2:"unsafe flex-end"==la&&(ha-=U.height));if("1px"==X.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ea&&"unsafe flex-end"==la||ea&&"unsafe flex-start"==la))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(ma.style.fontSize)/4);ca.push(mxUtils.bind(this,function(P){var T=I[J];null==T?Graph.htmlToPng(J,U.width,U.height,mxUtils.bind(this,
-function(W){t(da,ba,ha,U,W);I[J]=W;P()}),C):(t(da,ba,ha,U,T),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&
+function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(T){Editor.addRetryToError(T,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W)}));this.handleError(T)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;
+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,ea,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",T,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var k=mxUtils.bind(this,function(T){this.spinner.stop();z&&T.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(T){Editor.replaceSvgDataUris&&
+C&&EditorUi.embedSvgImages(T);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(T,ea,k):k(T)}),I=mxUtils.bind(this,function(T){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,A,this.thumbImageCache)):A(T)});ca?this.embedFonts(la,I):(this.editor.addFontCss(la),I(la))}catch(T){this.handleError(T)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ca,W,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,
+mxConstants.NS_SVG,"image");ma.setAttribute("x",ca);ma.setAttribute("y",W+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ea.length)ea[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,
+function(){counter--;0==counter&&l(c)}),K={},J={},ea=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ca=da.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),ma=W.getElementsByTagName("div")[1],Y=ca=!1,la=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||
+Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,T=K[I];null==T&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?ma.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?ma.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),
+T=new mxRectangle(ba,ha,k,A),K[I]=T);"1px"==W.style.height&&("unsafe center"==la?ha-=T.height/2:"unsafe flex-end"==la&&(ha-=T.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=T.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ca&&"unsafe flex-end"==la||ca&&"unsafe flex-start"==la))ba-=T.width;T=new mxRectangle(ba,ha,T.width,T.height+parseInt(ma.style.fontSize)/4);ea.push(mxUtils.bind(this,function(P){var U=J[I];null==U?Graph.htmlToPng(I,T.width,T.height,mxUtils.bind(this,
+function(X){t(da,ba,ha,T,X);J[I]=X;P()}),C):(t(da,ba,ha,T,U),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&
(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);
var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==
C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?
@@ -3645,161 +3646,162 @@ C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!
"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);
z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});
mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),
-"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,I,ca){var da=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==da||""==da.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,
-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+da.getHash(),c=!1);c&&null!=da&&null!=da.getTitle()&&da.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(da.getTitle()));I&&1<l.length&&(K.push("open="+l.substring(1)),l="");ca&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());return(t&&(null!=F||null!=da&&da.getMode()!=App.MODE_GITHUB&&da.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){this.getBasenames();var X={};""!=z&&z!=mxConstants.NONE&&(X.highlight=z);"auto"!==t&&(X.target=t);I||(X.lightbox=!1);X.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(X.zoom=l/100);l=[];F&&(l.push("pages"),X.resize=!0,null!=this.pages&&null!=this.currentPage&&
-(X.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),X.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ea&&(X["dark-mode"]=ea);0<l.length&&(I&&l.push("lightbox"),X.toolbar=l.join(" "));null!=ca&&0<ca.length&&(X.edit=ca);null!=c?X.url=c:X.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(X))+'"></div>';c=null!=c?"&fetch="+
-encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");
-mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value",
-"copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var I=this.getCurrentFile();null==l&&null!=I&&I.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),F.appendChild(K),
-mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(I.getId(),I)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ca=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));da.appendChild(K);K=document.createElement("option");
-K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ea=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var X=document.createElement("input");
-X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";X.style.marginLeft="4px";X.style.marginRight="12px";X.value="100%";z.appendChild(X);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=
-this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ea.checked,X.value,ca.getTarget(),ca.getColor(),ba.checked,ha.checked,ma.checked,Y.checked,la.checked,
-null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K){var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";I.appendChild(ca);var da=document.createElement("select");c=30;da.className=
-"geBtn";da.style.marginBottom="8px";da.style.marginLeft="0px";da.style.width="100%";da.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),da.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");da.appendChild(ca);null!=N&&
-""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");da.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),da.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));I.appendChild(da);mxUtils.br(I);da.focus();var ea=null,X=null;if(null!=f||null!=l)c+=30,mxUtils.write(I,mxResources.get("width")+
-":"),ea=document.createElement("input"),ea.setAttribute("type","text"),ea.style.marginRight="16px",ea.style.width="50px",ea.style.marginLeft="6px",ea.style.marginRight="16px",ea.style.marginBottom="10px",ea.value="100%",I.appendChild(ea),mxUtils.write(I,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=l+"px",I.appendChild(X),mxUtils.br(I);var ba=this.addLinkSection(I,t),
-ha=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ha=this.addCheckbox(I,mxResources.get("selectedPage")+": "+f));var ma=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),Y=this.addEditButton(I,ma),la=Y.getEditInput();t&&(la.style.marginLeft=ma.style.marginLeft,ma.style.display="none",c-=20);var Z=this.addCheckbox(I,mxResources.get("layers"),!0);
-Z.style.marginLeft=la.style.marginLeft;Z.style.marginTop="8px";var k=this.addCheckbox(I,mxResources.get("tags"),!0);k.style.marginLeft=la.style.marginLeft;k.style.marginBottom="16px";k.style.marginTop="16px";mxEvent.addListener(ma,"change",function(){ma.checked?(Z.removeAttribute("disabled"),la.removeAttribute("disabled"),k.removeAttribute("disabled")):(Z.setAttribute("disabled","disabled"),la.setAttribute("disabled","disabled"),k.setAttribute("disabled","disabled"));la.checked&&ma.checked?Y.getEditSelect().removeAttribute("disabled"):
-Y.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,I,mxUtils.bind(this,function(){K(ba.getTarget(),ba.getColor(),null==ha?!1:ha.checked,ma.checked,Y.getLink(),Z.checked,null!=ea?ea.value:null,null!=X?X.value:null,k.checked,da.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ea?(ea.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ea.select():document.execCommand("selectAll",!1,null)):null==da.parentNode;ba.focus()};
-EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=
-"4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var I=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ca=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ea=parseInt(N.value)/100||1,X=parseInt(K.value)||0;l(!I.checked,null!=ca?ca.checked:!1,null!=da?da.checked:!1,ea,X)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ea=document.createElement("h3");mxUtils.write(ea,c);ea.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";I.appendChild(ea);mxUtils.write(I,mxResources.get("zoom")+":");var X=document.createElement("input");X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";
-X.style.marginLeft="4px";X.style.marginRight="12px";X.value=this.lastExportZoom||"100%";I.appendChild(X);mxUtils.write(I,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";I.appendChild(ba);mxUtils.br(I);var ha=this.addCheckbox(I,mxResources.get("selectionOnly"),!1,ca.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop=
-"16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ea=0;ea<c.length;ea++)if(!ca.isSelectionEmpty()||"selectionOnly"!=c[ea]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ea]));la.setAttribute("value",c[ea]);Y.appendChild(la)}K?(mxUtils.write(I,mxResources.get("size")+
-":"),I.appendChild(Y),mxUtils.br(I),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(I.appendChild(ma),mxUtils.write(I,mxResources.get("crop")),mxUtils.br(I),da+=30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ca.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",
-ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(I,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");
-K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(I,mxResources.get("appearance")+":");I.appendChild(k);mxUtils.br(I);da+=26;var A=this.addCheckbox(I,mxResources.get("shadow"),
-ca.shadowVisible),J=null;if("png"==N||"jpeg"==N||"webp"==N)J=this.addCheckbox(I,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var U=this.addCheckbox(I,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ca=document.createElement("option"),ca.setAttribute("value",
-"allPages"),mxUtils.write(ca,mxResources.get("allPages")),P.appendChild(ca),ca=document.createElement("option"),ca.setAttribute("value","currentPage"),mxUtils.write(ca,mxResources.get("currentPage")),P.appendChild(ca),U.style.marginBottom="12px",P.style.marginBottom="16px",I.appendChild(P),mxUtils.br(I),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var T=document.createElement("input");T.style.marginBottom="16px";
-T.style.marginRight="8px";T.setAttribute("type","checkbox");var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type","checkbox");f&&(T.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,I.appendChild(T),mxUtils.write(I,mxResources.get("embedImages")),mxUtils.br(I),W.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,I.appendChild(W),mxUtils.write(I,mxResources.get("embedFonts")),mxUtils.br(I),da+=50);var aa=document.createElement("select");
-aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,
-mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(I,mxResources.get("links")+":"),I.appendChild(aa),I.appendChild(F),mxUtils.br(I),mxUtils.br(I),da+=50);l=new CustomDialog(this,I,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=X.value;this.lastEmbedImages=T.checked;this.lastEmbedFonts=W.checked;this.lastEmbedInclude=P.value;z(X.value,Z.checked,!ha.checked,A.checked,U.checked,T.checked&&f,ba.value,ma.checked,("png"==N||
-"svg"==N)&&"currentPage"==P.value,aa.value,null!=J?J.checked:null,null!=k?k.value:null,Y.value,W.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,
-f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),I=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),ca=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ea=this.addEditButton(C,da),X=ea.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=X.style.marginLeft;ha.style.marginBottom=
-"12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),X.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&da.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,I.checked,ca.checked,da.checked,ea.getLink(),ha.checked)}),null,mxResources.get("embed"),
-z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(X){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+
-(null!=ca?"&page="+ca:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(I.width)+'" height="'+Math.round(I.height)+'"');F('<img src="'+X+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var I=this.editor.graph.getGraphBounds(),ca=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var ba=t?this.getFileData(!0):null;X=this.createImageDataUri(X,
-ba,"png");K(X)}),null,null,null,mxUtils.bind(this,function(X){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),I.width*I.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*I.width)+"&h="+Math.round(2*I.height));var ea=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ea.send(mxUtils.bind(this,function(){200<=ea.getStatus()&&299>=ea.getStatus()?
-K("data:image/png;base64,"+ea.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var I=0;I<K.length;I++){var ca=K[I].getAttribute("href");null!=ca&&"#"==ca.charAt(0)&&"_blank"==K[I].getAttribute("target")&&K[I].removeAttribute("target")}t&&N.setAttribute("content",
-this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ea="";t&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",
-ea+="cursor:pointer;");c&&(ea+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=ea?' style="'+ea+'"':"")+da+"/>")}))}else ea="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ea+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ea+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ea&&N.setAttribute("style",ea),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
+"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,
+null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),l="");ea&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());da&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?
+EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){this.getBasenames();var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),
+W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=ea&&0<ea.length&&(W.edit=ea);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+
+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace=
+"nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");
+C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,
+mxResources.get("share")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ea=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));
+da.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,
+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),
+!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,ea.getTarget(),ea.getColor(),ba.checked,
+ha.checked,ma.checked,Y.checked,la.checked,null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,ea){var da=document.createElement("div");da.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";da.appendChild(ca);
+var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value",
+"auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));da.appendChild(W);mxUtils.br(da);W.focus();var ba=null,ha=null;if(null!=f||null!=
+l)c+=30,mxUtils.write(da,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",da.appendChild(ba),mxUtils.write(da,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",da.appendChild(ha),
+mxUtils.br(da);var ma=this.addLinkSection(da,t),Y=J?this.addCheckbox(da,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var la=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),la=this.addCheckbox(da,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop=
+"16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);ea&&(mxUtils.write(da,mxResources.get("appearance")+":"),da.appendChild(Z),mxUtils.br(da),
+c+=30);var k=this.addCheckbox(da,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(da,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var T=this.addCheckbox(da,mxResources.get("layers"),!0);T.style.marginLeft=I.style.marginLeft;T.style.marginTop="8px";var P=this.addCheckbox(da,mxResources.get("tags"),!0);P.style.marginLeft=I.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?
+(T.removeAttribute("disabled"),I.removeAttribute("disabled"),P.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,da,mxUtils.bind(this,function(){K(ma.getTarget(),ma.getColor(),null==la?!1:la.checked,k.checked,A.getLink(),T.checked,null!=ba?ba.value:null,null!=
+ha?ha.value:null,P.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));
+F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");
+K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ea=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom=
+"16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=ea?ea.checked:!1,null!=da?da.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var J=document.createElement("div");J.style.whiteSpace="nowrap";var ea=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");
+mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");
+ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,ea.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop="16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft=
+"8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!ea.isSelectionEmpty()||"selectionOnly"!=c[ca]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ca]));la.setAttribute("value",c[ca]);Y.appendChild(la)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(J.appendChild(ma),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),da+=
+30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ea.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),
+C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);da+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),ea.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+
+":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){T.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ea=document.createElement("option"),ea.setAttribute("value","allPages"),mxUtils.write(ea,mxResources.get("allPages")),P.appendChild(ea),ea=document.createElement("option"),ea.setAttribute("value","currentPage"),mxUtils.write(ea,mxResources.get("currentPage")),P.appendChild(ea),
+T.style.marginBottom="12px",P.style.marginBottom="16px",J.appendChild(P),mxUtils.br(J),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",F),F()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(U.checked=null!=this.lastEmbedImages?
+this.lastEmbedImages:!0,J.appendChild(U),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),da+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");
+F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),da+=50);l=new CustomDialog(this,
+J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=P.value;z(W.value,Z.checked,!ha.checked,A.checked,T.checked,U.checked&&f,ba.value,ma.checked,("png"==N||"svg"==N)&&"currentPage"==P.value,aa.value,null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&
+t,!t),ea=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,da),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled",
+"disabled"));W.checked&&da.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,ea.checked,da.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=ea?"&page="+ea:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),ea=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):
+null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=
+ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var ea=K[J].getAttribute("href");null!=ea&&"#"==ea.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&
+N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ca="";t&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":
+"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ca&&N.setAttribute("style",ca),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==
c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,z){try{var C=this.editor.graph,F=null;if(null!=l&&0<l.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
-!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(I){return"page"==I?K.getName():"pagenumber"==I?1:N.apply(this,arguments)};document.body.appendChild(C.container);
-C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=I.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(F));c(ca.substring(ca.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(I){null!=f&&f(I)}),null,null,t,null,C.shadowVisible,null,
-C,z,null,null,null,"diagram",null)}catch(I){null!=f&&f(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){N=null!=N?N:!0;ca=null!=ca?ca:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,I,ca,null,null,C,null,K,null,f.shadowVisible||da,null,ea,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ca);null!=c&&C.setAttribute("content",c);null!=
-l&&C.setAttribute("resource",l);var X=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){X(ha)})):X(ba)}));else return X(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,I,ca,da,
-ea)}));this.handleError(ba)}))){var X=this.editor.graph.isSelectionEmpty();l=null!=l?l:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ca)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),
-null,l,c||1,f,t,null,null,C,F,I,da,ea)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<
-c.length){K.model.beginUpdate();try{var I=mxUtils.parseXml(c);c={};var ca=this.editor.extractGraphModel(I.documentElement,null!=this.pages);if(null!=ca&&"mxfile"==ca.nodeName&&null!=this.pages){var da=ca.getElementsByTagName("diagram");if(1==da.length&&!C){if(ca=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ea=da[0].getAttribute("name");null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,
-ea))}}else if(0<da.length){C=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ea=da[0].getAttribute("name"),null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ea)),ca=Editor.parseDiagramNode(da[0]),t=!1,X=1);for(;X<da.length;X++){var ba=da[X].getAttribute("id");da[X].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[X]));c[ba]=da[X].getAttribute("id");var ma=this.pages.length;
-null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ca&&"mxGraphModel"===ca.nodeName){N=K.importGraphModel(ca,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),X=0;X<N.length;X++)this.updatePageLinksForCell(c,N[X]);var Y=K.parseBackgroundImage(ca.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,
+!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(J){return"page"==J?K.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(C.container);
+C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ea=J.toDataURL("image/png");ea=Editor.writeGraphModelToPng(ea,"tEXt","mxfile",encodeURIComponent(F));c(ea.substring(ea.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,
+C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){N=null!=N?N:!0;ea=null!=ea?ea:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,ea,null,null,C,null,K,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ea);null!=c&&C.setAttribute("content",c);null!=
+l&&C.setAttribute("resource",l);var W=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){W(ha)})):W(ba)}));else return W(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,ea,da,
+ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ea)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),
+null,l,c||1,f,t,null,null,C,F,J,da,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<
+c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var ea=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=ea&&"mxfile"==ea.nodeName&&null!=this.pages){var da=ea.getElementsByTagName("diagram");if(1==da.length&&!C){if(ea=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=da[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,
+ca))}}else if(0<da.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ca=da[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),ea=Editor.parseDiagramNode(da[0]),t=!1,W=1);for(;W<da.length;W++){var ba=da[W].getAttribute("id");da[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[W]));c[ba]=da[W].getAttribute("id");var ma=this.pages.length;
+null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ea&&"mxGraphModel"===ea.nodeName){N=K.importGraphModel(ea,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(ea.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,
null,Y);la.ignoreColor=!0;K.model.execute(la)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=
c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,
z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")+
1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,
-function(I){F.clear()&&C(I)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(t);try{var ca=t.lastIndexOf(".");if(0<=ca&&ca<t.length)t.substring(ca+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(X){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;
-I.append("file1",c,t);var ea=new XMLHttpRequest;ea.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ea.responseType="blob";this.addRemoteServiceSecurityCheck(ea);null!=z&&ea.setRequestHeader("x-convert-custom",z);ea.onreadystatechange=mxUtils.bind(this,function(){if(4==ea.readyState&&F.clear())if(200<=ea.status&&299>=ea.status)try{var X=ea.response;if("text/xml"==X.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});
-ba.readAsText(X)}else this.doImportVisio(X,f,N,t)}catch(ha){N(ha)}else try{""==ea.responseType||"text"==ea.responseType?N({message:ea.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ea.response))}catch(ha){N({})}});ea.send(I)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(X){N(X)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
+function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var ea=t.lastIndexOf(".");if(0<=ea&&ea<t.length)t.substring(ea+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;
+J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});
+ba.readAsText(W)}else this.doImportVisio(W,f,N,t)}catch(ha){N(ha)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ca.response))}catch(ha){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(W){N(W)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=
!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,
f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&
-K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var I=0;I<N.svgThumbs.length;I++)K.push(Editor.createSvgDataUri(N.svgThumbs[I]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ca){}}catch(ca){null!=window.console&&console.error(ca),C(ca)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
+K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ea){}}catch(ea){null!=window.console&&console.error(ea),C(ea)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));
l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",
-c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ca=mxUtils.trim(K.getText());this.generateMermaidImage(ca,null,mxUtils.bind(this,function(da,ea,X){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ca),f(ca,da,ea,X))}),N)}),N,mxUtils.bind(this,function(da){3>
-t++?C.clear()&&z():N(da)}))}),N);else{var I={message:mxResources.get("error")+" "+K.getStatus()};try{I=JSON.parse(K.getText()),I=I.error}catch(ca){}N(I)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?
+c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ea=mxUtils.trim(K.getText());this.generateMermaidImage(ea,null,mxUtils.bind(this,function(da,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ea),f(ea,da,ca,W))}),N)}),N,mxUtils.bind(this,function(da){3>
+t++?C.clear()&&z():N(da)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(ea){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?
f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,
f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=
-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var I=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<I.length&&"error"!=I[0].getAttribute("aria-roledescription")){var ca=parseFloat(I[0].getAttribute("width")),da=parseFloat(I[0].getAttribute("height"));if(isNaN(ca)||isNaN(da))try{var ea=I[0].getAttribute("viewBox").split(/\s+/);ca=parseFloat(ea[2]);da=parseFloat(ea[3])}catch(X){ca=ca||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),
-ca,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(X){t(X)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,
-null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,I){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|I>>6;c4=I&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+
+K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var ea=parseFloat(J[0].getAttribute("width")),da=parseFloat(J[0].getAttribute("height"));if(isNaN(ea)||isNaN(da))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);ea=parseFloat(ca[2]);da=parseFloat(ca[3])}catch(W){ea=ea||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),
+ea,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,
+null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+
N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==
-f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(I){var ca=new Image;ca.onload=function(){try{var da=ca.width,ea=ca.height;if(0==da&&0==ea){var X=K.result,ba=X.indexOf(","),ha=decodeURIComponent(escape(atob(X.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ea=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ea)}catch(Y){t(Y)}};ca.src=K.result};K.onerror=function(I){t(I)}}else t(N)};
+f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var ea=new Image;ea.onload=function(){try{var da=ea.width,ca=ea.height;if(0==da&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ca=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ca)}catch(Y){t(Y)}};ea.src=K.result};K.onerror=function(J){t(J)}}else t(N)};
F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ea){4==ea.readyState&&200<=ea.status&&299>=ea.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ea.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var I=Editor.extractGraphModelFromPdf(c);if(null!=
-I&&0<I.length)return this.importXml(I,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(I=Editor.extractGraphModelFromPng(c),null!=I&&0<I.length))return this.importXml(I,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{I=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(I=c.substring(c.indexOf(",")+1),I=window.atob&&!mxClient.IS_SF?atob(I):Base64.decode(I,!0)):I=decodeURIComponent(c.substring(c.indexOf(",")+1));var ca=this.importXml(I,f,l,C,!0,N);if(0<ca.length)return ca}catch(ea){}this.loadImage(c,
-mxUtils.bind(this,function(ea){if("data:"==c.substring(0,5))this.resizeImage(ea,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/ea.width,this.maxImageSize/ea.height)),ba=Math.round(ea.width*X);ea=Math.round(ea.height*
-X);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ea=null;K.getModel().beginUpdate();try{ea=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ea),K.fireEvent(new mxEventObject("textInserted","cells",[ea]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ea)}))}else{c=
-Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ea){this.editor.graph.setSelectionCells(this.importXml(ea,f,l,C,null,N))}),mxUtils.bind(this,function(ea){this.handleError(ea)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=
+J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var ea=this.importXml(J,f,l,C,!0,N);if(0<ea.length)return ea}catch(ca){}this.loadImage(c,
+mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*
+W);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=
+Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));
K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var da=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=da.width;z.geometry.height=da.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};
EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=
c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=
l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));
window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;
-this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(I,ca){I=ca.name.toLowerCase();"diagram/diagram.xml"==I?(K=!0,ca.async("string").then(function(da){0==
-da.indexOf("<mxfile ")?f(da):l()})):0==I.indexOf("versions/")&&(I=parseInt(I.substr(9)),I>F&&(F=I,N=ca))});0<F?N.async("string").then(function(I){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(I,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(I,mxUtils.bind(this,function(ca){4==ca.readyState&&(200<=ca.status&&299>=ca.status?f(ca.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||
-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,I,ca,da){I=null!=I?I:!0;var ea=!1,X=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,I,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=
-!1,"image/png"==f.substring(0,9)&&(ca=ca?null:this.extractGraphModelFromPng(c),null!=ca&&0<ca.length&&(X=this.importXml(ca,l,t,I,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ca=c.indexOf(";"),0<ca&&(c=c.substring(0,ca)+c.substring(c.indexOf(",",ca+1))),I&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ca="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ca+="editableCssRules=.*;"),
-X=[K.insertVertex(null,null,"",l,t,z,C,ca+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ea=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ea=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ea=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),
-413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ea=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I);N(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I,null,null!=da?mxEvent.isControlDown(da):null));ea||null==N||N(X);return X};EditorUi.prototype.importFiles=
-function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){t=null!=t?t:this.maxImageSize;I=null!=I?I:this.maxImageBytes;var X=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ca||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(W,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=
-W&&"<mxlibrary"==W.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,W,wa)),this.showSidebar(),null;this.isCompatibleString(W)&&1==c.length&&null!=ea&&"drop"==ea.type&&this.isBlankFile()&&!this.canUndo()&&(X=!1,pa=ja=0);return this.importFile(W,aa,ja,pa,sa,qa,wa,Ba,za,X,da,ea)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(W){Z.setSelectionCells(W)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,
-J=A,U=[],P=mxUtils.bind(this,function(W,aa){U[W]=aa;if(0==--J){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(W=0;W<U.length;W++){var pa=U[W]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),T=0;T<A;T++)mxUtils.bind(this,function(W){var aa=c[W];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),
-qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(W,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");
+this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,ea){J=ea.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,ea.async("string").then(function(da){0==
+da.indexOf("<mxfile ")?f(da):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=ea))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(ea){4==ea.readyState&&(200<=ea.status&&299>=ea.status?f(ea.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||
+this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,ea,da){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,J,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=
+!1,"image/png"==f.substring(0,9)&&(ea=ea?null:this.extractGraphModelFromPng(c),null!=ea&&0<ea.length&&(W=this.importXml(ea,l,t,J,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ea=c.indexOf(";"),0<ea&&(c=c.substring(0,ea)+c.substring(c.indexOf(",",ea+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ea="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ea+="editableCssRules=.*;"),
+W=[K.insertVertex(null,null,"",l,t,z,C,ea+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),
+413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=da?mxEvent.isControlDown(da):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=
+function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ea||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=
+X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,da,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,
+I=A,T=[],P=mxUtils.bind(this,function(X,aa){T[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(T);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var pa=T[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),U=0;U<A;U++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),
+qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");
if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,
-Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+W*k,l+W*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",
-sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(W,mxUtils.bind(this,function(){return z(ra,"text/xml",f+W*k,l+W*k,0,0,aa.name)}))}else P(W,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(W,mxUtils.bind(this,function(){return z(ya,"text/xml",f+W*k,l+W*k,Ca.width,Ca.height,aa.name)}));
-qa=!0}}qa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(W,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<I){var Za=ba&&this.isResampleImageSize(aa.size,
-ca)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+W*k,l+W*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ca,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+W*k,l+W*k,240,160,aa.name,function(Ma){P(W,function(){return Ma})},aa)}catch(Ma){P(W,mxUtils.bind(this,function(){return null})),null!=window.console&&
-console.error(Ma,aa)}else P(W,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+W*k,l+W*k,240,160,aa.name,function(pa){P(W,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(T)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+X*k,l+X*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",
+sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else P(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));
+qa=!0}}qa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,
+ea)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ea,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){P(X,function(){return Ma})},aa)}catch(Ma){P(X,mxUtils.bind(this,function(){return null})),null!=window.console&&
+console.error(Ma,aa)}else P(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){P(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(U)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,
!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=
function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,
-F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),I=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ca=Math.max(N/z,K/z);if(1<ca){var da=Math.round(N/ca),ea=Math.round(K/ca),X=document.createElement("canvas");X.width=da;X.height=ea;X.getContext("2d").drawImage(c,0,0,da,ea);var ba=X.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ea;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ea)}}}catch(Y){}t&&I!=f&&z>
+F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ea=Math.max(N/z,K/z);if(1<ea){var da=Math.round(N/ea),ca=Math.round(K/ea),W=document.createElement("canvas");W.width=da;W.height=ca;W.getContext("2d").drawImage(c,0,0,da,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ca;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ca)}}}catch(Y){}t&&J!=f&&z>
this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=
(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};
var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});
-f.cellEditor.editPlantUmlData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,U.format,function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+T+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(T),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=
-W,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:U.format}))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,U.config,
-function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",T,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,W),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=
-function(k,A){try{var J=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=J)this.editPlantUmlData(k,A,J);else if(J=this.graph.getAttributeForCell(k,"mermaidData"),null!=J&&window.isMermaidEnabled)this.editMermaidData(k,A,J);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var J=!1;try{var U=this.getGraphBounds();
-c.handleCustomLink(k,A);J=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return J};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var J=k.indexOf(",");if(0<J)for(k=k.substring(J+1),A=A.getProperty("patches"),J=0;J<A.length;J++)if(null!=A[J][EditorUi.DIFF_UPDATE]&&null!=A[J][EditorUi.DIFF_UPDATE][k]||
-null!=A[J][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[J][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var J=F.apply(this,arguments);null!=J&&null!=J.originalSrc&&(J=A?c.createImageForPageLink(J.originalSrc,null,null,!0):{src:J.originalSrc});return J};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");
-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,J){var U=A;A=function(P,T,W){if(null==T){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(T=aa.getAttribute("href"))}null!=
-T&&f.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(T,W)&&mxEvent.consume(P);null!=U&&U(P,T,W)};K.call(this,k,A,J)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,J){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,J);I.apply(this,arguments);
-f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,J);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,J)};var ca=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,J){if(c.editor.graph.isSelectionEmpty())ca.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,J);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,J):this.addPopupMenuArrangeItems(k,
-A,J),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,J),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,J),this.addMenuItems(k,["lockUnlock","-"],null,J),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,
-["clearWaypoints"],null,J)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,J);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ea=f.getGlobalVariable;f.getGlobalVariable=
-function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ea.apply(this,arguments)};var X=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;X!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),
-f.view.validate());X=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,J){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(J)&&mxEvent.isPopupTrigger(J))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(J)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};
+f.cellEditor.editPlantUmlData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,T.format,function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==T.format)f.labelChanged(k,"<pre>"+U+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(U),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=
+X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:T.format}))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,T.config,
+function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",U,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:T.config},null,2))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=
+function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var T=f.getCellStyle(k);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var T=this.getGraphBounds();
+c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||
+null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var T=A;A=function(P,U,X){if(null==U){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(U=aa.getAttribute("href"))}null!=
+U&&f.isCustomLink(U)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(U,X)&&mxEvent.consume(P);null!=T&&T(P,U,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);
+f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var ea=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())ea.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,
+A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var T=f.getModel().getGeometry(A);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(k,
+["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(k,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=
+function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var W=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;W!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),
+f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var T=A.getAttribute("href");if(null==T||!f.isCustomLink(T)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(T),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};
var ma=this.actions.get("print");ma.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ma.visible=ma.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,
!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=
-A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,J=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=J&&(J.parentNode.removeChild(J),J=null);U.stopPropagation();
-U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=J&&(J.parentNode.removeChild(J),J=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(T,W,aa,ja,pa,sa){f.insertImage(T,pa,sa)},function(){},function(T){return"image/"==T.type.substring(0,
-6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var P=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,W)),aa/Math.max(1,T));f.insertImage(decodeURIComponent(P),W*aa,T*aa)})):document.execCommand("insertHTML",
-!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:
+A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(T){null!=I&&(I.parentNode.removeChild(I),I=null);T.stopPropagation();
+T.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(T){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(T){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,aa,ja,pa,sa){f.insertImage(U,pa,sa)},function(){},function(U){return"image/"==U.type.substring(0,
+6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var P=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,U));f.insertImage(decodeURIComponent(P),X*aa,U*aa)})):document.execCommand("insertHTML",
+!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:
Y;ma.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ma.unit);this.refresh()}if("1"==urlParams.styledev){ma=document.getElementById("geFooter");null!=ma&&(this.styleInput=document.createElement("input"),
this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ma.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:la.apply(this,arguments)}}ma=document.getElementById("geInfo");null!=ma&&ma.parentNode.removeChild(ma);if(Graph.fileSupport&&
(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,
-"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),J=k.dataTransfer.files,U=f.view.translate,P=f.view.scale,T=A.x/P-U.x,W=A.y/P-U.y;if(0<J.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(J,!0)):(mxEvent.isAltDown(k)&&(W=T=null),this.importFiles(J,T,W,this.maxImageSize,
-null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(W=T=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,T,W,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);
-var pa=null;J=A.getElementsByTagName("img");null!=J&&1==J.length?(ja=J[0].getAttribute("src"),null==ja&&(ja=J[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(J=A.getElementsByTagName("a"),null!=J&&1==J.length?ja=J[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,T,W,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=
-ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",T,W,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,T,W,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),T,W,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();
-this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),J=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),
-T=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,J-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,T-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,
+"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,T=f.view.translate,P=f.view.scale,U=A.x/P-T.x,X=A.y/P-T.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=U=null),this.importFiles(I,U,X,this.maxImageSize,
+null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=U=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,U,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);
+var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,U,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=
+ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",U,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,U,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),U,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();
+this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),
+U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,
mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);ma=!1;null!=urlParams.dark?ma=urlParams.dark:(ma="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ma&&"auto"!=mxSettings.settings.darkMode||(ma=mxSettings.settings.darkMode));"auto"==ma&&
this.isAutoDarkModeSupported()&&(ma=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ma?"1"==ma:ma);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&
null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==
Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=
-this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(I),mxEvent.getClientY(I)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=
-"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(I){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,
-mxUtils.bind(this,function(I){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(I){var ca=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(I)-C)+"px",ca=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(I)-F)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(I){null==C&&null==F||mxEvent.consume(I);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";
-this.addListener("editInlineStart",mxUtils.bind(this,function(I){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(I){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,
+this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=
+"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,
+mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var ea=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",ea=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";
+this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,
function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,
-function(K,I,ca,da,ea,X){c.insertImage(K,ea,X)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var I=0;I<K.length;I++)K[I]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
+function(K,J,ea,da,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize=
"none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML="&nbsp;";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||
224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||
@@ -3871,21 +3873,21 @@ this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCell
C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,
F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&
(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=
-this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var I=!1,ca="";ca=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==
-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ca.lastIndexOf("%3E");0<=da&&da<ca.length-3&&(ca=ca.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ca))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,ca=
-K)}catch(ba){}try{if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ea=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),this.pasteXml(ca,t,I,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ea):ea()}else this.pasteXml(ca,t,I,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var X=this.editor.graph;X.lastPasteXml=null;X.pasteCounter=
+this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,ea="";ea=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==
+z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ea.lastIndexOf("%3E");0<=da&&da<ea.length-3&&(ea=ea.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ea))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,ea=
+K)}catch(ba){}try{if(null!=ea&&0<ea.length){if(0==ea.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{ea=(new MiroImporter).importMiroJson(JSON.parse(ea)),this.pasteXml(ea,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(ea,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=
0}}catch(ba){this.handleError(ba)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+
-1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,J=ma.currentScale,U=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var T=ma.getGraphBounds(),W=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);
-var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(T.height/ma.view.scale),ja.width*qa/(T.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),W-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(T=t.getBoundingBox(t.getSelectionCells())),ja.width=(T.width+1)*qa/ma.view.scale,ja.height=(T.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*
-ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,W,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;W=f.border;isNaN(W)||(Y.pageMargin=W);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),
+1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,I=ma.currentScale,T=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var U=ma.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);
+var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(U.height/ma.view.scale),ja.width*qa/(U.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(U=t.getBoundingBox(t.getSelectionCells())),ja.width=(U.width+1)*qa/ma.view.scale,ja.height=(U.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*
+ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),
ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=ma.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)+
'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};
-f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{T=ma.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";Y.backgroundColor=T;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,
-W,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)W=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(W)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&
-(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=J,ma.view.translate=U,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,I=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{I&&(I=f.selection||N==C&&K==C);if(!I&&null!=this.pages&&this.pages.length){I=0;C=this.pages.length-1;f.allPages||(I=parseInt(N)-1,C=parseInt(K)-1);for(var ca=I;ca<=C;ca++){var da=this.pages[ca];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);
-N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;I=!1;var ea=null,X=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,I=da.viewState.mathEnabled,ea=da.viewState.background,X=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=X&&null!=X.originalSrc&&(X=this.createImageForPageLink(X.originalSrc,da));N.background=ea;N.backgroundImage=null!=
-X?new mxImage(X.src,X.width,X.height,X.x,X.y):null;N.pageVisible=K;N.mathEnabled=I;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?
-ca+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ca!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),
+f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{U=ma.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";Y.backgroundColor=U;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,
+X,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)X=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&
+(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=I,ma.view.translate=T,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var ea=J;ea<=C;ea++){var da=this.pages[ea];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);
+N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,J=da.viewState.mathEnabled,ca=da.viewState.background,W=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,da));N.background=ca;N.backgroundImage=null!=
+W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?
+ea+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ea!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),
Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);
else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):
@@ -3893,7 +3895,7 @@ else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTran
413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;
var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?
this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||
-/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,
+/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,
f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),
200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();
null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);
@@ -3904,70 +3906,70 @@ F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResour
function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=
function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=
c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;
-this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(I){console.log(I)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
+this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,
f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;
f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||
-l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,I){this.editor.modified&&
-"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var I=K.data,ca=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):
-"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ea=!1;try{I=JSON.parse(I),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[I])}catch(ra){I=null}try{if(null==I)return;if("dialog"==I.action){this.showError(null!=
-I.titleKey?mxResources.get(I.titleKey):I.title,null!=I.messageKey?mxResources.get(I.messageKey):mxUtils.htmlEntities(I.message),null!=I.buttonKey?mxResources.get(I.buttonKey):I.button);null!=I.modified&&(this.editor.modified=I.modified);return}if("layout"==I.action){this.executeLayouts(this.editor.graph.createLayouts(I.layouts));return}if("prompt"==I.action){this.spinner.stop();var X=new FilenameDialog(this,I.defaultValue||"",null!=I.okKey?mxResources.get(I.okKey):I.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",
-value:ra,message:I}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")},null!=I.titleKey?mxResources.get(I.titleKey):I.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")});this.showDialog(X.container,300,80,!0,!1);X.init();return}if("draft"==I.action){var ba=da(I.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[I.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();
-F.postMessage(JSON.stringify({event:"draft",result:"edit",message:I}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:I}),"*")}),I.editKey?mxResources.get(I.editKey):null,I.discardKey?mxResources.get(I.discardKey):null,I.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:I}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&
-this.actions.get("exit").funct()}));try{X.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:I}),"*")}return}if("template"==I.action){this.spinner.stop();var ha=1==I.enableRecent,ma=1==I.enableSearch,Y=1==I.enableCustomTemp;X=new NewDialog(this,!1,I.templatesOnly?!1:null!=I.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=I.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,
-libs:Ma,builtIn:!0,message:I}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,I.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",
-docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==I.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==I.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:I}),"*");return}if("status"==
-I.action){null!=I.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(I.messageKey))):null!=I.message&&this.editor.setStatus(mxUtils.htmlEntities(I.message));null!=I.modified&&(this.editor.modified=I.modified);return}if("spinner"==I.action){var Z=null!=I.messageKey?mxResources.get(I.messageKey):I.message;null==I.show||I.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==I.action){this.actions.get("exit").funct();return}if("viewport"==I.action){null!=I.viewport&&
-(this.embedViewport=I.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==I.action){X=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),X=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=I.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=X&&this.restoreScrollState(X);return}if("snapshot"==I.action){this.sendEmbeddedSvgExport(!0);
-return}if("export"==I.action){if("png"==I.format||"xmlpng"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){var A=null!=I.xml?I.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var J=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(I.withSvg)I.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,I.embedImages,this.editor.graph.background,I.scale,I.border,I.shadow,
-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=I.format;Ca.message=I;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==I.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));J!=this.editor.graph&&J.container.parentNode.removeChild(J.container);U(ra)}),T=I.pageId||(null!=this.pages?I.currentPage?this.currentPage.getId():
-this.pages[0].getId():null);if(this.isExportToCanvas()){var W=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=T){var ra=J.getGlobalVariable;J=this.createTemporaryGraph(J.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==T){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);J.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(J.container);
-J.model.setRoot(ya.root)}if(null!=I.layerIds){var Ma=J.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<I.layerIds.length;Ca++)Aa[I.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;I.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),I.width,null,I.background,mxUtils.bind(this,function(){P(null)}),null,null,I.scale,I.transparent,I.shadow,null,J,I.border,null,
-I.grid,Ca)});null!=I.xml&&0<I.xml.length&&(l=!0,this.setFileData(A),l=!1);W()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==I.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=I.layerIds&&0<I.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:I.layerIds})):"")+(null!=I.scale?"&scale="+I.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):P(null)}),
-mxUtils.bind(this,function(){P(null)}))}}else if(W=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=I;if("html2"==I.format||"html"==I.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=I.format}else if("html"==I.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=I.format;
-else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=I.background?I.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";I.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=I.theme&&(Ma=I.theme);if("xmlsvg"==I.format){if(null==
-I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=I.theme&&(Ma=I.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,I.embedImages,ya,I.scale,I.border,I.shadow,Ma)}}else if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,
-I.scale,I.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||I.shadow,null,Ma),(this.editor.graph.shadowVisible||I.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){I.embedImages||null==I.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=I.xml&&0<I.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;
-Editor.onMathJaxDone=function(){aa.apply(this,arguments);W()}}l=!0;this.setFileData(I.xml);l=!1;this.editor.graph.mathEnabled||W()}else W();return}if("load"==I.action){ea=I.toSketch;t=1==I.autosave;this.hideDialog();null!=I.modified&&null==urlParams.modified&&(urlParams.modified=I.modified);null!=I.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=I.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||
-this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=I.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=I.noSaveBtn);if(null!=I.rough){var ja=Editor.sketchMode;this.doSetSketchMode(I.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=I.dark&&this.setDarkMode(I.dark);null!=I.border&&(this.embedExportBorder=
-I.border);null!=I.theme&&(this.embedExportTheme=I.theme);null!=I.background&&(this.embedExportBackground=I.background);null!=I.viewport&&(this.embedViewport=I.viewport);this.embedExitPoint=null;if(null!=I.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,I.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,I.rect.top)+"px";this.minInlineWidth=I.minWidth;this.minInlineHeight=I.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";var sa=I.maxFitScale,qa=I.rect.width+2*pa,wa=I.rect.height+2*pa;ca=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*
-pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[I]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&
-(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=I.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=I.noExitBtn);null!=I.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,I.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),
-this.embedFilenameSpan=ba);try{I.libs&&this.sidebar.showEntries(I.libs)}catch(ra){}I=null!=I.xmlpng?this.extractGraphModelFromPng(I.xmlpng):null!=I.descriptor?I.descriptor:I.xml}else{if("merge"==I.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(I.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:I}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:I,error:ra}),"*")}))}else"remoteInvokeReady"==I.action?
-this.handleRemoteInvokeReady(F):"remoteInvoke"==I.action?this.handleRemoteInvoke(I,K.origin):"remoteInvokeResponse"==I.action?this.handleRemoteInvokeResponse(I):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(I)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,
-ya,null,ea)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",
-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ca&&ca()});null!=I&&"function"===typeof I.substring&&"data:application/vnd.visio;base64,"==
-I.substring(0,34)?(da="0M8R4KGxGuE"==I.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=I&&"function"===typeof I.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(I,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&
-299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=I&&"function"===typeof I.substring&&this.isLucidChartData(I)?this.convertLucidChart(I,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==I||"object"!==typeof I||null==I.format||null==I.data&&null==I.url?(I=da(I),Ea(I,K)):this.loadDescriptor(I,
-mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,I,ca){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:I,allowOpener:ca}),"*")}}};EditorUi.prototype.createEmbedButton=
+l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){this.editor.modified&&
+"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,ea=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):
+"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=
+J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));return}if("prompt"==J.action){this.spinner.stop();var W=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",
+value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=da(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();
+F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(W.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&
+this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,ma=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,
+libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",
+docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:J}),"*");return}if("status"==
+J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&
+(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){W=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),W=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=W&&this.restoreScrollState(W);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);
+return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,T=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){T(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,
+"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);T(ra)}),U=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==U){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);
+I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){P(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,
+J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?T("data:image/png;base64,"+ra.getText()):P(null)}),
+mxUtils.bind(this,function(){P(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;
+else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";J.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ma=J.theme);if("xmlsvg"==J.format){if(null==
+J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=J.theme&&(Ma=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ma)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,
+J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ma),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;
+Editor.onMathJaxDone=function(){aa.apply(this,arguments);X()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||
+this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var ja=Editor.sketchMode;this.doSetSketchMode(J.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=
+J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=
+"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;ea=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*
+pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&
+(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),
+this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?
+this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,
+ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",
+f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ea&&ea()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==
+J.substring(0,34)?(da="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&
+299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=da(J),Ea(J,K)):this.loadDescriptor(J,
+mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,ea){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:ea}),"*")}}};EditorUi.prototype.createEmbedButton=
function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");
-c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style["float"]="right","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
+c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?
-mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
-mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),
-c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);
-document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),
-this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",
-l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,I=null,ca=null,da=null,ea=null,X=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",
-Y=null,la=null,Z="",k="auto",A="auto",J=!1,U=null,P=null,T=40,W=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&
-"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?X=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ca=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==Ha&&0<Aa.length&&"-"!=Aa?ea=Aa:"styles"==
-Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?I=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?J="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):"edgespacing"==Ha?T=parseFloat(Aa):
-"nodespacing"==Ha?W=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==N[Ea[Za].to]&&(N[Ea[Za].to]=
-{});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,sa,0,0),ca||"whiteSpace=wrap;html=1;");
-M.collapsed=J;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,J);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=X&&null!=ha){var V=ha[M.getAttribute(X)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ea&&null!=da){var ia=da[M.getAttribute(ea)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,I);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted",
-"cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=null!=la?0:qa;Ca=null!=la?0:wa;null!=U&&null!=Da.getAttribute(U)&&
-(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?
-Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+W}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,I),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=
-Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,I);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=
-lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,I)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,I));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,I):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?
-mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,I));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,
-Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=T;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));
-pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());
-Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=W;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==
-za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=W;cb.parallelEdgeSpacing=T;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,W),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());
-Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*W;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=
-function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&
+(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=
+new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
+!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,ea=null,da=null,ca=
+null,W=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",Y=null,la=null,Z="",k="auto",A="auto",I=!1,T=null,P=null,U=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=
+l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ea=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==
+Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?T=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):
+"edgespacing"==Ha?U=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==
+N[Ea[Za].to]&&(N[Ea[Za].to]={});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,
+sa,0,0),ea||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=da){var ia=da[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,
+J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=
+null!=la?0:qa;Ca=null!=la?0:wa;null!=T&&null!=Da.getAttribute(T)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(T)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=
+A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,J),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);
+var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+
+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();
+eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=
+ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=U;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());
+for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,
+arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=X;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==
+za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=U;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,
+arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*X;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=
+pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);
this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
@@ -3979,23 +3981,23 @@ l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.c
this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=
this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=
this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=
-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var I=c.getFileData(!0,null,null,null,null,!0),ca=K.getGraphBounds(),da=Math.floor(ca.width*z/K.view.scale),ea=Math.floor(ca.height*z/K.view.scale);if(I.length<=MAX_REQUEST_SIZE&&da*ea<MAX_AREA)if(c.hideDialog(),
-"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var X={globalVars:K.getExportVariables()};N&&(X.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ea+"&border="+C+"&xml="+encodeURIComponent(I))})}else"png"==l?c.exportImage(z,
+!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),ea=K.getGraphBounds(),da=Math.floor(ea.width*z/K.view.scale),ca=Math.floor(ea.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(c.hideDialog(),
+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,
null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+
" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(I){z.innerText="";if(0==I.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
-"</div>";else for(var ca=0;ca<I.length;ca++){var da=I[ca];C[da.id]&&(f[da.id]=da);var ea=this.addCheckbox(z,da.title,C[da.id]);(function(X,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(da,ea)}},mxUtils.bind(this,function(I){z.innerText="";var ca=document.createElement("div");ca.style.padding="8px";ca.style.textAlign="center";mxUtils.write(ca,mxResources.get("error")+": ");mxUtils.write(ca,null!=I&&null!=I.message?I.message:mxResources.get("unknownError"));
-z.appendChild(ca)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var I=0,ca;for(ca in f)null==C[ca]&&(I++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ea){I--;0==I&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ea,da)),this.showSidebar()}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){I--;
-0==I&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ca]));for(ca in C)f[ca]||this.closeLibrary(new RemoteLibrary(this,null,C[ca]));0==I&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,
+z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){z.innerText="";if(0==J.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+"</div>";else for(var ea=0;ea<J.length;ea++){var da=J[ea];C[da.id]&&(f[da.id]=da);var ca=this.addCheckbox(z,da.title,C[da.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(da,ca)}},mxUtils.bind(this,function(J){z.innerText="";var ea=document.createElement("div");ea.style.padding="8px";ea.style.textAlign="center";mxUtils.write(ea,mxResources.get("error")+": ");mxUtils.write(ea,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));
+z.appendChild(ea)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,ea;for(ea in f)null==C[ea]&&(J++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,da)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;
+0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ea]));for(ea in C)f[ea]||this.closeLibrary(new RemoteLibrary(this,null,C[ea]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,
allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==
l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);
-C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(I,ca){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ca?da.error={errResp:ca}:null!=I&&
-(da.resp=I);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(I){l(null,I||"Unkown Error")}),
-this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(I){l(null,"Invalid Call: An error occurred, "+I.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",
+C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(J,ea){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ea?da.error={errResp:ea}:null!=J&&
+(da.resp=J);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),
+this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",
{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var N=
-document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,I=!1,ca,da=0,ea=mxUtils.bind(this,function(){I=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ca.length)ea();else{var ma=
-ca[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):X()}),X)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],X,X,["filesInfo","files"])}catch(Y){console.log(Y)}});
-F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||I||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ca=Y.resp[0],K=!1,ba()):ea():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):X())}}catch(la){console.log(la)}});
+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,ea,da=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ea.length)ca();else{var ma=
+ea[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});
+F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ea=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(la){console.log(la)}});
window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,
"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=
function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),
@@ -4004,31 +4006,31 @@ this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prot
c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=
l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z=
"<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(J);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");
-A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var J=document.createElement("div");J.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});U.className="geCommentEditBtn";J.appendChild(U);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",
-mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";J.appendChild(P);ha.insertBefore(J,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));
+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");
+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});T.className="geCommentEditBtn";I.appendChild(T);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",
+mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";I.appendChild(P);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));
mxUtils.write(ha,mxResources.get("timeAgo",[ma],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function O(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,ma,Y,la){function Z(aa,
-ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});W.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=J;aa(ba);return{pdiv:pa,
-replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var J=
-document.createElement("div");J.className="geCommentContainer";J.setAttribute("data-commentId",ba.id);J.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";U.appendChild(P);var T=document.createElement("div");
-T.className="geCommentUsername";mxUtils.write(T,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ba.id);S(ba,T);P.appendChild(T);J.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");J.appendChild(U);ba.isLocked&&(J.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var W=document.createElement("ul");
-W.className="geCommentActionsList";U.appendChild(W);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,J,function(){G(J);ba.editComment(ba.content,function(){R(J)},function(ja){O(J);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),
-function(){b.confirm(mxResources.get("areYouSure"),function(){G(J);ba.deleteComment(function(aa){if(!0===aa){aa=J.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=J.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(J);J.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==
-F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(J);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=
-"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});J.appendChild(U);null!=ma?F.insertBefore(J,ma.nextSibling):F.appendChild(J);for(ma=0;null!=ba.replies&&
-ma<ba.replies.length;ma++)U=ba.replies[ma],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,J,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return J}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+
+ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});X.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=I;aa(ba);return{pdiv:pa,
+replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var I=
+document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;T.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";T.appendChild(P);var U=document.createElement("div");
+U.className="geCommentUsername";mxUtils.write(U,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",ba.id);S(ba,U);P.appendChild(U);I.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,ba.content||"");I.appendChild(T);ba.isLocked&&(I.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var X=document.createElement("ul");
+X.className="geCommentActionsList";T.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){O(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),
+function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);ba.deleteComment(function(aa){if(!0===aa){aa=I.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=I.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(I);I.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==
+F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=
+"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(T);null!=ma?F.insertBefore(I,ma.nextSibling):F.appendChild(I);for(ma=0;null!=ba.replies&&
+ma<ba.replies.length;ma++)T=ba.replies[ma],T.isResolved=ba.isResolved,c(T,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+
Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=
-C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var I=C.cloneNode();I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(I,
-"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ea.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ea,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(I)}var ca=C.cloneNode();ca.classList.add("geToggleItem");ca.style.backgroundImage="url("+Editor.checkImage+")";ca.setAttribute("title",mxResources.get("showResolved"));
-var da=!1;mxEvent.addListener(ca,"click",function(ba){(da=!da)?ca.classList.add("geActiveItem"):ca.classList.remove("geActiveItem");X();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ca);b.commentsRefreshNeeded()&&(I=C.cloneNode(),I.style.backgroundImage="url("+Editor.refreshImage+")",I.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(I,"click",function(ba){X();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(I));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=
-'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ea=[],X=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;
+C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var J=C.cloneNode();J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,
+"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ca.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var ea=C.cloneNode();ea.classList.add("geToggleItem");ea.style.backgroundImage="url("+Editor.checkImage+")";ea.setAttribute("title",mxResources.get("showResolved"));
+var da=!1;mxEvent.addListener(ea,"click",function(ba){(da=!da)?ea.classList.add("geActiveItem"):ea.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ea);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=
+'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ca=[],W=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;
ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(ma){b.handleError(ma)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ma){function Y(la){if(null!=la){la.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<la.length;Z++)Y(la[Z].replies)}}ma.sort(function(la,
-Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ea=ma;for(ma=0;ma<ea.length;ma++)Y(ea[ma].replies),c(ea[ma],ea,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-X();this.refreshComments=X;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ea.length;Y++)ba(ea[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=
+Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=ma;for(ma=0;ma<ca.length;ma++)Y(ca[ma].replies),c(ca[ma],ca,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,O){var R=document.createElement("div");R.style.textAlign="center";O=null!=O?O:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=
O+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";
null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
@@ -4109,29 +4111,29 @@ u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nod
function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var la=!1;null!=Y&&(la=
"1"==l.getCurrentCellStyle(Y).treeMoving);return la}function p(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),la="tree"==(null!=la?la.style:l.getCellStyle(Y)).containerType);return la}function B(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),l.view.getState(Y),la=null!=(null!=la?la.style:l.getCellStyle(Y)).childLayout);return la}function H(Y){Y=l.view.getState(Y);if(null!=Y){var la=l.getIncomingTreeEdges(Y.cell);if(0<la.length&&(la=l.view.getState(la[0]),null!=la&&(la=
la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==Y.y&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==Y.y+Y.height&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,la){la=null!=la?la:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],
-l.model.getTerminal(k[0],!0),!0);var J=H(Y),U=Z.geometry;J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var P=l.view.getState(Y),T=l.view.scale;if(null!=P){var W=mxRectangle.fromRectangle(P);J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?W.x+=(la?Y.geometry.width+10:-A[1].geometry.width-
-10)*T:W.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*T;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(J==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(W,qa)&&(k=10+Math.max(k,(Math.min(W.x+W.width,qa.x+qa.width)-Math.max(W.x,
-qa.x))/T),U=10+Math.max(U,(Math.min(W.y+W.height,qa.y+qa.height)-Math.max(W.y,qa.y))/T))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),J==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*U)}}}return l.addCells(A,
-Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),J=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=J.x,k[1].geometry.y-=J.y);l.traverse(Y,!0,function(W,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(W);return null==aa||ja});var P=Y.geometry.width+40,
-T=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,T=-T):la==mxConstants.DIRECTION_WEST?(P=-P,T=0):la==mxConstants.DIRECTION_EAST&&(T=0);l.moveCells(U,P,T);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var J=l.cloneCells([k[0],Y]);l.model.setTerminal(J[0],Y,!0);
-null==l.model.getTerminal(J[0],!1)&&(l.model.setTerminal(J[0],J[1],!1),l.applyNewEdgeStyle(J[1],[J[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;la=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var P=0;P<k.length;P++){var T=l.model.getTerminal(k[P],!1);null!=T&&la.push(T)}var W=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x-U.x+10,J[1].geometry.y+=
-J[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x+-U.x+10,J[1].geometry.y-=J[1].geometry.height+U.y+40):(J[1].geometry.x=A==mxConstants.DIRECTION_WEST?J[1].geometry.x-(J[1].geometry.width+U.x+40):J[1].geometry.x+(J[1].geometry.width-U.x+40),J[1].geometry.y=null==W?Y.geometry.y+(Y.geometry.height-J[1].geometry.height)/2:(W.y+W.height)/ja-aa.y+-U.y+10);return l.addCells(J,Z)}finally{l.model.endUpdate()}}
-function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var J=l.view.getState(l.model.getTerminal(Y[A],!1));null!=J&&(!la&&Math.min(J.x+J.width,Z.x+Z.width)>=Math.max(J.x,Z.x)||la&&Math.min(J.y+J.height,Z.y+Z.height)>=Math.max(J.y,Z.y))&&k.push(J)}k.sort(function(U,P){return la?U.x+U.width-P.x-P.width:U.y+U.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;
+l.model.getTerminal(k[0],!0),!0);var I=H(Y),T=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=T.x,A[1].geometry.y-=T.y);var P=l.view.getState(Y),U=l.view.scale;if(null!=P){var X=mxRectangle.fromRectangle(P);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(la?Y.geometry.width+10:-A[1].geometry.width-
+10)*U:X.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*U;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=T=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,
+qa.x))/U),T=10+Math.max(T,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/U))}}ja?T=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*T)}}}return l.addCells(A,
+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,T=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&T.push(aa);(null==aa||ja)&&T.push(X);return null==aa||ja});var P=Y.geometry.width+40,
+U=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,U=-U):la==mxConstants.DIRECTION_WEST?(P=-P,U=0):la==mxConstants.DIRECTION_EAST&&(U=0);l.moveCells(T,P,U);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);
+null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var T=Z.geometry;la=[];l.view.currentRoot==Z&&(T=new mxRectangle);for(var P=0;P<k.length;P++){var U=l.model.getTerminal(k[P],!1);null!=U&&la.push(U)}var X=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-T.x+10,I[1].geometry.y+=
+I[1].geometry.height-T.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-T.x+10,I[1].geometry.y-=I[1].geometry.height+T.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+T.x+40):I[1].geometry.x+(I[1].geometry.width-T.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-T.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}
+function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!la&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||la&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(T,P){return la?T.x+T.width-P.x-P.width:T.y+T.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;
(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=la?f.actions.get("selectParent").funct():Z==la?(la=l.getOutgoingTreeEdges(Y),null!=la&&0<la.length&&l.setSelectionCell(l.model.getTerminal(la[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=
this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,la,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){la=l.getSelectionCell();var k=l.getOutgoingTreeEdges(la);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(la).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,
Z)):0<l.model.getEdgeCount(la)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(la);if(null!=Y&&0<Y.length){la=[];for(var Z=0;Z<Y.length;Z++)la.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(la)}else l.setSelectionCells(l.model.getChildren(la))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var la=
-l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var J=null!=A&&l.isTreeEdge(A);J&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||J)&&Z.push(k);return null==A||J});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),
+l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),
null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(la)));
-l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var J=[];l.traverse(A,!0,function(U,P){var T=null!=P&&l.isTreeEdge(P);T&&J.push(P);(null==P||T)&&J.push(U);return null==P||T});0<J.length&&(Z=Z.concat(J),A=l.getIncomingTreeEdges(Y[k]),
-Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var J=l.getIncomingTreeEdges(A.cell);for(A=0;A<J.length;A++)mxUtils.remove(J[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,
-Y,la);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(U[k]);J=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<J.length){var T=this.cloneCell(J[0]);this.addEdge(T,l.getDefaultParent(),this.model.getTerminal(J[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,J,U){for(var P=null,T=[],W=0;W<Y.length;W++)(u(Y[W])||m(Y[W]))&&!B(Y[W])&&this.isCellCollapsed(Y[W])?T=T.concat(this.getSubtree(Y[W])):T.push(Y[W]);Y=
-mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(W=0;W<Y.length;W++)if(m(Y[W])||l.model.isEdge(Y[W])&&null==l.model.getTerminal(Y[W],!0)){A=l.model.getParent(Y[W]);break}if(null!=T&&A!=T&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(T);null!=sa&&(la=(sa.getCenterX()-
-pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(W=0;W<P.length;W++)if(this.model.isEdge(P[W]))m(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[W],!0))&&this.model.setTerminal(P[W],T,!0);else if(m(Y[W])&&(ja=l.getIncomingTreeEdges(Y[W]),0<ja.length))if(!k)m(T)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],T,!0);else if(0==l.getIncomingTreeEdges(P[W]).length){aa=
-T;if(null==aa||aa==l.model.getParent(Y[W]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[W])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,J=null;A.beginUpdate();try{if(J=K.apply(this,arguments),m(Y))for(var U=0;U<J.length;U++)if(A.isEdge(J[U])&&null==A.getTerminal(J[U],!0)){A.setTerminal(J[U],Y,!0);var P=l.getCellGeometry(J[U]);P.points=null;
-null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return J}}var I={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ca={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?I[Y.keyCode]:mxEvent.isAltDown(Y)?
-ca[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):
-38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ea=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,J,U){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var T=H(Y),W=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==
-mxConstants.DIRECTION_WEST;return T==la||0==P.length?O(Y,la):W==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ea.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var X=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){X.apply(this,
+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(T,P){var U=null!=P&&l.isTreeEdge(P);U&&I.push(P);(null==P||U)&&I.push(T);return null==P||U});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),
+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var T=F.call(this,
+Y,la);if(T.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(T[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<I.length){var U=this.cloneCell(I[0]);this.addEdge(U,l.getDefaultParent(),this.model.getTerminal(I[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,I,T){for(var P=null,U=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?U=U.concat(this.getSubtree(Y[X])):U.push(Y[X]);Y=
+mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=U&&A!=U&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(U);null!=sa&&(la=(sa.getCenterX()-
+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(X=0;X<P.length;X++)if(this.model.isEdge(P[X]))m(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[X],!0))&&this.model.setTerminal(P[X],U,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(U)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],U,!0);else if(0==l.getIncomingTreeEdges(P[X]).length){aa=
+U;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[X])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var T=0;T<I.length;T++)if(A.isEdge(I[T])&&null==A.getTerminal(I[T],!0)){A.setTerminal(I[T],Y,!0);var P=l.getCellGeometry(I[T]);P.points=null;
+null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ea={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?
+ea[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):
+38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,I,T){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var U=H(Y),X=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==
+mxConstants.DIRECTION_WEST;return U==la||0==P.length?O(Y,la):X==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,
arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;
mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=
@@ -4170,24 +4172,24 @@ var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,argument
620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=
this.editor.graph,l=document.createElement("div");l.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var O=!1;EditorUi.prototype.initFormatWindow=
function(){if(!O&&null!=this.formatWindow){O=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ca.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),I);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ea.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=
"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage=
"url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=
function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=
-"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}I=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
-ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?X:null);l([pa,f(mxResources.get("delete"),
-F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,P],60),520<=m&&l([T,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?
+"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?W:null);l([pa,f(mxResources.get("delete"),
+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([T,P],60),520<=m&&l([U,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?
this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&
-null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var I=null,ca=new Menubar(F,K);F.statusContainer=F.createStatusContainer();
-F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ea=F.descriptorChanged;F.descriptorChanged=function(){ea.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==
+null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,ea=new Menubar(F,K);F.statusContainer=F.createStatusContainer();
+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==
pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=
-F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var X=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;
+F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var W=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;
F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var ma=F.menus.get("viewZoom");if(null!=ma){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),J=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",J.funct,null,mxResources.get("redo")+" ("+J.shortcut+")",J,Editor.redoImage),T=f("",Y,!0,mxResources.get("fit")+
-" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var W=ca.addMenu("100%",ma.funct);W.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");W.className="geTabItem";W.style.height=F.tabContainerHeight+"px";W.style.position="absolute";W.style.display="0"!=urlParams.pages?"flex":"none";W.style.alignItems="center";W.style.justifyContent=
-"center";W.style.paddingRight="11px";W.style.whiteSpace="nowrap";W.style.overflow="hidden";W.style.fontSize="11px";W.style.width="51px";W.style.right="0px";W.style.bottom="0px";W.style.boxSizing="content-box";W.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";W.style.backgroundPosition="right 6px top 15px";W.style.backgroundRepeat="no-repeat";W.style.backgroundSize="10px";W.style.zIndex="1";C.appendChild(W);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,
-function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(W);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(W.style.visibility=this.tabContainer.style.visibility,
+mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),T=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),U=f("",Y,!0,mxResources.get("fit")+
+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var X=ea.addMenu("100%",ma.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent=
+"center";X.style.paddingRight="11px";X.style.whiteSpace="nowrap";X.style.overflow="hidden";X.style.fontSize="11px";X.style.width="51px";X.style.right="0px";X.style.bottom="0px";X.style.boxSizing="content-box";X.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";X.style.backgroundPosition="right 6px top 15px";X.style.backgroundRepeat="no-repeat";X.style.backgroundSize="10px";X.style.zIndex="1";C.appendChild(X);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,
+function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(X);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(X.style.visibility=this.tabContainer.style.visibility,
this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&
F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()})}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
@@ -4231,23 +4233,23 @@ GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=n
H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,p[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=
this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");
-mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ea||200)}),B=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display=
-"";mxUtils.setOpacity(e,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ea){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ea){B(100);mxEvent.consume(ea)}));mxEvent.addListener(e,"mouseleave",
-mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ea,X){},mouseUp:function(ea,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<
-S&&Math.abs(this.startX-X.getGraphX())<S&&Math.abs(this.startY-X.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ea,X,ba,ha){ea=this.createToolbarButton(ea,X,ba,ha);e.appendChild(ea);G++;return ea}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=
+mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ca||200)}),B=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display=
+"";mxUtils.setOpacity(e,ca||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ca){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ca){B(100);mxEvent.consume(ca)}));mxEvent.addListener(e,"mouseleave",
+mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,W){},mouseUp:function(ca,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<
+S&&Math.abs(this.startX-W.getGraphX())<S&&Math.abs(this.startY-W.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=
"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(t);var N=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,
mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(O(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||
-"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ea){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,
+"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,
function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,
-this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ea=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=
-this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var X=mxUtils.getDocumentScrollOrigin(document);c.style.left=X.x+ea.left-1+"px";c.style.top=X.y+ea.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":
-"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var I=O(mxUtils.bind(this,function(ea){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,
-f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ea=I.getBoundingClientRect();var X=mxUtils.getDocumentScrollOrigin(document);
-l.style.left=X.x+ea.left-1+"px";l.style.top=X.y+ea.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,
-function(){try{this.showLightbox()}catch(ea){alert(ea.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",
-g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ca=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?
-"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=b.getBoundingClientRect(),X=mxUtils.getScrollOrigin(document.body);X="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-X.x,top:-X.y};ea={left:ea.left-X.left,top:ea.top-X.top,bottom:ea.bottom-X.top,right:ea.right-X.left};e.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ea.bottom-1+"px":"inline"!=
-this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ea.top+1+"px"):e.style.top=ea.top+"px";"1px solid transparent"==ca&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ca});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=
+this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=
+this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var W=mxUtils.getDocumentScrollOrigin(document);c.style.left=W.x+ca.left-1+"px";c.style.top=W.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":
+"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=O(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,
+f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var W=mxUtils.getDocumentScrollOrigin(document);
+l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,
+function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",
+g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ea=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?
+"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ca=b.getBoundingClientRect(),W=mxUtils.getScrollOrigin(document.body);W="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-W.x,top:-W.y};ca={left:ca.left-W.left,top:ca.top-W.top,bottom:ca.bottom-W.top,right:ca.right-W.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=
+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==ea&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ea});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=
ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor=
"light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};
@@ -4279,8 +4281,8 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=
new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var I,ca,da,ea;l=function(){if((da=f.offsetWidth)!=I||(ea=f.offsetHeight)!=ca)N=!0,I=da,ca=ea;F()};var X=function(ba,
-ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};X(t,"scroll",l);X(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===
+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,ea,da,ca;l=function(){if((da=f.offsetWidth)!=J||(ca=f.offsetHeight)!=ea)N=!0,J=da,ea=ca;F()};var W=function(ba,
+ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===
O||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){O=0;for(var c=g.length;O<c;O++)B(g[O],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index 106148119..4b31b3b75 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -2,8 +2,8 @@ window.PROXY_URL=window.PROXY_URL||"https://viewer.diagrams.net/proxy";window.ST
window.mxImageBasePath=window.mxImageBasePath||"https://viewer.diagrams.net/mxgraph/images";window.mxBasePath=window.mxBasePath||"https://viewer.diagrams.net/mxgraph/";window.mxLoadStylesheets=window.mxLoadStylesheets||!1;
//fgnass.github.com/spin.js#v2.0.0
!function(a,b){"object"==typeof exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return l[e]||(m.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",m.cssRules.length),l[e]=1),e}function d(a,b){var c,d,e=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<k.length;d++)if(c=k[d]+b,void 0!==e[c])return c;return void 0!==e[b]?b:void 0}function e(a,b){for(var c in b)a.style[d(a,c)||c]=b[c];return a}function f(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];for(var d in c)void 0===a[d]&&(a[d]=c[d])}return a}function g(a,b){return"string"==typeof a?a:a[b%a.length]}function h(a){this.opts=f(a||{},h.defaults,n)}function i(){function c(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}m.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.width,left:d.radius,top:-d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.length+d.width,k=2*j,l=2*-(d.width+d.length)+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var j,k=["webkit","Moz","ms","O"],l={},m=function(){var c=a("style",{type:"text/css"});return b(document.getElementsByTagName("head")[0],c),c.sheet||c.styleSheet}(),n={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",position:"absolute"};h.defaults={},f(h.prototype,{spin:function(b){this.stop();{var c=this,d=c.opts,f=c.el=e(a(0,{className:d.className}),{position:d.position,width:0,zIndex:d.zIndex});d.radius+d.length+d.width}if(b&&(b.insertBefore(f,b.firstChild||null),e(f,{left:d.left,top:d.top})),f.setAttribute("role","progressbar"),c.lines(f,c.opts),!j){var g,h=0,i=(d.lines-1)*(1-d.direction)/2,k=d.fps,l=k/d.speed,m=(1-d.opacity)/(l*d.trail/100),n=l/d.lines;!function o(){h++;for(var a=0;a<d.lines;a++)g=Math.max(1-(h+(d.lines-a)*n)%l*m,d.opacity),c.opacity(f,a*d.direction+i,g,d);c.timeout=c.el&&setTimeout(o,~~(1e3/k))}()}return c},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=void 0),this},lines:function(d,f){function h(b,c){return e(a(),{position:"absolute",width:f.length+f.width+"px",height:f.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/f.lines*k+f.rotate)+"deg) translate("+f.radius+"px,0)",borderRadius:(f.corners*f.width>>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k<f.lines;k++)i=e(a(),{position:"absolute",top:1+~(f.width/2)+"px",transform:f.hwaccel?"translate3d(0,0,0)":"",opacity:f.opacity,animation:j&&c(f.opacity,f.trail,l+k*f.direction,f.lines)+" "+1/f.speed+"s linear infinite"}),f.shadow&&b(i,e(h("#000","0 0 4px #000"),{top:"2px"})),b(d,b(i,h(g(f.color,k),"0 0 1px rgba(0,0,0,.1)")));return d},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var o=e(a("group"),{behavior:"url(#default#VML)"});return!d(o,"transform")&&o.adj?i():j=d(o,"animation"),h});
-/*! @license DOMPurify 3.2.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.3/LICENSE */
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=b(Array.prototype.forEach),m=b(Array.prototype.pop),p=b(Array.prototype.push),f=b(String.prototype.toLowerCase),d=b(String.prototype.toString),h=b(String.prototype.match),g=b(String.prototype.replace),T=b(String.prototype.indexOf),y=b(String.prototype.trim),E=b(Object.prototype.hasOwnProperty),A=b(RegExp.prototype.test),_=(S=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(S,t)});var S;function b(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function N(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function R(e){for(let t=0;t<e.length;t++){E(e,t)||(e[t]=null)}return e}function w(t){const n=l(null);for(const[o,r]of e(t)){E(t,o)&&(Array.isArray(r)?n[o]=R(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=w(r):n[o]=r)}return n}function O(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return b(n.get);if("function"==typeof n.value)return b(n.value)}e=o(e)}return function(){return null}}const D=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),v=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),C=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),x=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),M=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),k=i(["#text"]),I=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),U=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),z=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),P=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),F=a(/<%[\w\W]*|[\w\W]*%>/gm),B=a(/\$\{[\w\W]*}/gm),W=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=a(/^aria-[\-\w]+$/),Y=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),j=a(/^(?:\w+script|data):/i),X=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=a(/^html$/i),$=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var K=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:X,CUSTOM_ELEMENT:$,DATA_ATTR:W,DOCTYPE_NAME:q,ERB_EXPR:F,IS_ALLOWED_URI:Y,IS_SCRIPT_OR_DATA:j,MUSTACHE_EXPR:H,TMPLIT_EXPR:B});const V=1,Z=3,J=7,Q=8,ee=9,te=function(){return"undefined"==typeof window?null:window};var ne=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const o=e=>t(e);if(o.version="3.2.3",o.removed=[],!n||!n.document||n.document.nodeType!==ee)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:S,Node:b,Element:R,NodeFilter:H,NamedNodeMap:F=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:B,DOMParser:W,trustedTypes:G}=n,j=R.prototype,X=O(j,"cloneNode"),$=O(j,"remove"),ne=O(j,"nextSibling"),oe=O(j,"childNodes"),re=O(j,"parentNode");if("function"==typeof S){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let ie,ae="";const{implementation:le,createNodeIterator:ce,createDocumentFragment:se,getElementsByTagName:ue}=r,{importNode:me}=a;let pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof re&&le&&void 0!==le.createHTMLDocument;const{MUSTACHE_EXPR:fe,ERB_EXPR:de,TMPLIT_EXPR:he,DATA_ATTR:ge,ARIA_ATTR:Te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:Ee,CUSTOM_ELEMENT:Ae}=K;let{IS_ALLOWED_URI:_e}=K,Se=null;const be=N({},[...D,...L,...v,...x,...k]);let Ne=null;const Re=N({},[...I,...U,...z,...P]);let we=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,De=null,Le=!0,ve=!0,Ce=!1,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!1,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!0,We=!1,Ge=!0,Ye=!1,je={},Xe=null;const qe=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $e=null;const Ke=N({},["audio","video","img","source","image","track"]);let Ve=null;const Ze=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml";let tt=et,nt=!1,ot=null;const rt=N({},[Je,Qe,et],d);let it=N({},["mi","mo","mn","ms","mtext"]),at=N({},["annotation-xml"]);const lt=N({},["title","style","font","a","script"]);let ct=null;const st=["application/xhtml+xml","text/html"];let ut=null,mt=null;const pt=r.createElement("form"),ft=function(e){return e instanceof RegExp||e instanceof Function},dt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!mt||mt!==e){if(e&&"object"==typeof e||(e={}),e=w(e),ct=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,ut="application/xhtml+xml"===ct?d:f,Se=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,ut):be,Ne=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,ut):Re,ot=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,d):rt,Ve=E(e,"ADD_URI_SAFE_ATTR")?N(w(Ze),e.ADD_URI_SAFE_ATTR,ut):Ze,$e=E(e,"ADD_DATA_URI_TAGS")?N(w(Ke),e.ADD_DATA_URI_TAGS,ut):Ke,Xe=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,ut):qe,Oe=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,ut):{},De=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,ut):{},je=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,ve=!1!==e.ALLOW_DATA_ATTR,Ce=e.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Me=e.SAFE_FOR_TEMPLATES||!1,ke=!1!==e.SAFE_FOR_XML,Ie=e.WHOLE_DOCUMENT||!1,Pe=e.RETURN_DOM||!1,He=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,ze=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=e.SANITIZE_NAMED_PROPS||!1,Ge=!1!==e.KEEP_CONTENT,Ye=e.IN_PLACE||!1,_e=e.ALLOWED_URI_REGEXP||Y,tt=e.NAMESPACE||et,it=e.MATHML_TEXT_INTEGRATION_POINTS||it,at=e.HTML_INTEGRATION_POINTS||at,we=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(we.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(we.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(we.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(ve=!1),He&&(Pe=!0),je&&(Se=N({},k),Ne=[],!0===je.html&&(N(Se,D),N(Ne,I)),!0===je.svg&&(N(Se,L),N(Ne,U),N(Ne,P)),!0===je.svgFilters&&(N(Se,v),N(Ne,U),N(Ne,P)),!0===je.mathMl&&(N(Se,x),N(Ne,z),N(Ne,P))),e.ADD_TAGS&&(Se===be&&(Se=w(Se)),N(Se,e.ADD_TAGS,ut)),e.ADD_ATTR&&(Ne===Re&&(Ne=w(Ne)),N(Ne,e.ADD_ATTR,ut)),e.ADD_URI_SAFE_ATTR&&N(Ve,e.ADD_URI_SAFE_ATTR,ut),e.FORBID_CONTENTS&&(Xe===qe&&(Xe=w(Xe)),N(Xe,e.FORBID_CONTENTS,ut)),Ge&&(Se["#text"]=!0),Ie&&N(Se,["html","head","body"]),Se.table&&(N(Se,["tbody"]),delete Oe.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw _('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ie=e.TRUSTED_TYPES_POLICY,ae=ie.createHTML("")}else void 0===ie&&(ie=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(G,c)),null!==ie&&"string"==typeof ae&&(ae=ie.createHTML(""));i&&i(e),mt=e}},ht=N({},[...L,...v,...C]),gt=N({},[...x,...M]),Tt=function(e){p(o.removed,{element:e});try{re(e).removeChild(e)}catch(t){$(e)}},yt=function(e,t){try{p(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){p(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Pe||He)try{Tt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Et=function(e){let t=null,n=null;if(ze)e="<remove></remove>"+e;else{const t=h(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ct&&tt===et&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=ie?ie.createHTML(e):e;if(tt===et)try{t=(new W).parseFromString(o,ct)}catch(e){}if(!t||!t.documentElement){t=le.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?ae:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,Ie?"html":"body")[0]:Ie?t.documentElement:i},At=function(e){return ce.call(e.ownerDocument||e,e,H.SHOW_ELEMENT|H.SHOW_COMMENT|H.SHOW_TEXT|H.SHOW_PROCESSING_INSTRUCTION|H.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof B&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof F)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},St=function(e){return"function"==typeof b&&e instanceof b};function bt(e,t,n){u(e,(e=>{e.call(o,t,n,mt)}))}const Nt=function(e){let t=null;if(bt(pe.beforeSanitizeElements,e,null),_t(e))return Tt(e),!0;const n=ut(e.nodeName);if(bt(pe.uponSanitizeElement,e,{tagName:n,allowedTags:Se}),e.hasChildNodes()&&!St(e.firstElementChild)&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Tt(e),!0;if(e.nodeType===J)return Tt(e),!0;if(ke&&e.nodeType===Q&&A(/<[/\w]/g,e.data))return Tt(e),!0;if(!Se[n]||Oe[n]){if(!Oe[n]&&wt(n)){if(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n))return!1;if(we.tagNameCheck instanceof Function&&we.tagNameCheck(n))return!1}if(Ge&&!Xe[n]){const t=re(e)||e.parentNode,n=oe(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=X(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,ne(e))}}}return Tt(e),!0}return e instanceof R&&!function(e){let t=re(e);t&&t.tagName||(t={namespaceURI:tt,tagName:"template"});const n=f(e.tagName),o=f(t.tagName);return!!ot[e.namespaceURI]&&(e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===o||it[o]):Boolean(ht[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&at[o]:Boolean(gt[n]):e.namespaceURI===et?!(t.namespaceURI===Qe&&!at[o])&&!(t.namespaceURI===Je&&!it[o])&&!gt[n]&&(lt[n]||!ht[n]):!("application/xhtml+xml"!==ct||!ot[e.namespaceURI]))}(e)?(Tt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Me&&e.nodeType===Z&&(t=e.textContent,u([fe,de,he],(e=>{t=g(t,e," ")})),e.textContent!==t&&(p(o.removed,{element:e.cloneNode()}),e.textContent=t)),bt(pe.afterSanitizeElements,e,null),!1):(Tt(e),!0)},Rt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in r||n in pt))return!1;if(ve&&!De[t]&&A(ge,t));else if(Le&&A(Te,t));else if(!Ne[t]||De[t]){if(!(wt(e)&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,e)||we.tagNameCheck instanceof Function&&we.tagNameCheck(e))&&(we.attributeNameCheck instanceof RegExp&&A(we.attributeNameCheck,t)||we.attributeNameCheck instanceof Function&&we.attributeNameCheck(t))||"is"===t&&we.allowCustomizedBuiltInElements&&(we.tagNameCheck instanceof RegExp&&A(we.tagNameCheck,n)||we.tagNameCheck instanceof Function&&we.tagNameCheck(n))))return!1}else if(Ve[t]);else if(A(_e,g(n,Ee,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==T(n,"data:")||!$e[e]){if(Ce&&!A(ye,g(n,Ee,"")));else if(n)return!1}else;return!0},wt=function(e){return"annotation-xml"!==e&&h(e,Ae)},Ot=function(e){bt(pe.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ne,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=ut(a);let p="value"===a?c:y(c);if(n.attrName=s,n.attrValue=p,n.keepAttr=!0,n.forceKeepAttr=void 0,bt(pe.uponSanitizeAttribute,e,n),p=n.attrValue,!We||"id"!==s&&"name"!==s||(yt(a,e),p="user-content-"+p),ke&&A(/((--!?|])>)|<\/(style|title)/i,p)){yt(a,e);continue}if(n.forceKeepAttr)continue;if(yt(a,e),!n.keepAttr)continue;if(!xe&&A(/\/>/i,p)){yt(a,e);continue}Me&&u([fe,de,he],(e=>{p=g(p,e," ")}));const f=ut(e.nodeName);if(Rt(f,s,p)){if(ie&&"object"==typeof G&&"function"==typeof G.getAttributeType)if(l);else switch(G.getAttributeType(f,s)){case"TrustedHTML":p=ie.createHTML(p);break;case"TrustedScriptURL":p=ie.createScriptURL(p)}try{l?e.setAttributeNS(l,a,p):e.setAttribute(a,p),_t(e)?Tt(e):m(o.removed)}catch(e){}}}bt(pe.afterSanitizeAttributes,e,null)},Dt=function e(t){let n=null;const o=At(t);for(bt(pe.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)bt(pe.uponSanitizeShadowNode,n,null),Nt(n),Ot(n),n.content instanceof s&&e(n.content);bt(pe.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(nt=!e,nt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!St(e)){if("function"!=typeof e.toString)throw _("toString is not a function");if("string"!=typeof(e=e.toString()))throw _("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Ue||dt(t),o.removed=[],"string"==typeof e&&(Ye=!1),Ye){if(e.nodeName){const t=ut(e.nodeName);if(!Se[t]||Oe[t])throw _("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof b)n=Et("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===V&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Pe&&!Me&&!Ie&&-1===e.indexOf("<"))return ie&&Fe?ie.createHTML(e):e;if(n=Et(e),!n)return Pe?null:Fe?ae:""}n&&ze&&Tt(n.firstChild);const c=At(Ye?e:n);for(;i=c.nextNode();)Nt(i),Ot(i),i.content instanceof s&&Dt(i.content);if(Ye)return e;if(Pe){if(He)for(l=se.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(Ne.shadowroot||Ne.shadowrootmode)&&(l=me.call(a,l,!0)),l}let m=Ie?n.outerHTML:n.innerHTML;return Ie&&Se["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&A(q,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Me&&u([fe,de,he],(e=>{m=g(m,e," ")})),ie&&Fe?ie.createHTML(m):m},o.setConfig=function(){dt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ue=!0},o.clearConfig=function(){mt=null,Ue=!1},o.isValidAttribute=function(e,t,n){mt||dt({});const o=ut(e),r=ut(t);return Rt(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&p(pe[e],t)},o.removeHook=function(e){return m(pe[e])},o.removeHooks=function(e){pe[e]=[]},o.removeAllHooks=function(){pe={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return ne}));
+/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */
+!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,(function(){"use strict";const{entries:e,setPrototypeOf:t,isFrozen:n,getPrototypeOf:o,getOwnPropertyDescriptor:r}=Object;let{freeze:i,seal:a,create:l}=Object,{apply:c,construct:s}="undefined"!=typeof Reflect&&Reflect;i||(i=function(e){return e}),a||(a=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),s||(s=function(e,t){return new e(...t)});const u=R(Array.prototype.forEach),m=R(Array.prototype.lastIndexOf),p=R(Array.prototype.pop),f=R(Array.prototype.push),d=R(Array.prototype.splice),h=R(String.prototype.toLowerCase),g=R(String.prototype.toString),T=R(String.prototype.match),y=R(String.prototype.replace),E=R(String.prototype.indexOf),A=R(String.prototype.trim),_=R(Object.prototype.hasOwnProperty),S=R(RegExp.prototype.test),b=(N=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return s(N,t)});var N;function R(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return c(e,t,o)}}function w(e,o){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h;t&&t(e,null);let i=o.length;for(;i--;){let t=o[i];if("string"==typeof t){const e=r(t);e!==t&&(n(o)||(o[i]=e),t=e)}e[t]=!0}return e}function O(e){for(let t=0;t<e.length;t++){_(e,t)||(e[t]=null)}return e}function D(t){const n=l(null);for(const[o,r]of e(t)){_(t,o)&&(Array.isArray(r)?n[o]=O(r):r&&"object"==typeof r&&r.constructor===Object?n[o]=D(r):n[o]=r)}return n}function v(e,t){for(;null!==e;){const n=r(e,t);if(n){if(n.get)return R(n.get);if("function"==typeof n.value)return R(n.value)}e=o(e)}return function(){return null}}const L=i(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),C=i(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),x=i(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=i(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),k=i(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),I=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),U=i(["#text"]),z=i(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),P=i(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),H=i(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=a(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=a(/<%[\w\W]*|[\w\W]*%>/gm),G=a(/\$\{[\w\W]*/gm),Y=a(/^data-[\-\w.\u00B7-\uFFFF]+$/),j=a(/^aria-[\-\w]+$/),X=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=a(/^(?:\w+script|data):/i),$=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var Z=Object.freeze({__proto__:null,ARIA_ATTR:j,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:V,DATA_ATTR:Y,DOCTYPE_NAME:K,ERB_EXPR:W,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:B,TMPLIT_EXPR:G});const J=1,Q=3,ee=7,te=8,ne=9,oe=function(){return"undefined"==typeof window?null:window};var re=function t(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:oe();const o=e=>t(e);if(o.version="3.2.4",o.removed=[],!n||!n.document||n.document.nodeType!==ne||!n.Element)return o.isSupported=!1,o;let{document:r}=n;const a=r,c=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:N,Node:R,Element:O,NodeFilter:B,NamedNodeMap:W=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:G,DOMParser:Y,trustedTypes:j}=n,q=O.prototype,$=v(q,"cloneNode"),V=v(q,"remove"),re=v(q,"nextSibling"),ie=v(q,"childNodes"),ae=v(q,"parentNode");if("function"==typeof N){const e=r.createElement("template");e.content&&e.content.ownerDocument&&(r=e.content.ownerDocument)}let le,ce="";const{implementation:se,createNodeIterator:ue,createDocumentFragment:me,getElementsByTagName:pe}=r,{importNode:fe}=a;let de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};o.isSupported="function"==typeof e&&"function"==typeof ae&&se&&void 0!==se.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ge,TMPLIT_EXPR:Te,DATA_ATTR:ye,ARIA_ATTR:Ee,IS_SCRIPT_OR_DATA:Ae,ATTR_WHITESPACE:_e,CUSTOM_ELEMENT:Se}=Z;let{IS_ALLOWED_URI:be}=Z,Ne=null;const Re=w({},[...L,...C,...x,...k,...U]);let we=null;const Oe=w({},[...z,...P,...H,...F]);let De=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ve=null,Le=null,Ce=!0,xe=!0,Me=!1,ke=!0,Ie=!1,Ue=!0,ze=!1,Pe=!1,He=!1,Fe=!1,Be=!1,We=!1,Ge=!0,Ye=!1,je=!0,Xe=!1,qe={},$e=null;const Ke=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ve=null;const Ze=w({},["audio","video","img","source","image","track"]);let Je=null;const Qe=w({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",nt="http://www.w3.org/1999/xhtml";let ot=nt,rt=!1,it=null;const at=w({},[et,tt,nt],g);let lt=w({},["mi","mo","mn","ms","mtext"]),ct=w({},["annotation-xml"]);const st=w({},["title","style","font","a","script"]);let ut=null;const mt=["application/xhtml+xml","text/html"];let pt=null,ft=null;const dt=r.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ft||ft!==e){if(e&&"object"==typeof e||(e={}),e=D(e),ut=-1===mt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,pt="application/xhtml+xml"===ut?g:h,Ne=_(e,"ALLOWED_TAGS")?w({},e.ALLOWED_TAGS,pt):Re,we=_(e,"ALLOWED_ATTR")?w({},e.ALLOWED_ATTR,pt):Oe,it=_(e,"ALLOWED_NAMESPACES")?w({},e.ALLOWED_NAMESPACES,g):at,Je=_(e,"ADD_URI_SAFE_ATTR")?w(D(Qe),e.ADD_URI_SAFE_ATTR,pt):Qe,Ve=_(e,"ADD_DATA_URI_TAGS")?w(D(Ze),e.ADD_DATA_URI_TAGS,pt):Ze,$e=_(e,"FORBID_CONTENTS")?w({},e.FORBID_CONTENTS,pt):Ke,ve=_(e,"FORBID_TAGS")?w({},e.FORBID_TAGS,pt):{},Le=_(e,"FORBID_ATTR")?w({},e.FORBID_ATTR,pt):{},qe=!!_(e,"USE_PROFILES")&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Ie=e.SAFE_FOR_TEMPLATES||!1,Ue=!1!==e.SAFE_FOR_XML,ze=e.WHOLE_DOCUMENT||!1,Fe=e.RETURN_DOM||!1,Be=e.RETURN_DOM_FRAGMENT||!1,We=e.RETURN_TRUSTED_TYPE||!1,He=e.FORCE_BODY||!1,Ge=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,je=!1!==e.KEEP_CONTENT,Xe=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||X,ot=e.NAMESPACE||nt,lt=e.MATHML_TEXT_INTEGRATION_POINTS||lt,ct=e.HTML_INTEGRATION_POINTS||ct,De=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(De.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(De.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(De.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ie&&(xe=!1),Be&&(Fe=!0),qe&&(Ne=w({},U),we=[],!0===qe.html&&(w(Ne,L),w(we,z)),!0===qe.svg&&(w(Ne,C),w(we,P),w(we,F)),!0===qe.svgFilters&&(w(Ne,x),w(we,P),w(we,F)),!0===qe.mathMl&&(w(Ne,k),w(we,H),w(we,F))),e.ADD_TAGS&&(Ne===Re&&(Ne=D(Ne)),w(Ne,e.ADD_TAGS,pt)),e.ADD_ATTR&&(we===Oe&&(we=D(we)),w(we,e.ADD_ATTR,pt)),e.ADD_URI_SAFE_ATTR&&w(Je,e.ADD_URI_SAFE_ATTR,pt),e.FORBID_CONTENTS&&($e===Ke&&($e=D($e)),w($e,e.FORBID_CONTENTS,pt)),je&&(Ne["#text"]=!0),ze&&w(Ne,["html","head","body"]),Ne.table&&(w(Ne,["tbody"]),delete ve.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw b('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');le=e.TRUSTED_TYPES_POLICY,ce=le.createHTML("")}else void 0===le&&(le=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const o="data-tt-policy-suffix";t&&t.hasAttribute(o)&&(n=t.getAttribute(o));const r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(j,c)),null!==le&&"string"==typeof ce&&(ce=le.createHTML(""));i&&i(e),ft=e}},Tt=w({},[...C,...x,...M]),yt=w({},[...k,...I]),Et=function(e){f(o.removed,{element:e});try{ae(e).removeChild(e)}catch(t){V(e)}},At=function(e,t){try{f(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(Fe||Be)try{Et(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},_t=function(e){let t=null,n=null;if(He)e="<remove></remove>"+e;else{const t=T(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===ut&&ot===nt&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const o=le?le.createHTML(e):e;if(ot===nt)try{t=(new Y).parseFromString(o,ut)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(ot,"template",null);try{t.documentElement.innerHTML=rt?ce:o}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(r.createTextNode(n),i.childNodes[0]||null),ot===nt?pe.call(t,ze?"html":"body")[0]:ze?t.documentElement:i},St=function(e){return ue.call(e.ownerDocument||e,e,B.SHOW_ELEMENT|B.SHOW_COMMENT|B.SHOW_TEXT|B.SHOW_PROCESSING_INSTRUCTION|B.SHOW_CDATA_SECTION,null)},bt=function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof W)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},Nt=function(e){return"function"==typeof R&&e instanceof R};function Rt(e,t,n){u(e,(e=>{e.call(o,t,n,ft)}))}const wt=function(e){let t=null;if(Rt(de.beforeSanitizeElements,e,null),bt(e))return Et(e),!0;const n=pt(e.nodeName);if(Rt(de.uponSanitizeElement,e,{tagName:n,allowedTags:Ne}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return Et(e),!0;if(e.nodeType===ee)return Et(e),!0;if(Ue&&e.nodeType===te&&S(/<[/\w]/g,e.data))return Et(e),!0;if(!Ne[n]||ve[n]){if(!ve[n]&&Dt(n)){if(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n))return!1;if(De.tagNameCheck instanceof Function&&De.tagNameCheck(n))return!1}if(je&&!$e[n]){const t=ae(e)||e.parentNode,n=ie(e)||e.childNodes;if(n&&t){for(let o=n.length-1;o>=0;--o){const r=$(n[o],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,re(e))}}}return Et(e),!0}return e instanceof O&&!function(e){let t=ae(e);t&&t.tagName||(t={namespaceURI:ot,tagName:"template"});const n=h(e.tagName),o=h(t.tagName);return!!it[e.namespaceURI]&&(e.namespaceURI===tt?t.namespaceURI===nt?"svg"===n:t.namespaceURI===et?"svg"===n&&("annotation-xml"===o||lt[o]):Boolean(Tt[n]):e.namespaceURI===et?t.namespaceURI===nt?"math"===n:t.namespaceURI===tt?"math"===n&&ct[o]:Boolean(yt[n]):e.namespaceURI===nt?!(t.namespaceURI===tt&&!ct[o])&&!(t.namespaceURI===et&&!lt[o])&&!yt[n]&&(st[n]||!Tt[n]):!("application/xhtml+xml"!==ut||!it[e.namespaceURI]))}(e)?(Et(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!S(/<\/no(script|embed|frames)/i,e.innerHTML)?(Ie&&e.nodeType===Q&&(t=e.textContent,u([he,ge,Te],(e=>{t=y(t,e," ")})),e.textContent!==t&&(f(o.removed,{element:e.cloneNode()}),e.textContent=t)),Rt(de.afterSanitizeElements,e,null),!1):(Et(e),!0)},Ot=function(e,t,n){if(Ge&&("id"===t||"name"===t)&&(n in r||n in dt))return!1;if(xe&&!Le[t]&&S(ye,t));else if(Ce&&S(Ee,t));else if(!we[t]||Le[t]){if(!(Dt(e)&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,e)||De.tagNameCheck instanceof Function&&De.tagNameCheck(e))&&(De.attributeNameCheck instanceof RegExp&&S(De.attributeNameCheck,t)||De.attributeNameCheck instanceof Function&&De.attributeNameCheck(t))||"is"===t&&De.allowCustomizedBuiltInElements&&(De.tagNameCheck instanceof RegExp&&S(De.tagNameCheck,n)||De.tagNameCheck instanceof Function&&De.tagNameCheck(n))))return!1}else if(Je[t]);else if(S(be,y(n,_e,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==E(n,"data:")||!Ve[e]){if(Me&&!S(Ae,y(n,_e,"")));else if(n)return!1}else;return!0},Dt=function(e){return"annotation-xml"!==e&&T(e,Se)},vt=function(e){Rt(de.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||bt(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:we,forceKeepAttr:void 0};let r=t.length;for(;r--;){const i=t[r],{name:a,namespaceURI:l,value:c}=i,s=pt(a);let m="value"===a?c:A(c);if(n.attrName=s,n.attrValue=m,n.keepAttr=!0,n.forceKeepAttr=void 0,Rt(de.uponSanitizeAttribute,e,n),m=n.attrValue,!Ye||"id"!==s&&"name"!==s||(At(a,e),m="user-content-"+m),Ue&&S(/((--!?|])>)|<\/(style|title)/i,m)){At(a,e);continue}if(n.forceKeepAttr)continue;if(At(a,e),!n.keepAttr)continue;if(!ke&&S(/\/>/i,m)){At(a,e);continue}Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")}));const f=pt(e.nodeName);if(Ot(f,s,m)){if(le&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(l);else switch(j.getAttributeType(f,s)){case"TrustedHTML":m=le.createHTML(m);break;case"TrustedScriptURL":m=le.createScriptURL(m)}try{l?e.setAttributeNS(l,a,m):e.setAttribute(a,m),bt(e)?Et(e):p(o.removed)}catch(e){}}}Rt(de.afterSanitizeAttributes,e,null)},Lt=function e(t){let n=null;const o=St(t);for(Rt(de.beforeSanitizeShadowDOM,t,null);n=o.nextNode();)Rt(de.uponSanitizeShadowNode,n,null),wt(n),vt(n),n.content instanceof s&&e(n.content);Rt(de.afterSanitizeShadowDOM,t,null)};return o.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,r=null,i=null,l=null;if(rt=!e,rt&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Nt(e)){if("function"!=typeof e.toString)throw b("toString is not a function");if("string"!=typeof(e=e.toString()))throw b("dirty is not a string, aborting")}if(!o.isSupported)return e;if(Pe||gt(t),o.removed=[],"string"==typeof e&&(Xe=!1),Xe){if(e.nodeName){const t=pt(e.nodeName);if(!Ne[t]||ve[t])throw b("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof R)n=_t("\x3c!----\x3e"),r=n.ownerDocument.importNode(e,!0),r.nodeType===J&&"BODY"===r.nodeName||"HTML"===r.nodeName?n=r:n.appendChild(r);else{if(!Fe&&!Ie&&!ze&&-1===e.indexOf("<"))return le&&We?le.createHTML(e):e;if(n=_t(e),!n)return Fe?null:We?ce:""}n&&He&&Et(n.firstChild);const c=St(Xe?e:n);for(;i=c.nextNode();)wt(i),vt(i),i.content instanceof s&&Lt(i.content);if(Xe)return e;if(Fe){if(Be)for(l=me.call(n.ownerDocument);n.firstChild;)l.appendChild(n.firstChild);else l=n;return(we.shadowroot||we.shadowrootmode)&&(l=fe.call(a,l,!0)),l}let m=ze?n.outerHTML:n.innerHTML;return ze&&Ne["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&S(K,n.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+m),Ie&&u([he,ge,Te],(e=>{m=y(m,e," ")})),le&&We?le.createHTML(m):m},o.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Pe=!0},o.clearConfig=function(){ft=null,Pe=!1},o.isValidAttribute=function(e,t,n){ft||gt({});const o=pt(e),r=pt(t);return Ot(o,r,n)},o.addHook=function(e,t){"function"==typeof t&&f(de[e],t)},o.removeHook=function(e,t){if(void 0!==t){const n=m(de[e],t);return-1===n?void 0:d(de[e],n,1)[0]}return p(de[e])},o.removeHooks=function(e){de[e]=[]},o.removeAllHooks=function(){de={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},o}();return re}));
/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pako={})}(this,(function(t){"use strict";function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,i=30,r=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);var _=new Array(60);e(_);var f=new Array(512);e(f);var u=new Array(256);e(u);var c=new Array(29);e(c);var w,m,b,g=new Array(i);function p(t,e,a,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function v(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(g);var k=function(t){return t<256?f[t]:f[256+(t>>>7)]},y=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},x=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,y(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},z=function(t,e,a){x(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,i,s=new Array(16),o=0;for(n=1;n<=r;n++)o=o+a[n-1]<<1,s[n]=o;for(i=0;i<=e;i++){var l=t[2*i+1];0!==l&&(t[2*i]=A(s[l]++,l))}},R=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<i;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Z=function(t){t.bi_valid>8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var i=2*e,r=2*a;return t[i]<t[r]||t[i]===t[r]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],i=a<<1;i<=t.heap_len&&(i<t.heap_len&&S(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!S(e,n,t.heap[i],t.depth));)t.heap[a]=t.heap[i],a=i,i<<=1;t.heap[a]=n},D=function(t,e,n){var i,r,l,h,d=0;if(0!==t.sym_next)do{i=255&t.pending_buf[t.sym_buf+d++],i+=(255&t.pending_buf[t.sym_buf+d++])<<8,r=t.pending_buf[t.sym_buf+d++],0===i?z(t,r,e):(l=u[r],z(t,l+a+1,e),0!==(h=s[l])&&(r-=c[l],x(t,r,h)),i--,l=k(i),z(t,l,n),0!==(h=o[l])&&(i-=g[l],x(t,i,h)))}while(d<t.sym_next);z(t,256,e)},T=function(t,e){var a,n,i,s=e.dyn_tree,o=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.elems,d=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<h;a++)0!==s[2*a]?(t.heap[++t.heap_len]=d=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=d<2?++d:0)]=1,t.depth[i]=0,t.opt_len--,l&&(t.static_len-=o[2*i+1]);for(e.max_code=d,a=t.heap_len>>1;a>=1;a--)U(t,s,a);i=h;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*i]=s[2*a]+s[2*n],t.depth[i]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=i,t.heap[1]=i++,U(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,i,s,o,l,h=e.dyn_tree,d=e.max_code,_=e.stat_desc.static_tree,f=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,w=e.stat_desc.max_length,m=0;for(s=0;s<=r;s++)t.bl_count[s]=0;for(h[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=h[2*h[2*(n=t.heap[a])+1]+1]+1)>w&&(s=w,m++),h[2*n+1]=s,n>d||(t.bl_count[s]++,o=0,n>=c&&(o=u[n-c]),l=h[2*n],t.opt_len+=l*(s+o),f&&(t.static_len+=l*(_[2*n+1]+o)));if(0!==m){do{for(s=w-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[w]--,m-=2}while(m>0);for(s=w;0!==s;s--)for(n=t.bl_count[s];0!==n;)(i=t.heap[--a])>d||(h[2*i+1]!==s&&(t.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(t,e),E(s,d,t.bl_count)},O=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)i=s,s=e[2*(n+1)+1],++o<l&&i===s||(o<h?t.bl_tree[2*i]+=o:0!==i?(i!==r&&t.bl_tree[2*i]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4))},I=function(t,e,a){var n,i,r=-1,s=e[1],o=0,l=7,h=4;for(0===s&&(l=138,h=3),n=0;n<=a;n++)if(i=s,s=e[2*(n+1)+1],!(++o<l&&i===s)){if(o<h)do{z(t,i,t.bl_tree)}while(0!=--o);else 0!==i?(i!==r&&(z(t,i,t.bl_tree),o--),z(t,16,t.bl_tree),x(t,o-3,2)):o<=10?(z(t,17,t.bl_tree),x(t,o-3,3)):(z(t,18,t.bl_tree),x(t,o-11,7));o=0,r=i,0===s?(l=138,h=3):i===s?(l=6,h=3):(l=7,h=4)}},F=!1,L=function(t,e,a,n){x(t,0+(n?1:0),3),Z(t),y(t,a),y(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a},N=function(t,e,n,i){var r,s,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),T(t,t.l_desc),T(t,t.d_desc),o=function(t){var e;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),T(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*h[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=r&&(r=s)):r=s=n+5,n+4<=r&&-1!==e?L(t,e,n,i):4===t.strategy||s===r?(x(t,2+(i?1:0),3),D(t,d,_)):(x(t,4+(i?1:0),3),function(t,e,a,n){var i;for(x(t,e-257,5),x(t,a-1,5),x(t,n-4,4),i=0;i<n;i++)x(t,t.bl_tree[2*h[i]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),D(t,t.dyn_ltree,t.dyn_dtree)),R(t),i&&Z(t)},B={_tr_init:function(t){F||(!function(){var t,e,a,h,v,k=new Array(16);for(a=0,h=0;h<28;h++)for(c[h]=a,t=0;t<1<<s[h];t++)u[a++]=h;for(u[a-1]=h,v=0,h=0;h<16;h++)for(g[h]=v,t=0;t<1<<o[h];t++)f[v++]=h;for(v>>=7;h<i;h++)for(g[h]=v<<7,t=0;t<1<<o[h]-7;t++)f[256+v++]=h;for(e=0;e<=r;e++)k[e]=0;for(t=0;t<=143;)d[2*t+1]=8,t++,k[8]++;for(;t<=255;)d[2*t+1]=9,t++,k[9]++;for(;t<=279;)d[2*t+1]=7,t++,k[7]++;for(;t<=287;)d[2*t+1]=8,t++,k[8]++;for(E(d,287,k),t=0;t<i;t++)_[2*t+1]=5,_[2*t]=A(t,5);w=new p(d,s,257,n,r),m=new p(_,o,0,i,r),b=new p(new Array(0),l,0,19,7)}(),F=!0),t.l_desc=new v(t.dyn_ltree,w),t.d_desc=new v(t.dyn_dtree,m),t.bl_desc=new v(t.bl_tree,b),t.bi_buf=0,t.bi_valid=0,R(t)},_tr_stored_block:L,_tr_flush_block:N,_tr_tally:function(t,e,n){return t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(u[n]+a+1)]++,t.dyn_dtree[2*k(e)]++),t.sym_next===t.sym_end},_tr_align:function(t){x(t,2,3),z(t,256,d),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var i=65535&t|0,r=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{r=r+(i=i+e[n++]|0)|0}while(--s);i%=65521,r%=65521}return i|r<<16|0},M=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),H=function(t,e,a,n){var i=M,r=n+a;t^=-1;for(var s=n;s<r;s++)t=t>>>8^i[255&(t^e[s])];return-1^t},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,Y=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,it=K.Z_BUF_ERROR,rt=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,ot=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,ht=K.Z_FIXED,dt=K.Z_DEFAULT_STRATEGY,_t=K.Z_UNKNOWN,ft=K.Z_DEFLATED,ut=258,ct=262,wt=42,mt=113,bt=666,gt=function(t,e){return t.msg=j[e],e},pt=function(t){return 2*t-(t>4?9:0)},vt=function(t){for(var e=t.length;--e>=0;)t[e]=0},kt=function(t){var e,a,n,i=t.w_size;n=e=t.hash_size;do{a=t.head[--n],t.head[n]=a>=i?a-i:0}while(--e);n=e=i;do{a=t.prev[--n],t.prev[n]=a>=i?a-i:0}while(--e)},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},xt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm)},At=function(t,e){t.pending_buf[t.pending++]=e},Et=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Rt=function(t,e,a,n){var i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),a),1===t.state.wrap?t.adler=C(t.adler,e,i,a):2===t.state.wrap&&(t.adler=H(t.adler,e,i,a)),t.next_in+=i,t.total_in+=i,i)},Zt=function(t,e){var a,n,i=t.max_chain_length,r=t.strstart,s=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ut,u=h[r+s-1],c=h[r+s];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(a=e)+s]===c&&h[a+s-1]===u&&h[a]===h[r]&&h[++a]===h[r+1]){r+=2,a++;do{}while(h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&h[++r]===h[++a]&&r<f);if(n=ut-(f-r),r=f-ut,n>s){if(t.match_start=e,s=n,n>=o)break;u=h[r+s-1],c=h[r+s]}}}while((e=_[e&d])>l&&0!=--i);return s<=t.lookahead?s:t.lookahead},St=function(t){var e,a,n,i=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=i+(i-ct)&&(t.window.set(t.window.subarray(i,i+i-a),0),t.match_start-=i,t.strstart-=i,t.block_start-=i,t.insert>t.strstart&&(t.insert=t.strstart),kt(t),a+=i),0===t.strm.avail_in)break;if(e=Rt(t.strm,t.window,t.strstart+t.lookahead,a),t.lookahead+=e,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=yt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){var a,n,i,r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,o=t.strm.avail_in;do{if(a=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,a>(n=t.strstart-t.block_start)+t.strm.avail_in&&(a=n+t.strm.avail_in),a>i&&(a=i),a<r&&(0===a&&e!==V||e===q||a!==n+t.strm.avail_in))break;s=e===V&&a===n+t.strm.avail_in?1:0,Y(t,0,0,s),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),n&&(n>a&&(n=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,a-=n),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===s);return(o-=t.strm.avail_in)&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==q&&e!==V&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Rt(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,r=(i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i)>t.w_size?t.w_size:i,((n=t.strstart-t.block_start)>=r||(n||e===V)&&e!==q&&0===t.strm.avail_in&&n<=i)&&(a=n>i?i:n,s=e===V&&0===t.strm.avail_in&&a===n?1:0,Y(t,t.block_start,a,s),t.block_start+=a,xt(t.strm)),s?3:1)},Dt=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2},Tt=function(t,e){for(var a,n,i;;){if(t.lookahead<ct){if(St(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Zt(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,e,a,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=i}var It=[new Ot(0,0,0,0,Ut),new Ot(4,4,8,4,Dt),new Ot(4,5,16,8,Dt),new Ot(4,6,32,32,Dt),new Ot(4,4,16,16,Tt),new Ot(8,16,32,32,Tt),new Ot(8,16,128,128,Tt),new Ot(8,32,128,256,Tt),new Ot(32,128,258,1024,Tt),new Ot(32,258,258,4096,Tt)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),vt(this.dyn_ltree),vt(this.dyn_dtree),vt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),vt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),vt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Lt=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==wt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==bt?1:0},Nt=function(t){if(Lt(t))return gt(t,at);t.total_in=t.total_out=0,t.data_type=_t;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?wt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,P(e),tt},Bt=function(t){var e,a=Nt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,vt(e.head),e.max_lazy_match=It[e.level].max_lazy,e.good_match=It[e.level].good_length,e.nice_match=It[e.level].nice_length,e.max_chain_length=It[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ct=function(t,e,a,n,i,r){if(!t)return at;var s=1;if(e===rt&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||a!==ft||n<8||n>15||e<0||e>9||r<0||r>ht||8===n&&1!==s)return gt(t,at);8===n&&(n=9);var o=new Ft;return t.state=o,o.strm=t,o.status=wt,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=r,o.method=a,Bt(t)},Mt={deflateInit:function(t,e){return Ct(t,e,ft,15,8,dt)},deflateInit2:Ct,deflateReset:Bt,deflateResetKeep:Nt,deflateSetHeader:function(t,e){return Lt(t)||2!==t.state.wrap?at:(t.state.gzhead=e,tt)},deflate:function(t,e){if(Lt(t)||e>$||e<0)return t?gt(t,at):at;var a=t.state;if(!t.output||0!==t.avail_in&&!t.input||a.status===bt&&e!==V)return gt(t,0===t.avail_out?it:at);var n=a.last_flush;if(a.last_flush=e,0!==a.pending){if(xt(t),0===t.avail_out)return a.last_flush=-1,tt}else if(0===t.avail_in&&pt(e)<=pt(n)&&e!==V)return gt(t,it);if(a.status===bt&&0!==t.avail_in)return gt(t,it);if(a.status===wt&&0===a.wrap&&(a.status=mt),a.status===wt){var i=ft+(a.w_bits-8<<4)<<8;if(i|=(a.strategy>=ot||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(i|=32),Et(a,i+=31-i%31),0!==a.strstart&&(Et(a,t.adler>>>16),Et(a,65535&t.adler)),t.adler=1,a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(57===a.status)if(t.adler=0,At(a,31),At(a,139),At(a,8),a.gzhead)At(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),At(a,255&a.gzhead.time),At(a,a.gzhead.time>>8&255),At(a,a.gzhead.time>>16&255),At(a,a.gzhead.time>>24&255),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(At(a,255&a.gzhead.extra.length),At(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=H(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(At(a,0),At(a,0),At(a,0),At(a,0),At(a,0),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,3),a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;if(69===a.status){if(a.gzhead.extra){for(var r=a.pending,s=(65535&a.gzhead.extra.length)-a.gzindex;a.pending+s>a.pending_buf_size;){var o=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+o),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex+=o,xt(t),0!==a.pending)return a.last_flush=-1,tt;r=0,s-=o}var l=new Uint8Array(a.gzhead.extra);a.pending_buf.set(l.subarray(a.gzindex,a.gzindex+s),a.pending),a.pending+=s,a.gzhead.hcrc&&a.pending>r&&(t.adler=H(t.adler,a.pending_buf,a.pending-r,r)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){var h,d=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),xt(t),0!==a.pending)return a.last_flush=-1,tt;d=0}h=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,At(a,h)}while(0!==h);a.gzhead.hcrc&&a.pending>d&&(t.adler=H(t.adler,a.pending_buf,a.pending-d,d)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){var _,f=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f)),xt(t),0!==a.pending)return a.last_flush=-1,tt;f=0}_=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,At(a,_)}while(0!==_);a.gzhead.hcrc&&a.pending>f&&(t.adler=H(t.adler,a.pending_buf,a.pending-f,f))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(xt(t),0!==a.pending))return a.last_flush=-1,tt;At(a,255&t.adler),At(a,t.adler>>8&255),t.adler=0}if(a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt}if(0!==t.avail_in||0!==a.lookahead||e!==q&&a.status!==bt){var u=0===a.level?Ut(a,e):a.strategy===ot?function(t,e){for(var a;;){if(0===t.lookahead&&(St(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):a.strategy===lt?function(t,e){for(var a,n,i,r,s=t.window;;){if(t.lookahead<=ut){if(St(t),t.lookahead<=ut&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){r=t.strstart+ut;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<r);t.match_length=ut-(r-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2}(a,e):It[a.level].func(a,e);if(3!==u&&4!==u||(a.status=bt),1===u||3===u)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===u&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(vt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et)},deflateEnd:function(t){if(Lt(t))return at;var e=t.state.status;return t.state=null,e===mt?gt(t,nt):tt},deflateSetDictionary:function(t,e){var a=e.length;if(Lt(t))return at;var n=t.state,i=n.wrap;if(2===i||1===i&&n.status!==wt||n.lookahead)return at;if(1===i&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===i&&(vt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var r=new Uint8Array(n.w_size);r.set(e.subarray(a-n.w_size,a),0),e=r,a=n.w_size}var s=t.avail_in,o=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,St(n);n.lookahead>=3;){var h=n.strstart,d=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[h+3-1]),n.prev[h&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=h,h++}while(--d);n.strstart=h,n.lookahead=2,St(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=l,t.avail_in=s,n.wrap=i,tt},deflateInfo:"pako deflate (from Nodeca project)"};function Ht(t){return Ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(t)}var jt=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},Kt=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!==Ht(a))throw new TypeError(a+"must be non-object");for(var n in a)jt(a,n)&&(t[n]=a[n])}}return t},Pt=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var i=new Uint8Array(e),r=0,s=0,o=t.length;r<o;r++){var l=t[r];i.set(l,s),s+=l.length}return i},Yt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Yt=!1}for(var Gt=new Uint8Array(256),Xt=0;Xt<256;Xt++)Gt[Xt]=Xt>=252?6:Xt>=248?5:Xt>=240?4:Xt>=224?3:Xt>=192?2:1;Gt[254]=Gt[254]=1;var Wt=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,i,r,s=t.length,o=0;for(i=0;i<s;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),r=0,i=0;r<o;i++)55296==(64512&(a=t.charCodeAt(i)))&&i+1<s&&56320==(64512&(n=t.charCodeAt(i+1)))&&(a=65536+(a-55296<<10)+(n-56320),i++),a<128?e[r++]=a:a<2048?(e[r++]=192|a>>>6,e[r++]=128|63&a):a<65536?(e[r++]=224|a>>>12,e[r++]=128|a>>>6&63,e[r++]=128|63&a):(e[r++]=240|a>>>18,e[r++]=128|a>>>12&63,e[r++]=128|a>>>6&63,e[r++]=128|63&a);return e},qt=function(t,e){var a,n,i=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));var r=new Array(2*i);for(n=0,a=0;a<i;){var s=t[a++];if(s<128)r[n++]=s;else{var o=Gt[s];if(o>4)r[n++]=65533,a+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&a<i;)s=s<<6|63&t[a++],o--;o>1?r[n++]=65533:s<65536?r[n++]=s:(s-=65536,r[n++]=55296|s>>10&1023,r[n++]=56320|1023&s)}}}return function(t,e){if(e<65534&&t.subarray&&Yt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}(r,n)},Jt=function(t,e){(e=e||t.length)>t.length&&(e=t.length);for(var a=e-1;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Gt[t[a]]>e?a:e};var Qt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Vt=Object.prototype.toString,$t=K.Z_NO_FLUSH,te=K.Z_SYNC_FLUSH,ee=K.Z_FULL_FLUSH,ae=K.Z_FINISH,ne=K.Z_OK,ie=K.Z_STREAM_END,re=K.Z_DEFAULT_COMPRESSION,se=K.Z_DEFAULT_STRATEGY,oe=K.Z_DEFLATED;function le(t){this.options=Kt({level:re,method:oe,chunkSize:16384,windowBits:15,memLevel:8,strategy:se},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ne)throw new Error(j[a]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var n;if(n="string"==typeof e.dictionary?Wt(e.dictionary):"[object ArrayBuffer]"===Vt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(a=Mt.deflateSetDictionary(this.strm,n))!==ne)throw new Error(j[a]);this._dict_set=!0}}function he(t,e){var a=new le(e);if(a.push(t,!0),a.err)throw a.msg||j[a.err];return a.result}le.prototype.push=function(t,e){var a,n,i=this.strm,r=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ae:$t,"string"==typeof t?i.input=Wt(t):"[object ArrayBuffer]"===Vt.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(r),i.next_out=0,i.avail_out=r),(n===te||n===ee)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if((a=Mt.deflate(i,n))===ie)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),a=Mt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===ne;if(0!==i.avail_out){if(n>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},le.prototype.onData=function(t){this.chunks.push(t)},le.prototype.onEnd=function(t){t===ne&&(this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var de={Deflate:le,deflate:he,deflateRaw:function(t,e){return(e=e||{}).raw=!0,he(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,he(t,e)},constants:K},_e=16209,fe=function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=t.state;a=t.next_in,z=t.input,n=a+(t.avail_in-5),i=t.next_out,A=t.output,r=i-(e-t.avail_out),s=i+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,u=E.bits,c=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=c[f&m];e:for(;;){if(f>>>=p=g>>>24,u-=p,0===(p=g>>>16&255))A[i++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=c[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=_e;break t}v=65535&g,(p&=15)&&(u<p&&(f+=z[a++]<<u,u+=8),v+=f&(1<<p)-1,f>>>=p,u-=p),u<15&&(f+=z[a++]<<u,u+=8,f+=z[a++]<<u,u+=8),g=w[f&b];a:for(;;){if(f>>>=p=g>>>24,u-=p,!(16&(p=g>>>16&255))){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=_e;break t}if(k=65535&g,u<(p&=15)&&(f+=z[a++]<<u,(u+=8)<p&&(f+=z[a++]<<u,u+=8)),(k+=f&(1<<p)-1)>o){t.msg="invalid distance too far back",E.mode=_e;break t}if(f>>>=p,u-=p,k>(p=i-r)){if((p=k-p)>h&&E.sane){t.msg="invalid distance too far back",E.mode=_e;break t}if(y=0,x=_,0===d){if(y+=l-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}else if(d<p){if(y+=l+d-p,(p-=d)<v){v-=p;do{A[i++]=_[y++]}while(--p);if(y=0,d<v){v-=p=d;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}}}else if(y+=d-p,p<v){v-=p;do{A[i++]=_[y++]}while(--p);y=i-k,x=A}for(;v>2;)A[i++]=x[y++],A[i++]=x[y++],A[i++]=x[y++],v-=3;v&&(A[i++]=x[y++],v>1&&(A[i++]=x[y++]))}else{y=i-k;do{A[i++]=A[y++],A[i++]=A[y++],A[i++]=A[y++],v-=3}while(v>2);v&&(A[i++]=A[y++],v>1&&(A[i++]=A[y++]))}break}}break}}while(a<n&&i<s);a-=v=u>>3,f&=(1<<(u-=v<<3))-1,t.next_in=a,t.next_out=i,t.avail_in=a<n?n-a+5:5-(a-n),t.avail_out=i<s?s-i+257:257-(i-s),E.hold=f,E.bits=u},ue=15,ce=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),we=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),me=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),be=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),ge=function(t,e,a,n,i,r,s,o){var l,h,d,_,f,u,c,w,m,b=o.bits,g=0,p=0,v=0,k=0,y=0,x=0,z=0,A=0,E=0,R=0,Z=null,S=new Uint16Array(16),U=new Uint16Array(16),D=null;for(g=0;g<=ue;g++)S[g]=0;for(p=0;p<n;p++)S[e[a+p]]++;for(y=b,k=ue;k>=1&&0===S[k];k--);if(y>k&&(y=k),0===k)return i[r++]=20971520,i[r++]=20971520,o.bits=1,0;for(v=1;v<k&&0===S[v];v++);for(y<v&&(y=v),A=1,g=1;g<=ue;g++)if(A<<=1,(A-=S[g])<0)return-1;if(A>0&&(0===t||1!==k))return-1;for(U[1]=0,g=1;g<ue;g++)U[g+1]=U[g]+S[g];for(p=0;p<n;p++)0!==e[a+p]&&(s[U[e[a+p]]++]=p);if(0===t?(Z=D=s,u=20):1===t?(Z=ce,D=we,u=257):(Z=me,D=be,u=0),R=0,p=0,g=v,f=r,x=y,z=0,d=-1,_=(E=1<<y)-1,1===t&&E>852||2===t&&E>592)return 1;for(;;){c=g-z,s[p]+1<u?(w=0,m=s[p]):s[p]>=u?(w=D[s[p]-u],m=Z[s[p]-u]):(w=96,m=0),l=1<<g-z,v=h=1<<x;do{i[f+(R>>z)+(h-=l)]=c<<24|w<<16|m|0}while(0!==h);for(l=1<<g-1;R&l;)l>>=1;if(0!==l?(R&=l-1,R+=l):R=0,p++,0==--S[g]){if(g===k)break;g=e[a+s[p]]}if(g>y&&(R&_)!==d){for(0===z&&(z=y),f+=v,A=1<<(x=g-z);x+z<k&&!((A-=S[x+z])<=0);)x++,A<<=1;if(E+=1<<x,1===t&&E>852||2===t&&E>592)return 1;i[d=R&_]=y<<24|x<<16|f-r|0}}return 0!==R&&(i[f+R]=g-z<<24|64<<16|0),o.bits=y,0},pe=K.Z_FINISH,ve=K.Z_BLOCK,ke=K.Z_TREES,ye=K.Z_OK,xe=K.Z_STREAM_END,ze=K.Z_NEED_DICT,Ae=K.Z_STREAM_ERROR,Ee=K.Z_DATA_ERROR,Re=K.Z_MEM_ERROR,Ze=K.Z_BUF_ERROR,Se=K.Z_DEFLATED,Ue=16180,De=16190,Te=16191,Oe=16192,Ie=16194,Fe=16199,Le=16200,Ne=16206,Be=16209,Ce=function(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)};function Me(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var He,je,Ke=function(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode<Ue||e.mode>16211?1:0},Pe=function(t){if(Ke(t))return Ae;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ue,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ye},Ye=function(t){if(Ke(t))return Ae;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Pe(t)},Ge=function(t,e){var a;if(Ke(t))return Ae;var n=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Ae:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=a,n.wbits=e,Ye(t))},Xe=function(t,e){if(!t)return Ae;var a=new Me;t.state=a,a.strm=t,a.window=null,a.mode=Ue;var n=Ge(t,e);return n!==ye&&(t.state=null),n},We=!0,qe=function(t){if(We){He=new Int32Array(512),je=new Int32Array(32);for(var e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ge(1,t.lens,0,288,He,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ge(2,t.lens,0,32,je,0,t.work,{bits:5}),We=!1}t.lencode=He,t.lenbits=9,t.distcode=je,t.distbits=5},Je=function(t,e,a,n){var i,r=t.state;return null===r.window&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0,r.window=new Uint8Array(r.wsize)),n>=r.wsize?(r.window.set(e.subarray(a-r.wsize,a),0),r.wnext=0,r.whave=r.wsize):((i=r.wsize-r.wnext)>n&&(i=n),r.window.set(e.subarray(a-n,a-n+i),r.wnext),(n-=i)?(r.window.set(e.subarray(a-n,a),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=i,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=i))),0},Qe={inflateReset:Ye,inflateReset2:Ge,inflateResetKeep:Pe,inflateInit:function(t){return Xe(t,15)},inflateInit2:Xe,inflate:function(t,e){var a,n,i,r,s,o,l,h,d,_,f,u,c,w,m,b,g,p,v,k,y,x,z,A,E=0,R=new Uint8Array(4),Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ke(t)||!t.output||!t.input&&0!==t.avail_in)return Ae;(a=t.state).mode===Te&&(a.mode=Oe),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=ye;t:for(;;)switch(a.mode){case Ue:if(0===a.wrap){a.mode=Oe;break}for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=Be;break}if((15&h)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(d-=4,y=8+(15&(h>>>=4)),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=Be;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:Te,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==Se){t.msg="unknown compression method",a.mode=Be;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=Be;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,R[2]=h>>>16&255,R[3]=h>>>24&255,a.check=H(a.check,R,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(R[0]=255&h,R[1]=h>>>8&255,a.check=H(a.check,R,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&((u=a.length)>o&&(u=o),u&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(n.subarray(r,r+u),y)),512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,a.length-=u),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;u=0;do{y=n[r+u++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&u<o);if(512&a.flags&&4&a.wrap&&(a.check=H(a.check,n,u,r)),o-=u,r+=u,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=Be;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=Te;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}t.adler=a.check=Ce(h),h=0,d=0,a.mode=De;case De:if(0===a.havedict)return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,ze;t.adler=a.check=1,a.mode=Te;case Te:if(e===ve||e===ke)break t;case Oe:if(a.last){h>>>=7&d,d-=7&d,a.mode=Ne;break}for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}switch(a.last=1&h,d-=1,3&(h>>>=1)){case 0:a.mode=16193;break;case 1:if(qe(a),a.mode=Fe,e===ke){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=Be}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=Be;break}if(a.length=65535&h,h=0,d=0,a.mode=Ie,e===ke)break t;case Ie:a.mode=16195;case 16195:if(u=a.length){if(u>o&&(u=o),u>l&&(u=l),0===u)break t;i.set(n.subarray(r,r+u),s),o-=u,r+=u,l-=u,s+=u,a.length-=u;break}a.mode=Te;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Be;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,z={bits:a.lenbits},x=ge(0,a.lens,0,19,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid code lengths set",a.mode=Be;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(A=m+2;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=Be;break}y=a.lens[a.have-1],u=3+(3&h),h>>>=2,d-=2}else if(17===g){for(A=m+3;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=3+(7&(h>>>=m)),h>>>=3,d-=3}else{for(A=m+7;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}d-=m,y=0,u=11+(127&(h>>>=m)),h>>>=7,d-=7}if(a.have+u>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Be;break}for(;u--;)a.lens[a.have++]=y}}if(a.mode===Be)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Be;break}if(a.lenbits=9,z={bits:a.lenbits},x=ge(1,a.lens,0,a.nlen,a.lencode,0,a.work,z),a.lenbits=z.bits,x){t.msg="invalid literal/lengths set",a.mode=Be;break}if(a.distbits=6,a.distcode=a.distdyn,z={bits:a.distbits},x=ge(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,z),a.distbits=z.bits,x){t.msg="invalid distances set",a.mode=Be;break}if(a.mode=Fe,e===ke)break t;case Fe:a.mode=Le;case Le:if(o>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,fe(t,f),s=t.next_out,i=t.output,l=t.avail_out,r=t.next_in,n=t.input,o=t.avail_in,h=a.hold,d=a.bits,a.mode===Te&&(a.back=-1);break}for(a.back=0;b=(E=a.lencode[h&(1<<a.lenbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,v=b,k=g;b=(E=a.lencode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=Te;break}if(64&b){t.msg="invalid literal/length code",a.mode=Be;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;b=(E=a.distcode[h&(1<<a.distbits)-1])>>>16&255,g=65535&E,!((m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(0==(240&b)){for(p=m,v=b,k=g;b=(E=a.distcode[k+((h&(1<<p+v)-1)>>p)])>>>16&255,g=65535&E,!(p+(m=E>>>24)<=d);){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=Be;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(A=a.extra;d<A;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Be;break}a.mode=16204;case 16204:if(0===l)break t;if(u=f-l,a.offset>u){if((u=a.offset-u)>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Be;break}u>a.wnext?(u-=a.wnext,c=a.wsize-u):c=a.wnext-u,u>a.length&&(u=a.length),w=a.window}else w=i,c=s-a.offset,u=a.length;u>l&&(u=l),l-=u,a.length-=u;do{i[s++]=w[c++]}while(--u);0===a.length&&(a.mode=Le);break;case 16205:if(0===l)break t;i[s++]=a.length,l--,a.mode=Le;break;case Ne:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=n[r++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,s-f):C(a.check,i,f,s-f)),f=l,4&a.wrap&&(a.flags?h:Ce(h))!==a.check){t.msg="incorrect data check",a.mode=Be;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=n[r++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=Be;break}h=0,d=0}a.mode=16208;case 16208:x=xe;break t;case Be:x=Ee;break t;case 16210:return Re;default:return Ae}return t.next_out=s,t.avail_out=l,t.next_in=r,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<Be&&(a.mode<Ne||e!==pe))&&Je(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?H(a.check,i,f,t.next_out-f):C(a.check,i,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(a.mode===Te?128:0)+(a.mode===Fe||a.mode===Ie?256:0),(0===_&&0===f||e===pe)&&x===ye&&(x=Ze),x},inflateEnd:function(t){if(Ke(t))return Ae;var e=t.state;return e.window&&(e.window=null),t.state=null,ye},inflateGetHeader:function(t,e){if(Ke(t))return Ae;var a=t.state;return 0==(2&a.wrap)?Ae:(a.head=e,e.done=!1,ye)},inflateSetDictionary:function(t,e){var a,n=e.length;return Ke(t)||0!==(a=t.state).wrap&&a.mode!==De?Ae:a.mode===De&&C(1,e,n,0)!==a.check?Ee:Je(t,e,n,n)?(a.mode=16210,Re):(a.havedict=1,ye)},inflateInfo:"pako inflate (from Nodeca project)"};var Ve=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},$e=Object.prototype.toString,ta=K.Z_NO_FLUSH,ea=K.Z_FINISH,aa=K.Z_OK,na=K.Z_STREAM_END,ia=K.Z_NEED_DICT,ra=K.Z_STREAM_ERROR,sa=K.Z_DATA_ERROR,oa=K.Z_MEM_ERROR;function la(t){this.options=Kt({chunkSize:65536,windowBits:15,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var a=Qe.inflateInit2(this.strm,e.windowBits);if(a!==aa)throw new Error(j[a]);if(this.header=new Ve,Qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Wt(e.dictionary):"[object ArrayBuffer]"===$e.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Qe.inflateSetDictionary(this.strm,e.dictionary))!==aa))throw new Error(j[a])}function ha(t,e){var a=new la(e);if(a.push(t),a.err)throw a.msg||j[a.err];return a.result}la.prototype.push=function(t,e){var a,n,i,r=this.strm,s=this.options.chunkSize,o=this.options.dictionary;if(this.ended)return!1;for(n=e===~~e?e:!0===e?ea:ta,"[object ArrayBuffer]"===$e.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(s),r.next_out=0,r.avail_out=s),(a=Qe.inflate(r,n))===ia&&o&&((a=Qe.inflateSetDictionary(r,o))===aa?a=Qe.inflate(r,n):a===sa&&(a=ia));r.avail_in>0&&a===na&&r.state.wrap>0&&0!==t[r.next_in];)Qe.inflateReset(r),a=Qe.inflate(r,n);switch(a){case ra:case sa:case ia:case oa:return this.onEnd(a),this.ended=!0,!1}if(i=r.avail_out,r.next_out&&(0===r.avail_out||a===na))if("string"===this.options.to){var l=Jt(r.output,r.next_out),h=r.next_out-l,d=qt(r.output,l);r.next_out=h,r.avail_out=s-h,h&&r.output.set(r.output.subarray(l,l+h),0),this.onData(d)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(a!==aa||0!==i){if(a===na)return a=Qe.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},la.prototype.onData=function(t){this.chunks.push(t)},la.prototype.onEnd=function(t){t===aa&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Pt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var da={Inflate:la,inflate:ha,inflateRaw:function(t,e){return(e=e||{}).raw=!0,ha(t,e)},ungzip:ha,constants:K},_a=de.Deflate,fa=de.deflate,ua=de.deflateRaw,ca=de.gzip,wa=da.Inflate,ma=da.inflate,ba=da.inflateRaw,ga=da.ungzip,pa=K,va={Deflate:_a,deflate:fa,deflateRaw:ua,gzip:ca,Inflate:wa,inflate:ma,inflateRaw:ba,ungzip:ga,constants:pa};t.Deflate=_a,t.Inflate=wa,t.constants=pa,t.default=va,t.deflate=fa,t.deflateRaw=ua,t.gzip=ca,t.inflate=ma,t.inflateRaw=ba,t.ungzip=ga,Object.defineProperty(t,"__esModule",{value:!0})}));
var rough=function(){"use strict";function t(t,e,s){if(t&&t.length){const[n,o]=e,a=Math.PI/180*s,h=Math.cos(a),r=Math.sin(a);for(const e of t){const[t,s]=e;e[0]=(t-n)*h-(s-o)*r+n,e[1]=(t-n)*r+(s-o)*h+o}}}function e(t,e){return t[0]===e[0]&&t[1]===e[1]}function s(s,n,o,a=1){const h=o,r=Math.max(n,.1),i=s[0]&&s[0][0]&&"number"==typeof s[0][0]?[s]:s,c=[0,0];if(h)for(const e of i)t(e,c,h);const l=function(t,s,n){const o=[];for(const s of t){const t=[...s];e(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&o.push(t)}const a=[];s=Math.max(s,.1);const h=[];for(const t of o)for(let e=0;e<t.length-1;e++){const s=t[e],n=t[e+1];if(s[1]!==n[1]){const t=Math.min(s[1],n[1]);h.push({ymin:t,ymax:Math.max(s[1],n[1]),x:t===s[1]?s[0]:n[0],islope:(n[0]-s[0])/(n[1]-s[1])})}}if(h.sort(((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!h.length)return a;let r=[],i=h[0].ymin,c=0;for(;r.length||h.length;){if(h.length){let t=-1;for(let e=0;e<h.length&&!(h[e].ymin>i);e++)t=e;h.splice(0,t+1).forEach((t=>{r.push({s:i,edge:t})}))}if(r=r.filter((t=>!(t.edge.ymax<=i))),r.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==n||c%s==0)&&r.length>1)for(let t=0;t<r.length;t+=2){const e=t+1;if(e>=r.length)break;const s=r[t].edge,n=r[e].edge;a.push([[Math.round(s.x),i],[Math.round(n.x),i]])}i+=n,r.forEach((t=>{t.edge.x=t.edge.x+n*t.edge.islope})),c++}return a}(i,r,a);if(h){for(const e of i)t(e,c,-h);!function(e,s,n){const o=[];e.forEach((t=>o.push(...t))),t(o,s,n)}(l,c,-h)}return l}function n(t,e){var n;const o=e.hachureAngle+90;let a=e.hachureGap;a<0&&(a=4*e.strokeWidth),a=Math.round(Math.max(a,.1));let h=1;return e.roughness>=1&&((null===(n=e.randomizer)||void 0===n?void 0:n.next())||Math.random())>.7&&(h=a),s(t,a,o,h||1)}class o{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.renderLines(s,e)}}renderLines(t,e){const s=[];for(const n of t)s.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],e));return s}}function a(t){const e=t[0],s=t[1];return Math.sqrt(Math.pow(e[0]-s[0],2)+Math.pow(e[1]-s[1],2))}class h extends o{fillPolygons(t,e){let s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);const o=n(t,Object.assign({},e,{hachureGap:s})),h=Math.PI/180*e.hachureAngle,r=[],i=.5*s*Math.cos(h),c=.5*s*Math.sin(h);for(const[t,e]of o)a([t,e])&&r.push([[t[0]-i,t[1]+c],[...e]],[[t[0]+i,t[1]-c],[...e]]);return{type:"fillSketch",ops:this.renderLines(r,e)}}}class r extends o{fillPolygons(t,e){const s=this._fillPolygons(t,e),n=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,n);return s.ops=s.ops.concat(o.ops),s}}class i{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(s,e)}dotsOnLines(t,e){const s=[];let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const h=n/4;for(const r of t){const t=a(r),i=t/n,c=Math.ceil(i)-1,l=t-c*n,u=(r[0][0]+r[1][0])/2-n/4,p=Math.min(r[0][1],r[1][1]);for(let t=0;t<c;t++){const a=p+l+t*n,r=u-h+2*Math.random()*h,i=a-h+2*Math.random()*h,c=this.helper.ellipse(r,i,o,o,e);s.push(...c.ops)}}return{type:"fillSketch",ops:s}}}class c{constructor(t){this.helper=t}fillPolygons(t,e){const s=n(t,e);return{type:"fillSketch",ops:this.dashedLine(s,e)}}dashedLine(t,e){const s=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,n=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach((t=>{const h=a(t),r=Math.floor(h/(s+n)),i=(h+n-r*(s+n))/2;let c=t[0],l=t[1];c[0]>l[0]&&(c=t[1],l=t[0]);const u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let t=0;t<r;t++){const a=t*(s+n),h=a+s,r=[c[0]+a*Math.cos(u)+i*Math.cos(u),c[1]+a*Math.sin(u)+i*Math.sin(u)],l=[c[0]+h*Math.cos(u)+i*Math.cos(u),c[1]+h*Math.sin(u)+i*Math.sin(u)];o.push(...this.helper.doubleLineOps(r[0],r[1],l[0],l[1],e))}})),o}}class l{constructor(t){this.helper=t}fillPolygons(t,e){const s=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,o=e.zigzagOffset<0?s:e.zigzagOffset,a=n(t,e=Object.assign({},e,{hachureGap:s+o}));return{type:"fillSketch",ops:this.zigzagLines(a,o,e)}}zigzagLines(t,e,s){const n=[];return t.forEach((t=>{const o=a(t),h=Math.round(o/(2*e));let r=t[0],i=t[1];r[0]>i[0]&&(r=t[1],i=t[0]);const c=Math.atan((i[1]-r[1])/(i[0]-r[0]));for(let t=0;t<h;t++){const o=2*t*e,a=2*(t+1)*e,h=Math.sqrt(2*Math.pow(e,2)),i=[r[0]+o*Math.cos(c),r[1]+o*Math.sin(c)],l=[r[0]+a*Math.cos(c),r[1]+a*Math.sin(c)],u=[i[0]+h*Math.cos(c+Math.PI/4),i[1]+h*Math.sin(c+Math.PI/4)];n.push(...this.helper.doubleLineOps(i[0],i[1],u[0],u[1],s),...this.helper.doubleLineOps(u[0],u[1],l[0],l[1],s))}})),n}}const u={};class p{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const f=0,d=1,g=2,M={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function k(t,e){return t.type===e}function b(t){const e=[],s=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:f,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:d,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:g,text:""},e}(t);let n="BOD",o=0,a=s[o];for(;!k(a,g);){let h=0;const r=[];if("BOD"===n){if("M"!==a.text&&"m"!==a.text)return b("M0,0"+t);o++,h=M[a.text],n=a.text}else k(a,d)?h=M[n]:(o++,h=M[a.text],n=a.text);if(!(o+h<s.length))throw new Error("Path data ended short");for(let t=o;t<o+h;t++){const e=s[t];if(!k(e,d))throw new Error("Param not a number: "+n+","+e.text);r[r.length]=+e.text}if("number"!=typeof M[n])throw new Error("Bad segment: "+n);{const t={key:n,data:r};e.push(t),o+=h,a=s[o],"M"===n&&(n="L"),"m"===n&&(n="l")}}return e}function y(t){let e=0,s=0,n=0,o=0;const a=[];for(const{key:h,data:r}of t)switch(h){case"M":a.push({key:"M",data:[...r]}),[e,s]=r,[n,o]=r;break;case"m":e+=r[0],s+=r[1],a.push({key:"M",data:[e,s]}),n=e,o=s;break;case"L":a.push({key:"L",data:[...r]}),[e,s]=r;break;case"l":e+=r[0],s+=r[1],a.push({key:"L",data:[e,s]});break;case"C":a.push({key:"C",data:[...r]}),e=r[4],s=r[5];break;case"c":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"C",data:t}),e=t[4],s=t[5];break}case"Q":a.push({key:"Q",data:[...r]}),e=r[2],s=r[3];break;case"q":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"Q",data:t}),e=t[2],s=t[3];break}case"A":a.push({key:"A",data:[...r]}),e=r[5],s=r[6];break;case"a":e+=r[5],s+=r[6],a.push({key:"A",data:[r[0],r[1],r[2],r[3],r[4],e,s]});break;case"H":a.push({key:"H",data:[...r]}),e=r[0];break;case"h":e+=r[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...r]}),s=r[0];break;case"v":s+=r[0],a.push({key:"V",data:[s]});break;case"S":a.push({key:"S",data:[...r]}),e=r[2],s=r[3];break;case"s":{const t=r.map(((t,n)=>n%2?t+s:t+e));a.push({key:"S",data:t}),e=t[2],s=t[3];break}case"T":a.push({key:"T",data:[...r]}),e=r[0],s=r[1];break;case"t":e+=r[0],s+=r[1],a.push({key:"T",data:[e,s]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,s=o}return a}function m(t){const e=[];let s="",n=0,o=0,a=0,h=0,r=0,i=0;for(const{key:c,data:l}of t){switch(c){case"M":e.push({key:"M",data:[...l]}),[n,o]=l,[a,h]=l;break;case"C":e.push({key:"C",data:[...l]}),n=l[4],o=l[5],r=l[2],i=l[3];break;case"L":e.push({key:"L",data:[...l]}),[n,o]=l;break;case"H":n=l[0],e.push({key:"L",data:[n,o]});break;case"V":o=l[0],e.push({key:"L",data:[n,o]});break;case"S":{let t=0,a=0;"C"===s||"S"===s?(t=n+(n-r),a=o+(o-i)):(t=n,a=o),e.push({key:"C",data:[t,a,...l]}),r=l[0],i=l[1],n=l[2],o=l[3];break}case"T":{const[t,a]=l;let h=0,c=0;"Q"===s||"T"===s?(h=n+(n-r),c=o+(o-i)):(h=n,c=o);const u=n+2*(h-n)/3,p=o+2*(c-o)/3,f=t+2*(h-t)/3,d=a+2*(c-a)/3;e.push({key:"C",data:[u,p,f,d,t,a]}),r=h,i=c,n=t,o=a;break}case"Q":{const[t,s,a,h]=l,c=n+2*(t-n)/3,u=o+2*(s-o)/3,p=a+2*(t-a)/3,f=h+2*(s-h)/3;e.push({key:"C",data:[c,u,p,f,a,h]}),r=t,i=s,n=a,o=h;break}case"A":{const t=Math.abs(l[0]),s=Math.abs(l[1]),a=l[2],h=l[3],r=l[4],i=l[5],c=l[6];if(0===t||0===s)e.push({key:"C",data:[n,o,i,c,i,c]}),n=i,o=c;else if(n!==i||o!==c){x(n,o,i,c,t,s,a,h,r).forEach((function(t){e.push({key:"C",data:t})})),n=i,o=c}break}case"Z":e.push({key:"Z",data:[]}),n=a,o=h}s=c}return e}function w(t,e,s){return[t*Math.cos(s)-e*Math.sin(s),t*Math.sin(s)+e*Math.cos(s)]}function x(t,e,s,n,o,a,h,r,i,c){const l=(u=h,Math.PI*u/180);var u;let p=[],f=0,d=0,g=0,M=0;if(c)[f,d,g,M]=c;else{[t,e]=w(t,e,-l),[s,n]=w(s,n,-l);const h=(t-s)/2,c=(e-n)/2;let u=h*h/(o*o)+c*c/(a*a);u>1&&(u=Math.sqrt(u),o*=u,a*=u);const p=o*o,k=a*a,b=p*k-p*c*c-k*h*h,y=p*c*c+k*h*h,m=(r===i?-1:1)*Math.sqrt(Math.abs(b/y));g=m*o*c/a+(t+s)/2,M=m*-a*h/o+(e+n)/2,f=Math.asin(parseFloat(((e-M)/a).toFixed(9))),d=Math.asin(parseFloat(((n-M)/a).toFixed(9))),t<g&&(f=Math.PI-f),s<g&&(d=Math.PI-d),f<0&&(f=2*Math.PI+f),d<0&&(d=2*Math.PI+d),i&&f>d&&(f-=2*Math.PI),!i&&d>f&&(d-=2*Math.PI)}let k=d-f;if(Math.abs(k)>120*Math.PI/180){const t=d,e=s,r=n;d=i&&d>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,p=x(s=g+o*Math.cos(d),n=M+a*Math.sin(d),e,r,o,a,h,0,i,[d,t,g,M])}k=d-f;const b=Math.cos(f),y=Math.sin(f),m=Math.cos(d),P=Math.sin(d),v=Math.tan(k/4),S=4/3*o*v,O=4/3*a*v,L=[t,e],T=[t+S*y,e-O*b],D=[s+S*P,n-O*m],A=[s,n];if(T[0]=2*L[0]-T[0],T[1]=2*L[1]-T[1],c)return[T,D,A].concat(p);{p=[T,D,A].concat(p);const t=[];for(let e=0;e<p.length;e+=3){const s=w(p[e][0],p[e][1],l),n=w(p[e+1][0],p[e+1][1],l),o=w(p[e+2][0],p[e+2][1],l);t.push([s[0],s[1],n[0],n[1],o[0],o[1]])}return t}}const P={randOffset:function(t,e){return G(t,e)},randOffsetWithRange:function(t,e,s){return E(t,e,s)},ellipse:function(t,e,s,n,o){const a=T(s,n,o);return D(t,e,o,a).opset},doubleLineOps:function(t,e,s,n,o){return $(t,e,s,n,o,!0)}};function v(t,e,s,n,o){return{type:"path",ops:$(t,e,s,n,o)}}function S(t,e,s){const n=(t||[]).length;if(n>2){const o=[];for(let e=0;e<n-1;e++)o.push(...$(t[e][0],t[e][1],t[e+1][0],t[e+1][1],s));return e&&o.push(...$(t[n-1][0],t[n-1][1],t[0][0],t[0][1],s)),{type:"path",ops:o}}return 2===n?v(t[0][0],t[0][1],t[1][0],t[1][1],s):{type:"path",ops:[]}}function O(t,e,s,n,o){return function(t,e){return S(t,!0,e)}([[t,e],[t+s,e],[t+s,e+n],[t,e+n]],o)}function L(t,e){if(t.length){const s="number"==typeof t[0][0]?[t]:t,n=j(s[0],1*(1+.2*e.roughness),e),o=e.disableMultiStroke?[]:j(s[0],1.5*(1+.22*e.roughness),z(e));for(let t=1;t<s.length;t++){const a=s[t];if(a.length){const t=j(a,1*(1+.2*e.roughness),e),s=e.disableMultiStroke?[]:j(a,1.5*(1+.22*e.roughness),z(e));for(const e of t)"move"!==e.op&&n.push(e);for(const t of s)"move"!==t.op&&o.push(t)}}return{type:"path",ops:n.concat(o)}}return{type:"path",ops:[]}}function T(t,e,s){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),o=Math.ceil(Math.max(s.curveStepCount,s.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/o;let h=Math.abs(t/2),r=Math.abs(e/2);const i=1-s.curveFitting;return h+=G(h*i,s),r+=G(r*i,s),{increment:a,rx:h,ry:r}}function D(t,e,s,n){const[o,a]=F(n.increment,t,e,n.rx,n.ry,1,n.increment*E(.1,E(.4,1,s),s),s);let h=q(o,null,s);if(!s.disableMultiStroke&&0!==s.roughness){const[o]=F(n.increment,t,e,n.rx,n.ry,1.5,0,s),a=q(o,null,s);h=h.concat(a)}return{estimatedPoints:a,opset:{type:"path",ops:h}}}function A(t,e,s,n,o,a,h,r,i){const c=t,l=e;let u=Math.abs(s/2),p=Math.abs(n/2);u+=G(.01*u,i),p+=G(.01*p,i);let f=o,d=a;for(;f<0;)f+=2*Math.PI,d+=2*Math.PI;d-f>2*Math.PI&&(f=0,d=2*Math.PI);const g=2*Math.PI/i.curveStepCount,M=Math.min(g/2,(d-f)/2),k=V(M,c,l,u,p,f,d,1,i);if(!i.disableMultiStroke){const t=V(M,c,l,u,p,f,d,1.5,i);k.push(...t)}return h&&(r?k.push(...$(c,l,c+u*Math.cos(f),l+p*Math.sin(f),i),...$(c,l,c+u*Math.cos(d),l+p*Math.sin(d),i)):k.push({op:"lineTo",data:[c,l]},{op:"lineTo",data:[c+u*Math.cos(f),l+p*Math.sin(f)]})),{type:"path",ops:k}}function _(t,e){const s=m(y(b(t))),n=[];let o=[0,0],a=[0,0];for(const{key:t,data:h}of s)switch(t){case"M":a=[h[0],h[1]],o=[h[0],h[1]];break;case"L":n.push(...$(a[0],a[1],h[0],h[1],e)),a=[h[0],h[1]];break;case"C":{const[t,s,o,r,i,c]=h;n.push(...Z(t,s,o,r,i,c,a,e)),a=[i,c];break}case"Z":n.push(...$(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:n}}function I(t,e){const s=[];for(const n of t)if(n.length){const t=e.maxRandomnessOffset||0,o=n.length;if(o>2){s.push({op:"move",data:[n[0][0]+G(t,e),n[0][1]+G(t,e)]});for(let a=1;a<o;a++)s.push({op:"lineTo",data:[n[a][0]+G(t,e),n[a][1]+G(t,e)]})}}return{type:"fillPath",ops:s}}function C(t,e){return function(t,e){let s=t.fillStyle||"hachure";if(!u[s])switch(s){case"zigzag":u[s]||(u[s]=new h(e));break;case"cross-hatch":u[s]||(u[s]=new r(e));break;case"dots":u[s]||(u[s]=new i(e));break;case"dashed":u[s]||(u[s]=new c(e));break;case"zigzag-line":u[s]||(u[s]=new l(e));break;default:s="hachure",u[s]||(u[s]=new o(e))}return u[s]}(e,P).fillPolygons(t,e)}function z(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function W(t){return t.randomizer||(t.randomizer=new p(t.seed||0)),t.randomizer.next()}function E(t,e,s,n=1){return s.roughness*n*(W(s)*(e-t)+t)}function G(t,e,s=1){return E(-t,t,e,s)}function $(t,e,s,n,o,a=!1){const h=a?o.disableMultiStrokeFill:o.disableMultiStroke,r=R(t,e,s,n,o,!0,!1);if(h)return r;const i=R(t,e,s,n,o,!0,!0);return r.concat(i)}function R(t,e,s,n,o,a,h){const r=Math.pow(t-s,2)+Math.pow(e-n,2),i=Math.sqrt(r);let c=1;c=i<200?1:i>500?.4:-.0016668*i+1.233334;let l=o.maxRandomnessOffset||0;l*l*100>r&&(l=i/10);const u=l/2,p=.2+.2*W(o);let f=o.bowing*o.maxRandomnessOffset*(n-e)/200,d=o.bowing*o.maxRandomnessOffset*(t-s)/200;f=G(f,o,c),d=G(d,o,c);const g=[],M=()=>G(u,o,c),k=()=>G(l,o,c),b=o.preserveVertices;return a&&(h?g.push({op:"move",data:[t+(b?0:M()),e+(b?0:M())]}):g.push({op:"move",data:[t+(b?0:G(l,o,c)),e+(b?0:G(l,o,c))]})),h?g.push({op:"bcurveTo",data:[f+t+(s-t)*p+M(),d+e+(n-e)*p+M(),f+t+2*(s-t)*p+M(),d+e+2*(n-e)*p+M(),s+(b?0:M()),n+(b?0:M())]}):g.push({op:"bcurveTo",data:[f+t+(s-t)*p+k(),d+e+(n-e)*p+k(),f+t+2*(s-t)*p+k(),d+e+2*(n-e)*p+k(),s+(b?0:k()),n+(b?0:k())]}),g}function j(t,e,s){if(!t.length)return[];const n=[];n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]),n.push([t[0][0]+G(e,s),t[0][1]+G(e,s)]);for(let o=1;o<t.length;o++)n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]),o===t.length-1&&n.push([t[o][0]+G(e,s),t[o][1]+G(e,s)]);return q(n,null,s)}function q(t,e,s){const n=t.length,o=[];if(n>3){const a=[],h=1-s.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<n;e++){const s=t[e];a[0]=[s[0],s[1]],a[1]=[s[0]+(h*t[e+1][0]-h*t[e-1][0])/6,s[1]+(h*t[e+1][1]-h*t[e-1][1])/6],a[2]=[t[e+1][0]+(h*t[e][0]-h*t[e+2][0])/6,t[e+1][1]+(h*t[e][1]-h*t[e+2][1])/6],a[3]=[t[e+1][0],t[e+1][1]],o.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(e&&2===e.length){const t=s.maxRandomnessOffset;o.push({op:"lineTo",data:[e[0]+G(t,s),e[1]+G(t,s)]})}}else 3===n?(o.push({op:"move",data:[t[1][0],t[1][1]]}),o.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===n&&o.push(...R(t[0][0],t[0][1],t[1][0],t[1][1],s,!0,!0));return o}function F(t,e,s,n,o,a,h,r){const i=[],c=[];if(0===r.roughness){t/=4,c.push([e+n*Math.cos(-t),s+o*Math.sin(-t)]);for(let a=0;a<=2*Math.PI;a+=t){const t=[e+n*Math.cos(a),s+o*Math.sin(a)];i.push(t),c.push(t)}c.push([e+n*Math.cos(0),s+o*Math.sin(0)]),c.push([e+n*Math.cos(t),s+o*Math.sin(t)])}else{const l=G(.5,r)-Math.PI/2;c.push([G(a,r)+e+.9*n*Math.cos(l-t),G(a,r)+s+.9*o*Math.sin(l-t)]);const u=2*Math.PI+l-.01;for(let h=l;h<u;h+=t){const t=[G(a,r)+e+n*Math.cos(h),G(a,r)+s+o*Math.sin(h)];i.push(t),c.push(t)}c.push([G(a,r)+e+n*Math.cos(l+2*Math.PI+.5*h),G(a,r)+s+o*Math.sin(l+2*Math.PI+.5*h)]),c.push([G(a,r)+e+.98*n*Math.cos(l+h),G(a,r)+s+.98*o*Math.sin(l+h)]),c.push([G(a,r)+e+.9*n*Math.cos(l+.5*h),G(a,r)+s+.9*o*Math.sin(l+.5*h)])}return[c,i]}function V(t,e,s,n,o,a,h,r,i){const c=a+G(.1,i),l=[];l.push([G(r,i)+e+.9*n*Math.cos(c-t),G(r,i)+s+.9*o*Math.sin(c-t)]);for(let a=c;a<=h;a+=t)l.push([G(r,i)+e+n*Math.cos(a),G(r,i)+s+o*Math.sin(a)]);return l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),l.push([e+n*Math.cos(h),s+o*Math.sin(h)]),q(l,null,i)}function Z(t,e,s,n,o,a,h,r){const i=[],c=[r.maxRandomnessOffset||1,(r.maxRandomnessOffset||1)+.3];let l=[0,0];const u=r.disableMultiStroke?1:2,p=r.preserveVertices;for(let f=0;f<u;f++)0===f?i.push({op:"move",data:[h[0],h[1]]}):i.push({op:"move",data:[h[0]+(p?0:G(c[0],r)),h[1]+(p?0:G(c[0],r))]}),l=p?[o,a]:[o+G(c[f],r),a+G(c[f],r)],i.push({op:"bcurveTo",data:[t+G(c[f],r),e+G(c[f],r),s+G(c[f],r),n+G(c[f],r),l[0],l[1]]});return i}function Q(t){return[...t]}function H(t,e=0){const s=t.length;if(s<3)throw new Error("A curve must have at least three points.");const n=[];if(3===s)n.push(Q(t[0]),Q(t[1]),Q(t[2]),Q(t[2]));else{const s=[];s.push(t[0],t[0]);for(let e=1;e<t.length;e++)s.push(t[e]),e===t.length-1&&s.push(t[e]);const o=[],a=1-e;n.push(Q(s[0]));for(let t=1;t+2<s.length;t++){const e=s[t];o[0]=[e[0],e[1]],o[1]=[e[0]+(a*s[t+1][0]-a*s[t-1][0])/6,e[1]+(a*s[t+1][1]-a*s[t-1][1])/6],o[2]=[s[t+1][0]+(a*s[t][0]-a*s[t+2][0])/6,s[t+1][1]+(a*s[t][1]-a*s[t+2][1])/6],o[3]=[s[t+1][0],s[t+1][1]],n.push(o[1],o[2],o[3])}}return n}function N(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function B(t,e,s){const n=N(e,s);if(0===n)return N(t,e);let o=((t[0]-e[0])*(s[0]-e[0])+(t[1]-e[1])*(s[1]-e[1]))/n;return o=Math.max(0,Math.min(1,o)),N(t,J(e,s,o))}function J(t,e,s){return[t[0]+(e[0]-t[0])*s,t[1]+(e[1]-t[1])*s]}function K(t,e,s,n){const o=n||[];if(function(t,e){const s=t[e+0],n=t[e+1],o=t[e+2],a=t[e+3];let h=3*n[0]-2*s[0]-a[0];h*=h;let r=3*n[1]-2*s[1]-a[1];r*=r;let i=3*o[0]-2*a[0]-s[0];i*=i;let c=3*o[1]-2*a[1]-s[1];return c*=c,h<i&&(h=i),r<c&&(r=c),h+r}(t,e)<s){const s=t[e+0];if(o.length){(a=o[o.length-1],h=s,Math.sqrt(N(a,h)))>1&&o.push(s)}else o.push(s);o.push(t[e+3])}else{const n=.5,a=t[e+0],h=t[e+1],r=t[e+2],i=t[e+3],c=J(a,h,n),l=J(h,r,n),u=J(r,i,n),p=J(c,l,n),f=J(l,u,n),d=J(p,f,n);K([a,c,p,d],0,s,o),K([d,f,u,i],0,s,o)}var a,h;return o}function U(t,e){return X(t,0,t.length,e)}function X(t,e,s,n,o){const a=o||[],h=t[e],r=t[s-1];let i=0,c=1;for(let n=e+1;n<s-1;++n){const e=B(t[n],h,r);e>i&&(i=e,c=n)}return Math.sqrt(i)>n?(X(t,e,c+1,n,a),X(t,c,s,n,a)):(a.length||a.push(h),a.push(r)),a}function Y(t,e=.15,s){const n=[],o=(t.length-1)/3;for(let s=0;s<o;s++){K(t,3*s,e,n)}return s&&s>0?X(n,0,n.length,s):n}const tt="none";class et{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,s){return{shape:t,sets:e||[],options:s||this.defaultOptions}}line(t,e,s,n,o){const a=this._o(o);return this._d("line",[v(t,e,s,n,a)],a)}rectangle(t,e,s,n,o){const a=this._o(o),h=[],r=O(t,e,s,n,a);if(a.fill){const o=[[t,e],[t+s,e],[t+s,e+n],[t,e+n]];"solid"===a.fillStyle?h.push(I([o],a)):h.push(C([o],a))}return a.stroke!==tt&&h.push(r),this._d("rectangle",h,a)}ellipse(t,e,s,n,o){const a=this._o(o),h=[],r=T(s,n,a),i=D(t,e,a,r);if(a.fill)if("solid"===a.fillStyle){const s=D(t,e,a,r).opset;s.type="fillPath",h.push(s)}else h.push(C([i.estimatedPoints],a));return a.stroke!==tt&&h.push(i.opset),this._d("ellipse",h,a)}circle(t,e,s,n){const o=this.ellipse(t,e,s,s,n);return o.shape="circle",o}linearPath(t,e){const s=this._o(e);return this._d("linearPath",[S(t,!1,s)],s)}arc(t,e,s,n,o,a,h=!1,r){const i=this._o(r),c=[],l=A(t,e,s,n,o,a,h,!0,i);if(h&&i.fill)if("solid"===i.fillStyle){const h=Object.assign({},i);h.disableMultiStroke=!0;const r=A(t,e,s,n,o,a,!0,!1,h);r.type="fillPath",c.push(r)}else c.push(function(t,e,s,n,o,a,h){const r=t,i=e;let c=Math.abs(s/2),l=Math.abs(n/2);c+=G(.01*c,h),l+=G(.01*l,h);let u=o,p=a;for(;u<0;)u+=2*Math.PI,p+=2*Math.PI;p-u>2*Math.PI&&(u=0,p=2*Math.PI);const f=(p-u)/h.curveStepCount,d=[];for(let t=u;t<=p;t+=f)d.push([r+c*Math.cos(t),i+l*Math.sin(t)]);return d.push([r+c*Math.cos(p),i+l*Math.sin(p)]),d.push([r,i]),C([d],h)}(t,e,s,n,o,a,i));return i.stroke!==tt&&c.push(l),this._d("arc",c,i)}curve(t,e){const s=this._o(e),n=[],o=L(t,s);if(s.fill&&s.fill!==tt)if("solid"===s.fillStyle){const e=L(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const n of t)n.length<3?e.push(...n):3===n.length?e.push(...Y(H([n[0],n[0],n[1],n[2]]),10,(1+s.roughness)/2)):e.push(...Y(H(n),10,(1+s.roughness)/2))}e.length&&n.push(C([e],s))}return s.stroke!==tt&&n.push(o),this._d("curve",n,s)}polygon(t,e){const s=this._o(e),n=[],o=S(t,!0,s);return s.fill&&("solid"===s.fillStyle?n.push(I([t],s)):n.push(C([t],s))),s.stroke!==tt&&n.push(o),this._d("polygon",n,s)}path(t,e){const s=this._o(e),n=[];if(!t)return this._d("path",n,s);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=s.fill&&"transparent"!==s.fill&&s.fill!==tt,a=s.stroke!==tt,h=!!(s.simplification&&s.simplification<1),r=function(t,e,s){const n=m(y(b(t))),o=[];let a=[],h=[0,0],r=[];const i=()=>{r.length>=4&&a.push(...Y(r,e)),r=[]},c=()=>{i(),a.length&&(o.push(a),a=[])};for(const{key:t,data:e}of n)switch(t){case"M":c(),h=[e[0],e[1]],a.push(h);break;case"L":i(),a.push([e[0],e[1]]);break;case"C":if(!r.length){const t=a.length?a[a.length-1]:h;r.push([t[0],t[1]])}r.push([e[0],e[1]]),r.push([e[2],e[3]]),r.push([e[4],e[5]]);break;case"Z":i(),a.push([h[0],h[1]])}if(c(),!s)return o;const l=[];for(const t of o){const e=U(t,s);e.length&&l.push(e)}return l}(t,1,h?4-4*(s.simplification||1):(1+s.roughness)/2),i=_(t,s);if(o)if("solid"===s.fillStyle)if(1===r.length){const e=_(t,Object.assign(Object.assign({},s),{disableMultiStroke:!0,roughness:s.roughness?s.roughness+s.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else n.push(I(r,s));else n.push(C(r,s));return a&&(h?r.forEach((t=>{n.push(S(t,!1,s))})):n.push(i)),this._d("path",n,s)}opsToPath(t,e){let s="";for(const n of t.ops){const t="number"==typeof e&&e>=0?n.data.map((t=>+t.toFixed(e))):n.data;switch(n.op){case"move":s+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":s+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":s+=`L${t[0]} ${t[1]} `}}return s.trim()}toPaths(t){const e=t.sets||[],s=t.options||this.defaultOptions,n=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:s.stroke,strokeWidth:s.strokeWidth,fill:tt};break;case"fillPath":e={d:this.opsToPath(t),stroke:tt,strokeWidth:0,fill:s.fill||tt};break;case"fillSketch":e=this.fillSketch(t,s)}e&&n.push(e)}return n}fillSketch(t,e){let s=e.fillWeight;return s<0&&(s=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||tt,strokeWidth:s,fill:tt}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}class st{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":n.save(),n.strokeStyle="none"===s.stroke?"transparent":s.stroke,n.lineWidth=s.strokeWidth,s.strokeLineDash&&n.setLineDash(s.strokeLineDash),s.strokeLineDashOffset&&(n.lineDashOffset=s.strokeLineDashOffset),this._drawToContext(n,a,o),n.restore();break;case"fillPath":{n.save(),n.fillStyle=s.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(n,a,o,e),n.restore();break}case"fillSketch":this.fillSketch(n,a,s)}}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2),t.save(),s.fillLineDash&&t.setLineDash(s.fillLineDash),s.fillLineDashOffset&&(t.lineDashOffset=s.fillLineDashOffset),t.strokeStyle=s.fill||"",t.lineWidth=n,this._drawToContext(t,e,s.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,s,n="nonzero"){t.beginPath();for(const n of e.ops){const e="number"==typeof s&&s>=0?n.data.map((t=>+t.toFixed(s))):n.data;switch(n.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a),a}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a),a}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a),a}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o),o}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s),s}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s),s}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i),i}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s),s}path(t,e){const s=this.gen.path(t,e);return this.draw(s),s}}const nt="http://www.w3.org/2000/svg";class ot{constructor(t,e){this.svg=t,this.gen=new et(e)}draw(t){const e=t.sets||[],s=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,o=n.createElementNS(nt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const h of e){let e=null;switch(h.type){case"path":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke",s.stroke),e.setAttribute("stroke-width",s.strokeWidth+""),e.setAttribute("fill","none"),s.strokeLineDash&&e.setAttribute("stroke-dasharray",s.strokeLineDash.join(" ").trim()),s.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${s.strokeLineDashOffset}`);break;case"fillPath":e=n.createElementNS(nt,"path"),e.setAttribute("d",this.opsToPath(h,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",s.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(n,h,s)}e&&o.appendChild(e)}return o}fillSketch(t,e,s){let n=s.fillWeight;n<0&&(n=s.strokeWidth/2);const o=t.createElementNS(nt,"path");return o.setAttribute("d",this.opsToPath(e,s.fixedDecimalPlaceDigits)),o.setAttribute("stroke",s.fill||""),o.setAttribute("stroke-width",n+""),o.setAttribute("fill","none"),s.fillLineDash&&o.setAttribute("stroke-dasharray",s.fillLineDash.join(" ").trim()),s.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${s.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,s,n,o){const a=this.gen.line(t,e,s,n,o);return this.draw(a)}rectangle(t,e,s,n,o){const a=this.gen.rectangle(t,e,s,n,o);return this.draw(a)}ellipse(t,e,s,n,o){const a=this.gen.ellipse(t,e,s,n,o);return this.draw(a)}circle(t,e,s,n){const o=this.gen.circle(t,e,s,n);return this.draw(o)}linearPath(t,e){const s=this.gen.linearPath(t,e);return this.draw(s)}polygon(t,e){const s=this.gen.polygon(t,e);return this.draw(s)}arc(t,e,s,n,o,a,h=!1,r){const i=this.gen.arc(t,e,s,n,o,a,h,r);return this.draw(i)}curve(t,e){const s=this.gen.curve(t,e);return this.draw(s)}path(t,e){const s=this.gen.path(t,e);return this.draw(s)}}return{canvas:(t,e)=>new st(t,e),svg:(t,e)=>new ot(t,e),generator:t=>new et(t),newSeed:()=>et.newSeed()}}();
@@ -30,7 +30,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);"function"!==typeof window.structuredClone&&(window.structuredClone=function(a){return a});window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,HTML_INTEGRATION_POINTS:{foreignobject:!0},ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";
window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";
-window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.9",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"26.0.13",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:-1<navigator.userAgent.toLowerCase().indexOf("firefox"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&
0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||
@@ -89,17 +89,17 @@ b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=
isRgbColor:function(a){return mxUtils.rgbaColorRegex.test(a)},isValidColor:function(a){if(null==a)return!1;a=String(a).replace(/\s/g,"");if(a.toLowerCase()==mxUtils.normalizedValidInvalidColor)return!0;mxUtils.canvasContext.fillStyle=mxUtils.validInvalidColor;mxUtils.canvasContext.fillStyle=a;return mxUtils.canvasContext.fillStyle!=mxUtils.validInvalidColor},isDarkColor:function(a){a=mxUtils.parseColor(a);return null!=a?128>.213*a.r+.715*a.g+.072*a.b:!1},parseLightDarkColor:function(a,b,c){var d=
a,e=null;null!=a&&(a=a.match(mxUtils.lightDarkColorRegex))&&3===a.length&&(d=mxUtils.trim(a[1]),e=mxUtils.trim(a[2]));null==e&&(c||mxUtils.isVarColor(d))&&(e=d);e=null!=e?e:null!=b?b:mxUtils.getInverseColor(d);return{light:d,dark:e}},getInverseColor:function(a,b,c){function d(m){return Math.round(b/100*(255-m)+m*(1-b/100))}function e(m){return Math.round(Math.max(0,Math.min(255,m)))}c=null!=c?c:180;b=null!=b?b:93;var f=0,g=0,k=0;if("transparent"==a.toLowerCase())return a;k=mxUtils.parseColor(a);if(null==
k)return a;f=k.r;g=k.g;k=k.b;f=d(f);g=d(g);k=d(k);a=[1,0,0,0,1,0,0,0,1];var l=Math.cos(c*Math.PI/180);c=Math.sin(c*Math.PI/180);a[0]=.2126+.7874*l-.2126*c;a[1]=.7152-.7152*l-.7152*c;a[2]=.0722-.0722*l+.9278*c;a[3]=.2126-.2126*l+.143*c;a[4]=.7152+(1-.7152)*l+.14*c;a[5]=.0722-.0722*l-.283*c;a[6]=.2126-.2126*l-.7874*c;a[7]=.7152-.7152*l+.7152*c;a[8]=.0722+.9278*l+.0722*c;c=e(a[0]*f+a[1]*g+a[2]*k);l=e(a[3]*f+a[4]*g+a[5]*k);f=e(a[6]*f+a[7]*g+a[8]*k);return"#"+(16777216|c<<16|l<<8|f).toString(16).slice(1)},
-addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?"light-dark("+e.light+", "+e.dark+")":mxUtils.preferDarkColor?
-e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText="light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===Element)d=a.cloneNode(null!=c?!c:!1);else{d=
-new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/
-180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
+addAlphaToColor:function(a,b){null!=b&&null!=a&&"transparent"!=a&&(a=mxUtils.parseColor(a),a="rgba("+a.r+","+a.g+","+a.b+","+b+")");return a},getLightDarkColor:function(a,b,c,d){var e={light:"transparent",dark:"transparent",cssText:"transparent"};null!=a&&a!=mxConstants.NONE&&("string"===typeof a?(a=mxUtils.parseLightDarkColor(a,c,d),e.light=mxUtils.addAlphaToColor(a.light,b),e.dark=mxUtils.addAlphaToColor(a.dark,b),e.cssText=mxUtils.lightDarkColorSupported?e.light==e.dark?e.light:"light-dark("+e.light+
+", "+e.dark+")":mxUtils.preferDarkColor?e.dark:e.light):(e.light=a,e.dark=a,e.cssText=a));return e},invertLightDarkColor:function(a){var b={};b.light=a.dark;b.dark=a.light;b.cssText=b.light==b.dark?b.light:"light-dark("+b.light+", "+b.dark+")";return b},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},isEmptyObject:function(a){for(var b in a)return!1;return!0},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor)if(a.constructor===
+Element)d=a.cloneNode(null!=c?!c:!1);else{d=new a.constructor;for(var 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]&&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)},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+=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 A;c=Math.abs(c);
+d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180);A=Math.sin(e*Math.PI/180);e=p*m+A*n;m=-1*A*m+p*n;n=e*e;var q=m*m,r=c*c,t=d*d,u=n/r+q/t;1<u?(c*=Math.sqrt(u),d*=Math.sqrt(u),f=0):(u=1,f===g&&(u=-1),f=u*Math.sqrt((r*t-r*q-t*n)/(r*q+t*n)));n=f*c*m/d;q=-1*f*d*e/c;k=p*n-A*q+k/2;l=A*n+p*q+l/2;r=Math.atan2((m-q)/d,(e-n)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-m-q)/d,(-e-n)/c)-Math.atan2((m-q)/d,(e-n)/c);e=0<=r?r:2*Math.PI+r;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*=A;d*=A;var x=Math.cos(f),y=Math.sin(f);q=-m*(n*y+d*x);r=-m*(c*y-p*x);for(var A=[],z=0;z<g;++z){f+=e;x=Math.cos(f);y=Math.sin(f);t=n*x-d*y+k;u=c*x+p*y+l;var C=-m*(n*y+d*x);x=-m*(c*y-p*x);y=6*z;A[y]=Number(q+a);A[y+1]=Number(r+b);A[y+2]=Number(t-C+a);A[y+3]=Number(u-x+b);A[y+4]=Number(t+a);A[y+5]=Number(u+b);q=t+C;r=u+x}return A},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);
+d=Math.cos(b);var 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,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,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;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|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},
reversePortConstraints:function(a){var 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,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,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=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,
@@ -1973,9 +1973,9 @@ OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.
function Dialog(b,e,g,m,u,p,B,H,S,G,O){this.editorUi=b;var R=S?57:0,c=g,f=m,l=S?0:64,t=Editor.inlineFullscreen||null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(t.height=window.innerHeight);var z=t.height;t=Math.max(1,Math.round((t.width-g-l)/2));var C=Math.max(1,Math.round((z-m-b.footerHeight)/3));e.style.maxHeight="100%";g=null!=document.body?Math.min(g,document.body.scrollWidth-l):g;m=Math.min(m,z-l);0<b.dialogs.length&&
(this.zIndex+=2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("geBackground"),this.bg.style.position="absolute",this.bg.style.height=z+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));var F=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=F.x+"px";this.bg.style.top=F.y+"px";t+=F.x;C+=F.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px",C+=b.embedViewport.y,t+=b.embedViewport.x);
u&&document.body.appendChild(this.bg);var N=b.createDiv(S?"geTransDialog":"geDialog");u=this.getPosition(t,C,g,m);t=u.x;C=u.y;N.style.width=g+"px";N.style.height=m+"px";N.style.left=t+"px";N.style.top=C+"px";N.style.zIndex=this.zIndex;N.appendChild(e);document.body.appendChild(N);!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(p&&(p=document.createElement("img"),p.setAttribute("src",Dialog.prototype.closeImage),p.setAttribute("title",mxResources.get("close")),
-p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(I){K=!0}),null,mxUtils.bind(this,function(I){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var I=G();null!=I&&(c=g=I.w,f=m=I.h)}I=Editor.inlineFullscreen||
-null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=I.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);I=Math.max(1,Math.round((I.width-g-l)/2));var ca=Math.max(1,Math.round((z-m-b.footerHeight)/3));ca=this.getPosition(I,ca,g,m);I=ca.x;ca=ca.y;var da=mxUtils.getDocumentScrollOrigin(document);I+=da.x;
-ca+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ca+=b.embedViewport.y,I+=b.embedViewport.x);N.style.left=I+"px";N.style.top=ca+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=I+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=
+p.className="geDialogClose",p.style.top=C+14+"px",p.style.left=t+g+38-R+"px",p.style.zIndex=this.zIndex,mxEvent.addListener(p,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(p),this.dialogImg=p,!O)){var K=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(J){K=!0}),null,mxUtils.bind(this,function(J){K&&(b.hideDialog(!0),K=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=G){var J=G();null!=J&&(c=g=J.w,f=m=J.h)}J=Editor.inlineFullscreen||
+null==b.embedViewport?this.getDocumentSize():mxUtils.clone(b.embedViewport);z=J.height;this.bg.style.height=z+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=this.getDocumentSize().height+"px");g=null!=document.body?Math.min(c,document.body.scrollWidth-l):c;m=Math.min(f,z-l);J=Math.max(1,Math.round((J.width-g-l)/2));var ea=Math.max(1,Math.round((z-m-b.footerHeight)/3));ea=this.getPosition(J,ea,g,m);J=ea.x;ea=ea.y;var da=mxUtils.getDocumentScrollOrigin(document);J+=da.x;
+ea+=da.y;Editor.inlineFullscreen||null==b.embedViewport||(ea+=b.embedViewport.y,J+=b.embedViewport.x);N.style.left=J+"px";N.style.top=ea+"px";N.style.width=g+"px";N.style.height=m+"px";!H&&e.clientHeight>N.clientHeight-l&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ea+14+"px",this.dialogImg.style.left=J+g+38-R+"px")});null!=b.embedViewport?b.addListener("embedViewportChanged",this.resizeListener):mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=
B;this.container=N;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
@@ -2006,10 +2006,10 @@ PageSetupDialog.addPageFormatPanel=function(b,e,g,m){e="format-"+e;var u=documen
B.style.padding="2px";B.style.width="210px";var H=document.createElement("div");H.style.whiteSpace="nowrap";H.style.marginLeft="4px";H.style.width="210px";H.style.height="24px";u.style.marginRight="6px";H.appendChild(u);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));H.appendChild(e);p.style.marginLeft="10px";p.style.marginRight="6px";H.appendChild(p);var S=document.createElement("span");S.style.width="100px";mxUtils.write(S,mxResources.get("landscape"));
H.appendChild(S);var G=document.createElement("div");G.style.whiteSpace="nowrap";G.style.marginLeft="4px";G.style.fontSize="12px";G.style.width="210px";G.style.height="24px";var O=document.createElement("input");O.setAttribute("size","7");O.setAttribute("title",mxResources.get("width"));O.style.textAlign="right";G.appendChild(O);mxUtils.write(G," x ");var R=document.createElement("input");R.setAttribute("size","7");R.setAttribute("title",mxResources.get("height"));R.style.textAlign="right";G.appendChild(R);
var c=document.createElement("select");c.style.marginLeft="4px";c.style.maxWidth="78px";c.style.width="78px";for(var f=[{label:mxResources.get("points"),unit:mxConstants.POINTS},{label:mxResources.get("inches"),unit:mxConstants.INCHES},{label:mxResources.get("millimeters"),unit:mxConstants.MILLIMETERS}],l=0;l<f.length;l++){var t=document.createElement("option");t.setAttribute("value",f[l].unit);mxUtils.write(t,f[l].label);c.appendChild(t)}c.value=Editor.pageSizeUnit;G.appendChild(c);H.style.display=
-"none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var I=C[K];null!=I.format&&("a4"==I.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==I.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=
-583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==I.format.width&&g.height==I.format.height?(B.value=I.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==I.format.height&&g.height==I.format.width&&(B.value=I.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?
-(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,I){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",
-H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));I||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});
+"none";G.style.display="none";var z={},C=PageSetupDialog.getFormats();for(l=0;l<C.length;l++)f=C[l],z[f.key]=f,t=document.createElement("option"),t.setAttribute("value",f.key),mxUtils.write(t,f.title),B.appendChild(t);var F=function(){B.value="custom";for(var K=0;K<C.length;K++){var J=C[K];null!=J.format&&("a4"==J.key?826==g.width?(g=mxRectangle.fromRectangle(g),g.width=827):826==g.height&&(g=mxRectangle.fromRectangle(g),g.height=827):"a5"==J.key&&(584==g.width?(g=mxRectangle.fromRectangle(g),g.width=
+583):584==g.height&&(g=mxRectangle.fromRectangle(g),g.height=583)),g.width==J.format.width&&g.height==J.format.height?(B.value=J.key,u.setAttribute("checked","checked"),u.defaultChecked=!0,u.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,detected=!0):g.width==J.format.height&&g.height==J.format.width&&(B.value=J.key,u.removeAttribute("checked"),u.defaultChecked=!1,u.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,detected=p.checked=!0))}"custom"==B.value?
+(O.value=Editor.toUnit(g.width,c.value),R.value=Editor.toUnit(g.height,c.value),u.setAttribute("checked","checked"),B.value="custom",H.style.display="none",G.style.display=""):(H.style.display="",G.style.display="none")};F();b.appendChild(B);mxUtils.br(b);b.appendChild(H);b.appendChild(G);var N=function(K,J){K=z[B.value];null!=K.format?(O.value=Editor.toUnit(p.checked?K.format.height:K.format.width,c.value),R.value=Editor.toUnit(p.checked?K.format.width:K.format.height,c.value),G.style.display="none",
+H.style.display=""):(H.style.display="none",G.style.display="");K=parseFloat(O.value);if(isNaN(K)||0>=K)O.value=Editor.toUnit(g.width,c.value);K=parseFloat(R.value);if(isNaN(K)||0>=K)R.value=Editor.toUnit(g.height,c.value);K=new mxRectangle(0,0,Math.floor(Editor.fromUnit(parseFloat(O.value),c.value)),Math.floor(Editor.fromUnit(parseFloat(R.value),c.value)));J||K.width==g.width&&K.height==g.height||(g=K,null!=m&&m(g))};mxEvent.addListener(e,"click",function(K){u.checked=!0;N(K);mxEvent.consume(K)});
mxEvent.addListener(S,"click",function(K){p.checked=!0;N(K);mxEvent.consume(K)});mxEvent.addListener(O,"blur",N);mxEvent.addListener(O,"click",N);mxEvent.addListener(R,"blur",N);mxEvent.addListener(R,"click",N);mxEvent.addListener(p,"change",N);mxEvent.addListener(u,"change",N);mxEvent.addListener(B,"change",function(K){N(K,"custom"==B.value);mxEvent.consume(K)});mxEvent.addListener(c,"change",function(K){O.value=Editor.toUnit(Editor.fromUnit(O.value,Editor.pageSizeUnit),c.value);R.value=Editor.toUnit(Editor.fromUnit(R.value,
Editor.pageSizeUnit),c.value);Editor.pageSizeUnit=c.value;N(K,!0);mxEvent.consume(K)});N(null,!0);return{set:function(K){g=K;F(null,null,!0)},get:function(){return g},widthInput:O,heightInput:R}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
@@ -2031,41 +2031,42 @@ B.tooltipHandler&&B.tooltipHandler.isHideOnHover()&&B.tooltipHandler.hide();B.is
mxGraphView.prototype.validateBackgroundStyles=function(B,H,S){var G=this.graph;B=null!=B?B:1;var O=mxUtils.getLightDarkColor(null==G.background||G.background==mxConstants.NONE?G.defaultPageBackgroundColor:G.background).cssText,R=mxUtils.getLightDarkColor(G.defaultPageBorderColor).cssText,c=null!=O&&this.gridColor!=O.toLowerCase()?this.gridColor:"#ffffff",f="none",l="";"simple"==G.getAdaptiveColors()&&G.background!=mxConstants.NONE&&null!=G.background&&(O=G.background);if(G.isGridEnabled()||G.gridVisible){l=
10;mxClient.IS_SVG?(f=unescape(encodeURIComponent(this.createSvgGrid(c,B))),f=window.btoa?btoa(f):Base64.encode(f,!0),f="url(data:image/svg+xml;base64,"+f+")",l=G.gridSize*this.scale*this.gridSteps*B):f="url("+this.gridImage+")";var t=c=0;H=null!=H?H-this.translate.x*this.scale:0;S=null!=S?S-this.translate.y*this.scale:0;var z=G.gridSize*this.scale*this.gridSteps,C=H%z;z=S%z;null!=G.view.backgroundPageShape&&(t=this.getBackgroundPageBounds(),c=1+t.x,t=1+t.y);l=-Math.round(l-mxUtils.mod(this.translate.x*
this.scale-c+H,l)+C*B)+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-t+S,l)+z*B)+"px"}B=G.view.canvas;null!=B.ownerSVGElement&&(B=B.ownerSVGElement);c=!Editor.isDarkMode()&&G.enableDiagramBackground;null!=G.view.backgroundPageShape?(G.view.backgroundPageShape.node.style.backgroundPosition=l,G.view.backgroundPageShape.node.style.backgroundImage=f,G.view.backgroundPageShape.node.style.backgroundColor=O,G.view.backgroundPageShape.node.style.borderColor=R,G.view.backgroundPageShape.node.style.colorScheme=
-"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=
-function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+
-H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();
-H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,I=0;I<=K;I++){var ca=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),
-Math.round(f.y+(I+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(I+1)*l.height))]:[new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(I+1)*l.width),Math.round(F))];null!=N[I]?(N[I].points=ca,N[I].redraw()):(ca=new mxPolyline(ca,this.pageBreakColor),ca.dialect=this.dialect,ca.isDashed=this.pageBreakDashed,ca.pointerEvents=!1,ca.init(this.view.backgroundPane),ca.redraw(),N[I]=ca)}for(I=K;I<N.length;I++)null!=N[I]&&N[I].destroy();N.splice(K,N.length-K)}});
-B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,
-O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||
-this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var X=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;X=mxRectangle.fromRectangle(X);X.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return X};u.useCssTransforms&&
-(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(X,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
-0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(X){for(var ba=X.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(X.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(X){try{u.getModel().isEdge(X)?
-S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(X,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(X)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[X],"force",!0));u.getModel().isEdge(X)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=
-u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(X,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(X,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(X){null==X&&(X=window.event);return u.isEditing()||null!=X&&this.isSelectionAllowed(X)});this.container!=document.body||
+"none"==G.getAdaptiveColors()?"light":"",G.container.classList.add("geDiagramBackdrop"),B.style.backgroundImage="none",B.style.backgroundColor="",G.container.style.backgroundColor=c?G.diagramBackgroundColor:""):(G.container.classList.remove("geDiagramBackdrop"),B.style.backgroundPosition=l,B.style.backgroundImage=f,"1"==urlParams.transparent?G.container.style.background="transparent":!c||null!=G.background&&G.background!=mxConstants.NONE?B.style.backgroundColor=O:(B.style.backgroundColor=G.diagramBackgroundColor,
+G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(B,H){for(var S=this.graph.gridSize*this.scale*(null!=H?H:1);S<this.minGridSize;)S*=2;H=this.gridSteps*S;for(var G=[],O=1;O<this.gridSteps;O++){var R=O*S;G.push("M 0 "+R+" L "+H+" "+R+" M "+R+" 0 L "+R+" "+H)}B=mxUtils.getLightDarkColor(B);S="color-scheme: light dark;";mxClient.IS_SF&&(S="color-scheme: "+("none"!=this.graph.getAdaptiveColors()&&Editor.isDarkMode()?"dark":"light"));return'<svg style="'+S+'" width="'+
+H+'" height="'+H+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+H+'" height="'+H+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" opacity="0.2" stroke-width="1"/><path d="M '+H+" 0 L 0 0 0 "+H+'" fill="none" style="stroke:'+mxUtils.htmlEntities(B.cssText)+';" stroke="'+B.light+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;
+mxGraph.prototype.panGraph=function(B,H){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;null!=S.ownerSVGElement&&(S=S.ownerSVGElement);var G=this.gridSize*this.view.scale*this.view.gridSteps;G=-Math.round(G-mxUtils.mod(this.view.translate.x*this.view.scale+B,G))+"px "+-Math.round(G-mxUtils.mod(this.view.translate.y*this.view.scale+H,G))+"px";S.style.backgroundPosition=G}};mxGraph.prototype.updatePageBreaks=function(B,H,S){var G=this.view.scale,O=this.view.translate,R=
+this.pageFormat,c=G*this.pageScale,f=this.view.getBackgroundPageBounds();H=f.width;S=f.height;var l=new mxRectangle(G*O.x,G*O.y,R.width*c,R.height*c),t=(B=B&&Math.min(l.width,l.height)>this.minPageBreakDist)?Math.ceil(S/l.height)-1:0,z=B?Math.ceil(H/l.width)-1:0,C=f.x+H,F=f.y+S;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<z&&(this.verticalPageBreaks=[]);B=mxUtils.bind(this,function(N){if(null!=N){for(var K=N==this.horizontalPageBreaks?t:z,J=
+0;J<=K;J++){var ea=N==this.horizontalPageBreaks?[new mxPoint(Math.round(f.x),Math.round(f.y+(J+1)*l.height)),new mxPoint(Math.round(C),Math.round(f.y+(J+1)*l.height))]:[new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(f.y)),new mxPoint(Math.round(f.x+(J+1)*l.width),Math.round(F))];null!=N[J]?(N[J].points=ea,N[J].redraw()):(ea=new mxPolyline(ea,this.pageBreakColor),ea.dialect=this.dialect,ea.isDashed=this.pageBreakDashed,ea.pointerEvents=!1,ea.init(this.view.backgroundPane),ea.redraw(),N[J]=ea)}for(J=
+K;J<N.length;J++)null!=N[J]&&N[J].destroy();N.splice(K,N.length-K)}});B(this.horizontalPageBreaks);B(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(B,H,S){for(var G=0;G<H.length;G++){if(this.graph.isTableCell(H[G])||this.graph.isTableRow(H[G]))return!1;if(this.graph.getModel().isVertex(H[G])){var O=this.graph.getCellGeometry(H[G]);if(null!=O&&O.relative)return!1}}return e.apply(this,arguments)};var g=
+mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var B=g.apply(this,arguments);B.intersects=mxUtils.bind(this,function(H,S){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(B,arguments)});return B};mxGraphView.prototype.createBackgroundPageShape=function(B){return new mxRectangleShape(B,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var B=this.getGraphBounds(),H=0<B.width?B.x/
+this.scale-this.translate.x:0,S=0<B.height?B.y/this.scale-this.translate.y:0,G=this.graph.pageFormat,O=this.graph.pageScale,R=G.width*O;G=G.height*O;O=Math.floor(Math.min(0,H)/R);var c=Math.floor(Math.min(0,S)/G);return new mxRectangle(this.scale*(this.translate.x+O*R),this.scale*(this.translate.y+c*G),this.scale*(Math.ceil(Math.max(1,H+B.width/this.scale)/R)-O)*R,this.scale*(Math.ceil(Math.max(1,S+B.height/this.scale)/G)-c)*G)};var m=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(B,
+H){m.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=B+"px",this.view.backgroundPageShape.node.style.marginTop=H+"px")};var u=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(B,H,S,G,O,R){var c=u.apply(this,arguments);null==R||R||mxEvent.addListener(c,"mousedown",function(f){mxEvent.consume(f)});return c};var p=
+mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=function(B,H,S){var G=this.graph.model.getParent(B);if(H){var O=this.graph.model.isEdge(B)?null:this.graph.getCellGeometry(B);O=!this.graph.model.isEdge(G)&&!this.graph.isSiblingSelected(B)&&(null!=O&&O.relative||!this.graph.isContainer(G)||this.graph.isPart(B))}else if(O=p.apply(this,arguments),this.graph.isTableCell(B)||this.graph.isTableRow(B))O=G,this.graph.isTable(O)||(O=this.graph.model.getParent(O)),
+O=!this.graph.selectionCellsHandler.isHandled(O)||this.graph.isCellSelected(O)&&this.graph.isToggleEvent(S.getEvent())||this.graph.isCellSelected(B)&&!this.graph.isToggleEvent(S.getEvent())||this.graph.isTableCell(B)&&this.graph.isCellSelected(G);return O};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(B){B=B.getCell();for(var H=this.graph.getModel(),S=H.getParent(B),G=this.graph.view.getState(S),O=this.graph.isCellSelected(B);null!=G&&(H.isVertex(S)||H.isEdge(S));){var R=this.graph.isCellSelected(S);
+O=O||R;if(R||!O&&(this.graph.isTableCell(B)||this.graph.isTableRow(B)))B=S;S=H.getParent(S)}return B}})();EditorUi=function(b,e,g){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var m=this,u=this.editor.graph;u.lightbox=g;var p=u.getGraphBounds;u.getGraphBounds=function(){var W=p.apply(this,arguments),ba=this.backgroundImage;if(null!=ba&&null!=ba.width&&null!=ba.height){var ha=this.view.translate,ma=this.view.scale;W=mxRectangle.fromRectangle(W);W.add(new mxRectangle((ha.x+ba.x)*ma,(ha.y+ba.y)*ma,ba.width*ma,ba.height*ma))}return W};u.useCssTransforms&&
+(this.lazyZoomDelay=0);this.selectionStateListener=mxUtils.bind(this,function(W,ba){this.clearSelectionState()});u.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);u.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);u.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);u.getView().addListener("unitChanged",this.selectionStateListener);if(this.editor.chromeless&&!this.editor.editable){this.footerHeight=
+0;u.isEnabled=function(){return!1};u.panningHandler.isForcePanningEvent=function(W){for(var ba=W.getSource();null!=ba&&ba!=u.container;){if("foreignObject"===ba.nodeName||"text"===ba.nodeName)return!1;ba=ba.parentNode}return!mxEvent.isPopupTrigger(W.getEvent())};var B=u.panningHandler.start;u.panningHandler.start=function(){B.apply(this,arguments);mxUtils.clearSelection()}}this.actions=new Actions(this);this.menus=this.createMenus();if(!u.standalone){var H=!1,S=!1;this.setDefaultStyle=function(W){try{u.getModel().isEdge(W)?
+S=u.pasteEdgeStyle=!1:H=!1;var ba=u.getCellStyle(W,!1),ha=[],ma=[],Y;for(Y in ba)ha.push(ba[Y]),ma.push(Y);u.getModel().isEdge(W)?u.currentEdgeStyle={}:u.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ha,"cells",[W],"force",!0));u.getModel().isEdge(W)?S=u.pasteEdgeStyle=!0:H=!0}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){u.currentEdgeStyle=mxUtils.clone(u.defaultEdgeStyle);u.currentVertexStyle=mxUtils.clone(u.defaultVertexStyle);H=S=
+u.pasteEdgeStyle=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};u.addListener("cellsInserted",function(W,ba){u.pasteCellStyles(u.includeDescendants(ba.getProperty("cells")))});u.addListener("textInserted",function(W,ba){u.pasteCellStyles(ba.getProperty("cells"))});this.createDivs();this.createUi();this.refresh();var G=mxUtils.bind(this,function(W){null==W&&(W=window.event);return u.isEditing()||null!=W&&this.isSelectionAllowed(W)});this.container!=document.body||
this.editor.chromeless&&!this.editor.editable||(this.menubarContainer.onselectstart=G,this.menubarContainer.onmousedown=G,this.toolbarContainer.onselectstart=G,this.toolbarContainer.onmousedown=G,this.diagramContainer.onselectstart=G,this.diagramContainer.onmousedown=G,this.sidebarContainer.onselectstart=G,this.sidebarContainer.onmousedown=G,this.formatContainer.onselectstart=G,this.formatContainer.onmousedown=G,this.footerContainer.onselectstart=G,this.footerContainer.onmousedown=G,null!=this.tabContainer&&
-(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var X=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{X=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return X}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",
-"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(X){if(null!=X){var ba=mxEvent.getSource(X);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(X)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||
+(this.tabContainer.onselectstart=G),mxClient.IS_IOS&&(e=function(){var W=null;if(/iP(hone|od|ad)/.test(navigator.platform)){var ba=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);try{W=[parseInt(ba[1],10),parseInt(ba[2],10),parseInt(ba[3]||0,10)]}catch(ha){}}return W}(),null!=e&&16<=e[0]&&(mxUtils.setPrefixedStyle(this.menubarContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.diagramContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.sidebarContainer.style,"userSelect",
+"none"),mxUtils.setPrefixedStyle(this.formatContainer.style,"userSelect","none"),mxUtils.setPrefixedStyle(this.footerContainer.style,"userSelect","none"),null!=this.tabContainer&&mxUtils.setPrefixedStyle(this.tabContainer.style,"userSelect","none"))));!this.editor.chromeless||this.editor.editable?(e=function(W){if(null!=W){var ba=mxEvent.getSource(W);if("A"==ba.nodeName)for(;null!=ba;){if("geHint"==ba.className)return!0;ba=ba.parentNode}}return G(W)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||
9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):u.panningHandler.usePopupTrigger=!1;u.init(this.diagramContainer);mxClient.IS_SVG&&null!=u.view.getDrawPane()&&(e=u.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=u.graphHandler){var O=u.graphHandler.start;u.graphHandler.start=function(){null!=m.hoverIcons&&m.hoverIcons.reset();O.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,
-"mousemove",mxUtils.bind(this,function(X){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(X)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(X)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(X,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,
-function(X){16==X.which?this.shiftDown=!0:32!=X.which||u.isEditing()?mxEvent.isConsumed(X)||27!=X.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(X)!=u.container||mxEvent.consume(X))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(X){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
-var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(X){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(X.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(X.getEvent()))&&(!mxEvent.isControlDown(X.getEvent())&&mxEvent.isRightMouseButton(X.getEvent())||mxEvent.isMiddleMouseButton(X.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(X){return f.apply(this,arguments)||13==X.keyCode&&(!mxClient.IS_SF&&
-mxEvent.isControlDown(X)||mxClient.IS_MAC&&mxEvent.isMetaDown(X)||mxClient.IS_SF&&mxEvent.isShiftDown(X))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var X=this.toolbar.container.firstChild,ba=[];null!=X;){var ha=X.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,X)&&(X.parentNode.removeChild(X),ba.push(X));
-X=ha}X=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=X;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var X=!1,ba=function(){X||(X=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();
-null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));X=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var I=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(X,ba){try{I.apply(this,
-arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(X){}var ca=u.fireMouseEvent;u.fireMouseEvent=function(X,ba,ha){try{X==mxEvent.MOUSE_DOWN&&this.container.focus(),ca.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(X,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=
-!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(X,ba,ha){this.menus.createPopupMenu(X,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(X){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(X,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=
-m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(X,ba){X=ba.getProperty("force");(this.updateDefaultStyle||X)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||
+"mousemove",mxUtils.bind(this,function(W){var ba=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(W)-ba.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(W)-ba.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var R=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(W,ba){return m.isSpaceDown()||R.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,
+function(W){16==W.which?this.shiftDown=!0:32!=W.which||u.isEditing()?mxEvent.isConsumed(W)||27!=W.keyCode||this.hideDialog(null,!0):(this.spaceDown=!0,this.hoverIcons.reset(),u.container.style.cursor="move",u.isEditing()||mxEvent.getSource(W)!=u.container||mxEvent.consume(W))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(W){u.container.style.cursor="";this.shiftDown=this.spaceDown=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);
+var c=u.panningHandler.isForcePanningEvent;u.panningHandler.isForcePanningEvent=function(W){return c.apply(this,arguments)||m.isSpaceDown()||mxEvent.isMouseEvent(W.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(W.getEvent()))&&(!mxEvent.isControlDown(W.getEvent())&&mxEvent.isRightMouseButton(W.getEvent())||mxEvent.isMiddleMouseButton(W.getEvent()))};var f=u.cellEditor.isStopEditingEvent;u.cellEditor.isStopEditingEvent=function(W){return f.apply(this,arguments)||13==W.keyCode&&(!mxClient.IS_SF&&
+mxEvent.isControlDown(W)||mxClient.IS_MAC&&mxEvent.isMetaDown(W)||mxClient.IS_SF&&mxEvent.isShiftDown(W))};var l=u.isZoomWheelEvent;u.isZoomWheelEvent=function(){return m.isSpaceDown()||l.apply(this,arguments)};var t=!1,z=null,C=null,F=null,N=mxUtils.bind(this,function(){if(null!=this.toolbar&&t!=u.cellEditor.isContentEditing()){for(var W=this.toolbar.container.firstChild,ba=[];null!=W;){var ha=W.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,W)&&(W.parentNode.removeChild(W),ba.push(W));
+W=ha}W=this.toolbar.fontMenu;ha=this.toolbar.sizeMenu;if(null==F)this.toolbar.createTextToolbar();else{for(var ma=0;ma<F.length;ma++)this.toolbar.container.appendChild(F[ma]);this.toolbar.fontMenu=z;this.toolbar.sizeMenu=C}t=u.cellEditor.isContentEditing();z=W;C=ha;F=ba}}),K=u.cellEditor.startEditing;u.cellEditor.startEditing=function(){K.apply(this,arguments);N();if(u.cellEditor.isContentEditing()){var W=!1,ba=function(){W||(W=!0,window.setTimeout(function(){var ha=u.getSelectedEditingElement();
+null!=ha&&(ha=mxUtils.getCurrentStyle(ha),null!=ha&&null!=m.toolbar&&(m.toolbar.setFontName(mxUtils.getCssFontFamily(ha.fontFamily)),m.toolbar.setFontSize(parseInt(ha.fontSize))));W=!1},0))};mxEvent.addListener(u.cellEditor.textarea,"input",ba);mxEvent.addListener(u.cellEditor.textarea,"touchend",ba);mxEvent.addListener(u.cellEditor.textarea,"mouseup",ba);mxEvent.addListener(u.cellEditor.textarea,"keyup",ba);ba()}};var J=u.cellEditor.stopEditing;u.cellEditor.stopEditing=function(W,ba){try{J.apply(this,
+arguments),N()}catch(ha){m.handleError(ha)}};u.container.setAttribute("tabindex","0");u.container.style.cursor="default";if(window.self===window.top&&null!=u.container.parentNode)try{u.container.focus()}catch(W){}var ea=u.fireMouseEvent;u.fireMouseEvent=function(W,ba,ha){try{W==mxEvent.MOUSE_DOWN&&this.container.focus(),ea.apply(this,arguments)}catch(ma){m.handleError(ma)}};var da=u.foldCells;u.foldCells=function(W,ba,ha,ma,Y){try{da.apply(this,arguments)}catch(la){m.handleError(la)}};u.popupMenuHandler.autoExpand=
+!0;null!=this.menus&&(u.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(W,ba,ha){this.menus.createPopupMenu(W,ba,ha)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(W){u.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};u.connectionHandler.addListener(mxEvent.CONNECT,function(W,ba){var ha=[ba.getProperty("cell")];ba.getProperty("terminalInserted")&&(ha.push(ba.getProperty("terminal")),window.setTimeout(function(){null!=
+m.hoverIcons&&m.hoverIcons.update(u.view.getState(ha[ha.length-1]))},0));u.pasteCellStyles(ha)});this.addListener("styleChanged",mxUtils.bind(this,function(W,ba){W=ba.getProperty("force");(this.updateDefaultStyle||W)&&u.copyCellStyles(ba.getProperty("cells"),ba.getProperty("keys"),ba.getProperty("values"),u.currentVertexStyle,u.currentEdgeStyle,H,S);null!=this.toolbar&&(this.toolbar.setFontName(u.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(u.currentVertexStyle.fontSize||
Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(ba=this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="orthogonalEdgeStyle"==u.currentEdgeStyle.edgeStyle&&"1"==u.currentEdgeStyle.curved?"url("+Format.curvedImage.src+")":"straight"==u.currentEdgeStyle.edgeStyle||"none"==u.currentEdgeStyle.edgeStyle||
null==u.currentEdgeStyle.edgeStyle?"url("+Format.straightImage.src+")":"entityRelationEdgeStyle"==u.currentEdgeStyle.edgeStyle?"url("+Format.entityImage.src+")":"elbowEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalElbowImage.src+")":"url("+Format.horizontalElbowImage.src+")":"isometricEdgeStyle"==u.currentEdgeStyle.edgeStyle?"vertical"==u.currentEdgeStyle.elbow?"url("+Format.verticalIsometricImage.src+")":"url("+Format.horizontalIsometricImage.src+
")":"url("+Format.orthogonalImage.src+")"),null!=this.toolbar.edgeShapeMenu&&(ba=this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0],ba.style.backgroundPosition="left center",ba.style.backgroundRepeat="no-repeat",ba.className="geAdaptiveAsset",ba.style.height="100%",ba.style.width="100%",ba.style.backgroundImage="link"==u.currentEdgeStyle.shape?"url("+Format.linkEdgeImage.src+")":"flexArrow"==u.currentEdgeStyle.shape?"url("+Format.arrowImage.src+")":"arrow"==u.currentEdgeStyle.shape?"url("+
-Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var X=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(X=ha.style[mxConstants.STYLE_FONTFAMILY]||X,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<X.length&&(X=X.substring(0,8)+"..."));this.toolbar.setFontName(X);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,
-b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(X,ba){X=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=X&&0<X.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var X=u.getLayerForCells(u.getSelectionCells());null!=X&&u.setDefaultParent(X)}});this.gestureHandler=mxUtils.bind(this,
-function(X){null!=this.currentMenu&&mxEvent.getSource(X)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ea=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ea&&window.clearTimeout(ea);ea=window.setTimeout(mxUtils.bind(this,function(){ea=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,
+Format.simpleArrowImage.src+")":"url("+Format.connectionImage.src+")"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var W=u.currentVertexStyle.fontFamily||"Helvetica",ba=String(u.currentVertexStyle.fontSize||"12"),ha=u.getView().getState(u.getSelectionCell());null!=ha&&(W=ha.style[mxConstants.STYLE_FONTFAMILY]||W,ba=ha.style[mxConstants.STYLE_FONTSIZE]||ba,10<W.length&&(W=W.substring(0,8)+"..."));this.toolbar.setFontName(W);this.toolbar.setFontSize(ba)}),u.getSelectionModel().addListener(mxEvent.CHANGE,
+b),u.getModel().addListener(mxEvent.CHANGE,b));u.addListener(mxEvent.CELLS_ADDED,function(W,ba){W=ba.getProperty("cells");ba=ba.getProperty("parent");null!=ba&&u.getModel().isLayer(ba)&&!u.isCellVisible(ba)&&null!=W&&0<W.length&&u.getModel().setVisible(ba,!0)});Graph.selectParentLayer&&u.selectionModel.addListener(mxEvent.CHANGE,function(){if(u.isEnabled()&&!u.isSelectionEmpty()){var W=u.getLayerForCells(u.getSelectionCells());null!=W&&u.setDefaultParent(W)}});this.gestureHandler=mxUtils.bind(this,
+function(W){null!=this.currentMenu&&mxEvent.getSource(W)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);var ca=null;this.resizeHandler=mxUtils.bind(this,function(){null!=ca&&window.clearTimeout(ca);ca=window.setTimeout(mxUtils.bind(this,function(){ca=null;this.windowResized()}),100)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,
"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){u.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,
function(){u.view.validateBackground()}));u.addListener("gridSizeChanged",mxUtils.bind(this,function(){u.isGridEnabled()&&u.view.validateBackground()}));this.editor.resetGraph()}this.init();u.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,g){function m(H,S){var G=p;p+=S;return H.substring(G,p)}function u(H){H=m(H,4);return H.charCodeAt(3)+(H.charCodeAt(2)<<8)+(H.charCodeAt(1)<<16)+(H.charCodeAt(0)<<24)}var p=0;if(m(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(m(b,4),"IHDR"!=m(b,4))null!=g&&g();else{m(b,17);do{g=u(b);var B=m(b,4);if(null!=e&&e(p-8,B,g))break;value=m(b,g);m(b,4);if("IEND"==B)break}while(g)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2120,42 +2121,42 @@ EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipb
0),c=0;c<G.length;c++){O.add(R,G[c]);var f=p.view.getState(B[c]);if(null!=f){var l=p.getCellGeometry(G[c]);null!=l&&l.relative&&!O.isEdge(B[c])&&null==S[mxObjectIdentity.get(O.getParent(B[c]))]&&(l.offset=null,l.relative=!1,l.x=f.x/f.view.scale-f.view.translate.x,l.y=f.y/f.view.scale-f.view.translate.y)}}p.updateCustomLinks(p.createCellMapping(H,S),G);mxClipboard.insertCount=1;mxClipboard.setCells(G)}b.updatePasteActionStates();return B};var g=mxClipboard.paste;mxClipboard.paste=function(p){var B=
null;p.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):B=g.apply(this,arguments);b.updatePasteActionStates();return B};var m=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){m.apply(this,arguments);b.updatePasteActionStates()};var u=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(p,B){u.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=500;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),T=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*T.width),this.scale*(this.translate.y+P.y*T.height),this.scale*P.width*T.width,
-this.scale*P.height*T.height)};b.getPreferredPageSize=function(P,T,W){P=this.getPageLayout();T=this.getPageSize();return new mxRectangle(0,0,P.width*T.width,P.height*T.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,T,W,aa){if(null!=b.container&&!b.isViewer()){W=null!=W?W:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,
-wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(T||1,Ea/wa.width)):qa;T=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(T=Math.max(T,0),ra=Math.max(ra,
-0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(T-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=W||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+W/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),U=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*U.width),this.scale*(this.translate.y+P.y*U.height),this.scale*P.width*U.width,
+this.scale*P.height*U.height)};b.getPreferredPageSize=function(P,U,X){P=this.getPageLayout();U=this.getPageSize();return new mxRectangle(0,0,P.width*U.width,P.height*U.height)};var e=null,g=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,U,X,aa){if(null!=b.container&&!b.isViewer()){X=null!=X?X:0;aa=null!=aa?aa:0;var ja=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),pa=mxUtils.hasScrollbars(b.container),sa=b.view.translate,qa=b.view.scale,
+wa=mxRectangle.fromRectangle(ja);wa.x=wa.x/qa-sa.x;wa.y=wa.y/qa-sa.y;wa.width/=qa;wa.height/=qa;sa=b.container.scrollTop;var Ba=b.container.scrollLeft,za=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)za+=3;var Ea=b.container.offsetWidth-za;za=b.container.offsetHeight-za;P=P?Math.max(.3,Math.min(U||1,Ea/wa.width)):qa;U=(Ea-P*wa.width)/2/P;var ra=0==this.lightboxVerticalDivider?0:(za-P*wa.height)/this.lightboxVerticalDivider/P;pa&&(U=Math.max(U,0),ra=Math.max(ra,
+0));if(pa||ja.width<Ea||ja.height<za)b.view.scaleAndTranslate(P,Math.floor(U-wa.x),Math.floor(ra-wa.y)),b.container.scrollTop=sa*P/qa,b.container.scrollLeft=Ba*P/qa;else if(0!=X||0!=aa)ja=b.view.translate,b.view.setTranslate(Math.floor(ja.x+X/qa),Math.floor(ja.y+aa/qa))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var m=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",m);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
"resize",m)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var u=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
"fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,T,W){B++;
-var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=W&&aa.setAttribute("title",W);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",T);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var p=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",p);p();var B=0;p=mxUtils.bind(this,function(P,U,X){B++;
+var aa=document.createElement("span");aa.style.paddingLeft="8px";aa.style.paddingRight="8px";aa.style.cursor="pointer";mxEvent.addListener(aa,"click",P);null!=X&&aa.setAttribute("title",X);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",U);P.style.width="36px";P.style.filter="invert(100%)";aa.appendChild(P);this.chromelessToolbar.appendChild(aa);return aa});if(null!=u.backBtn){var H=Graph.sanitizeLink(u.backBtn.url);null!=H&&p(mxUtils.bind(this,function(P){window.location.href=
H;mxEvent.consume(P)}),Editor.backImage,mxResources.get("back",null,"Back"))}if(this.isPagesEnabled()){var S=p(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),G=document.createElement("div");G.style.fontFamily=Editor.defaultHtmlFont;G.style.display="inline-block";G.style.verticalAlign="top";G.style.fontWeight="bold";G.style.marginTop="8px";G.style.fontSize="14px";G.style.cursor="default";G.style.color=
mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";this.chromelessToolbar.appendChild(G);var O=p(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),R=mxUtils.bind(this,function(){if(null!=this.pages&&1<this.pages.length&&null!=this.currentPage){G.innerText="";var P=mxUtils.indexOf(this.pages,this.currentPage);mxUtils.write(G,P+1+" / "+this.pages.length);G.setAttribute("title",mxResources.get("currentPage")+": "+this.currentPage.getName());
S.setAttribute("title",mxResources.get("previousPage")+": "+this.pages[mxUtils.mod(P-1,this.pages.length)].getName());O.setAttribute("title",mxResources.get("nextPage")+": "+this.pages[mxUtils.mod(P+1,this.pages.length)].getName())}});S.style.paddingLeft="0px";S.style.paddingRight="4px";O.style.paddingLeft="4px";O.style.paddingRight="0px";var c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(O.style.display="",S.style.display="",G.style.display="inline-block"):
-(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var T=new mxPopupMenu(f.funct);T.div.className+=" geMenubarMenu";T.smartSeparators=!0;T.showDisabled=!0;T.autoExpand=!0;T.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(T,arguments);T.destroy()});var W=mxUtils.getOffset(G);T.popup(W.x,W.y+G.offsetHeight,null,P);mxEvent.addListener(T.div,
-"mouseleave",mxUtils.bind(this,function(){T.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?
+(O.style.display="none",S.style.display="none",G.style.display="none");R()});if(null!=this.menus){var f=this.menus.get("pages");null!=f&&mxEvent.addListener(G,"click",mxUtils.bind(this,function(P){var U=new mxPopupMenu(f.funct);U.div.className+=" geMenubarMenu";U.smartSeparators=!0;U.showDisabled=!0;U.autoExpand=!0;U.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(U,arguments);U.destroy()});var X=mxUtils.getOffset(G);U.popup(X.x,X.y+G.offsetHeight,null,P);mxEvent.addListener(U.div,
+"mouseleave",mxUtils.bind(this,function(){U.hideMenu()}))}))}this.editor.addListener("resetGraphView",c);this.editor.addListener("pageSelected",R)}p(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();mxEvent.consume(P)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");p(mxUtils.bind(this,function(P){b.isLightboxView()?
(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(P)}),Editor.zoomFitImage,mxResources.get("fit"));var l=null,t=null,z=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);l=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);l=null;t=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";t=null}),
600)}),P||200)}),C=mxUtils.bind(this,function(P){null!=l&&(window.clearTimeout(l),l=null);null!=t&&(window.clearTimeout(t),t=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,P||30)});if("1"==urlParams.layers){this.layersDialog=null;var F=p(mxUtils.bind(this,function(P){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(mxUtils.bind(this,function(){this.chromelessResize&&
-this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var T=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
-T.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));T=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
-T.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
-this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var I=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=
-I?window.location.href=I:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
+this.chromelessResize()}),!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var U=F.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.left=
+U.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));U=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+U.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(P)}),Editor.layersImage,mxResources.get("layers")),N=b.getModel();N.addListener(mxEvent.CHANGE,function(){F.style.display=1<N.getChildCount(N.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(p);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||p(mxUtils.bind(this,function(P){null!=this.editor.editButtonFunc?
+this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(P)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(c=0;c<this.lightboxToolbarActions.length;c++){var K=this.lightboxToolbarActions[c];K.elem=p(K.fn,K.icon,K.tooltip)}if(null!=u.refreshBtn){var J=null==u.refreshBtn.url?null:Graph.sanitizeLink(u.refreshBtn.url);p(mxUtils.bind(this,function(P){null!=
+J?window.location.href=J:window.location.reload();mxEvent.consume(P)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"))}null!=u.fullscreenBtn&&window.self!==window.top&&p(mxUtils.bind(this,function(P){u.fullscreenBtn.url?b.openLink(u.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(P)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));!u.noCloseBtn&&(u.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=
document.body))&&p(mxUtils.bind(this,function(P){"1"==urlParams.close||u.closeBtn?window.close():(this.destroy(),mxEvent.consume(P))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||
(mxEvent.isShiftDown(P)||C(30),z())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?z():C(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?z():C(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ca=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,T){this.startX=T.getGraphX();this.startY=T.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,T){},mouseUp:function(P,T){mxEvent.isTouchEvent(T.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ca&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ca&&Math.abs(this.startX-T.getGraphX())<ca&&Math.abs(this.startY-T.getGraphY())<ca&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ea=new mxPoint,X=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;X=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
-!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ea,1);var T=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(T.x!=this.translate.x||T.y!=this.translate.y)this.invalidate(),this.translate.x=T.x,this.translate.y=T.y}T=b.getPagePadding();var W=b.getPageSize();P=T.x-(this.x0||0)*W.width;T=T.y-(this.y0||0)*W.height;if(this.translate.x!=P||this.translate.y!=T)this.invalidate(),this.translate.x=P,this.translate.y=T}da.apply(this,arguments)};
-if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=X;X=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var T=this.getPageLayout(),W=this.getDefaultTranslate(T),aa=this.view.translate.x,ja=this.view.translate.y;if(W.x!=aa||W.y!=ja){this.view.x0=T.x;this.view.y0=T.y;this.autoTranslate=!0;this.view.setTranslate(W.x,W.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((W.x-aa)*this.view.scale),this.container.scrollTop+=
-Math.round((W.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,J=null,U=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&
+"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||C(30)}));var ea=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,U){this.startX=U.getGraphX();this.startY=U.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,U){},mouseUp:function(P,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ea&&Math.abs(this.scrollTop-b.container.scrollTop)<
+ea&&Math.abs(this.startX-U.getGraphX())<ea&&Math.abs(this.startY-U.getGraphY())<ea&&(0<parseFloat(g.chromelessToolbar.style.opacity||0)?z():C(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var da=b.view.validate,ca=new mxPoint,W=!1,ba=null;b.view.validate=function(){if(null!=b.container&&mxUtils.hasScrollbars(b.container)){if(null!=g.currentPage&&ba!=g.currentPage){ba=g.currentPage;W=!0;var P=b.getBoundingBoxFromGeometry(b.model.getCells(),!0,null,
+!0);null==P&&(P=new mxRectangle(b.view.translate.x*b.view.scale,b.view.translate.y*b.view.scale));P=b.getPageLayout(P,ca,1);var U=b.getDefaultTranslate(P);this.x0=P.x;this.y0=P.y;if(U.x!=this.translate.x||U.y!=this.translate.y)this.invalidate(),this.translate.x=U.x,this.translate.y=U.y}U=b.getPagePadding();var X=b.getPageSize();P=U.x-(this.x0||0)*X.width;U=U.y-(this.y0||0)*X.height;if(this.translate.x!=P||this.translate.y!=U)this.invalidate(),this.translate.x=P,this.translate.y=U}da.apply(this,arguments)};
+if(!b.isViewer()){var ha=b.sizeDidChange;b.sizeDidChange=function(){var P=W;W=!1;if(null!=this.container&&mxUtils.hasScrollbars(this.container)){this.updateMinimumSize();if(!this.autoTranslate){var U=this.getPageLayout(),X=this.getDefaultTranslate(U),aa=this.view.translate.x,ja=this.view.translate.y;if(X.x!=aa||X.y!=ja){this.view.x0=U.x;this.view.y0=U.y;this.autoTranslate=!0;this.view.setTranslate(X.x,X.y);this.autoTranslate=!1;P||(this.container.scrollLeft+=Math.round((X.x-aa)*this.view.scale),this.container.scrollTop+=
+Math.round((X.y-ja)*this.view.scale));return}}ha.apply(this,arguments)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var ma=b.view.getBackgroundPane(),Y=b.view.getDrawPane();b.cumulativeZoomFactor=1;var la=null,Z=null,k=null,A=null,I=null,T=function(P){null!=la&&window.clearTimeout(la);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||A)la=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&
(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),Y.style.transformOrigin="",ma.style.transformOrigin="",mxClient.IS_SF?(Y.style.transform="scale(1)",ma.style.transform="scale(1)",window.setTimeout(function(){Y.style.transform="";ma.style.transform=""},0)):(Y.style.transform="",ma.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity=
-"");var T=new mxPoint(b.container.scrollLeft,b.container.scrollTop),W=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+W.x,pa=b.container.offsetHeight/2-Z.y+W.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=T.x-k.x,pa+=T.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=
-ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=J&&Y.setAttribute("filter",J);b.cumulativeZoomFactor=1;J=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,T,W,aa){aa=null!=aa?aa:this.zoomFactor;(T=T||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+"");var U=new mxPoint(b.container.scrollLeft,b.container.scrollTop),X=mxUtils.getOffset(b.container),aa=b.view.scale,ja=0,pa=0;null!=Z&&(ja=b.container.offsetWidth/2-Z.x+X.x,pa=b.container.offsetHeight/2-Z.y+X.y);b.zoom(b.cumulativeZoomFactor,null,b.isFastZoomEnabled()?20:null);b.view.scale!=aa&&(null!=k&&(ja+=U.x-k.x,pa+=U.y-k.y),null!=e&&g.chromelessResize(!1,null,ja*(b.cumulativeZoomFactor-1),pa*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ja&&0==pa||(b.container.scrollLeft-=
+ja*(b.cumulativeZoomFactor-1),b.container.scrollTop-=pa*(b.cumulativeZoomFactor-1)));null!=I&&Y.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=A=Z=k=la=null}),null!=P?P:b.isFastZoomEnabled()?g.wheelZoomDelay:g.lazyZoomDelay)},0)};b.lazyZoom=function(P,U,X,aa){aa=null!=aa?aa:this.zoomFactor;(U=U||!b.scrollbars)&&(Z=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=aa,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,
-160))/this.view.scale;if(b.isFastZoomEnabled()){null==J&&""!=Y.getAttribute("filter")&&(J=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=T||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=T||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-
-b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(T||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(T||null==Z?b.container.clientHeight/
-2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}U(b.isFastZoomEnabled()?W:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},
-null,function(P){1!=b.cumulativeZoomFactor&&U(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||U(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,T,W,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!W&&b.isScrollWheelEvent(P))W=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(W.x+(T?-aa:aa),W.y):b.view.setTranslate(W.x,W.y+(T?
-aa:-aa));else if(W||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=W,W=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?W=1+Math.abs(P.deltaY)/20*(W-1):null!=P.movementY&&"pointermove"==P.type&&(W=1+Math.max(1,Math.abs(P.movementY))/20*(W-1),aa=-1),b.lazyZoom(T,null,aa,W),mxEvent.consume(P),
+160))/this.view.scale;if(b.isFastZoomEnabled()){null==I&&""!=Y.getAttribute("filter")&&(I=Y.getAttribute("filter"),Y.removeAttribute("filter"));k=new mxPoint(b.container.scrollLeft,b.container.scrollTop);P=Math.round(Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100*20)/(20*this.view.scale);aa=U||null==Z?b.container.scrollLeft+b.container.clientWidth/2:Z.x+b.container.scrollLeft-b.container.offsetLeft;var ja=U||null==Z?b.container.scrollTop+b.container.clientHeight/2:Z.y+b.container.scrollTop-
+b.container.offsetTop;Y.style.transformOrigin=aa+"px "+ja+"px";Y.style.transform="scale("+P+")";ma.style.transformOrigin=aa+"px "+ja+"px";ma.style.transform="scale("+P+")";null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node?(aa=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(aa.style,"transform-origin",(U||null==Z?b.container.clientWidth/2+b.container.scrollLeft-aa.offsetLeft+"px":Z.x+b.container.scrollLeft-aa.offsetLeft-b.container.offsetLeft+"px")+" "+(U||null==Z?b.container.clientHeight/
+2+b.container.scrollTop-aa.offsetTop+"px":Z.y+b.container.scrollTop-aa.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(aa.style,"transform","scale("+P+")")):b.view.validateBackgroundStyles(P,aa,ja);b.view.getDecoratorPane().style.opacity="0";b.view.getOverlayPane().style.opacity="0";null!=g.hoverIcons&&g.hoverIcons.reset();b.fireEvent(new mxEventObject("zoomPreview","factor",P))}T(b.isFastZoomEnabled()?X:0)};mxEvent.addGestureListeners(b.container,function(P){null!=la&&window.clearTimeout(la)},
+null,function(P){1!=b.cumulativeZoomFactor&&T(0)});mxEvent.addListener(b.container,"scroll",function(P){null==la||b.isMouseDown||1==b.cumulativeZoomFactor||T(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,U,X,aa,ja){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!X&&b.isScrollWheelEvent(P))X=b.view.getTranslate(),aa=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(X.x+(U?-aa:aa),X.y):b.view.setTranslate(X.x,X.y+(U?
+aa:-aa));else if(X||b.isZoomWheelEvent(P))for(var pa=mxEvent.getSource(P);null!=pa;){if(pa==b.container)return b.tooltipHandler.hideTooltip(),Z=null!=aa&&null!=ja?new mxPoint(aa,ja):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),A=X,X=b.zoomFactor,aa=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?X=1+Math.abs(P.deltaY)/20*(X-1):null!=P.movementY&&"pointermove"==P.type&&(X=1+Math.max(1,Math.abs(P.movementY))/20*(X-1),aa=-1),b.lazyZoom(U,null,aa,X),mxEvent.consume(P),
!1;pa=pa.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};
EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.width=this.formatWidth+"px",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};EditorUi.prototype.isFormatPanelVisible=function(){return 0<this.formatWidth};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,g=60;null!=e&&(g=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(g,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2246,8 +2247,8 @@ EditorUi.prototype.altShiftActions={65:"connectionArrows",82:"clearWaypoints",76
EditorUi.prototype.createKeyHandler=function(b){function e(R,c,f){if(!m.isSelectionEmpty()&&m.isEnabled()){c=null!=c?c:1;var l=m.getCompositeParents(m.getSelectionCells()),t=0<l.length?l[0]:null;if(null!=t)if(f){m.getModel().beginUpdate();try{for(t=0;t<l.length;t++)if(m.getModel().isVertex(l[t])&&m.isCellResizable(l[t])){var z=m.getCellGeometry(l[t]);null!=z&&(z=z.clone(),37==R?z.width=Math.max(0,z.width-c):38==R?z.height=Math.max(0,z.height-c):39==R?z.width+=c:40==R&&(z.height+=c),m.getModel().setGeometry(l[t],
z))}}finally{m.getModel().endUpdate()}}else{z=m.model.getParent(t);var C=m.getView().scale;f=null;1==m.getSelectionCount()&&m.model.isVertex(t)&&null!=m.layoutManager&&!m.isCellLocked(t)&&(f=m.layoutManager.getLayout(z));if(null!=f&&f.constructor==mxStackLayout)c=z.getIndex(t),37==R||38==R?m.model.add(z,t,Math.max(0,c-1)):(39==R||40==R)&&m.model.add(z,t,Math.min(m.model.getChildCount(z),c+1));else{var F=m.graphHandler;null!=F&&(null==F.first&&F.start(t,0,0,m.getMovableCells(l)),null!=F.first&&(t=
l=0,37==R?l=-c:38==R?t=-c:39==R?l=c:40==R&&(t=c),F.currentDx+=l*C,F.currentDy+=t*C,F.checkPreview(),F.updatePreview()),null!=B&&window.clearTimeout(B),B=window.setTimeout(function(){if(null!=F.first){var N=F.roundLength(F.currentDx/C),K=F.roundLength(F.currentDy/C);F.moveCells(F.cells,N,K);F.reset()}},400))}}}}var g=this,m=this.editor.graph,u=new mxKeyHandler(m),p=u.isEventIgnored;u.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||
-90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&(null==
-g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?
+90!=R.keyCode&&89!=R.keyCode&&188!=R.keyCode&&190!=R.keyCode&&85!=R.keyCode&&83!=R.keyCode)&&(66!=R.keyCode&&73!=R.keyCode||!this.isControlDown(R)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&(109!=R.keyCode&&107!=R.keyCode||!this.isControlDown(R)&&!mxEvent.isShiftDown(R)||!this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&p.apply(this,arguments)};u.isEnabledForEvent=function(R){return!mxEvent.isConsumed(R)&&this.isGraphEvent(R)&&this.isEnabled()&&
+(null==g.dialogs||0==g.dialogs.length)};u.isControlDown=function(R){return mxEvent.isControlDown(R)||mxClient.IS_MAC&&R.metaKey};var B=null,H={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},S=u.getFunction;mxKeyHandler.prototype.getFunction=function(R){if(m.isEnabled()){var c=null;mxEvent.isShiftDown(R)&&this.isControlDown(R)&&mxEvent.isAltDown(R)?c=g.actions.get(g.ctrlAltShiftActions[R.keyCode]):mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)?
c=g.actions.get(g.altShiftActions[R.keyCode]):this.isControlDown(R)&&mxEvent.isAltDown(R)&&(c=g.actions.get(g.ctrlAltActions[R.keyCode]));if(null!=c)return c.funct;if(null!=H[R.keyCode]&&!m.isSelectionEmpty())if(!this.isControlDown(R)&&mxEvent.isShiftDown(R)&&mxEvent.isAltDown(R)){if(m.model.isVertex(m.getSelectionCell()))return function(){var f=m.connectVertex(m.getSelectionCell(),H[R.keyCode],m.defaultEdgeLength,R,!0);null!=f&&0<f.length&&(1==f.length&&m.model.isEdge(f[0])?m.setSelectionCell(m.model.getTerminal(f[0],
!1)):m.setSelectionCell(f[f.length-1]),m.scrollCellToVisible(m.getSelectionCell()),null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(m.getSelectionCell())))}}else return this.isControlDown(R)?function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null,!0)}:function(){e(R.keyCode,mxEvent.isShiftDown(R)?m.gridSize:null)}}return S.apply(this,arguments)};u.bindAction=mxUtils.bind(this,function(R,c,f,l){var t=this.actions.get(f);null!=t&&(f=function(){t.isEnabled()&&t.funct.apply(this,arguments)},
c?l?u.bindControlShiftKey(R,f):u.bindControlKey(R,f):l?u.bindShiftKey(R,f):u.bindKey(R,f))});var G=this,O=u.escape;u.escape=function(R){O.apply(this,arguments)};u.enter=function(){};u.bindControlShiftKey(36,function(){m.exitGroup()});u.bindControlShiftKey(35,function(){m.enterGroup()});u.bindShiftKey(36,function(){m.home()});u.bindKey(35,function(){m.refresh()});u.bindAction(80,!0,"print");u.bindAction(107,!0,"zoomIn");u.bindAction(109,!0,"zoomOut");u.bindAction(61,!0,"zoomIn");u.bindAction(187,!0,
@@ -2271,33 +2272,33 @@ mxImageShape.prototype.getImageDataUri=function(){var b=String(this.image);if("d
(function(){var b=mxStencil.prototype.parseColor;mxStencil.prototype.parseColor=function(e,g,m,u,p){return"default"==u&&null!=p?"fillcolor"==m.nodeName?p.shapeBackgroundColor:p.shapeForegroundColor:b.apply(this,arguments)}})();(function(){var b=mxResources.get;mxResources.get=function(e,g,m){null==m&&(m=e);return b.apply(this,[e,g,m])}})();
(function(){var b=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(e,g,m,u,p,B,H,S){var G=b.apply(this,arguments);if(null!=g){var O=G.getElementsByTagName("img");0<O.length&&(O[0].className="geToolbarButton geAdaptiveAsset",O[0].style.margin="4px",O[0].style.width="18px")}return G}})();
Graph=function(b,e,g,m,u,p){mxGraph.call(this,b,e,g,m);this.themes=u||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=p?p:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(Z){Z=this.getCurrentCellStyle(Z);
-return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var J=this.selectionCellsHandler.getHandler(A.cell);
-if(null==J||null==J.getHandleForEvent(Z)){var U=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;J=P+2;U.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()-J)&&mxUtils.contains(A,Z.getGraphX()-J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()+J,Z.getGraphY()+J)&&mxUtils.contains(A,Z.getGraphX()+
-J,Z.getGraphY()-J))){var T=this.model.getParent(A.cell);J=this.model.getParent(T);if(!this.isCellSelected(J)){P*=k;var W=2*P;if(this.model.getChildAt(J,0)!=T&&mxUtils.intersects(U,new mxRectangle(A.x,A.y-P,A.width,W))||this.model.getChildAt(T,0)!=A.cell&&mxUtils.intersects(U,new mxRectangle(A.x-P,A.y,W,A.height))||mxUtils.intersects(U,new mxRectangle(A.x,A.y+A.height-P,A.width,W))||mxUtils.intersects(U,new mxRectangle(A.x+A.width-P,A.y,W,A.height)))T=this.selectionCellsHandler.isHandled(J),this.selectCellForEvent(J,
-Z.getEvent()),J=this.selectionCellsHandler.getHandler(J),null!=J&&(P=J.getHandleForEvent(Z),null!=P&&(J.start(Z.getGraphX(),Z.getGraphY(),P),J.blockDelayedSelection=!T,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(J=this.getActualStartSize(A.cell),(0<J.x||0<J.width)&&mxUtils.intersects(U,new mxRectangle(A.x+(J.x-J.width-1)*k+(0==J.x?A.width:0),A.y,1,A.height))||(0<J.y||
-0<J.height)&&mxUtils.intersects(U,new mxRectangle(A.x,A.y+(J.y-J.height-1)*k+(0==J.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),J=this.selectionCellsHandler.getHandler(A.cell),null!=J&&null!=J.customHandles&&(P=mxEvent.CUSTOM_HANDLE-J.customHandles.length+1,J.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&
+return null!=Z?"1"==Z.html||"wrap"==Z[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.immediateHandling){var B=null,H=null,S=null,G=null,O=!1,R=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();k=this.view.scale;if(!mxEvent.isAltDown(Z.getEvent())&&null!=A&&(R=this.isCellSelected(A.cell),!this.panningHandler.isActive()&&!mxEvent.isControlDown(Z.getEvent()))){var I=this.selectionCellsHandler.getHandler(A.cell);
+if(null==I||null==I.getHandleForEvent(Z)){var T=new mxRectangle(Z.getGraphX()-1,Z.getGraphY()-1),P=mxEvent.isTouchEvent(Z.getEvent())?mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;I=P+2;T.grow(P);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&!this.isCellSelected(A.cell)&&!(mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()-I)&&mxUtils.contains(A,Z.getGraphX()-I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+I,Z.getGraphY()+I)&&mxUtils.contains(A,Z.getGraphX()+
+I,Z.getGraphY()-I))){var U=this.model.getParent(A.cell);I=this.model.getParent(U);if(!this.isCellSelected(I)){P*=k;var X=2*P;if(this.model.getChildAt(I,0)!=U&&mxUtils.intersects(T,new mxRectangle(A.x,A.y-P,A.width,X))||this.model.getChildAt(U,0)!=A.cell&&mxUtils.intersects(T,new mxRectangle(A.x-P,A.y,X,A.height))||mxUtils.intersects(T,new mxRectangle(A.x,A.y+A.height-P,A.width,X))||mxUtils.intersects(T,new mxRectangle(A.x+A.width-P,A.y,X,A.height)))U=this.selectionCellsHandler.isHandled(I),this.selectCellForEvent(I,
+Z.getEvent()),I=this.selectionCellsHandler.getHandler(I),null!=I&&(P=I.getHandleForEvent(Z),null!=P&&(I.start(Z.getGraphX(),Z.getGraphY(),P),I.blockDelayedSelection=!U,Z.consume()))}}for(;!Z.isConsumed()&&null!=A&&(this.isTableCell(A.cell)||this.isTableRow(A.cell)||this.isTable(A.cell));)this.isSwimlane(A.cell)&&this.isCellMovable(A.cell)&&(I=this.getActualStartSize(A.cell),(0<I.x||0<I.width)&&mxUtils.intersects(T,new mxRectangle(A.x+(I.x-I.width-1)*k+(0==I.x?A.width:0),A.y,1,A.height))||(0<I.y||
+0<I.height)&&mxUtils.intersects(T,new mxRectangle(A.x,A.y+(I.y-I.height-1)*k+(0==I.y?A.height:0),A.width,1)))&&(this.selectCellForEvent(A.cell,Z.getEvent()),I=this.selectionCellsHandler.getHandler(A.cell),null!=I&&null!=I.customHandles&&(P=mxEvent.CUSTOM_HANDLE-I.customHandles.length+1,I.start(Z.getGraphX(),Z.getGraphY(),P),Z.consume())),A=this.view.getState(this.model.getParent(A.cell))}}}}));this.addListener(mxEvent.CONSUME_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){if("mouseDown"==k.getProperty("eventName")&&
this.isEnabled()){Z=k.getProperty("event");var A=Z.getState();mxEvent.isAltDown(Z.getEvent())||mxEvent.isControlDown(k)||mxEvent.isShiftDown(k)||R||null==A||!this.model.isEdge(A.cell)||(B=new mxPoint(Z.getGraphX(),Z.getGraphY()),O=this.isCellSelected(A.cell),S=A,H=Z,null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,Z.getGraphX(),Z.getGraphY())?G=mxEvent.LABEL_HANDLE:(k=this.selectionCellsHandler.getHandler(A.cell),null!=k&&null!=k.bends&&0<k.bends.length&&(G=k.getHandleForEvent(Z))))}}));
-this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var J=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>J||Math.abs(B.y-k.getGraphY())>J){var U=null;mxEvent.isShiftDown(k.getEvent())||(U=this.selectionCellsHandler.getHandler(A.cell));if(null!=U&&null!=
-U.bends&&0<U.bends.length){U.redrawHandles();var P=null!=G?G:U.getHandleForEvent(H),T=this.view.getEdgeStyle(A),W=T==mxEdgeStyle.EntityRelation;J=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=J&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,J[0].x,J[0].y)?P=0:mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?P=U.bends.length-1:null!=J&&(null==T&&null==P||T==mxEdgeStyle.SegmentConnector||T==mxEdgeStyle.OrthConnector)&&
-(null!=T&&(2==J.length||3==J.length&&(0==Math.round(J[0].x-J[1].x)&&0==Math.round(J[1].x-J[2].x)||0==Math.round(J[0].y-J[1].y)&&0==Math.round(J[1].y-J[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==T?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==U.bends.length-1;if(!W&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)U.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=U&&(this.selectionCellsHandler.isHandlerActive(U)?
-this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,U),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||U.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);U=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==
-Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),J=A.absolutePoints,null!=J)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?U="move":mxUtils.contains(Z,J[0].x,J[0].y)||mxUtils.contains(Z,J[J.length-1].x,J[J.length-1].y)?U="pointer":(T=this.view.getEdgeStyle(A),T==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(U="crosshair",T!=mxEdgeStyle.SegmentConnector&&
-T!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<J.length-1&&0<=k&&(U=0==Math.round(J[k].x-J[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){J=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(J);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),J=this.model.getParent(k),!this.isCellSelected(J)))if(mxUtils.intersects(Z,new mxRectangle(A.x,
-A.y-2,A.width,4))&&this.model.getChildAt(J,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))U="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))U="col-resize";for(k=A;null==U&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(J=this.getActualStartSize(k.cell),
-P=this.view.scale,(0<J.x||0<J.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(J.x-J.width-1)*P+(0==J.x?k.width*P:0),k.y,1,k.height))?U="col-resize":(0<J.y||0<J.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(J.y-J.height-1)*P+(0==J.y?k.height:0),k.width,1))&&(U="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=U&&A.setCursor(U)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=
+this.addMouseListener({mouseDown:function(Z,k){},mouseMove:mxUtils.bind(this,function(Z,k){Z=this.selectionCellsHandler.handlers.map;for(var A in Z)if(null!=Z[A].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(k.getEvent())){var I=this.tolerance;if(null!=B&&null!=S&&null!=H){if(A=S,null!=G||Math.abs(B.x-k.getGraphX())>I||Math.abs(B.y-k.getGraphY())>I){var T=null;mxEvent.isShiftDown(k.getEvent())||(T=this.selectionCellsHandler.getHandler(A.cell));if(null!=T&&null!=
+T.bends&&0<T.bends.length){T.redrawHandles();var P=null!=G?G:T.getHandleForEvent(H),U=this.view.getEdgeStyle(A),X=U==mxEdgeStyle.EntityRelation;I=A.absolutePoints;O||(P=G);P!=mxEvent.LABEL_HANDLE&&null!=I&&(P=G,null==P&&(Z=new mxRectangle(B.x,B.y),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(Z,I[0].x,I[0].y)?P=0:mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?P=T.bends.length-1:null!=I&&(null==U&&null==P||U==mxEdgeStyle.SegmentConnector||U==mxEdgeStyle.OrthConnector)&&
+(null!=U&&(2==I.length||3==I.length&&(0==Math.round(I[0].x-I[1].x)&&0==Math.round(I[1].x-I[2].x)||0==Math.round(I[0].y-I[1].y)&&0==Math.round(I[1].y-I[2].y)))?P=2:(P=mxUtils.findNearestSegment(A,B.x,B.y),P=null==U?mxEvent.VIRTUAL_HANDLE-P:P+1))),null==P&&(P=mxEvent.VIRTUAL_HANDLE));Z=P==mxEvent.LABEL_HANDLE||0==P||P==T.bends.length-1;if(!X&&(null!=A.visibleSourceState||null!=A.visibleTargetState)||Z)T.start(k.getGraphX(),k.getGraphX(),P),k.consume(),this.graphHandler.reset()}null!=T&&(this.selectionCellsHandler.isHandlerActive(T)?
+this.isCellSelected(A.cell)||(this.selectionCellsHandler.handlers.put(A.cell,T),this.selectCellForEvent(A.cell,k.getEvent())):this.isCellSelected(A.cell)||T.destroy());O=!1;B=H=S=G=null}}else if(A=k.getState(),null!=A&&this.isCellEditable(A.cell)){Z=this.model.getParent(A.cell);T=null;if(this.model.isEdge(A.cell)&&!this.isCellSelected(A.cell)&&!mxEvent.isAltDown(k.getEvent())&&!mxEvent.isShiftDown(k.getEvent())&&!this.isAncestorSelected(A.cell)&&(this.isSwimlane(Z)||this.model.isLayer(Z)||this.getCurrentRoot()==
+Z)){if(Z=new mxRectangle(k.getGraphX(),k.getGraphY()),Z.grow(mxEdgeHandler.prototype.handleImage.width/2),I=A.absolutePoints,null!=I)null!=A.text&&null!=A.text.boundingBox&&mxUtils.contains(A.text.boundingBox,k.getGraphX(),k.getGraphY())?T="move":mxUtils.contains(Z,I[0].x,I[0].y)||mxUtils.contains(Z,I[I.length-1].x,I[I.length-1].y)?T="pointer":(U=this.view.getEdgeStyle(A),U==mxEdgeStyle.EntityRelation||null==A.visibleSourceState&&null==A.visibleTargetState||(T="crosshair",U!=mxEdgeStyle.SegmentConnector&&
+U!=mxEdgeStyle.OrthConnector))||(k=mxUtils.findNearestSegment(A,k.getGraphX(),k.getGraphY()),k<I.length-1&&0<=k&&(T=0==Math.round(I[k].x-I[k+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(k.getEvent())){I=mxShape.prototype.svgStrokeTolerance/2;Z=new mxRectangle(k.getGraphX(),k.getGraphY());Z.grow(I);if(this.isTableCell(A.cell)&&this.isCellMovable(A.cell)&&(k=this.model.getParent(A.cell),I=this.model.getParent(k),!this.isCellSelected(I)))if(mxUtils.intersects(Z,new mxRectangle(A.x,
+A.y-2,A.width,4))&&this.model.getChildAt(I,0)!=k||mxUtils.intersects(Z,new mxRectangle(A.x,A.y+A.height-2,A.width,4)))T="row-resize";else if(mxUtils.intersects(Z,new mxRectangle(A.x-2,A.y,4,A.height))&&this.model.getChildAt(k,0)!=A.cell||mxUtils.intersects(Z,new mxRectangle(A.x+A.width-2,A.y,4,A.height)))T="col-resize";for(k=A;null==T&&null!=k&&(this.isTableCell(k.cell)||this.isTableRow(k.cell)||this.isTable(k.cell));)this.isSwimlane(k.cell)&&this.isCellMovable(k.cell)&&(I=this.getActualStartSize(k.cell),
+P=this.view.scale,(0<I.x||0<I.width)&&mxUtils.intersects(Z,new mxRectangle(k.x+(I.x-I.width-1)*P+(0==I.x?k.width*P:0),k.y,1,k.height))?T="col-resize":(0<I.y||0<I.height)&&mxUtils.intersects(Z,new mxRectangle(k.x,k.y+(I.y-I.height-1)*P+(0==I.y?k.height:0),k.width,1))&&(T="row-resize")),k=this.view.getState(this.model.getParent(k.cell))}null!=T&&A.setCursor(T)}}}),mouseUp:mxUtils.bind(this,function(Z,k){G=B=H=S=null})})}this.cellRenderer.minSvgStrokeWidth=.1;var c=document.createElement("div");this.cellRenderer.getLabelValue=
function(Z){var k=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);Z.view.graph.isHtmlLabel(Z.cell)&&("0"==mxUtils.getValue(Z.style,"html","0")?k=mxUtils.htmlEntities(k,!1):(Z.lastLabelValue!=k&&(Z.lastLabelValue=k,Z.lastSanitizedLabelValue=Graph.sanitizeHtml(k),c.innerHTML=Z.lastSanitizedLabelValue,Graph.addLightDarkColors(c,null,"simple"==Z.view.graph.getAdaptiveColors())&&(Z.lastSanitizedLabelValue=c.innerHTML)),k=Z.lastSanitizedLabelValue));return k};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);
this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(Z,k){return!1};this.alternateEdgeStyle="vertical";null==m&&this.loadStylesheet();var f=this.graphHandler.getGuideStates;
-this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,J=this.graph.pageScale,U=A.width*J;A=A.height*J;J=this.graph.view.translate;for(var P=this.graph.view.scale,T=this.graph.getPageLayout(),W=0;W<T.width;W++)k.push(new mxRectangle(((T.x+W)*U+J.x)*P,(T.y*A+J.y)*P,U*P,A*P));for(W=1;W<T.height;W++)k.push(new mxRectangle((T.x*U+J.x)*P,((T.y+W)*A+J.y)*P,U*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=
-mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,J=[],U=0;U<k.length;U++){var P=
-this.graph.isTableCell(Z)&&this.graph.isTableCell(k[U])&&this.graph.isCellSelected(k[U])?this.graph.model.getParent(k[U]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[U])&&this.graph.isCellSelected(k[U])?k[U]:this.graph.getCompositeParent(k[U]);null==P||A.get(P)||(A.put(P,!0),J.push(P))}return J};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,J){var U=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?U=!0:Z=this.graph.model.getParent(Z));U||this.graph.isTableRow(Z)&&
-this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,J,U,P){var T=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=J&&this.graph.applyNewEdgeStyle(J,[T]);return T};var z=new mxRubberband(this);this.getRubberband=function(){return z};
+this.graphHandler.getGuideStates=function(){var Z=f.apply(this,arguments);if(this.graph.pageVisible){var k=[],A=this.graph.pageFormat,I=this.graph.pageScale,T=A.width*I;A=A.height*I;I=this.graph.view.translate;for(var P=this.graph.view.scale,U=this.graph.getPageLayout(),X=0;X<U.width;X++)k.push(new mxRectangle(((U.x+X)*T+I.x)*P,(U.y*A+I.y)*P,T*P,A*P));for(X=1;X<U.height;X++)k.push(new mxRectangle((U.x*T+I.x)*P,((U.y+X)*A+I.y)*P,T*P,A*P));Z=k.concat(Z)}return Z};mxDragSource.prototype.dragElementZIndex=
+mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(Z,k){return null==Z.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(Z){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var l=this.graphHandler.getCells;this.graphHandler.getCells=function(Z){for(var k=l.apply(this,arguments),A=new mxDictionary,I=[],T=0;T<k.length;T++){var P=
+this.graph.isTableCell(Z)&&this.graph.isTableCell(k[T])&&this.graph.isCellSelected(k[T])?this.graph.model.getParent(k[T]):this.graph.isTableRow(Z)&&this.graph.isTableRow(k[T])&&this.graph.isCellSelected(k[T])?k[T]:this.graph.getCompositeParent(k[T]);null==P||A.get(P)||(A.put(P,!0),I.push(P))}return I};var t=this.graphHandler.start;this.graphHandler.start=function(Z,k,A,I){var T=!1;this.graph.isTableCell(Z)&&(this.graph.isCellSelected(Z)?T=!0:Z=this.graph.model.getParent(Z));T||this.graph.isTableRow(Z)&&
+this.graph.isCellSelected(Z)||(Z=this.graph.getCompositeParent(Z));t.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(Z,k){k=this.graph.getCompositeParent(k);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};this.connectionHandler.insertEdge=function(Z,k,A,I,T,P){var U=mxConnectionHandler.prototype.insertEdge.apply(this,arguments);null!=I&&this.graph.applyNewEdgeStyle(I,[U]);return U};var z=new mxRubberband(this);this.getRubberband=function(){return z};
var C=(new Date).getTime(),F=0,N=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var Z=this.currentState;N.apply(this,arguments);Z!=this.currentState?(C=(new Date).getTime(),F=0):F=(new Date).getTime()-C};var K=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(Z){return mxEvent.isShiftDown(Z.getEvent())&&mxEvent.isAltDown(Z.getEvent())?!1:null!=this.currentState&&Z.getState()==this.currentState&&2E3<F||(null==this.currentState||
-"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var I=this.isToggleEvent;this.isToggleEvent=function(Z){return I.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ca=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ca.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};
-var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ea=this.click;this.click=function(Z){var k=null==Z.state&&
-null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ea.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var J=this.getClickableLinkForCell(A);null!=J?this.isCustomLink(J)?this.customLinkClicked(J,A):this.openLink(J):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=function(){X.apply(this,arguments);
+"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&K.apply(this,arguments)};var J=this.isToggleEvent;this.isToggleEvent=function(Z){return J.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z)};var ea=z.isForceRubberbandEvent;z.isForceRubberbandEvent=function(Z){return ea.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(Z.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==Z.getState()&&mxEvent.isTouchEvent(Z.getEvent())};
+var da=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(da=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=da)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(Z){return mxEvent.isMouseEvent(Z.getEvent())};var ca=this.click;this.click=function(Z){var k=null==Z.state&&
+null!=Z.sourceState&&this.isCellLocked(this.getLayerForCell(Z.sourceState.cell));if(this.isEnabled()&&!k||Z.isConsumed())return ca.apply(this,arguments);var A=k?Z.sourceState.cell:Z.getCell();if(null!=A){var I=this.getClickableLinkForCell(A);null!=I?this.isCustomLink(I)?this.customLinkClicked(I,A):this.openLink(I):k&&this.clearSelection()}};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);
if(null!=this.div)for(var Z=this.div.getElementsByTagName("a"),k=0;k<Z.length;k++)null!=Z[k].getAttribute("href")&&null==Z[k].getAttribute("target")&&Z[k].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(Z){return Z.sourceState};this.getCursorForMouseEvent=function(Z){var k=null==Z.state&&null!=Z.sourceState&&this.isCellLocked(Z.sourceState.cell);return this.getCursorForCell(k?Z.sourceState.cell:Z.getCell())};var ba=this.getCursorForCell;this.getCursorForCell=function(Z){if(!this.isEnabled()||
this.isCellLocked(Z)){if(null!=this.getClickableLinkForCell(Z))return"pointer";if(this.isCellLocked(Z))return"default"}return ba.apply(this,arguments)};this.selectRegion=function(Z,k){var A=mxEvent.isAltDown(k)?Z:null;Z=this.getCells(Z.x,Z.y,Z.width,Z.height,null,null,A,null,!0);if(this.isToggleEvent(k))for(A=0;A<Z.length;A++)this.selectCellForEvent(Z[A],k);else this.selectCellsForEvent(Z,k);return Z};var ha=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=
-function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,J){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):
+function(Z,k,A){return this.graph.isCellSelected(Z)?!1:ha.apply(this,arguments)};var ma=this.updateMouseEvent;this.updateMouseEvent=function(Z){Z=ma.apply(this,arguments);null!=Z.state&&this.isCellLocked(this.getLayerForCell(Z.getCell()))&&(null==this.getLinkForCell(Z.getCell())?Z.state=this.view.getState(this.getCellAt(Z.getGraphX(),Z.getGraphY(),null,null,null,mxUtils.bind(this,function(k,A,I){return Z.state==k||this.isCellLocked(this.getLayerForCell(k.cell))&&null==this.getLinkForCell(k.cell)}))):
Z.state=null);return Z};var Y=this.isCellSelectable;this.isCellSelectable=function(Z){return Y.apply(this,arguments)&&!this.isCellLocked(this.getLayerForCell(Z))};this.isCellLocked=function(Z){for(;null!=Z;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(Z),"locked","0"))return!0;Z=this.model.getParent(Z)}return!1};var la=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(Z,k){"mouseDown"==k.getProperty("eventName")&&(Z=k.getProperty("event").getState(),la=null==Z||this.isSelectionEmpty()||
this.isCellSelected(Z.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(Z,k){if(!mxEvent.isMultiTouchEvent(k)){Z=k.getProperty("event");var A=k.getProperty("cell");null==A?(Z=mxUtils.convertPoint(this.container,mxEvent.getClientX(Z),mxEvent.getClientY(Z)),z.start(Z.x,Z.y)):null!=la?this.addSelectionCells(la):1<this.getSelectionCount()&&this.isCellSelected(A)&&this.removeSelectionCell(A);la=null;k.consume()}}));this.connectionHandler.selectCells=
function(Z,k){this.graph.setSelectionCell(k||Z)};this.connectionHandler.constraintHandler.isStateIgnored=function(Z,k){var A=Z.view.graph;return k&&(A.isCellSelected(Z.cell)||A.isTableRow(Z.cell)&&A.selectionCellsHandler.isHandled(A.model.getParent(Z.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var Z=this.connectionHandler.constraintHandler;null!=Z.currentFocus&&Z.isStateIgnored(Z.currentFocus,!0)&&(Z.currentFocus=null,Z.constraints=null,Z.destroyIcons());Z.destroyFocusHighlight()}));
@@ -2328,14 +2329,14 @@ Graph.decompress=function(b,e,g){if(null==b||0==b.length||"undefined"===typeof p
Graph.fadeNodes=function(b,e,g,m,u){u=null!=u?u:1E3;Graph.setTransitionForNodes(b,null);Graph.setOpacityForNodes(b,e);window.setTimeout(function(){Graph.setTransitionForNodes(b,"all "+u+"ms ease-in-out");Graph.setOpacityForNodes(b,g);window.setTimeout(function(){Graph.setTransitionForNodes(b,null);null!=m&&m()},u)},0)};
Graph.exploreFromCell=function(b,e,g){pageSize=null!=g&&null!=g.pageSize?g.pageSize:8;minSize=null!=g&&null!=g.minSize?g.minSize:180;(function(m,u){function p(O,R){if(O.getModel().isVertex(R)){var c=O.container.scrollWidth/2,f=O.container.scrollHeight/2;O.rootCell=R.referenceCell||R;O.getModel().beginUpdate();try{for(var l=R.referenceCell||R,t=m.model.getCell(l.sourceCellId),z=m.getEdges(t,null,!0,!0,!1,!0),C=[],F=0;F<z.length;F++)null!=z[F].getTerminal(!0)&&null!=z[F].getTerminal(!1)&&m.isCellVisible(z[F])&&
!m.isEdgeIgnored(z[F])&&m.isCellVisible(z[F].getTerminal(!0))&&m.isCellVisible(z[F].getTerminal(!1))&&m.isCellVisible(m.getLayerForCell(z[F]))&&C.push(z[F]);C=z=C;if(null!=R.startIndex||0<pageSize&&z.length>pageSize){var N=R.startIndex||0;C=z.slice(Math.max(0,N),Math.min(z.length,N+pageSize))}C=m.getOpposites(C,t).concat(C);var K=O.cloneCells(C);for(F=0;F<C.length;F++)if(K[F].sourceCellId=C[F].id,O.model.isEdge(K[F]))for(K[F].geometry.x=0,K[F].geometry.y=0,K[F].geometry.points=null,K[F].setStyle(K[F].getStyle()+
-";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var I=K[F].getChildAt(t);null!=I.geometry&&I.geometry.relative&&(I.setStyle(I.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),I.geometry.offset=new mxPoint(0,0),I.geometry.y=0,I.geometry.x=.5>I.geometry.x?-.8:.5<I.geometry.x?.8:0)}if(0<R.startIndex){var ca=O.createVertex(null,null,mxResources.get("previousPage")+
-" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ca.referenceCell=l;ca.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ca)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
-da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ea in O.getModel().cells){var X=O.getModel().getCell(ea);X!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,X)&&O.getModel().isVertex(X)&&O.removeCells([X])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ea in O.getModel().cells)X=O.getModel().getCell(ea),X!=O.rootCell&&O.getModel().isVertex(X)&&
-O.getModel().getParent(X)==O.getDefaultParent()&&(R.push(X),ba=O.getModel().getGeometry(X),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=
+";curved=1;noEdgeStyle=1;entryX=none;entryY=none;exitX=none;exitY=none;labelBackgroundColor=#ffffffc0;textOpacity=100;"),K[F].setTerminal(l,null==K[F].getTerminal(!0)),t=0;t<K[F].getChildCount();t++){var J=K[F].getChildAt(t);null!=J.geometry&&J.geometry.relative&&(J.setStyle(J.getStyle()+";labelBackgroundColor=#ffffffc0;textOpacity=100;"),J.geometry.offset=new mxPoint(0,0),J.geometry.y=0,J.geometry.x=.5>J.geometry.x?-.8:.5<J.geometry.x?.8:0)}if(0<R.startIndex){var ea=O.createVertex(null,null,mxResources.get("previousPage")+
+" ("+Math.ceil((R.startIndex||0)/pageSize)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");ea.referenceCell=l;ea.startIndex=Math.max(0,(R.startIndex||0)-pageSize);K.splice(0,0,ea)}if(z.length>(R.startIndex||0)+pageSize){var da=O.createVertex(null,null,mxResources.get("nextPage")+" ("+(Math.ceil((R.startIndex||0)/pageSize)+2)+"/"+Math.ceil(z.length/pageSize)+")",0,0,120,30,"fillColor=green;fontColor=white;strokeColor=green;rounded=1;");
+da.referenceCell=l;da.startIndex=(R.startIndex||0)+pageSize;K.splice(0,0,da)}for(var ca in O.getModel().cells){var W=O.getModel().getCell(ca);W!=O.rootCell&&!O.getModel().isAncestor(O.rootCell,W)&&O.getModel().isVertex(W)&&O.removeCells([W])}O.addCells(K);var ba=O.getModel().getGeometry(O.rootCell);null!=ba&&(ba=ba.clone(),ba.x=c-ba.width/2,ba.y=f-ba.height/3,O.getModel().setGeometry(O.rootCell,ba));R=[];for(ca in O.getModel().cells)W=O.getModel().getCell(ca),W!=O.rootCell&&O.getModel().isVertex(W)&&
+O.getModel().getParent(W)==O.getDefaultParent()&&(R.push(W),ba=O.getModel().getGeometry(W),null!=ba&&(ba.x=c-ba.width/2,ba.y=f-ba.height/2));var ha=R.length,ma=2*Math.PI/ha,Y=Math.max(minSize,Math.min(O.container.scrollWidth/2.5-80,O.container.scrollHeight/2.5-80));for(c=0;c<ha;c++)ba=O.getModel().getGeometry(R[c]),null!=ba&&(ba=ba.clone(),ba.x+=Y*Math.sin(c*ma),ba.y+=Y*Math.cos(c*ma),O.getModel().setGeometry(R[c],ba))}finally{O.getModel().endUpdate()}}}var B=document.createElement("div");B.style.position=
"absolute";B.style.display="block";B.style.background=Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.style.width="100%";B.style.height="100%";B.style.left="0px";B.style.top="0px";B.style.zIndex=2;var H=document.createElement("img");H.setAttribute("src",Editor.closeBlackImage);H.style.position="absolute";H.style.cursor="pointer";H.style.right="10px";H.style.top="10px";B.appendChild(H);var S=document.createElement("div");S.style.position="absolute";S.style.cursor="pointer";S.style.right="38px";S.style.top=
"14px";S.style.textAlign="right";S.style.verticalAlign="top";mxUtils.write(S,mxResources.get("close"));B.appendChild(S);document.body.appendChild(B);var G=function(O){27==O.keyCode&&H.click()};mxEvent.addListener(document,"keydown",G);(function(O){if(mxClient.isBrowserSupported()){var R=new Graph(O);R.keepEdgesInBackground=!0;R.isCellResizable=function(){return!1};R.isCellRotatable=function(){return!1};R.getCursorForCell=function(C){return this.model.isVertex(C)?"pointer":null};R.getFoldingImage=
function(){return null};var c=function(){mxEvent.removeListener(document,"keydown",G);O.parentNode.removeChild(O);m.scrollCellToVisible(u)};mxEvent.addListener(H,"click",c);mxEvent.addListener(S,"click",c);R.setEnabled(!1);var f=R.click;R.click=function(C){var F=C.getCell(),N=null!=F?null!=F.referenceCell?F.referenceCell:F:null;null!=F&&R.rootCell!=F&&0<R.getEdges(N).length?p(R,F):f.apply(this,arguments)};c=R.container.scrollWidth/2;var l=R.container.scrollHeight/3;R.model.beginUpdate();var t=R.importCells([u])[0];
-t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(I){N.spacing=Math.min(60,Math.max(30,60-5*I.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=
+t.sourceCellId=u.id;t.geometry.x=c-t.geometry.width/2;t.geometry.y=l-t.geometry.height/2;R.model.endUpdate();var z=!1;R.getModel().addListener(mxEvent.CHANGE,function(C,F){z||(C=F.getProperty("edit").changes,mxText.prototype.enableBoundingBox=!1,R.labelsVisible=!1,z=!0,mxEffects.animateChanges(R,C,function(){var N=new mxParallelEdgeLayout(R);N.spacing=60;var K=N.layout;N.layout=function(J){N.spacing=Math.min(60,Math.max(30,60-5*J.length));K.apply(this,arguments)};N.execute(R.getDefaultParent());mxText.prototype.enableBoundingBox=
!0;R.labelsVisible=!0;R.tooltipHandler.hide();R.refresh();z=!1}))});p(R,t)}else mxUtils.error("Browser is not supported!",200,!1)})(B)})(b,e)};Graph.removeKeys=function(b,e){for(var g in b)e(g)&&delete b[g]};Graph.setTransitionForNodes=function(b,e){for(var g=0;g<b.length;g++)mxUtils.setPrefixedStyle(b[g].style,"transition",e)};Graph.setOpacityForNodes=function(b,e){for(var g=0;g<b.length;g++)b[g].style.opacity=e};
Graph.removePasteFormatting=function(b,e){for(;null!=b;){null!=b.firstChild&&Graph.removePasteFormatting(b.firstChild,!0);var g=b.nextSibling;if(b.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=b.style){"#000000"==b.style.color&&(b.style.color="");if("SPAN"==b.nodeName&&"Apple-tab-span"==b.className){var m=Graph.createTabNode(4);b.parentNode.replaceChild(m,b);b=m}if("P"==b.nodeName&&"p1"==b.className){for(;null!=b.firstChild;)b.parentNode.insertBefore(b.firstChild,b);null!=g&&"P"==g.nodeName&&"p1"==
g.className&&b.parentNode.insertBefore(b.ownerDocument.createElement("br"),b);b.parentNode.removeChild(b)}!e&&null!=b.innerHTML&&0<=b.innerHTML.indexOf("\t")&&(m=Graph.createTabNode(4),b.innerHTML=b.innerHTML.replace(/\t/g,m.outerHTML))}b=g}};Graph.createTabNode=function(b){var e="\t";if(null!=b)for(e="";0<b;)e+=" ",b--;b=document.createElement("span");b.style.whiteSpace="pre";b.appendChild(document.createTextNode(e));return b};Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};
@@ -2364,8 +2365,8 @@ Graph.prototype.mergeStyle=function(B,H,S){if(null!=B){var G={},O;for(O in B){va
0)));if(this.isTableRow(B)&&(!this.isSwimlane(B)||0==H)&&""==this.getLabel(B)&&0<this.model.getChildCount(B))for(H=0;H<this.model.getChildCount(B);H++){var S=this.model.getChildAt(B,H);if(this.isCellEditable(S)){B=S;break}}return B};Graph.prototype.copyStyle=function(B){return this.getCellStyle(B,!1)};Graph.prototype.pasteStyle=function(B,H,S,G){null!=B&&(G||(S=null!=S?S:Graph.cellStyles,Graph.removeKeys(B,function(O){return 0>mxUtils.indexOf(S,O)})),this.updateCellStyles(B,H))};Graph.prototype.copyCellStyles=
function(B,H,S,G,O,R,c){var f=!1,l=!1;if(0<B.length)for(var t=0;t<B.length&&(f=this.getModel().isVertex(B[t])||f,!(l=this.getModel().isEdge(B[t])||l)||!f);t++);else l=f=!0;f=f&&!R;l=l&&!c;for(t=0;t<H.length;t++)if(B=0<=mxUtils.indexOf(Graph.textStyles,H[t]),"strokeColor"!=H[t]||null!=S[t]&&"none"!=S[t])if(0<=mxUtils.indexOf(Graph.cellStyles,H[t])||"shape"==H[t])if("shape"!=H[t]&&(f||B)&&(null==S[t]?delete G[H[t]]:G[H[t]]=S[t]),l||B)null==S[t]?delete O[H[t]]:O[H[t]]=S[t]};Graph.prototype.includeDescendants=
function(B){for(var H=[],S=0;S<B.length;S++)H=H.concat(this.model.getDescendants(B[S]));return H};Graph.prototype.pasteCellStyles=function(B,H,S,G,O){H=null!=H?H:this.currentVertexStyle;S=null!=S?S:this.currentEdgeStyle;O=null!=O?O:this.pasteEdgeStyle;this.model.beginUpdate();try{for(var R=0;R<B.length;R++){var c=B[R],f=this.model.getStyle(c),l=!1;null!=c.style&&(pairs=c.style.split(";"),l=l||0<=mxUtils.indexOf(pairs,"text"));if(l)var t=Graph.textStyles;else if(t=Graph.cellStyles.slice(),!G)for(var z=
-null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),I=mxUtils.indexOf(t,K);0<=I&&t.splice(I,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ca=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ca,K))for(var da=0;da<ca.length;da++){var ea=mxUtils.indexOf(t,ca[da]);0<=ea&&t.splice(ea,1)}}}}var X=this.model.isEdge(c);l=X?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(X||!X&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=
-mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),X&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=
+null!=f?f.split(";"):[],C=0;C<z.length;C++){var F=z[C],N=F.indexOf("=");if(0<=N){var K=F.substring(0,N),J=mxUtils.indexOf(t,K);0<=J&&t.splice(J,1);for(l=0;l<Graph.cellStyleGroups.length;l++){var ea=Graph.cellStyleGroups[l];if(0<=mxUtils.indexOf(ea,K))for(var da=0;da<ea.length;da++){var ca=mxUtils.indexOf(t,ea[da]);0<=ca&&t.splice(ca,1)}}}}var W=this.model.isEdge(c);l=W?S:H;for(C=0;C<t.length;C++){K=t[C];var ba=l[K];null!=ba&&("edgeStyle"!=K||O)&&(W||!W&&0>mxUtils.indexOf(Graph.edgeStyles,K))&&(f=
+mxUtils.setStyle(f,K,ba),"fontFamily"==K&&null==l.fontSource&&(f=mxUtils.setStyle(f,"fontSource",null)),W&&"rounded"==K&&"1"==ba&&null==l.curved&&(f=mxUtils.setStyle(f,"curved",null)))}Editor.simpleLabels&&(f=mxUtils.setStyle(mxUtils.setStyle(f,"html",null),"whiteSpace",null));this.model.setStyle(c,f)}}finally{this.model.endUpdate()}return B};Graph.prototype.updateCellStyles=function(B,H){this.model.beginUpdate();try{for(var S=0;S<H.length;S++)if(this.model.isVertex(H[S])||this.model.isEdge(H[S])){var G=
this.getCellStyle(H[S],!1),O=G[mxConstants.STYLE_PERIMETER],R=!1;for(f in B){var c=B[f];if(G[f]!=c){if(f==mxConstants.STYLE_SHAPE&&"umlLifeline"==G[f]&&"umlLifeline"!=c){R=!0;var f="participant"}this.setCellStyles(f,c,[H[S]])}}R&&this.setCellStyles(mxConstants.STYLE_PERIMETER,O,[H[S]])}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};
Graph.prototype.isCssTransformsSupported=function(){return this.dialect==mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(B,H,S,G,O,R){this.useCssTransforms&&(B=B/this.currentScale-this.currentTranslate.x,H=H/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(B,H,S,G,O,R){G=null!=G?G:!0;O=null!=O?O:!0;null==S&&(S=this.getCurrentRoot(),null==S&&(S=this.getModel().getRoot()));
if(null!=S)for(var c=this.model.getChildCount(S)-1;0<=c;c--){var f=this.model.getChildAt(S,c),l=this.getScaledCellAt(B,H,f,G,O,R);if(null!=l)return l;if(this.isCellVisible(f)&&(O&&this.model.isEdge(f)||G&&this.model.isVertex(f))&&(l=this.view.getState(f),null!=l&&(null==R||!R(l,B,H))&&this.intersects(l,B,H)))return f}return null};Graph.prototype.isRecursiveVertexResize=function(B){return!this.isSwimlane(B.cell)&&0<this.model.getChildCount(B.cell)&&!this.isCellCollapsed(B.cell)&&"1"==mxUtils.getValue(B.style,
@@ -2428,9 +2429,9 @@ Graph.prototype.insertEdgeBeforeCell=function(b,e){for(var g=e;null!=g.parent&&n
Graph.prototype.connectVertex=function(b,e,g,m,u,p,B,H){p=p?p:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var S=this.isCloneConnectSource(b),G=S?b:this.getCompositeParent(b),O=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(G.geometry.x,G.geometry.y);e==mxConstants.DIRECTION_NORTH?(O.x+=G.geometry.width/2,O.y-=g):e==
mxConstants.DIRECTION_SOUTH?(O.x+=G.geometry.width/2,O.y+=G.geometry.height+g):(O.x=e==mxConstants.DIRECTION_WEST?O.x-g:O.x+(G.geometry.width+g),O.y+=G.geometry.height/2);var R=this.view.getState(this.model.getParent(b));g=this.view.scale;var c=this.view.translate;G=c.x*g;c=c.y*g;null!=R&&this.model.isVertex(R.cell)&&(G=R.x,c=R.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(O.x+=b.parent.geometry.x,O.y+=b.parent.geometry.y);p=p?null:(new mxRectangle(G+O.x*g,c+O.y*g)).grow(40*g);p=null!=p?
this.getCells(0,0,0,0,null,null,p,null,!0):null;R=this.view.getState(b);var f=null,l=null;if(null!=p){p=p.reverse();for(var t=0;t<p.length;t++)if(!this.isCellLocked(p[t])&&!this.model.isEdge(p[t])&&p[t]!=b)if(!this.model.isAncestor(b,p[t])&&this.isContainer(p[t])&&(null==f||p[t]==this.model.getParent(b)))f=p[t];else if(null==l&&this.isCellConnectable(p[t])&&!this.model.isAncestor(p[t],b)&&!this.isSwimlane(p[t])){var z=this.view.getState(p[t]);null==R||null==z||mxUtils.intersects(R,z)||(l=p[t])}}var C=
-!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var I=this.getAbsoluteParent(null!=K?K:b);I=S?b:this.getCompositeParent(I);N=null!=K?K:this.duplicateCells([I],
-!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ca=this.getCellGeometry(N);null!=ca&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ca.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ca.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ca.width/2:O.x+ca.width/2),ca.x=O.x-ca.width/2,ca.y=O.y-ca.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&
-mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ea=b.parent.getIndex(b);this.model.add(b.parent,N,ea)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",
+!mxEvent.isShiftDown(m)||mxEvent.isControlDown(m)||u;C&&("1"!=urlParams.sketch||u)&&(e==mxConstants.DIRECTION_NORTH?O.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=b.geometry.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-b.geometry.width/2:O.x+b.geometry.width/2);var F=[],N=l;l=f;u=mxUtils.bind(this,function(K){if(null==B||null!=K||null==l&&S){this.model.beginUpdate();try{if(null==N&&C){var J=this.getAbsoluteParent(null!=K?K:b);J=S?b:this.getCompositeParent(J);N=null!=K?K:this.duplicateCells([J],
+!1)[0];null!=K&&this.addCells([N],this.model.getParent(b),null,null,null,!0);var ea=this.getCellGeometry(N);null!=ea&&(null!=K&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?O.y-=ea.height/2:e==mxConstants.DIRECTION_SOUTH?O.y+=ea.height/2:O.x=e==mxConstants.DIRECTION_WEST?O.x-ea.width/2:O.x+ea.width/2),ea.x=O.x-ea.width/2,ea.y=O.y-ea.height/2);null!=f?(this.addCells([N],f,null,null,null,!0),l=null):C&&!S&&this.addCells([N],this.getDefaultParent(),null,null,null,!0)}var da=mxEvent.isControlDown(m)&&
+mxEvent.isShiftDown(m)&&C||null==l&&S?null:this.insertEdge(this.model.getParent(b),null,"",b,N,this.createCurrentEdgeStyle());null!=da&&(F.push(da),this.applyNewEdgeStyle(b,[da],e),this.connectionHandler.insertBeforeSource&&this.insertEdgeBeforeCell(da,b));if(null==l&&null!=N&&null!=b.parent&&S&&e==mxConstants.DIRECTION_WEST){var ca=b.parent.getIndex(b);this.model.add(b.parent,N,ca)}null==l&&null!=N&&F.push(N);null==N&&null!=da&&da.geometry.setTerminalPoint(O,!1);null!=da&&this.fireEvent(new mxEventObject("cellsInserted",
"cells",[da]))}finally{this.model.endUpdate()}}if(null!=H)H(F);else return F});if(null==B||null!=N||!C||null==l&&S)return u(N);B(G+O.x*g,c+O.y*g,u)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),g=[],m,u=0;u<b.length;u++)if(m=b[u],this.model.isVertex(m)||this.model.isEdge(m))this.isHtmlLabel(m)?(e.innerHTML=Graph.sanitizeHtml(this.getLabel(m)),m=mxUtils.extractTextWithWhitespace([e])):m=this.getLabel(m),m=mxUtils.trim(m.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<m.length&&g.push(m);return g.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var g=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var m=b;null==g&&null!=m;)null!=m.value&&"object"==typeof m.value&&(g=m.hasAttribute(e)?null!=m.getAttribute(e)?m.getAttribute(e):"":null),m=this.model.getParent(m)}else g=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(g=e.getAttribute("label_"+Graph.diagramLanguage)),
@@ -2525,12 +2526,12 @@ arguments);null!=f&&c&&this.graph.model.isEdge(f.cell)&&null!=f.style&&1!=f.styl
R)for(var c=0;c<R.length;c++)if("hidden"!=R[c].getAttribute("visibility"))return R[c];return null};mxShape.prototype.addFlowAnimationToShape=function(){null!=this.state&&this.state.view.graph.addFlowAnimationToNode(this.getFlowAnimationPath(),this.state.style,this.state.view.scale,this.state.view.graph.addFlowAnimationStyle())};var g=mxShape.prototype.paint;mxShape.prototype.paint=function(R){g.apply(this,arguments);this.isFlowAnimationEnabled()&&this.addFlowAnimationToShape()};var m=mxShape.prototype.createSvgCanvas;
mxShape.prototype.createSvgCanvas=function(R){R=m.apply(this,arguments);null!=this.state&&(R.adaptiveColors=this.state.view.graph.getAdaptiveColors());return R};var u=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(R,c){return u.apply(this,arguments)||null!=R.routedPoints&&null!=c.routedPoints&&!mxUtils.equalPoints(c.routedPoints,R.routedPoints)};var p=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(R){p.apply(this,arguments);
this.graph.model.isEdge(R.cell)&&1!=R.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(R)};mxGraphView.prototype.updateLineJumps=function(R){var c=R.absolutePoints;if(Graph.lineJumpsEnabled){var f=null!=R.routedPoints,l=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(R.style,"jumpStyle","none")){var t=function(Y,la,Z){var k=new mxPoint(la,Z);k.type=Y;l.push(k);k=null!=R.routedPoints?R.routedPoints[l.length-1]:null;return null==k||k.type!=Y||k.x!=la||k.y!=Z},z=.5*this.scale;
-f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],I=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,I.x,I.y,F.x,F.y)<1*this.scale*this.scale;)F=I,C++,I=c[C+2];f=t(0,N.x,N.y)||f;for(var ca=0;ca<this.validEdges.length;ca++){var da=this.validEdges[ca],ea=da.absolutePoints;if(null!=ea&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var X=null;for(da=0;da<ea.length-1;da++){var ba=ea[da+1],ha=ea[da];for(I=ea[da+2];da<ea.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,I.x,I.y,ba.x,ba.y)<1*this.scale*
-this.scale;)ba=I,da++,I=ea[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==X||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,X.x,X.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==I||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,I.x,I.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){I=ma.x-N.x;X=ma.y-N.y;ma={distSq:I*I+X*X,x:ma.x,y:ma.y};for(I=0;I<K.length;I++)if(K[I].distSq>
-ma.distSq){K.splice(I,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}X=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,
-arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],I=null;R.begin();for(var ca=0;ca<this.state.routedPoints.length;ca++){var da=this.state.routedPoints[ca],ea=new mxPoint(da.x/this.scale,da.y/this.scale);0==ca?ea=c[0]:ca==this.state.routedPoints.length-1&&(ea=c[c.length-1]);var X=
-!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ca+1];da=ba.x/this.scale-ea.x;ba=ba.y/this.scale-ea.y;da=da*da+ba*ba;null==I&&(I=new mxPoint(ea.x-F.x,ea.y-F.y),N=Math.sqrt(I.x*I.x+I.y*I.y),0<N?(I.x=I.x*t/N,I.y=I.y*t/N):I=null);da>t*t&&0<N&&(da=F.x-ea.x,ba=F.y-ea.y,da=da*da+ba*ba,da>t*t&&(X=new mxPoint(ea.x-I.x,ea.y-I.y),da=new mxPoint(ea.x+I.x,ea.y+I.y),K.push(X),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(I.x)||0==Math.round(I.x)&&0>=Math.round(I.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(X.x-
-I.y*K,X.y+I.x*K),R.lineTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(X.x+I.y*K,X.y-I.x*K),R.lineTo(X.x-I.y*K,X.y+I.x*K),R.moveTo(da.x-I.y*K,da.y+I.x*K),R.lineTo(da.x+I.y*K,da.y-I.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(X.x-I.y*K,X.y+I.x*K,da.x-I.y*K,da.y+I.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],X=!0))}else I=null;X||(K.push(ea),F=ea)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
+f=!1;l=[];for(var C=0;C<c.length-1;C++){for(var F=c[C+1],N=c[C],K=[],J=c[C+2];C<c.length-2&&mxUtils.ptSegDistSq(N.x,N.y,J.x,J.y,F.x,F.y)<1*this.scale*this.scale;)F=J,C++,J=c[C+2];f=t(0,N.x,N.y)||f;for(var ea=0;ea<this.validEdges.length;ea++){var da=this.validEdges[ea],ca=da.absolutePoints;if(null!=ca&&mxUtils.intersects(R,da)&&"1"!=da.style.noJump){var W=null;for(da=0;da<ca.length-1;da++){var ba=ca[da+1],ha=ca[da];for(J=ca[da+2];da<ca.length-2&&mxUtils.ptSegDistSq(ha.x,ha.y,J.x,J.y,ba.x,ba.y)<1*this.scale*
+this.scale;)ba=J,da++,J=ca[da+2];var ma=mxUtils.intersection(N.x,N.y,F.x,F.y,ha.x,ha.y,ba.x,ba.y);if(null!=ma&&(Math.abs(ma.x-N.x)>z||Math.abs(ma.y-N.y)>z)&&(Math.abs(ma.x-F.x)>z||Math.abs(ma.y-F.y)>z)&&(null==W||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,W.x,W.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ha.x,ha.y)>z)&&(null==J||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,J.x,J.y)>z||mxUtils.ptLineDist(N.x,N.y,F.x,F.y,ba.x,ba.y)>z)){J=ma.x-N.x;W=ma.y-N.y;ma={distSq:J*J+W*W,x:ma.x,y:ma.y};for(J=0;J<K.length;J++)if(K[J].distSq>
+ma.distSq){K.splice(J,0,ma);ma=null;break}null==ma||0!=K.length&&K[K.length-1].x===ma.x&&K[K.length-1].y===ma.y||K.push(ma)}W=ha}}}for(da=0;da<K.length;da++)f=t(1,K[da].x,K[da].y)||f}ma=c[c.length-1];f=t(0,ma.x,ma.y)||f}R.routedPoints=l;return f}return!1};var B=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(R,c,f){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)B.apply(this,
+arguments);else{var l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,t=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,z=mxUtils.getValue(this.style,"jumpStyle","none"),C=!0,F=null,N=null,K=[],J=null;R.begin();for(var ea=0;ea<this.state.routedPoints.length;ea++){var da=this.state.routedPoints[ea],ca=new mxPoint(da.x/this.scale,da.y/this.scale);0==ea?ca=c[0]:ea==this.state.routedPoints.length-1&&(ca=c[c.length-1]);var W=
+!1;if(null!=F&&1==da.type){var ba=this.state.routedPoints[ea+1];da=ba.x/this.scale-ca.x;ba=ba.y/this.scale-ca.y;da=da*da+ba*ba;null==J&&(J=new mxPoint(ca.x-F.x,ca.y-F.y),N=Math.sqrt(J.x*J.x+J.y*J.y),0<N?(J.x=J.x*t/N,J.y=J.y*t/N):J=null);da>t*t&&0<N&&(da=F.x-ca.x,ba=F.y-ca.y,da=da*da+ba*ba,da>t*t&&(W=new mxPoint(ca.x-J.x,ca.y-J.y),da=new mxPoint(ca.x+J.x,ca.y+J.y),K.push(W),this.addPoints(R,K,f,l,!1,null,C),K=0>Math.round(J.x)||0==Math.round(J.x)&&0>=Math.round(J.y)?1:-1,C=!1,"sharp"==z?(R.lineTo(W.x-
+J.y*K,W.y+J.x*K),R.lineTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x,da.y)):"line"==z?(R.moveTo(W.x+J.y*K,W.y-J.x*K),R.lineTo(W.x-J.y*K,W.y+J.x*K),R.moveTo(da.x-J.y*K,da.y+J.x*K),R.lineTo(da.x+J.y*K,da.y-J.x*K),R.moveTo(da.x,da.y)):"arc"==z?(K*=1.3,R.curveTo(W.x-J.y*K,W.y+J.x*K,da.x-J.y*K,da.y+J.x*K,da.x,da.y)):(R.moveTo(da.x,da.y),C=!0),K=[da],W=!0))}else J=null;W||(K.push(ca),F=ca)}this.addPoints(R,K,f,l,!1,null,C);R.stroke()}};var H=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=
function(R,c,f,l){return null!=c&&"centerPerimeter"==c.style[mxConstants.STYLE_PERIMETER]?new mxPoint(c.getCenterX(),c.getCenterY()):H.apply(this,arguments)};var S=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(R,c,f,l){if(null==c||null==R||"1"!=c.style.snapToPoint&&"1"!=R.style.snapToPoint)S.apply(this,arguments);else{c=this.getTerminalPort(R,c,l);var t=this.getNextPoint(R,f,l),z=this.graph.isOrthogonal(R),C=mxUtils.toRadians(Number(c.style[mxConstants.STYLE_ROTATION]||
"0")),F=new mxPoint(c.getCenterX(),c.getCenterY());if(0!=C){var N=Math.cos(-C),K=Math.sin(-C);t=mxUtils.getRotatedPoint(t,N,K,F)}N=parseFloat(R.style[mxConstants.STYLE_PERIMETER_SPACING]||0);N+=parseFloat(R.style[l?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);t=this.getPerimeterPoint(c,t,0==C&&z,N);0!=C&&(N=Math.cos(C),K=Math.sin(C),t=mxUtils.getRotatedPoint(t,N,K,F));R.setAbsoluteTerminalPoint(this.snapToAnchorPoint(R,c,f,l,t),l)}};mxGraphView.prototype.snapToAnchorPoint=
function(R,c,f,l,t){if(null!=c&&null!=R){R=this.graph.getAllConnectionConstraints(c);l=f=null;if(null!=R)for(var z=0;z<R.length;z++){var C=this.graph.getConnectionPoint(c,R[z]);if(null!=C){var F=(C.x-t.x)*(C.x-t.x)+(C.y-t.y)*(C.y-t.y);if(null==l||F<l)f=C,l=F}}null!=f&&(t=f)}return t};var G=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(R,c,f){var l=G.apply(this,arguments);"1"==R.getAttribute("placeholders")&&null!=f.state&&(l=f.state.view.graph.replacePlaceholders(f.state.cell,
@@ -2660,14 +2661,14 @@ Math.round(ta)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textare
Q);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+Q+","+Q+")")}else this.textarea.style.height="",this.textarea.style.overflow="",N.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(x,M){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);
var Q=this.graph.getEditingValue(x.cell,M);"1"==mxUtils.getValue(x.style,"nl2Br","1")&&(Q=Q.replace(/\n/g,"<br/>"));return Graph.sanitizeHtml(Q,!0)};mxCellEditorSetEditingValue=mxCellEditor.prototype.setEditingValue;mxCellEditor.prototype.setEditingValue=function(x,M){mxCellEditorSetEditingValue.apply(this,arguments);"1"==mxUtils.getValue(x.style,"html","0")&&Graph.addLightDarkColors(this.textarea,Graph.backupStyleAttribute,"simple"==this.graph.getAdaptiveColors())};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;
mxCellEditor.prototype.getCurrentValue=function(x){if("0"==mxUtils.getValue(x.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);Graph.removeLightDarkColors(this.textarea,Graph.backupStyleAttribute);var M=Graph.sanitizeHtml(this.textarea.innerHTML,!0);"1"==mxUtils.getValue(x.style,"nl2Br","1")?(M=M.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"),0<M.length&&("<br/>"==M.substring(M.length-5)||"<br>"==M.substring(M.length-4))&&(M=M.substring(0,M.lastIndexOf("<br"))+"<div><br/></div>")):
-M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var I=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{I.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&
+M=M.replace(/\r\n/g,"").replace(/\n/g,"");return M};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(x){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(x){}};var J=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(x,M){this.graph.getModel().beginUpdate();try{J.apply(this,arguments),""==M&&this.graph.isCellDeletable(x.cell)&&
0==this.graph.model.getChildCount(x.cell)&&this.graph.isTransparentState(x)&&this.graph.removeCells([x.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getBorderColor=function(x){x=mxUtils.getValue(x.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);x==mxConstants.NONE&&(x=null);return x};mxCellEditor.prototype.getMinimumSize=
function(x){var M=this.graph.getView().scale;return new mxRectangle(0,0,null==x.text?30:x.text.size*M+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(x,M){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(M.getEvent)};mxGraphView.prototype.formatUnitText=function(x){return x?e(x,this.unit):x};mxGraphHandler.prototype.updateHint=function(x){if(null!=this.pBounds&&(null!=this.shape||
this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var M=this.graph.view.translate,Q=this.graph.view.scale;x=this.roundLength((this.bounds.x+this.currentDx)/Q-M.x);M=this.roundLength((this.bounds.y+this.currentDy)/Q-M.y);Q=this.graph.view.unit;this.hint.innerHTML=e(x,Q)+", "+e(M,Q);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+
-Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ca=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ca.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=
+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var ea=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(x,M){ea.apply(this,arguments);var Q=this.graph.getCellStyle(x);if(null==Q.childLayout){var V=this.graph.model.getParent(x),ia=null!=V?this.graph.getCellGeometry(V):null;if(null!=ia&&(Q=this.graph.getCellStyle(V),"stackLayout"==Q.childLayout)){var ka=
parseFloat(mxUtils.getValue(Q,"stackBorder",mxStackLayout.prototype.border));Q="1"==mxUtils.getValue(Q,"horizontalStack","1");var oa=this.graph.getActualStartSize(V);ia=ia.clone();Q?ia.height=M.height+oa.y+oa.height+2*ka:ia.width=M.width+oa.x+oa.width+2*ka;this.graph.model.setGeometry(V,ia)}}};var da=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function x(xa){Q.get(xa)||(Q.put(xa,!0),ia.push(xa))}for(var M=da.apply(this,
-arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ea=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ea.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var X=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
-function(){return X.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
+arguments),Q=new mxDictionary,V=this.graph.model,ia=[],ka=0;ka<M.length;ka++){var oa=M[ka];this.graph.isTableCell(oa)?x(V.getParent(V.getParent(oa))):this.graph.isTableRow(oa)&&x(V.getParent(oa));x(oa)}return ia};var ca=mxConnectionHandler.prototype.isStartEvent;mxConnectionHandler.prototype.isStartEvent=function(x){return ca.apply(this,arguments)&&!mxEvent.isControlDown(x.getEvent())&&!mxEvent.isShiftDown(x.getEvent())};var W=mxVertexHandler.prototype.isGhostPreview;mxVertexHandler.prototype.isGhostPreview=
+function(){return W.apply(this,arguments)&&!this.graph.isTable(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isSwimlane(this.state.cell)};var ba=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(x){var M=ba.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=
function(x){var M=ha.apply(this,arguments);M.stroke="#C0C0C0";M.strokewidth=1;return M};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var x=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+x.x/2,this.bounds.y+this.rotationHandleVSpacing-x.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(x,M){return this.graph.isRecursiveVertexResize(x)&&!mxEvent.isAltDown(M.getEvent())};
mxVertexHandler.prototype.isCenteredEvent=function(x,M){return mxEvent.isControlDown(M.getEvent())||mxEvent.isMetaDown(M.getEvent())};var ma=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ma.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?
this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var Y=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return Y.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var la=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(x){return x.tableHandle||la.apply(this,arguments)&&
@@ -2679,19 +2680,19 @@ V.getActualStartSize(oa.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=
cb)V.setTableRowHeight(this.state.cell,cb,!Ya);else if(!Q.blockDelayedSelection){var hb=V.getCellAt(gb.getGraphX(),gb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(hb,gb)}cb=0};Qa.reset=function(){cb=0}}x.push(Qa)})(ia);for(ia=0;ia<Na.length;ia++)mxUtils.bind(this,function(ab){var Oa=V.view.getState(Na[ab]),Qa=V.getCellGeometry(Na[ab]),kb=null!=Qa.alternateBounds?Qa.alternateBounds:Qa;null==Oa&&(Oa=new mxCellState(V.view,Na[ab],V.getCellStyle(Na[ab])),Oa.x=oa.x+Qa.x*ka,Oa.y=oa.y+Qa.y*ka,
Oa.width=kb.width*ka,Oa.height=kb.height*ka,Oa.updateCachedBounds());Qa=ab<Na.length-1?Na[ab+1]:null;Qa=null!=Qa?V.getCellGeometry(Qa):null;var cb=null!=Qa&&null!=Qa.alternateBounds?Qa.alternateBounds:Qa;Qa=null!=Wa[ab]?new k(Wa[ab],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Qa.isDashed=xa.isDashed;Qa.svgStrokeTolerance++;Oa=new mxHandle(Oa,"col-resize",null,Qa);Oa.tableHandle=!0;var Ya=0;Oa.shape.node.parentNode.insertBefore(Oa.shape.node,Oa.shape.node.parentNode.firstChild);
Oa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ya?mxConstants.NONE:xa.stroke;if(this.shape.constructor==k)this.shape.line=M(Wa[ab],Ya,0),this.shape.updateBoundsFromLine();else{var hb=V.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(kb.width+Ya)*ka;this.shape.bounds.y=oa.y+(ab==Na.length-1?0:hb.y*ka);this.shape.bounds.height=oa.height-(ab==Na.length-1?0:(hb.height+hb.y)*ka)}this.shape.redraw()}};var gb=!1;Oa.setPosition=function(hb,vb,mb){Ya=
-Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var J=
-mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){J.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
+Math.max(Graph.minTableColumnWidth-kb.width,vb.x-hb.x-kb.width);gb=mxEvent.isShiftDown(mb.getEvent());null==cb||gb||(Ya=Math.min(Ya,cb.width-Graph.minTableColumnWidth))};Oa.execute=function(hb){if(0!=Ya)V.setTableColumnWidth(this.state.cell,Ya,gb);else if(!Q.blockDelayedSelection){var vb=V.getCellAt(hb.getGraphX(),hb.getGraphY())||oa.cell;V.graphHandler.selectCellForEvent(vb,hb)}Ya=0};Oa.positionChanged=function(){};Oa.reset=function(){Ya=0};x.push(Oa)})(ia)}}return null!=x?x.reverse():null};var I=
+mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(x){I.apply(this,arguments);if(null!=this.moveHandles)for(var M=0;M<this.moveHandles.length;M++)null!=this.moveHandles[M]&&(this.moveHandles[M].node.style.visibility=x?"":"hidden");if(null!=this.cornerHandles)for(M=0;M<this.cornerHandles.length;M++)this.cornerHandles[M].node.style.visibility=x?"":"hidden"};mxVertexHandler.prototype.isMoveHandlesVisible=function(){return this.graph.isTable(this.state.cell)&&
this.graph.isCellMovable(this.state.cell)};mxVertexHandler.prototype.refreshMoveHandles=function(){var x=this.isMoveHandlesVisible();x&&null==this.moveHandles?this.moveHandles=this.createMoveHandles():x||null==this.moveHandles||this.destroyMoveHandles();if(x&&null==this.moveHandles){for(x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].parentNode.removeChild(this.moveHandles[x]);this.moveHandles=null}};mxVertexHandler.prototype.createMoveHandles=function(){for(var x=
this.graph,M=x.model,Q=[],V=0;V<M.getChildCount(this.state.cell);V++)mxUtils.bind(this,function(ia){if(null!=ia&&M.isVertex(ia.cell)&&x.isCellMovable(ia.cell)){var ka=new mxRectangle(0,0,this.rowHandleImage.width,this.rowHandleImage.height);ka=new mxImageShape(ka,this.rowHandleImage.src);ka.rowState=ia;ka.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;ka.init(this.graph.getView().getOverlayPane());ka.node.style.cursor="move";mxEvent.addGestureListeners(ka.node,
mxUtils.bind(this,function(oa){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(oa)&&this.graph.isCellSelected(ia.cell)||this.graph.selectCellForEvent(ia.cell,oa);mxEvent.isPopupTrigger(oa)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(oa),mxEvent.getClientY(oa),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(oa),this.graph.isMouseDown=!0);mxEvent.consume(oa)}),
null,mxUtils.bind(this,function(oa){mxEvent.isPopupTrigger(oa)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(oa),mxEvent.getClientY(oa),ia.cell,oa),mxEvent.consume(oa))}));Q.push(ka)}else Q.push(null)})(this.graph.view.getState(M.getChildAt(this.state.cell,V)));return Q};mxVertexHandler.prototype.destroyMoveHandles=function(){if(null!=this.moveHandles){for(var x=0;x<this.moveHandles.length;x++)null!=this.moveHandles[x]&&this.moveHandles[x].destroy();this.moveHandles=null}};mxVertexHandler.prototype.destroyCornerHandles=
-function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var U=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){U.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
+function(){if(null!=this.cornerHandles){for(var x=0;x<this.cornerHandles.length;x++)null!=this.cornerHandles[x]&&null!=this.cornerHandles[x].node&&null!=this.cornerHandles[x].node.parentNode&&this.cornerHandles[x].node.parentNode.removeChild(this.cornerHandles[x].node);this.cornerHandles=null}};var T=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){T.apply(this,arguments);this.destroyMoveHandles();this.destroyCornerHandles();if(this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&this.graph.isCellMovable(this.state.cell)&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var x=0;4>x;x++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}this.graph.isTable(this.state.cell)&&this.graph.isCellMovable(this.state.cell)&&this.refreshMoveHandles();
x=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var P=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var x=new mxPoint(0,0),M=this.tolerance,Q=this.state.style.shape;null==mxCellRenderer.defaultShapes[Q]&&mxStencilRegistry.getStencil(Q);Q=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!Q&&null!=this.customHandles)for(var V=0;V<this.customHandles.length;V++)if(null!=
this.customHandles[V]&&null!=this.customHandles[V].shape&&null!=this.customHandles[V].shape.bounds){var ia=this.customHandles[V].shape.bounds,ka=ia.getCenterX(),oa=ia.getCenterY();if(Math.abs(this.state.x-ka)<ia.width/2||Math.abs(this.state.y-oa)<ia.height/2||Math.abs(this.state.x+this.state.width-ka)<ia.width/2||Math.abs(this.state.y+this.state.height-oa)<ia.height/2){Q=!0;break}}Q&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(M/=2,this.graph.isTable(this.state.cell)&&(M+=7),x.x=
this.sizers[0].bounds.width+M,x.y=this.sizers[0].bounds.height+M):x=P.apply(this,arguments);return x};mxVertexHandler.prototype.updateHint=function(x){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{x=this.state.view.scale;var M=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/x),M)+" x "+e(this.roundLength(this.bounds.height/
x),M)}x=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==x&&(x=this.bounds);this.hint.style.left=x.x+Math.round((x.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=x.y+x.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display=
-"")};var T=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){T.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var W=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){W.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
+"")};var U=mxEdgeHandler.prototype.refresh;mxEdgeHandler.prototype.refresh=function(){U.apply(this,arguments);var x=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);this.updateLinkHint(x,M)};var X=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(x,M){X.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};
var aa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(x,M){aa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&1==this.graph.getSelectionCount()&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(x,M,Q){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var V=this.graph.view.translate,ia=this.graph.view.scale,ka=this.roundLength(M.x/ia-V.x);V=this.roundLength(M.y/ia-V.y);var oa=
this.graph.view.unit;this.hint.innerHTML=e(ka,oa)+", "+e(V,oa);this.hint.style.visibility="visible";null!=Q&&(Q.view.updateEdgeBounds(Q),this.hint.innerHTML+=" ("+(oa==mxConstants.POINTS?Math.round(Q.length/ia):e(Q.length/ia,oa))+")");if(this.isSource||this.isTarget)null!=this.constraintHandler&&null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(Q=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*Q.x)+"%, "+Math.round(100*
Q.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(x.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(x.getGraphY(),M.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
@@ -2736,10 +2737,10 @@ this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,M=null!=this.state
this.destroyMoveHandles();this.destroyCornerHandles();null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var La=mxEdgeHandler.prototype.redrawHandles;
mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(La.apply(this),null!=this.state&&null!=this.linkHint)){var x=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(x=new mxRectangle(x.x,x.y,x.width,x.height),x.add(this.state.text.bounds));this.linkHint.style.left=x.x+x.width/2+"px";this.linkHint.style.top=Math.round(x.y+x.height+Editor.hintOffset)+"px";this.linkHint.style.display=1<this.graph.getSelectionCount()?"none":""}};var $a=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=
function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var Da=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){Da.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function b(d,n,y){mxShape.call(this);this.line=d;this.stroke=n;this.strokewidth=null!=y?y:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function g(){mxSwimlane.call(this)}function m(){mxCylinder.call(this)}function u(){mxConnector.call(this)}function p(){mxCylinder.call(this)}function B(){mxActor.call(this)}function H(){mxCylinder.call(this)}function S(){mxCylinder.call(this)}function G(){mxCylinder.call(this)}function O(){mxCylinder.call(this)}function R(){mxShape.call(this)}
-function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function I(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxActor.call(this)}function ea(d,n){this.canvas=d;this.canvas.setLineJoin("round");
-this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ea.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ea.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ea.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ea.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
-mxUtils.bind(this,ea.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ea.prototype.arcTo)}function X(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function J(){mxShape.call(this)}function U(){mxEllipse.call(this)}
-function P(){mxShape.call(this)}function T(){mxShape.call(this)}function W(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);
+function c(){mxShape.call(this)}function f(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1}function l(){mxActor.call(this)}function t(){mxCylinder.call(this)}function z(){mxCylinder.call(this)}function C(){mxActor.call(this)}function F(){mxActor.call(this)}function N(){mxActor.call(this)}function K(){mxActor.call(this)}function J(){mxActor.call(this)}function ea(){mxActor.call(this)}function da(){mxActor.call(this)}function ca(d,n){this.canvas=d;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=n;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,ca.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,ca.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,ca.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,ca.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,ca.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,ca.prototype.arcTo)}function W(){mxRectangleShape.call(this)}function ba(){mxRectangleShape.call(this)}function ha(){mxActor.call(this)}function ma(){mxActor.call(this)}function Y(){mxActor.call(this)}function la(){mxRectangleShape.call(this)}function Z(){mxRectangleShape.call(this)}function k(){mxCylinder.call(this)}function A(){mxShape.call(this)}function I(){mxShape.call(this)}function T(){mxEllipse.call(this)}
+function P(){mxShape.call(this)}function U(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function aa(){mxShape.call(this)}function ja(){mxShape.call(this)}function pa(){mxShape.call(this)}function sa(){mxShape.call(this)}function qa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function za(){mxRectangleShape.call(this)}function Ea(){mxDoubleEllipse.call(this)}function ra(){mxDoubleEllipse.call(this)}function ya(){mxArrowConnector.call(this);
this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ma(){mxActor.call(this)}function Ha(){mxRectangleShape.call(this)}function Aa(){mxActor.call(this)}function Ra(){mxActor.call(this)}function Za(){mxActor.call(this)}function La(){mxActor.call(this)}function $a(){mxActor.call(this)}function Da(){mxActor.call(this)}function x(){mxActor.call(this)}function M(){mxActor.call(this)}function Q(){mxActor.call(this)}function V(){mxActor.call(this)}function ia(){mxEllipse.call(this)}
function ka(){mxEllipse.call(this)}function oa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxEllipse.call(this)}function Fa(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Wa(){mxActor.call(this)}function Xa(){mxActor.call(this)}function ab(){mxActor.call(this)}function Oa(d,n,y,q){mxShape.call(this);this.bounds=d;this.fill=n;this.stroke=y;this.strokewidth=null!=q?q:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
!0;this.indent=2;this.rectOutline="single"}function Qa(){mxConnector.call(this)}function kb(d,n,y,q,v,D,E,fa,L,va){E+=L;var na=q.clone();q.x-=v*(2*E+L);q.y-=D*(2*E+L);v*=E+L;D*=E+L;return function(){d.ellipse(na.x-v-E,na.y-D-E,2*E,2*E);va?d.fillAndStroke():d.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var d=null;if(null!=this.line)for(var n=0;n<this.line.length;n++){var y=this.line[n];null!=y&&(y=new mxRectangle(y.x,y.y,this.strokewidth,this.strokewidth),null==
@@ -2776,20 +2777,20 @@ function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=2*mxUtils.get
function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var y=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;n=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var q=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),D=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(D*=Math.min(d.width,d.height));D=Math.min(D,
.5*d.width,.5*(d.height-n));q||(D=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(D,0,Math.min(d.width,d.width-y),Math.min(d.height,d.height-n)):new mxRectangle(Math.min(d.width,d.width-y),0,D,Math.min(d.height,d.height-n))}return new mxRectangle(0,Math.min(d.height,n),0,0)}return null};z.prototype.getLabelMargins=function(d){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*
this.scale,0,0,0):null};O.prototype.getLabelMargins=function(d){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var n=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(d.height*this.scale,n*this.scale),0,Math.max(0,n*this.scale))}return null};mxUtils.extend(K,mxActor);K.prototype.size=.2;K.prototype.fixedSize=20;K.prototype.isRoundable=function(){return!0};K.prototype.redrawPath=function(d,n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(I,mxActor);I.prototype.size=.2;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(d,
-n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",I);mxUtils.extend(ca,mxActor);
-ca.prototype.size=.5;ca.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ca);mxUtils.extend(da,mxActor);
-da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ea.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ea.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
-arguments));this.originalClose.apply(this.canvas,arguments)};ea.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ea.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ea.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ea.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===
+"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q,0),new mxPoint(q-n,v)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("parallelogram",K);mxUtils.extend(J,mxActor);J.prototype.size=.2;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(d,
+n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,v),new mxPoint(n,0),new mxPoint(q-n,0),new mxPoint(q,v)],this.isRounded,y,!0)};mxCellRenderer.registerShape("trapezoid",J);mxUtils.extend(ea,mxActor);
+ea.prototype.size=.5;ea.prototype.redrawPath=function(d,n,y,q,v){d.setFillColor(null);n=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(q,0),new mxPoint(n,0),new mxPoint(n,v/2),new mxPoint(0,v/2),new mxPoint(n,v/2),new mxPoint(n,v),new mxPoint(q,v)],this.isRounded,y,!1);d.end()};mxCellRenderer.registerShape("curlyBracket",ea);mxUtils.extend(da,mxActor);
+da.prototype.redrawPath=function(d,n,y,q,v){d.setStrokeWidth(1);d.setFillColor(this.stroke);n=q/5;d.rect(0,0,n,v);d.fillAndStroke();d.rect(2*n,0,n,v);d.fillAndStroke();d.rect(4*n,0,n,v);d.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",da);ca.prototype.moveTo=function(d,n){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;this.firstX=d;this.firstY=n};ca.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
+arguments));this.originalClose.apply(this.canvas,arguments)};ca.prototype.quadTo=function(d,n,y,q){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=y;this.lastY=q};ca.prototype.curveTo=function(d,n,y,q,v,D){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=D};ca.prototype.arcTo=function(d,n,y,q,v,D,E){this.originalArcTo.apply(this.canvas,arguments);this.lastX=D;this.lastY=E};ca.prototype.lineTo=function(d,n){if(null!=this.lastX&&null!=this.lastY){var y=function(na){return"number"===
typeof na?na?0>na?-1:1:na===na?0:NaN:NaN},q=Math.abs(d-this.lastX),v=Math.abs(n-this.lastY),D=Math.sqrt(q*q+v*v);if(2>D){this.originalLineTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=n;return}var E=Math.round(D/10),fa=this.defaultVariation;5>E&&(E=5,fa/=3);var L=y(d-this.lastX)*q/E;y=y(n-this.lastY)*v/E;q/=D;v/=D;for(D=0;D<E;D++){var va=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,L*D+this.lastX-va*v,y*D+this.lastY-va*q)}this.originalLineTo.call(this.canvas,d,n)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=d;this.lastY=n};ea.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ea(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ea)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||
+arguments);this.lastX=d;this.lastY=n};ca.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};var hb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(d){hb.apply(this,arguments);null==d.handJiggle&&(d.handJiggle=this.createHandJiggle(d))};var vb=mxShape.prototype.afterPaint;
+mxShape.prototype.afterPaint=function(d){vb.apply(this,arguments);null!=d.handJiggle&&(d.handJiggle.destroy(),delete d.handJiggle)};mxShape.prototype.createComicCanvas=function(d){return new ca(d,mxUtils.getValue(this.style,"jiggle",Editor.sketchDefaultJiggle))};mxShape.prototype.createHandJiggle=function(d){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(d)};var mb=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&mb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(d,n,y,q,v){if(null==d.handJiggle||d.handJiggle.constructor!=ca)pb.apply(this,arguments);else{var D=!0;null!=this.style&&(D="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(D||
null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)D||null!=this.fill&&this.fill!=mxConstants.NONE||(d.pointerEvents=!1),d.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?D=Math.min(q/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,D=Math.min(q*D,v*D)),d.moveTo(n+
-D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(X,mxRectangleShape);X.prototype.size=.1;X.prototype.fixedSize=!1;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
-!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};X.prototype.paintForeground=
+D,y),d.lineTo(n+q-D,y),d.quadTo(n+q,y,n+q,y+D),d.lineTo(n+q,y+v-D),d.quadTo(n+q,y+v,n+q-D,y+v),d.lineTo(n+D,y+v),d.quadTo(n,y+v,n,y+v-D),d.lineTo(n,y+D),d.quadTo(n,y,n+D,y)):(d.moveTo(n,y),d.lineTo(n+q,y),d.lineTo(n+q,y+v),d.lineTo(n,y+v),d.lineTo(n,y)),d.close(),d.end(),d.fillAndStroke()}};mxUtils.extend(W,mxRectangleShape);W.prototype.size=.1;W.prototype.fixedSize=!1;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,
+!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var n=d.width,y=d.height;d=new mxRectangle(d.x,d.y,n,y);var q=n*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;q=Math.max(q,Math.min(n*v,y*v))}d.x+=Math.round(q);d.width-=Math.round(2*q);return d}return d};W.prototype.paintForeground=
function(d,n,y,q,v){var D=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),E=parseFloat(mxUtils.getValue(this.style,"size",this.size));E=D?Math.max(0,Math.min(q,E)):q*Math.max(0,Math.min(1,E));this.isRounded&&(D=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,E=Math.max(E,Math.min(q*D,v*D)));E=Math.round(E);d.begin();d.moveTo(n+E,y);d.lineTo(n+E,y+v);d.moveTo(n+q-E,y);d.lineTo(n+q-E,y+v);d.end();d.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",X);mxCellRenderer.registerShape("process2",X);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,
+arguments)};mxCellRenderer.registerShape("process",W);mxCellRenderer.registerShape("process2",W);mxUtils.extend(ba,mxRectangleShape);ba.prototype.paintBackground=function(d,n,y,q,v){d.setFillColor(mxConstants.NONE);d.rect(n,y,q,v);d.fill()};ba.prototype.paintForeground=function(d,n,y,q,v){};mxCellRenderer.registerShape("transparent",ba);mxUtils.extend(ha,mxHexagon);ha.prototype.size=30;ha.prototype.position=.5;ha.prototype.position2=.5;ha.prototype.base=20;ha.prototype.getLabelMargins=function(){return new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(d,n,y,q,v){n=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;y=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var D=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),E=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
this.position2)))),fa=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(d,[new mxPoint(0,0),new mxPoint(q,0),new mxPoint(q,v-y),new mxPoint(Math.min(q,D+fa),v-y),new mxPoint(E,v),new mxPoint(Math.max(0,D),v-y),new mxPoint(0,v-y)],this.isRounded,n,!0,[4])};mxCellRenderer.registerShape("callout",ha);mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.fixedSize=20;ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(d,
n,y,q,v){n="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));y=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(d,[new mxPoint(0,0),new mxPoint(q-n,0),new mxPoint(q,v/2),new mxPoint(q-n,v),new mxPoint(0,v),new mxPoint(n,v/2)],this.isRounded,y,!0);d.end()};mxCellRenderer.registerShape("step",
@@ -2800,20 +2801,20 @@ mxCellRenderer.registerShape("plus",la);var db=mxRhombus.prototype.paintVertexSh
Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);n+=D;y+=D;q-=2*D;v-=2*D;0<q&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}d.setDashed(!1);D=0;do{var E=mxCellRenderer.defaultShapes[this.style["symbol"+D]];if(null!=E){var fa=this.style["symbol"+D+"Align"],L=this.style["symbol"+D+"VerticalAlign"],va=this.style["symbol"+D+"Width"],na=this.style["symbol"+D+"Height"],Va=this.style["symbol"+D+"Spacing"]||0,fb=this.style["symbol"+D+"VSpacing"]||
Va,bb=this.style["symbol"+D+"ArcSpacing"];null!=bb&&(bb*=this.getArcSize(q+this.strokewidth,v+this.strokewidth),Va+=bb,fb+=bb);bb=n;var Ga=y;bb=fa==mxConstants.ALIGN_CENTER?bb+(q-va)/2:fa==mxConstants.ALIGN_RIGHT?bb+(q-va-Va):bb+Va;Ga=L==mxConstants.ALIGN_MIDDLE?Ga+(v-na)/2:L==mxConstants.ALIGN_BOTTOM?Ga+(v-na-fb):Ga+fb;d.save();fa=new E;fa.style=this.style;E.prototype.paintVertexShape.call(fa,d,bb,Ga,va,na);d.restore()}D++}while(null!=E)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
mxCellRenderer.registerShape("ext",Z);mxUtils.extend(k,mxCylinder);k.prototype.redrawPath=function(d,n,y,q,v,D){D?(d.moveTo(0,0),d.lineTo(q/2,v/2),d.lineTo(q,0),d.end()):(d.moveTo(0,0),d.lineTo(q,0),d.lineTo(q,v),d.lineTo(0,v),d.close())};mxCellRenderer.registerShape("message",k);mxUtils.extend(A,mxShape);A.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.ellipse(q/4,0,q/2,v/4);d.fillAndStroke();d.begin();d.moveTo(q/2,v/4);d.lineTo(q/2,2*v/3);d.moveTo(q/2,v/3);d.lineTo(0,v/3);d.moveTo(q/
-2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};J.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-J);mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",U);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(T,mxShape);
-T.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};T.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};T.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",T);mxUtils.extend(W,mxRectangleShape);W.prototype.size=
-40;W.prototype.isHtmlAllowed=function(){return!1};W.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};W.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,
-y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=W&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};W.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,
-D))};mxCellRenderer.registerShape("umlLifeline",W);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,
+2,v/3);d.lineTo(q,v/3);d.moveTo(q/2,2*v/3);d.lineTo(0,v);d.moveTo(q/2,2*v/3);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlActor",A);mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(d){return new mxRectangle(d.width/6,0,0,0)};I.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(0,v/4);d.lineTo(0,3*v/4);d.end();d.stroke();d.begin();d.moveTo(0,v/2);d.lineTo(q/6,v/2);d.end();d.stroke();d.ellipse(q/6,0,5*q/6,v);d.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+I);mxUtils.extend(T,mxEllipse);T.prototype.paintVertexShape=function(d,n,y,q,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);d.begin();d.moveTo(n+q/8,y+v);d.lineTo(n+7*q/8,y+v);d.end();d.stroke()};mxCellRenderer.registerShape("umlEntity",T);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(q,0);d.lineTo(0,v);d.moveTo(0,0);d.lineTo(q,v);d.end();d.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(U,mxShape);
+U.prototype.getLabelBounds=function(d){return new mxRectangle(d.x,d.y+d.height/8,d.width,7*d.height/8)};U.prototype.paintBackground=function(d,n,y,q,v){d.translate(n,y);d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,0);d.end();d.stroke();d.ellipse(0,v/8,q,7*v/8);d.fillAndStroke()};U.prototype.paintForeground=function(d,n,y,q,v){d.begin();d.moveTo(3*q/8,v/8*1.1);d.lineTo(5*q/8,v/4);d.end();d.stroke()};mxCellRenderer.registerShape("umlControl",U);mxUtils.extend(X,mxRectangleShape);X.prototype.size=
+40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(d){var n=Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(d.x,d.y,d.width,n)};X.prototype.paintBackground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),E=mxUtils.getValue(this.style,"participant");null==E||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,d,n,
+y,q,D):(E=this.state.view.graph.cellRenderer.getShape(E),null!=E&&E!=X&&(E=new E,E.apply(this.state),d.save(),E.paintVertexShape(d,n,y,q,D),d.restore()));D<v&&(d.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),d.begin(),d.moveTo(n+q/2,y+D),d.lineTo(n+q/2,y+v),d.end(),d.stroke())};X.prototype.paintForeground=function(d,n,y,q,v){var D=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,d,n,y,q,Math.min(v,
+D))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(aa,mxShape);aa.prototype.width=60;aa.prototype.height=30;aa.prototype.corner=10;aa.prototype.configurePointerEvents=function(d){var n=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);null==this.style||null!=n&&n!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(d.pointerEvents=!1)};aa.prototype.getLabelMargins=function(d){return new mxRectangle(0,
0,d.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),d.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};aa.prototype.paintBackground=function(d,n,y,q,v){var D=this.corner,E=Math.min(q,Math.max(D,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),fa=Math.min(v,Math.max(1.5*D,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),L=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);L!=mxConstants.NONE&&
(d.setFillColor(L),d.rect(n,y,q,v),d.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(d,n,y,q,v),d.setGradient(this.fill,this.gradient,n,y,q,v,this.gradientDirection)):d.setFillColor(this.fill);d.pointerEvents=!0;d.begin();d.moveTo(n,y);d.lineTo(n+E,y);d.lineTo(n+E,y+Math.max(0,fa-1.5*D));d.lineTo(n+Math.max(0,E-D),y+fa);d.lineTo(n,y+fa);d.close();d.fillAndStroke();this.configurePointerEvents(d);d.begin();d.moveTo(n+E,y);
-d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=W.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&
+d.lineTo(n+q,y);d.lineTo(n+q,y+v);d.lineTo(n,y+v);d.lineTo(n,y+fa);d.stroke()};mxCellRenderer.registerShape("umlFrame",aa);mxPerimeter.CenterPerimeter=function(d,n,y,q){return new mxPoint(d.getCenterX(),d.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(d,n,y,q){q=X.prototype.size;null!=n&&(q=mxUtils.getValue(n.style,"size",q)*n.view.scale);n=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;y.x<d.getCenterX()&&
(n=-1*(n+1));return new mxPoint(d.getCenterX()+n,Math.min(d.y+d.height,Math.max(d.y+q,y.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(d,n,y,q){q=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(d,n,y,q){q=parseFloat(n.style[mxConstants.STYLE_STROKEWIDTH]||1)*n.view.scale/2-1;null!=n.style.backboneSize&&
(q+=parseFloat(n.style.backboneSize)*n.view.scale/2-1);if("south"==n.style[mxConstants.STYLE_DIRECTION]||"north"==n.style[mxConstants.STYLE_DIRECTION])return y.x<d.getCenterX()&&(q=-1*(q+1)),new mxPoint(d.getCenterX()+q,Math.min(d.y+d.height,Math.max(d.y,y.y)));y.y<d.getCenterY()&&(q=-1*(q+1));return new mxPoint(Math.min(d.x+d.width,Math.max(d.x,y.x)),d.getCenterY()+q)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(d,n,y,q){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(d,
new mxRectangle(0,0,0,Math.max(0,Math.min(d.height,parseFloat(mxUtils.getValue(n.style,"size",ha.prototype.size))*n.view.scale))),n.style),n,y,q)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?K.prototype.fixedSize:K.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,
mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_NORTH||n==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa)]):(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]);va=d.getCenterX();
-d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?I.prototype.fixedSize:I.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,
+d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?J.prototype.fixedSize:J.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height;n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,
mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E+v,fa),new mxPoint(E+L-v,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va),new mxPoint(E+v,fa)]):n==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa),new mxPoint(E+L-v,fa+va),new mxPoint(E+v,fa+va),new mxPoint(E,fa)]):n==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,
Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa+v),new mxPoint(E+L,fa),new mxPoint(E+L,fa+va),new mxPoint(E,fa+va-v),new mxPoint(E,fa+v)]):(v=v?Math.max(0,Math.min(va,D)):va*Math.max(0,Math.min(1,D)),fa=[new mxPoint(E,fa),new mxPoint(E+L,fa+v),new mxPoint(E+L,fa+va-v),new mxPoint(E,fa+va),new mxPoint(E,fa)]);va=d.getCenterX();d=d.getCenterY();d=new mxPoint(va,d);q&&(y.x<E||y.x>E+L?d.y=y.y:d.x=y.x);return mxUtils.getPerimeterPoint(fa,d,y)};mxStyleRegistry.putValue("trapezoidPerimeter",
mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(d,n,y,q){var v="0"!=mxUtils.getValue(n.style,"fixedSize","0"),D=v?ma.prototype.fixedSize:ma.prototype.size;null!=n&&(D=mxUtils.getValue(n.style,"size",D));v&&(D*=n.view.scale);var E=d.x,fa=d.y,L=d.width,va=d.height,na=d.getCenterX();d=d.getCenterY();n=null!=n?mxUtils.getValue(n.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;n==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(L,D)):L*Math.max(0,
@@ -2929,9 +2930,9 @@ va){q=Math.sqrt(mxUtils.ptSegDistSq(E.x,E.y,fa.x,fa.y,L.x,L.y));v=mxUtils.ptLine
(Math.abs(parseFloat(d.style[mxConstants.STYLE_ENDSIZE])-parseFloat(d.style[mxConstants.STYLE_STARTSIZE]))<n/6&&(d.style[mxConstants.STYLE_ENDSIZE]=d.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(d.style.endWidth)-parseFloat(d.style.startWidth))<n&&(d.style.endWidth=d.style.startWidth))})));return y},swimlane:function(d){var n=[];if(mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED)){var y=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));n.push(wb(d,
y/2))}n.push(jb(d,[mxConstants.STYLE_STARTSIZE],function(q){var v=parseFloat(mxUtils.getValue(d.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(d.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(q.getCenterX(),q.y+Math.max(0,Math.min(q.height,v))):new mxPoint(q.x+Math.max(0,Math.min(q.width,v)),q.getCenterY())},function(q,v){d.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
Math.min(q.height,v.y-q.y))):Math.round(Math.max(0,Math.min(q.width,v.x-q.x)))},!1,null,function(q){var v=d.view.graph;if(!mxEvent.isShiftDown(q.getEvent())&&!mxEvent.isControlDown(q.getEvent())&&(v.isTableRow(d.cell)||v.isTableCell(d.cell))){q=v.getSwimlaneDirection(d.style);var D=v.model.getParent(d.cell);D=v.model.getChildCells(D,!0);for(var E=[],fa=0;fa<D.length;fa++)D[fa]!=d.cell&&v.isSwimlane(D[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(D[fa]))==q&&E.push(D[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,
-d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,
+d.style[mxConstants.STYLE_STARTSIZE],E)}}));return n},label:yb(),ext:yb(),rectangle:yb(),triangle:yb(),rhombus:yb(),umlLifeline:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(n.getCenterX(),n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},umlFrame:function(d){return[jb(d,["width","height"],function(n){var y=Math.max(aa.prototype.corner,
Math.min(n.width,mxUtils.getValue(this.state.style,"width",aa.prototype.width))),q=Math.max(1.5*aa.prototype.corner,Math.min(n.height,mxUtils.getValue(this.state.style,"height",aa.prototype.height)));return new mxPoint(n.x+y,n.y+q)},function(n,y){this.state.style.width=Math.round(Math.max(aa.prototype.corner,Math.min(n.width,y.x-n.x)));this.state.style.height=Math.round(Math.max(1.5*aa.prototype.corner,Math.min(n.height,y.y-n.y)))},!1)]},process:function(d){var n=[jb(d,["size"],function(y){var q=
-"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,
+"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size));return q?new mxPoint(y.x+v,y.y+y.height/4):new mxPoint(y.x+y.width*v,y.y+y.height/4)},function(y,q){y="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*y.width,q.x-y.x)):Math.max(0,Math.min(.5,(q.x-y.x)/y.width));this.state.style.size=y},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},cross:function(d){return[jb(d,
["size"],function(n){var y=Math.min(n.width,n.height);y=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",Xa.prototype.size)))*y/2;return new mxPoint(n.getCenterX()-y,n.getCenterY()-y)},function(n,y){var q=Math.min(n.width,n.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,n.getCenterY()-y.y)/q*2,Math.max(0,n.getCenterX()-y.x)/q*2)))})]},note:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,
"size",G.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},note2:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(n.width,Math.min(n.height,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size)))));return new mxPoint(n.x+n.width-y,n.y+y)},function(n,y){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(n.width,
n.x+n.width-y.x),Math.min(n.height,y.y-n.y))))})]},manualInput:function(d){var n=[jb(d,["size"],function(y){var q=Math.max(0,Math.min(y.height,mxUtils.getValue(this.state.style,"size",Ma.prototype.size)));return new mxPoint(y.x+y.width/4,y.y+3*q/4)},function(y,q){this.state.style.size=Math.round(Math.max(0,Math.min(y.height,4*(q.y-y.y)/3)))},!1)];mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&n.push(wb(d));return n},dataStorage:function(d){return[jb(d,["size"],function(n){var y="0"!=mxUtils.getValue(this.state.style,
@@ -2948,7 +2949,7 @@ Math.round(Math.max(0,Math.min(n.height,y.y-n.y)))},!1)]},document:function(d){r
return new mxPoint(n.getCenterX(),n.y+y*n.height/2)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(y.y-n.y)/n.height*2))},!1)]},isoCube2:function(d){return[jb(d,["isoAngle"],function(n){var y=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",R.isoAngle))))*Math.PI/200;return new mxPoint(n.x,n.y+Math.min(n.width*Math.tan(y),.5*n.height))},function(n,y){this.state.style.isoAngle=Math.max(0,50*(y.y-n.y)/n.height)},!0)]},cylinder2:tb(c.prototype.size),cylinder3:tb(f.prototype.size),
offPageConnector:function(d){return[jb(d,["size"],function(n){var y=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(n.getCenterX(),n.y+(1-y)*n.height)},function(n,y){this.state.style.size=Math.max(0,Math.min(1,(n.y+n.height-y.y)/n.height))},!1)]},"mxgraph.basic.rect":function(d){var n=[Graph.createHandle(d,["size"],function(y){var q=Math.max(0,Math.min(y.width/2,y.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));
return new mxPoint(y.x+q,y.y+q)},function(y,q){this.state.style.size=Math.round(100*Math.max(0,Math.min(y.height/2,y.width/2,q.x-y.x)))/100})];d=Graph.createHandle(d,["indent"],function(y){var q=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(y.x+.75*y.width,y.y+q*y.height/200)},function(y,q){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(q.y-y.y)/y.height)))/100});n.push(d);return n},step:ub(ma.prototype.size,!0,null,
-!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ca.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,I.prototype.size,I.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
+!0,ma.prototype.fixedSize),hexagon:ub(Y.prototype.size,!0,.5,!0,Y.prototype.fixedSize),curlyBracket:ub(ea.prototype.size,!1),display:ub(ab.prototype.size,!1),cube:ob(1,m.prototype.size,!1),card:ob(.5,C.prototype.size,!0),loopLimit:ob(.5,Q.prototype.size,!0),trapezoid:Ab(.5,J.prototype.size,J.prototype.fixedSize),parallelogram:Ab(1,K.prototype.size,K.prototype.fixedSize)};Graph.createHandle=jb;Graph.handleFactory=ib;var Bb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=
function(){var d=Bb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var n=this.state.style.shape;null==mxCellRenderer.defaultShapes[n]&&null==mxStencilRegistry.getStencil(n)?n=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(n=mxConstants.SHAPE_SWIMLANE);n=ib[n];null==n&&null!=this.state.shape&&this.state.shape.isRoundable()&&(n=ib[mxConstants.SHAPE_RECTANGLE]);null!=n&&(n=n(this.state),null!=n&&(d=null==d?n:d.concat(n)))}return d};mxEdgeHandler.prototype.createCustomHandles=
function(){var d=this.state.style.shape;null==mxCellRenderer.defaultShapes[d]&&null==mxStencilRegistry.getStencil(d)&&(d=mxConstants.SHAPE_CONNECTOR);d=ib[d];return null!=d?d(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);sb=mxUtils.getRotatedPoint(sb,Math.cos(zb),Math.sin(zb));var rb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(rb),Math.sin(rb));mxEdgeStyle.IsometricConnector=function(d,
n,y,q,v){var D=d.view;q=null!=q&&0<q.length?q[0]:null;var E=d.absolutePoints,fa=E[0];E=E[E.length-1];null!=q&&(q=D.transformControlPoint(d,q));null==fa&&null!=n&&(fa=new mxPoint(n.getCenterX(),n.getCenterY()));null==E&&null!=y&&(E=new mxPoint(y.getCenterX(),y.getCenterY()));var L=sb.x,va=sb.y,na=xb.x,Va=xb.y,fb="horizontal"==mxUtils.getValue(d.style,"elbow","horizontal");if(null!=E&&null!=fa){d=function(Ga,Ka,Ja){Ga-=bb.x;var Ia=Ka-bb.y;Ka=(Va*Ga-na*Ia)/(L*Va-va*na);Ga=(va*Ga-L*Ia)/(va*na-L*Va);fb?
@@ -2988,7 +2989,7 @@ mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),n
[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,
.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
+.25),!1)];K.prototype.constraints=mxRectangleShape.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Za.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(y,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(1,
0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,.5*v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*n+.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+q),y));d.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(n-q),y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),.5*(y+v)));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n-q),v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*n-.25*q,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return d};Aa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.max(0,Math.min(n,parseFloat(mxUtils.getValue(this.style,
@@ -3000,7 +3001,7 @@ mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),n
0),!1,null,n-v,0));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n-v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*n,y-q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));return d};Xa.prototype.getConstraints=function(d,n,y){d=[];var q=Math.min(y,n),v=Math.max(0,Math.min(q,q*parseFloat(mxUtils.getValue(this.style,"size",this.size))));q=(y-v)/2;var D=q+v,E=(n-v)/2;v=E+v;d.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,E,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,0));d.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,y));d.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,y-.5*q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(n+v),q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,q));d.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,n,D));d.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};W.prototype.constraints=
+0),!1,null,.5*(n+v),D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,q));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,q));d.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*E,D));d.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,E,q));return d};X.prototype.constraints=
null;x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,
.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(G){p.escape();G=p.deleteCells(p.getDeletableCells(p.getSelectionCells()),G);null!=G&&p.setSelectionCells(G)}function e(){if(!p.isSelectionEmpty()){p.getModel().beginUpdate();try{for(var G=p.getSelectionCells(),O=0;O<G.length;O++)p.cellLabelChanged(G[O],"")}finally{p.getModel().endUpdate()}}}function g(G,O,R,c,f){f.getModel().beginUpdate();try{var l=f.getCellGeometry(G);null!=l&&R&&c&&(R/=c,l=l.clone(),1<R?l.height=l.width/R:l.width=l.height*R,f.getModel().setGeometry(G,
@@ -3061,9 +3062,9 @@ G[O];p.getModel().isEdge(R)&&(p.setCellStyles(mxConstants.STYLE_EXIT_X,null,[R])
null!=c&&(c=c.clone(),c.points=null,c.x=0,c.y=0,c.offset=null,p.getModel().setGeometry(R,c))}}}finally{p.getModel().endUpdate()}}},null,null,"Alt+Shift+R");H=this.addAction("subscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");H=this.addAction("superscript",mxUtils.bind(this,function(){p.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");H=this.addAction("decreaseFontSize",
mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.max(1,G-1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift + (Numpad)");H=this.addAction("increaseFontSize",mxUtils.bind(this,function(){if(!p.isSelectionEmpty()){var G=p.getCurrentCellStyle(p.getSelectionCell());G=mxUtils.getValue(G,mxConstants.STYLE_FONTSIZE,
mxConstants.DEFAULT_FONTSIZE);p.setCellStyles(mxConstants.STYLE_FONTSIZE,Math.min(100,G+1),p.getSelectionCells())}}),null,null,Editor.ctrlKey+"+Shift - (Numpad)");this.addAction("image...",function(){if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())){var G=mxResources.get("image")+" ("+mxResources.get("url")+"):",O=p.getView().getState(p.getSelectionCell()),R="",c=null;null!=O&&(R=O.style[mxConstants.STYLE_IMAGE]||R,c=O.style[mxConstants.STYLE_CLIP_PATH]||c);var f=p.cellEditor.saveSelection();
-m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var I=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ca=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ca.x;K[0].geometry.y=
-ca.y;null!=C&&g(K[0],C,F,N,p);I=K;p.fireEvent(new mxEventObject("cellsInserted","cells",I))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ea=K[l];if("0"!=p.getCurrentCellStyle(ea).expand){var X=
-p.getModel().getGeometry(ea);null!=X&&(X=X.clone(),X.width=t,X.height=z,p.getModel().setGeometry(ea,X))}null!=C&&g(ea,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=I&&(p.setSelectionCells(I),p.scrollCellToVisible(I[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],
+m.showImageDialog(G,R,function(l,t,z,C,F,N){if(p.cellEditor.isContentEditing())p.cellEditor.restoreSelection(f),p.insertImage(l,t,z);else{var K=p.getSelectionCells();if(null!=l&&(0<l.length||0<K.length)){var J=null;p.getModel().beginUpdate();try{if(0==K.length){K=[p.insertVertex(p.getDefaultParent(),null,"",0,0,t,z,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];var ea=p.getCenterInsertPoint(p.getBoundingBoxFromGeometry(K,!0));K[0].geometry.x=ea.x;K[0].geometry.y=
+ea.y;null!=C&&g(K[0],C,F,N,p);J=K;p.fireEvent(new mxEventObject("cellsInserted","cells",J))}p.setCellStyles(mxConstants.STYLE_IMAGE,0<l.length?l:null,K);var da=p.getCurrentCellStyle(K[0]);"image"!=da[mxConstants.STYLE_SHAPE]&&"label"!=da[mxConstants.STYLE_SHAPE]?p.setCellStyles(mxConstants.STYLE_SHAPE,"image",K):0==l.length&&p.setCellStyles(mxConstants.STYLE_SHAPE,null,K);null==C&&p.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,K);if(null!=t&&null!=z)for(l=0;l<K.length;l++){var ca=K[l];if("0"!=p.getCurrentCellStyle(ca).expand){var W=
+p.getModel().getGeometry(ca);null!=W&&(W=W.clone(),W.width=t,W.height=z,p.getModel().setGeometry(ca,W))}null!=C&&g(ca,C,F,N,p)}}finally{p.getModel().endUpdate()}null!=J&&(p.setSelectionCells(J),p.scrollCellToVisible(J[0]))}}},p.cellEditor.isContentEditing(),!p.cellEditor.isContentEditing(),!0,c)}}).isEnabled=B;this.addAction("crop...",function(){var G=p.getSelectionCell();if(p.isEnabled()&&!p.isCellLocked(p.getDefaultParent())&&null!=G){var O=p.getCurrentCellStyle(G),R=O[mxConstants.STYLE_IMAGE],
c=O[mxConstants.STYLE_SHAPE];R&&"image"==c&&(O=new CropImageDialog(m,R,O[mxConstants.STYLE_CLIP_PATH],function(f,l,t){g(G,f,l,t,p)}),m.showDialog(O.container,300,390,!0,!0))}}).isEnabled=B;H=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(m,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("layers"))})),this.layersWindow.window.addListener("hide",
function(){m.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),m.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));H=this.addAction("format",mxUtils.bind(this,function(){m.toggleFormatPanel()}),null,
null,Editor.ctrlKey+"+Shift+P");H.setToggleAction(!0);H.setSelectedCallback(mxUtils.bind(this,function(){return m.isFormatPanelVisible()}));H=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(m,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){m.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){m.fireEvent(new mxEventObject("outline"))}),
@@ -3233,214 +3234,214 @@ type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float
dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(k,A){return A.editorUi.editor.graph.isCellConnectable(0<k.vertices.length&&0==k.edges.length?k.vertices[0]:null)},isVisible:function(k,A){return 0<k.vertices.length&&0==k.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},
{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},
{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&A.isSwimlane(k)},isVisible:function(k,A){return 1==k.vertices.length&&
-0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&(A.isSwimlane(k)||0<A.model.getChildCount(k))},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,A){var J=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;
-return null!=J&&(A.isContainer(J)&&"0"!=k.style.collapsible||!A.isContainer(J)&&"1"==k.style.collapsible)},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length&&!A.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",
+0==k.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(k,A){k=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;return null!=k&&(A.isSwimlane(k)||0<A.model.getChildCount(k))},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(k,A){var I=1==k.vertices.length&&0==k.edges.length?k.vertices[0]:null;A=A.editorUi.editor.graph;
+return null!=I&&(A.isContainer(I)&&"0"!=k.style.collapsible||!A.isContainer(I)&&"1"==k.style.collapsible)},isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(k,A){return 1==k.vertices.length&&0==k.edges.length&&!A.editorUi.editor.graph.isSwimlane(k.vertices[0])&&null==mxUtils.getValue(k.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",
type:"bool",defVal:!1,isVisible:function(k,A){A=A.editorUi.editor.graph.model;return 0<k.vertices.length?A.isVertex(A.getParent(k.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(k,A){k=
0<k.vertices.length?A.editorUi.editor.graph.getCellGeometry(k.vertices[0]):null;return null!=k&&!k.relative}},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"autosizeGrid",dispName:"Autosize Grid",type:"enum",defVal:null,enumList:[{val:null,dispName:"Default"},{val:"1",dispName:"Enabled"},{val:"0",dispName:"Disabled"}],isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isAutoSizeCell(k.vertices[0])}},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",
defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",
-type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var J=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==J||J==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
+type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(k,A){var I=mxUtils.getValue(k.style,mxConstants.STYLE_FILLCOLOR,null);return!mxShape.forceFilledPointerEvents||A.editorUi.editor.graph.isSwimlane(k.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(k.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(k.style,mxConstants.STYLE_OPACITY,100)||null!=k.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",
type:"bool",defVal:!1,isVisible:function(k,A){return 0<k.vertices.length&&A.editorUi.editor.graph.isContainer(k.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## An optional data object can be specified to define the metadata for the connector.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto, width or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,[email protected],default,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,[email protected],default,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,[email protected],default,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(J){var U=J.sets||[];J=J.options||this.getDefaultOptions();for(var P=0;P<U.length;P++){var T=U[P];switch(T.type){case "path":null!=J.stroke&&this._drawToContext(k,T,J);break;case "fillPath":this._drawToContext(k,T,J);break;case "fillSketch":this.fillSketch(k,T,J)}}};A.fillSketch=function(J,U,P){var T=k.state.strokeColor,W=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;
-0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(J,U,P);k.setDashed(ja);k.setStrokeWidth(W);k.setStrokeColor(T);k.setStrokeAlpha(aa)};A._drawToContext=function(J,U,P){J.begin();for(var T=0;T<U.ops.length;T++){var W=U.ops[T],aa=W.data;switch(W.op){case "move":J.moveTo(aa[0],aa[1]);break;case "bcurveTo":J.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":J.lineTo(aa[0],aa[1])}}J.end();
-"fillPath"===U.type&&P.filled?J.fill():J.stroke()};return A};(function(){function k(T,W,aa){this.canvas=T;this.rc=W;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+Editor.createRoughCanvas=function(k){var A=rough.canvas({getContext:function(){return k}});A.draw=function(I){var T=I.sets||[];I=I.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var U=T[P];switch(U.type){case "path":null!=I.stroke&&this._drawToContext(k,U,I);break;case "fillPath":this._drawToContext(k,U,I);break;case "fillSketch":this.fillSketch(k,U,I)}}};A.fillSketch=function(I,T,P){var U=k.state.strokeColor,X=k.state.strokeWidth,aa=k.state.strokeAlpha,ja=k.state.dashed,pa=P.fillWeight;
+0>pa&&(pa=P.strokeWidth/2);k.setStrokeAlpha(k.state.fillAlpha);k.setStrokeColor(P.fill||"");k.setStrokeWidth(pa);k.setDashed(!1);this._drawToContext(I,T,P);k.setDashed(ja);k.setStrokeWidth(X);k.setStrokeColor(U);k.setStrokeAlpha(aa)};A._drawToContext=function(I,T,P){I.begin();for(var U=0;U<T.ops.length;U++){var X=T.ops[U],aa=X.data;switch(X.op){case "move":I.moveTo(aa[0],aa[1]);break;case "bcurveTo":I.curveTo(aa[0],aa[1],aa[2],aa[3],aa[4],aa[5]);break;case "lineTo":I.lineTo(aa[0],aa[1])}}I.end();
+"fillPath"===T.type&&P.filled?I.fill():I.stroke()};return A};(function(){function k(U,X,aa){this.canvas=U;this.rc=X;this.shape=aa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,k.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,k.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,k.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
this.canvas.roundrect=mxUtils.bind(this,k.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,k.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,k.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,k.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,k.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,k.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,k.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,k.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,k.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,k.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(T,W){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=T?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;T=null;(aa.filled=W)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,T=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);
-aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);W=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==W?-1:W;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-W);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",W);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",W);W=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==W?-1:W;W=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==W&&(W="auto");"auto"==W&&(W=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&W.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&W.push(mxUtils.hex2rgb(Editor.darkColor)),W=
-null!=aa.fill&&(null!=T||0<=mxUtils.indexOf(W,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=W;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var T=2;T<arguments.length;T+=2)this.lastX=arguments[T-1],this.lastY=arguments[T],
-this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(T,W){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,T,W),this.lastX=T,this.lastY=W)};k.prototype.moveTo=function(T,W){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,T,W),this.lastX=T,this.lastY=W,this.firstX=T,this.firstY=W)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,
-arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(T,W,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,T,W,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,T,W,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(T,W,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);
-else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,T,W,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(T,W,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(T,W,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(T,W,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,
-arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(T+aa/2,W+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(T,W,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(T+pa,W),this.lineTo(T+aa-pa,W),this.quadTo(T+aa,W,T+aa,W+sa),this.lineTo(T+aa,W+ja-sa),this.quadTo(T+aa,W+ja,T+aa-pa,W+ja),this.lineTo(T+pa,W+ja),this.quadTo(T,W+ja,T,W+ja-sa),this.lineTo(T,W+sa),this.quadTo(T,W,T+pa,W))};k.prototype.drawPath=function(T){if(0<
-this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),T)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var W in T)this.nextShape.options[W]=T[W];T.stroke!=mxConstants.NONE&&null!=T.stroke||delete this.nextShape.options.stroke;T.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
+k.prototype.fillAndStroke);this.path=[];this.passThrough=!1}k.prototype.moveOp="M";k.prototype.lineOp="L";k.prototype.quadOp="Q";k.prototype.curveOp="C";k.prototype.closeOp="Z";k.prototype.getStyle=function(U,X){var aa=1;if(null!=this.shape.state){var ja=this.shape.state.cell.id;if(null!=ja)for(var pa=0;pa<ja.length;pa++)aa=(aa<<5)-aa+ja.charCodeAt(pa)<<0}aa={strokeWidth:this.canvas.state.strokeWidth,seed:aa,preserveVertices:!0};ja=this.rc.getDefaultOptions();aa.stroke=U?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;U=null;(aa.filled=X)?(aa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,U=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):aa.fill="";aa.bowing=mxUtils.getValue(this.shape.style,"bowing",ja.bowing);aa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ja.hachureAngle);aa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ja.curveFitting);
+aa.roughness=mxUtils.getValue(this.shape.style,"jiggle",ja.roughness);aa.simplification=mxUtils.getValue(this.shape.style,"simplification",ja.simplification);aa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ja.disableMultiStroke);aa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ja.disableMultiStrokeFill);X=mxUtils.getValue(this.shape.style,"hachureGap",-1);aa.hachureGap="auto"==X?-1:X;aa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+X);aa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",X);aa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",X);X=mxUtils.getValue(this.shape.style,"fillWeight",-1);aa.fillWeight="auto"==X?-1:X;X=mxUtils.getValue(this.shape.style,"fillStyle","auto");"dots"==X&&(X="auto");"auto"==X&&(X=[mxUtils.hex2rgb("#ffffff")],null!=this.shape.state&&X.push(mxUtils.hex2rgb(this.shape.state.view.graph.shapeBackgroundColor)),Editor.isDarkMode()&&X.push(mxUtils.hex2rgb(Editor.darkColor)),X=
+null!=aa.fill&&(null!=U||0<=mxUtils.indexOf(X,mxUtils.hex2rgb(aa.fill)))?"solid":ja.fillStyle);aa.fillStyle=X;return aa};k.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};k.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};k.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var U=2;U<arguments.length;U+=2)this.lastX=arguments[U-1],this.lastY=arguments[U],
+this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};k.prototype.lineTo=function(U,X){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,U,X),this.lastX=U,this.lastY=X)};k.prototype.moveTo=function(U,X){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,U,X),this.lastX=U,this.lastY=X,this.firstX=U,this.firstY=X)};k.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,
+arguments):this.addOp(this.closeOp)};k.prototype.quadTo=function(U,X,aa,ja){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,U,X,aa,ja),this.lastX=aa,this.lastY=ja)};k.prototype.curveTo=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,U,X,aa,ja,pa,sa),this.lastX=pa,this.lastY=sa)};k.prototype.arcTo=function(U,X,aa,ja,pa,sa,qa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);
+else{var wa=mxUtils.arcToCurves(this.lastX,this.lastY,U,X,aa,ja,pa,sa,qa);if(null!=wa)for(var Ba=0;Ba<wa.length;Ba+=6)this.curveTo(wa[Ba],wa[Ba+1],wa[Ba+2],wa[Ba+3],wa[Ba+4],wa[Ba+5]);this.lastX=sa;this.lastY=qa}};k.prototype.rect=function(U,X,aa,ja){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(U,X,aa,ja,this.getStyle(!0,!0)))};k.prototype.ellipse=function(U,X,aa,ja){this.passThrough?this.originalEllipse.apply(this.canvas,
+arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(U+aa/2,X+ja/2,aa,ja,this.getStyle(!0,!0)))};k.prototype.roundrect=function(U,X,aa,ja,pa,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(U+pa,X),this.lineTo(U+aa-pa,X),this.quadTo(U+aa,X,U+aa,X+sa),this.lineTo(U+aa,X+ja-sa),this.quadTo(U+aa,X+ja,U+aa-pa,X+ja),this.lineTo(U+pa,X+ja),this.quadTo(U,X+ja,U,X+ja-sa),this.lineTo(U,X+sa),this.quadTo(U,X,U+pa,X))};k.prototype.drawPath=function(U){if(0<
+this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),U)}catch(aa){}this.passThrough=!1}else if(null!=this.nextShape){for(var X in U)this.nextShape.options[X]=U[X];U.stroke!=mxConstants.NONE&&null!=U.stroke||delete this.nextShape.options.stroke;U.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};k.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,
!1))};k.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};k.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};k.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;
-this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(T){return new k(T,Editor.createRoughCanvas(T),this)};var A=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(T){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(T):this.createRoughCanvas(T)};var J=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(T,W,aa,ja,pa){null!=T.handJiggle&&T.handJiggle.passThrough||J.apply(this,arguments)};var U=mxShape.prototype.paint;mxShape.prototype.paint=
-function(T){var W=T.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=T.handJiggle&&T.handJiggle.constructor==k&&!this.outline){T.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=T.setStrokeColor;T.setStrokeColor=function(){};var wa=T.setFillColor;T.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});T.handJiggle.passThrough=!0;U.apply(this,
-arguments);T.handJiggle.passThrough=!1;T.setFillColor=wa;T.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;T.restore();aa&&null!=ja&&(T.addTolerance=function(){})}U.apply(this,arguments);T.addTolerance=W};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(T,W,aa,ja,pa,sa){null!=T.handJiggle&&T.handJiggle.constructor==k?(T.handJiggle.passThrough=!0,P.apply(this,arguments),T.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=
-function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,J){if(null!=k&&"undefined"!==typeof pako){var U=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=U&&0<U.length)for(var T=0;T<U.length;T++)if("mxgraph"==U[T].getAttribute("class")){P.push(U[T]);
-break}0<P.length&&(U=P[0].getAttribute("data-mxgraph"),null!=U?(P=JSON.parse(U),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(U=mxUtils.getTextContent(P[0]),U=Graph.decompress(U,null,J),0<U.length&&(k=mxUtils.parseXml(U),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(U=k.getAttribute("content"),null!=U&&"<"!=U.charAt(0)&&"%"!=U.charAt(0)&&(U=unescape(window.atob?atob(U):Base64.decode(cont,U))),null!=U&&"%"==U.charAt(0)&&
-(U=decodeURIComponent(U)),null!=U&&0<U.length)k=mxUtils.parseXml(U).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(U=k.getElementsByTagName("diagram"),0<U.length&&(P=U[Math.max(0,Math.min(U.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,J)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,J){Editor.validateDiagramNode(k);
-var U=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<U.length?(A=Graph.decompress(U,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],J&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),J=null;0<A.length?J=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),
-null!=k&&0<k.length&&(J=mxUtils.getXml(k[0])));return J};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,J=new mxGraphModel;k.appendChild(A.encode(J))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var J=k.indexOf("EmbeddedFile");if(-1<J){var U=k.indexOf("stream",
-J)+9;if(0<k.substring(J,U).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",U-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"})}}for(J=k.indexOf("/ObjStm");0<J;){U=k.indexOf("stream",J)+9;P=k.indexOf("endstream",U-1);U=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(U,P)),{to:"string"});P=U.indexOf("/Subject <");if(0<P){J=U.substring(P+14,U.indexOf(">",P));if(null!=J){A=J;J=[];for(U=0;U<A.length;U+=2)P=A.substr(U,2),"00"!=P&&J.push(String.fromCharCode(parseInt(P,
-16)));A=J.join("")}break}J=k.indexOf("/ObjStm",J+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){J="";P=U=0;for(var T=[],W=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(J+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(U)?U++:U=0;if(19==U){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==J?W=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(W=[],T[J.split(" ")[0]]=W):null!=W&&W.push(J),J="")}}null==A&&null!=
-T&&(A=Editor.extractGraphModelFromXref(T));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,J=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),J=k.substring(1,k.length-1))))));return J};Editor.extractParserError=function(k,A){var J=null;k=
-null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(J=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(J=mxUtils.getTextContent(A[0])));return null!=J?mxUtils.trim(J):J};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,J){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,J)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=
+this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(U){return new k(U,Editor.createRoughCanvas(U),this)};var A=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(U){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?A.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(U):this.createRoughCanvas(U)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(U,X,aa,ja,pa){null!=U.handJiggle&&U.handJiggle.passThrough||I.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=
+function(U){var X=U.addTolerance,aa=!0;null!=this.style&&(aa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=U.handJiggle&&U.handJiggle.constructor==k&&!this.outline){U.save();var ja=this.fill,pa=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,qa=U.setStrokeColor;U.setStrokeColor=function(){};var wa=U.setFillColor;U.setFillColor=function(){};aa||null==ja||(this.configurePointerEvents=function(){});U.handJiggle.passThrough=!0;T.apply(this,
+arguments);U.handJiggle.passThrough=!1;U.setFillColor=wa;U.setStrokeColor=qa;this.configurePointerEvents=sa;this.stroke=pa;this.fill=ja;U.restore();aa&&null!=ja&&(U.addTolerance=function(){})}T.apply(this,arguments);U.addTolerance=X};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(U,X,aa,ja,pa,sa){null!=U.handJiggle&&U.handJiggle.constructor==k?(U.handJiggle.passThrough=!0,P.apply(this,arguments),U.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=
+function(k){return null==k||0==k.length||"undefined"===typeof pako?k:Graph.arrayBufferToString(pako.deflateRaw(k))};Editor.fastDecompress=function(k){return null==k||0==k.length||"undefined"===typeof pako?k:pako.inflateRaw(Graph.stringToArrayBuffer(atob(k)),{to:"string"})};Editor.extractGraphModel=function(k,A,I){if(null!=k&&"undefined"!==typeof pako){var T=k.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var U=0;U<T.length;U++)if("mxgraph"==T[U].getAttribute("class")){P.push(T[U]);
+break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(k=mxUtils.parseXml(P.xml),k=k.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,I),0<T.length&&(k=mxUtils.parseXml(T),k=k.documentElement))))}if(null!=k&&"svg"==k.nodeName)if(T=k.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&
+(T=decodeURIComponent(T)),null!=T&&0<T.length)k=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==k||A||(P=null,"diagram"==k.nodeName?P=k:"mxfile"==k.nodeName&&(T=k.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(k=Editor.parseDiagramNode(P,I)));null==k||"mxGraphModel"==k.nodeName||A&&"mxfile"==k.nodeName||(k=null);return k};Editor.parseDiagramNode=function(k,A,I){Editor.validateDiagramNode(k);
+var T=mxUtils.trim(mxUtils.getTextContent(k)),P=null;0<T.length?(A=Graph.decompress(T,null,A),null!=A&&0<A.length&&(P=mxUtils.parseXml(A).documentElement)):(k=mxUtils.getChildNodes(k),0<k.length&&(P=k[0],I&&(P=Editor.parseDiagramNode(P,A,!1)),A=mxUtils.createXmlDocument(),A.appendChild(A.importNode(P,!0)),P=A.documentElement));return P};Editor.getDiagramNodeXml=function(k){Editor.validateDiagramNode(k);var A=mxUtils.getNodeValue(k),I=null;0<A.length?I=Graph.decompress(A):(k=k.getElementsByTagName("mxGraphModel"),
+null!=k&&0<k.length&&(I=mxUtils.getXml(k[0])));return I};Editor.validateDiagramNode=function(k){if(0==mxUtils.trim(mxUtils.getTextContent(k)).length&&0==mxUtils.getChildNodes(k).length){var A=new mxCodec,I=new mxGraphModel;k.appendChild(A.encode(I))}return k};Editor.extractGraphModelFromPdf=function(k){var A=null;k=k.substring(k.indexOf(",")+1);k=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);if("%PDF-1.7"==k.substring(0,8)){var I=k.indexOf("EmbeddedFile");if(-1<I){var T=k.indexOf("stream",
+I)+9;if(0<k.substring(I,T).indexOf("application#2Fvnd.jgraph.mxfile")){var P=k.indexOf("endstream",T-1);return pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"})}}for(I=k.indexOf("/ObjStm");0<I;){T=k.indexOf("stream",I)+9;P=k.indexOf("endstream",T-1);T=pako.inflateRaw(Graph.stringToArrayBuffer(k.substring(T,P)),{to:"string"});P=T.indexOf("/Subject <");if(0<P){I=T.substring(P+14,T.indexOf(">",P));if(null!=I){A=I;I=[];for(T=0;T<A.length;T+=2)P=A.substr(T,2),"00"!=P&&I.push(String.fromCharCode(parseInt(P,
+16)));A=I.join("")}break}I=k.indexOf("/ObjStm",I+1)}}if(null==A&&"%PDF-1.4"==k.substring(0,8)){I="";P=T=0;for(var U=[],X=null;P<k.length;){var aa=k.charCodeAt(P);P+=1;10!=aa&&(I+=String.fromCharCode(aa));aa=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ja=k.indexOf("%3C%2Fmxfile%3E",P)+15;P-=9;if(ja>P){A=k.substring(P,ja);break}}10==aa&&("endobj"==I?X=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(X=[],U[I.split(" ")[0]]=X):null!=X&&X.push(I),I="")}}null==A&&null!=
+U&&(A=Editor.extractGraphModelFromXref(U));null!=A&&(A=decodeURIComponent(A.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return A};Editor.extractGraphModelFromXref=function(k){var A=k.trailer,I=null;null!=A&&(A=/.* \/Info (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(A=k[A[1]],null!=A&&(A=/.* \/Subject (\d+) (\d+) R/g.exec(A.join("\n")),null!=A&&0<A.length&&(k=k[A[1]],null!=k&&(k=k.join("\n"),I=k.substring(1,k.length-1))))));return I};Editor.extractParserError=function(k,A){var I=null;k=
+null!=k?k.getElementsByTagName("parsererror"):null;null!=k&&0<k.length&&(I=A||mxResources.get("invalidChars"),A=k[0].getElementsByTagName("div"),0<A.length&&(I=mxUtils.getTextContent(A[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(k,A){null!=k&&(k=null!=k.error?k.error:k,null==k.retry&&(k.retry=A))};Editor.mermaidToDrawio=function(k,A,I){if("function"===typeof mxMermaidToDrawio)return mxMermaidToDrawio(k,A,I)};Editor.configure=function(k){if(null!=k){Editor.config=k;Editor.configVersion=
k.version;k.debug&&(urlParams.test="1");null!=k.defaultFonts&&(Menus.prototype.defaultFonts=k.defaultFonts);null!=k.presetColors&&(ColorDialog.prototype.presetColors=k.presetColors);null!=k.defaultColors&&(ColorDialog.prototype.defaultColors=k.defaultColors);null!=k.colorNames&&(ColorDialog.prototype.colorNames=k.colorNames);null!=k.defaultColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.defaultColorSchemes);null!=k.defaultEdgeLength&&(Graph.prototype.defaultEdgeLength=k.defaultEdgeLength);
null!=k.selectParentLayer&&(Graph.selectParentLayer=k.selectParentLayer);null!=k.autosaveDelay&&(DrawioFile.prototype.autosaveDelay=k.autosaveDelay);null!=k.templateFile&&(EditorUi.templateFile=k.templateFile);null!=k.styles&&(Array.isArray(k.styles)?Editor.styles=k.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=k.globalVars&&(Editor.globalVars=k.globalVars);null!=k.compressXml&&(Editor.defaultCompressed=k.compressXml,Editor.compressXml=k.compressXml);null!=k.includeDiagram&&
-(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?
-"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));
-null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(k.css));var J=document.getElementsByTagName("script")[0];J.parentNode.insertBefore(A,J)}null!=
-k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);
-null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);
-null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(A=parseFloat(k.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(A=parseInt(k.defaultGridSize),!isNaN(A)&&0<A?mxGraph.prototype.gridSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(A=parseInt(k.gridSteps),!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
-null!=k.pageFormat&&(A=parseInt(k.pageFormat.width),J=parseInt(k.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(J)&&0<J?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,J),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
-k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&(A=parseInt(k.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
-null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(A=parseInt(k.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&
-(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);
-null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==
-typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var J=document.createElement("style");J.setAttribute("type","text/css");J.appendChild(document.createTextNode(k));A.parentNode.insertBefore(J,A);k=k.split("url(");for(J=1;J<k.length;J++){var U=k[J].indexOf(")");U=Editor.trimCssUrl(k[J].substring(0,U));var P=document.createElement("link");
-P.setAttribute("rel","preload");P.setAttribute("href",U);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=
-20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],J=0;J<k;J++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},
-{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;
-Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(J=null!=this.graph.themes?
-this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=J&&(U=new mxCodec(J.ownerDocument),U.decode(J,this.graph.getStylesheet())));else{var J=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=J){var U=new mxCodec(J.ownerDocument);U.decode(J,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));
-A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),J=0;J<A.length;J++)this.graph.addExtFont(A[J].name,
-A[J].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var J=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&J.setAttribute("style",
-this.graph.currentStyle);var U=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=U&&J.setAttribute("backgroundImage",JSON.stringify(U));J.setAttribute("math",this.graph.mathEnabled?"1":"0");J.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?J.setAttribute("adaptiveColors",this.graph.adaptiveColors):J.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(U=this.graph.extFonts.map(function(P){return P.name+
-"^"+P.url}),J.setAttribute("extFonts",U.join("|")));return J};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),null!=A&&0<A.length)){var J=mxUtils.parseXml(A).documentElement;return"mxfile"==J.nodeName||"mxGraphModel"==J.nodeName}}catch(U){}return!1};Editor.prototype.extractGraphModel=
-function(k,A,J){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var J=function(){U=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var U=null;Editor.doMathJaxRender=
-function(W){try{null==U?(MathJax.typesetClear([W]),MathJax.typeset([W]),J()):U!=W&&Editor.mathJaxQueue.push(W)}catch(aa){MathJax.typesetClear([W]),null!=aa.retry?(U=W,aa.retry.then(function(){MathJax.typesetPromise([W]).then(J)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());J()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+ja.toString());J()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=
-A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var W=0;W<Editor.mathJaxQueue.length;W++)Editor.doMathJaxRender(Editor.mathJaxQueue[W])}}};Editor.MathJaxRender=function(W){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(W):Editor.mathJaxQueue.push(W)};Editor.onMathJaxDone=function(){};
-var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var W=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,W);this.graph.addListener(mxEvent.REFRESH,W)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",k);A[0].parentNode.appendChild(T)}}};
-Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",J=[""],U=0,P=!0,T;k=$jscomp.makeIterator(k);for(T=k.next();!T.done;T=k.next())T=T.value,'"'===T?(P&&T===A&&(J[U]+=T),P=!P):","===T&&P?T=J[++U]="":J[U]+=T,A=T;return J}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var J=
-"t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+J+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||
-"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,J=this;k.convert=function(U){null!=U&&navigator.onLine&&("http://"!=U.substring(0,7)&&"https://"!=U.substring(0,8)||U.substring(0,k.baseUrl.length)==k.baseUrl||J.crossOriginImages&&J.isCorsEnabledForUrl(U)?"chrome-extension://"!=U.substring(0,19)&&(U=A.apply(this,arguments)):U=PROXY_URL+
-"?url="+encodeURIComponent(U));return U};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,J,U,P){try{var T=!0,W=window.setTimeout(mxUtils.bind(this,function(){T=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=U?this.convertImageToDataUri(k,A,J,U,!0):A(k)});if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(W);T&&(200>pa.getStatus()||
-299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(W);T&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(W);if(T)try{U=null!=U&&P?U:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(U,U);pa.height=ja.height*U;pa.width=ja.width*U;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(W);T&&(null!=
-J?J():A(k))};ja.src=k}}catch(pa){null!=J?J():A(k)}};Editor.prototype.convertImages=function(k,A,J,U){function P(){0<T.length?T.shift()():A(k)}null==U&&(U=this.createImageUrlConverter());var T=[],W=J||{};J=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){T.push(mxUtils.bind(this,function(){try{if(null!=sa){var qa=U.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=W[qa];null==wa?this.convertImageToDataUri(qa,
-function(Ba){null!=Ba&&(W[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});J("image","xlink:href");J("img","src");P()};Editor.base64Encode=function(k){for(var A="",J=0,U=k.length,P,T,W;J<U;){P=k.charCodeAt(J++)&255;if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4);A+="==";break}T=k.charCodeAt(J++);if(J==U){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);A+="=";break}W=k.charCodeAt(J++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4|(T&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(W&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(W&63)}return A};Editor.prototype.loadUrl=function(k,A,J,U,P,T,W,aa){try{var ja=!W&&(U||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&
-299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}T=null!=T?T:"data:image/png;base64,";qa=T+Editor.base64Encode(qa)}A(qa)}}else null!=J&&(0==sa.getStatus()?J({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?
-J({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):J({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=J&&J({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=J&&J({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=J&&J(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var J=k.getText(),U=JSON.parse(J);null!=U&&null!=U.error&&null!=U.error.message&&(A=U.error.message+
-" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var J=k.split("url(");if(0<J.length){A=[J[0]];k=window.location.pathname;var U=null!=k?k.lastIndexOf("/"):-1;0<=U&&(k=k.substring(0,U+1));U=document.getElementsByTagName("base");var P=null;null!=U&&0<U.length&&(P=U[0].getAttribute("href"));for(var T=1;T<J.length;T++)if(U=J[T].indexOf(")"),0<U){var W=Editor.trimCssUrl(J[T].substring(0,U));this.graph.isRelativeUrl(W)&&(W=null!=P?P+W:window.location.protocol+
-"//"+window.location.hostname+("/"==W.charAt(0)?"":k)+W);A.push('url("'+W+'"'+J[T].substring(U))}else A.push(J[T])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,J){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));J(k,A)};Editor.prototype.embedCssFonts=function(k,A){var J=k.split("url("),U=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==U){for(var ja=[J[0]],pa=1;pa<J.length;pa++){var sa=
-J[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(J[pa].substring(0,sa))]);ja.push('"'+J[pa].substring(sa))}A(ja.join(""))}});if(0<J.length){for(k=1;k<J.length;k++){var T=J[k].indexOf(")"),W=null,aa=J[k].indexOf("format(",T);0<aa&&(W=Editor.trimCssUrl(J[k].substring(aa+7,J[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;U++;var pa="application/x-font-ttf";if("svg"==W||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";
-else if("otf"==W||"embedded-opentype"==W||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==W||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==W||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==W||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==W||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=
-wa;U--;P()}),mxUtils.bind(this,function(wa){U--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(J[k].substring(0,T)),W)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);
-return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var J=[],U=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==U&&this.embedCssFonts(J.join(""),k)}),T=0;T<A.length;T++)mxUtils.bind(this,function(W,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(U++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;J.push(ja+
-"\n");U--;P()}),mxUtils.bind(this,function(ja){U--;J.push("@import url("+aa+");\n");P()}))):J.push(this.cachedGoogleFonts[aa]+"\n"):J.push('@font-face {font-family: "'+W+'";src: url("'+aa+'")}\n')})(A[T].name,A[T].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),J=0;J<A.length;J++){var U=mxUtils.getTextContent(A[J]);0>U.indexOf("mxPageSelector")&&0<U.indexOf("MathJax")&&k[0].appendChild(A[J].cloneNode(!0))}};
-Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var J=mxUtils.getSvgDefs(k),U=A.split("\n");A=[];for(var P=[],T=0;T<U.length;T++)"@import"==U[T].substring(0,7)?A.push(U[T]):P.push(U[T]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,A.join("\n")),J.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,
-P.join("\n")),J.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,J){var U=mxClient.IS_FF?8192:16384;return Math.min(J,Math.min(U/k,U/A))};Editor.prototype.exportToCanvas=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{T=null!=T?T:!0;W=null!=W?W:!0;qa=null!=qa?qa:this.graph;wa=null!=wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=U);null==
-Ca&&0==ja&&(Ca="dark"==Ea?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,W,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&
-(aa=T?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),
-ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);
-var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),J,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=
-p;Editor.updateCRC=function(k,A,J,U){for(var P=0;P<U;P++)k=Editor.crcTable[(k^A.charCodeAt(J+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,J=0;J<k.length;J++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(J))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,J,U,P){function T(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function W(sa){sa=T(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>
-24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(T(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(k,4),"IHDR"!=T(k,4))null!=P&&P();else{T(k,17);P=k.substring(0,ja);do{var pa=W(k);if("IDAT"==T(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==J?(J=Math.round(U/.0254),J=aa(J)+aa(J)+String.fromCharCode(1)):J=J+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+U;U=4294967295;U=
-Editor.updateCRC(U,A,0,4);U=Editor.updateCRC(U,J,0,J.length);P+=aa(J.length)+A+J+aa(U^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);T(k,pa);T(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
-mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var J=null;null!=k.editor.graph.getModel().getParent(A)?J=A.getId():null!=k.currentPage&&(J=k.currentPage.getId());return J});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,
-arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=
-function(k){k=R.apply(this,arguments);var A=this.editorUi,J=A.editor.graph;if(J.isEnabled()){var U=A.getCurrentFile();null!=U&&U.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(W){A.editor.setAutosave(W);A.editor.autosave&&U.isModified()&&U.fileChanged()},{install:function(W){this.listener=function(){W(A.editor.autosave)};A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&
-J.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return J.mathEnabled},function(W){A.actions.get("mathematicalTypesetting").funct()},{install:function(W){this.listener=function(){W(J.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var T=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");
-T.style.position="absolute";T.style.left="85%";P.appendChild(T)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",
-dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",
-type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",
-dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,
-isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];
-mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",
-dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",
-dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",
-min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",
-type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
-type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",
-type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(k,A,J,U){if(null!=A){var P=mxUtils.bind(this,function(W){if(null!=W)if(J)for(var aa=0;aa<W.length;aa++){if("function"!==typeof W[aa].isVisible||W[aa].isVisible(U,this))A[W[aa].name]=W[aa]}else for(var ja in A){var pa=!1;for(aa=
-0;aa<W.length;aa++)if(W[aa].name==ja&&W[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),T=this.editorUi.editor.graph.view.getState(k);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),P(T.shape.customProperties));k=k.getAttribute("customProperties");
-if(null!=k)try{P(JSON.parse(k))}catch(W){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},J=k.vertices,U=k.edges,P=0;P<J.length;P++)this.findCommonProperties(J[P],A,
-0==P,k);for(P=0;P<U.length;P++)this.findCommonProperties(U[P],A,0==J.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,
-arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,J,U){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,
-M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());
-V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function T(Da,x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function W(Da,x,
-M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background="linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle=
-"solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft="1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",
-mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];
-for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";
-oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(W(Da,
-x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;T(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,
-null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,
-M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,
-"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");T(xa,
-Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height=
-"16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat=
-"no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage="url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage=
-"url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==J.vertices.length&&0==J.edges.length?Ea=J.vertices[0].id:0==J.vertices.length&&1==
-J.edges.length&&(Ea=J.edges[0].id);null==Ea||U||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(U=A[Ha],"function"!=typeof U.isVisible||U.isVisible(J,this)){var Aa=null!=U.getValue?U.getValue():null!=J.style[Ha]?mxUtils.htmlEntities(J.style[Ha]+""):null!=U.getDefaultValue?U.getDefaultValue(J,this):U.defVal;if("separator"==U.type)Ma=!Ma;else{if("staticArr"==U.type)U.size=parseInt(J.style[U.sizeProperty]||A[U.sizeProperty].defVal)||0;else if(null!=
-U.dependentProps){var Ra=U.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=J.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}U.dependentPropsDefVal=La;U.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,U,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(U=Ba[Ea],A=U.parentRow,J=0;J<U.values.length;J++)Ha=sa(U.name,U.values[J],{type:U.type,parentRow:U.parentRow,isDeletable:U.isDeletable,index:J,defVal:U.defVal,countProperty:U.countProperty,size:U.size},0==J%2,
-U.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",function(){Ba.style.opacity="0.5"})},J=this.editorUi,U=J.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft=
-"16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var W=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background=
-"transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);W.push(ja);T.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=W[Ba]&&(null!=this.format.currentScheme&&null!=W[this.format.currentScheme]&&(W[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),W[this.format.currentScheme].style.background="#84d7ff")}),
-sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(U.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";U.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=
-mxUtils.button("",mxUtils.bind(this,function(Aa){U.getModel().beginUpdate();try{for(var Ra=J.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=U.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,
-ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!U.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,
-mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),U.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));U.getModel().setStyle(Ra[Za],La)}}finally{U.getModel().endUpdate()}}));Ca.className="geStyleButton";Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage=
-"linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+
-Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,
-"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor=
-"transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(W.length-1,Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+
-aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));
-var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";1<this.defaultColorSchemes.length&&
-(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(T)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};
+(Editor.defaultIncludeDiagram=k.includeDiagram);null!=k.simpleLabels&&(Editor.simpleLabels=k.simpleLabels);null!=k.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=k.oneDriveInlinePicker);null!=k.defaultAdaptiveColors?Graph.defaultAdaptiveColors=k.defaultAdaptiveColors:0==k.enableCssDarkMode&&(Graph.defaultAdaptiveColors="simple");null!=k.enableLightDarkColors&&(mxUtils.lightDarkColorSupported=k.enableLightDarkColors);null!=k.darkColor&&(Editor.darkColor=k.darkColor);null!=k.darkColorVar&&(Editor.darkColorVar=
+k.darkColorVar);Graph.prototype.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":"light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.defaultPageBorderColor="light-dark(#ffffff, "+Editor.darkColor+")";Graph.prototype.shapeBackgroundColor="light-dark(#ffffff, var("+Editor.darkColorVar+", "+Editor.darkColor+"))";null!=k.settingsName&&(Editor.configurationKey="."+k.settingsName+"-configuration",Editor.settingsKey="."+k.settingsName+"-config",mxSettings.key=Editor.settingsKey);
+null!=k.customFonts&&(Menus.prototype.defaultFonts=k.customFonts.concat(Menus.prototype.defaultFonts));null!=k.customPresetColors&&(ColorDialog.prototype.presetColors=k.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=k.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=k.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=k.css){var A=document.createElement("style");A.setAttribute("type","text/css");A.appendChild(document.createTextNode(k.css));
+var I=document.getElementsByTagName("script")[0];I.parentNode.insertBefore(A,I)}null!=k.expandLibraries&&(Sidebar.prototype.expandLibraries=k.expandLibraries);null!=k.appendCustomLibraries&&(Sidebar.prototype.appendCustomLibraries=k.appendCustomLibraries);null!=k.libraries&&(Sidebar.prototype.customEntries=k.libraries);null!=k.enabledLibraries&&(Array.isArray(k.enabledLibraries)?Sidebar.prototype.enabledLibraries=k.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));
+null!=k.defaultLibraries&&(Sidebar.prototype.defaultEntries=k.defaultLibraries);null!=k.defaultCustomLibraries&&(Editor.defaultCustomLibraries=k.defaultCustomLibraries);null!=k.enableCustomLibraries&&(Editor.enableCustomLibraries=k.enableCustomLibraries);null!=k.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=k.defaultVertexStyle);null!=k.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=k.defaultEdgeStyle);null!=k.defaultPageVisible&&(Graph.prototype.defaultPageVisible=k.defaultPageVisible);
+null!=k.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=k.defaultGridEnabled);null!=k.zoomWheel&&(Graph.zoomWheel=k.zoomWheel);null!=k.zoomFactor&&(A=parseFloat(k.zoomFactor),!isNaN(A)&&1<A?Graph.prototype.zoomFactor=A:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=k.defaultGridSize&&(A=parseInt(k.defaultGridSize),!isNaN(A)&&0<A?mxGraph.prototype.gridSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for defaultGridSize"));null!=k.gridSteps&&(A=parseInt(k.gridSteps),
+!isNaN(A)&&0<A?mxGraphView.prototype.gridSteps=A:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=k.pageFormat&&(A=parseInt(k.pageFormat.width),I=parseInt(k.pageFormat.height),!isNaN(A)&&0<A&&!isNaN(I)&&0<I?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,A,I),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));null!=k.thumbWidth&&(Sidebar.prototype.thumbWidth=
+k.thumbWidth);null!=k.thumbHeight&&(Sidebar.prototype.thumbHeight=k.thumbHeight);null!=k.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=k.emptyLibraryXml);null!=k.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=k.emptyDiagramXml);null!=k.sidebarWidth&&(EditorUi.prototype.hsplitPosition=k.sidebarWidth);null!=k.updateDefaultStyle&&(EditorUi.prototype.updateDefaultStyle=k.updateDefaultStyle);null!=k.sidebarTitles&&(Sidebar.prototype.sidebarTitles=k.sidebarTitles);null!=k.sidebarTitleSize&&
+(A=parseInt(k.sidebarTitleSize),!isNaN(A)&&0<A?Sidebar.prototype.sidebarTitleSize=A:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));null!=k.fontCss&&("string"===typeof k.fontCss?Editor.configureFontCss(k.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=k.autosaveDelay&&(A=parseInt(k.autosaveDelay),!isNaN(A)&&0<A?DrawioFile.prototype.autosaveDelay=A:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));null!=k.maxImageBytes&&
+(EditorUi.prototype.maxImageBytes=k.maxImageBytes);null!=k.maxImageSize&&(EditorUi.prototype.maxImageSize=k.maxImageSize);null!=k.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=k.shareCursorPosition);null!=k.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=k.showRemoteCursors);null!=k.restrictExport&&(DrawioFile.RESTRICT_EXPORT=k.restrictExport);null!=k.replaceSvgDataUris&&(Editor.replaceSvgDataUris=k.replaceSvgDataUris);null!=k.foreignObjectImages&&(Editor.foreignObjectImages=
+k.foreignObjectImages);null!=k.shadowColor&&(mxConstants.SHADOW_COLOR=k.shadowColor);null!=k.shadowOpacity&&(mxConstants.SHADOW_OPACITY=k.shadowOpacity);null!=k.shadowOffsetX&&(mxConstants.SHADOW_OFFSET_X=k.shadowOffsetX);null!=k.shadowOffsetY&&(mxConstants.SHADOW_OFFSET_Y=k.shadowOffsetY);null!=k.shadowBlur&&(mxConstants.SHADOW_BLUR=k.shadowBlur);null!=k.enableAnimations&&(Editor.enableAnimations=k.enableAnimations);null!=k.enableChatGpt&&(Editor.enableChatGpt=k.enableChatGpt);null!=k.gptApiKey&&
+(Editor.gptApiKey=k.gptApiKey);null!=k.gptModel&&(Editor.gptModel=k.gptModel);null!=k.gptUrl&&(Editor.gptUrl=k.gptUrl)}};Editor.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};Editor.configureFontCss=function(k){if(null!=k){Editor.prototype.fontCss=k;var A=document.getElementsByTagName("script")[0];if(null!=A&&null!=A.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(k));
+A.parentNode.insertBefore(I,A);k=k.split("url(");for(I=1;I<k.length;I++){var T=k[I].indexOf(")");T=Editor.trimCssUrl(k[I].substring(0,T));var P=document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");A.parentNode.insertBefore(P,A)}}}};Editor.trimCssUrl=function(k){return k.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
+Editor.GOOGLE_FONTS_CSS2="https://fonts.googleapis.com/css2?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(k){k=null!=k?k:Editor.GUID_LENGTH;for(var A=[],I=0;I<k;I++)A.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return A.join("")};Editor.updateStatusInterval=1E4;Editor.prototype.appName="draw.io";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",
+extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.prototype.timeout=
+25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(k){k=null!=k&&"mxlibrary"!=k.nodeName?this.extractGraphModel(k):null;if(null!=k){var A=Editor.extractParserError(k,mxResources.get("invalidOrMissingFile"));if(A)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[k],"cause",[A]),Error(mxResources.get("notADiagramFile")+
+" ("+A+")");if("mxGraphModel"==k.nodeName){A=k.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=A&&""!=A)A!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[A]:mxUtils.load(STYLE_PATH+"/"+A+".xml").getDocumentElement(),null!=I&&(T=new mxCodec(I.ownerDocument),T.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var T=new mxCodec(I.ownerDocument);
+T.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=A;this.graph.mathEnabled="1"==urlParams.math||"1"==k.getAttribute("math");this.graph.setAdaptiveColors(k.getAttribute("adaptiveColors"));A=k.getAttribute("backgroundImage");null!=A?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(A)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==
+k.getAttribute("shadow"),!1);if(A=k.getAttribute("extFonts"))try{for(A=A.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),I=0;I<A.length;I++)this.graph.addExtFont(A[I].name,A[I].url)}catch(P){console.log("ExtFonts format error: "+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;
+Editor.prototype.getGraphXml=function(k,A){k=null!=k?k:!0;var I=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,A);null!=T&&I.setAttribute("backgroundImage",JSON.stringify(T));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.adaptiveColors?I.setAttribute("adaptiveColors",
+this.graph.adaptiveColors):I.removeAttribute("adaptiveColors");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),I.setAttribute("extFonts",T.join("|")));return I};Editor.prototype.isDataSvg=function(k){try{var A=mxUtils.parseXml(k).documentElement.getAttribute("content");if(null!=A&&(null!=A&&"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(cont,A))),null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A)),
+null!=A&&0<A.length)){var I=mxUtils.parseXml(A).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(k,A,I){return Editor.extractGraphModel.apply(this,arguments)};var g=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.setAdaptiveColors(null);this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&
+this.graph.isCssTransformsSupported();this.graph.updateCssTransform();g.apply(this,arguments)};var m=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){m.apply(this,arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(k,A){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){var I=function(){T=null;if(0<Editor.mathJaxQueue.length)Editor.doMathJaxRender(Editor.mathJaxQueue.shift());
+else Editor.onMathJaxDone()};k=null!=k?k:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];var T=null;Editor.doMathJaxRender=function(X){try{null==T?(MathJax.typesetClear([X]),MathJax.typeset([X]),I()):T!=X&&Editor.mathJaxQueue.push(X)}catch(aa){MathJax.typesetClear([X]),null!=aa.retry?(T=X,aa.retry.then(function(){MathJax.typesetPromise([X]).then(I)["catch"](function(ja){console.log("Error in MathJax.typesetPromise: "+ja.toString());I()})})["catch"](function(ja){console.log("Error in MathJax.retry: "+
+ja.toString());I()})):null!=window.console&&console.log("Error in MathJax.typeset: "+aa.toString())}};window.MathJax=null!=A?A:{options:{skipHtmlTags:{"[+]":["text"]},ignoreHtmlClass:"geDisableMathJax"},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath","ui/safe"]},startup:{pageReady:function(){for(var X=0;X<Editor.mathJaxQueue.length;X++)Editor.doMathJaxRender(Editor.mathJaxQueue[X])}}};Editor.MathJaxRender=function(X){"undefined"!==typeof MathJax&&
+"function"===typeof MathJax.typeset?Editor.doMathJaxRender(X):Editor.mathJaxQueue.push(X)};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var X=mxUtils.bind(this,function(aa,ja){null!=this.graph.container&&this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,X);this.graph.addListener(mxEvent.REFRESH,X)};A=document.getElementsByTagName("script");if(null!=A&&0<A.length){var U=
+document.createElement("script");U.setAttribute("type","text/javascript");U.setAttribute("src",k);A[0].parentNode.appendChild(U)}}};Editor.prototype.csvToArray=function(k){if(0<k.length){var A="",I=[""],T=0,P=!0,U;k=$jscomp.makeIterator(k);for(U=k.next();!U.done;U=k.next())U=U.value,'"'===U?(P&&U===A&&(I[T]+=U),P=!P):","===U&&P?U=I[++T]="":I[T]+=U,A=U;return I}return[]};Editor.prototype.getProxiedUrl=function(k){if((/test\.draw\.io$/.test(window.location.hostname)||/app\.diagrams\.net$/.test(window.location.hostname))&&
+!this.isCorsEnabledForUrl(k)){var A=EditorUi.isVisioFilename(k);A=/\.png$/i.test(k)||/\.pdf$/i.test(k)||A;var I="t="+(new Date).getTime();k=PROXY_URL+"?url="+encodeURIComponent(k)+"&"+I+(A?"&base64=1":"")}return k};Editor.prototype.isCorsEnabledForUrl=function(k){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||k.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));
+return null!=this.corsRegExp&&this.corsRegExp.test(k)||"https://raw.githubusercontent.com/"===k.substring(0,34)||"https://fonts.googleapis.com/"===k.substring(0,29)||"https://fonts.gstatic.com/"===k.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var k=new mxUrlConverter;k.updateBaseUrl();var A=k.convert,I=this;k.convert=function(T){null!=T&&navigator.onLine&&("http://"!=T.substring(0,7)&&"https://"!=T.substring(0,8)||T.substring(0,k.baseUrl.length)==k.baseUrl||I.crossOriginImages&&
+I.isCorsEnabledForUrl(T)?"chrome-extension://"!=T.substring(0,19)&&(T=A.apply(this,arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T));return T};return k};Editor.createSvgDataUri=function(k){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(k)))};Editor.prototype.convertImageToDataUri=function(k,A,I,T,P){try{var U=!0,X=window.setTimeout(mxUtils.bind(this,function(){U=!1;A(k)}),this.timeout),aa=mxUtils.bind(this,function(){null!=T?this.convertImageToDataUri(k,A,I,T,!0):A(k)});
+if(/(\.svg)$/i.test(k)&&!P)mxUtils.get(k,mxUtils.bind(this,function(pa){window.clearTimeout(X);U&&(200>pa.getStatus()||299<pa.getStatus()?aa():A(Editor.createSvgDataUri(pa.getText())))}),mxUtils.bind(this,function(){window.clearTimeout(X);U&&aa()}));else{var ja=new Image;this.crossOriginImages&&(ja.crossOrigin="anonymous");ja.onload=function(){window.clearTimeout(X);if(U)try{T=null!=T&&P?T:1;var pa=document.createElement("canvas"),sa=pa.getContext("2d");sa.scale(T,T);pa.height=ja.height*T;pa.width=
+ja.width*T;sa.drawImage(ja,0,0);A(pa.toDataURL())}catch(qa){A(k)}};ja.onerror=function(){window.clearTimeout(X);U&&(null!=I?I():A(k))};ja.src=k}}catch(pa){null!=I?I():A(k)}};Editor.prototype.convertImages=function(k,A,I,T){function P(){0<U.length?U.shift()():A(k)}null==T&&(T=this.createImageUrlConverter());var U=[],X=I||{};I=mxUtils.bind(this,function(aa,ja){aa=k.getElementsByTagName(aa);for(var pa=0;pa<aa.length;pa++)mxUtils.bind(this,function(sa){U.push(mxUtils.bind(this,function(){try{if(null!=
+sa){var qa=T.convert(sa.getAttribute(ja));if(null!=qa&&"data:"!=qa.substring(0,5)){var wa=X[qa];null==wa?this.convertImageToDataUri(qa,function(Ba){null!=Ba&&(X[qa]=Ba,sa.setAttribute(ja,Ba));P()},null,Editor.svgRasterScale):(sa.setAttribute(ja,wa),P())}else null!=qa&&sa.setAttribute(ja,qa),P()}}catch(Ba){P()}}))})(aa[pa])});I("image","xlink:href");I("img","src");P()};Editor.base64Encode=function(k){for(var A="",I=0,T=k.length,P,U,X;I<T;){P=k.charCodeAt(I++)&255;if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>
+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);A+="==";break}U=k.charCodeAt(I++);if(I==T){A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2);A+="=";break}X=k.charCodeAt(I++);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>
+2);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(U&240)>>4);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((U&15)<<2|(X&192)>>6);A+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(X&63)}return A};Editor.prototype.loadUrl=function(k,A,I,T,P,U,X,aa){try{var ja=!X&&(T||/(\.png)($|\?)/i.test(k)||/(\.jpe?g)($|\?)/i.test(k)||/(\.gif)($|\?)/i.test(k)||/(\.pdf)($|\?)/i.test(k));P=null!=P?P:!0;var pa=mxUtils.bind(this,
+function(){mxUtils.get(k,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&299>=sa.getStatus()){if(null!=A){var qa=sa.getText();if(ja){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();qa=Array(sa.length);for(var wa=0;wa<sa.length;wa++)qa[wa]=String.fromCharCode(sa[wa]);qa=qa.join("")}U=null!=U?U:"data:image/png;base64,";qa=U+Editor.base64Encode(qa)}A(qa)}}else null!=I&&(0==sa.getStatus()?
+I({message:mxResources.get("accessDenied")},sa):404==sa.getStatus()?I({message:mxResources.get("fileNotFound"),code:sa.getStatus()},sa):I({message:this.getErrorMessage(sa)},sa))}),function(sa){null!=I&&I({message:mxResources.get("error")+" "+sa.getStatus()})},ja,this.timeout,function(){P&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:pa})},aa)});pa()}catch(sa){null!=I&&I(sa)}};Editor.prototype.getErrorMessage=function(k){var A=mxResources.get("error")+" "+k.getStatus();try{var I=k.getText(),T=JSON.parse(I);
+null!=T&&null!=T.error&&null!=T.error.message&&(A=T.error.message+" ("+A+")")}catch(P){}return A};Editor.prototype.absoluteCssFonts=function(k){var A=null;if(null!=k){var I=k.split("url(");if(0<I.length){A=[I[0]];k=window.location.pathname;var T=null!=k?k.lastIndexOf("/"):-1;0<=T&&(k=k.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var U=1;U<I.length;U++)if(T=I[U].indexOf(")"),0<T){var X=Editor.trimCssUrl(I[U].substring(0,
+T));this.graph.isRelativeUrl(X)&&(X=null!=P?P+X:window.location.protocol+"//"+window.location.hostname+("/"==X.charAt(0)?"":k)+X);A.push('url("'+X+'"'+I[U].substring(T))}else A.push(I[U])}else A=[k]}return null!=A?A.join(""):null};Editor.prototype.mapFontUrl=function(k,A,I){/^https?:\/\//.test(A)&&!this.isCorsEnabledForUrl(A)&&(A=PROXY_URL+"?url="+encodeURIComponent(A));I(k,A)};Editor.prototype.embedCssFonts=function(k,A){var I=k.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=
+mxUtils.bind(this,function(){if(0==T){for(var ja=[I[0]],pa=1;pa<I.length;pa++){var sa=I[pa].indexOf(")");ja.push('url("');ja.push(this.cachedFonts[Editor.trimCssUrl(I[pa].substring(0,sa))]);ja.push('"'+I[pa].substring(sa))}A(ja.join(""))}});if(0<I.length){for(k=1;k<I.length;k++){var U=I[k].indexOf(")"),X=null,aa=I[k].indexOf("format(",U);0<aa&&(X=Editor.trimCssUrl(I[k].substring(aa+7,I[k].indexOf(")",aa))));mxUtils.bind(this,function(ja){if(null==this.cachedFonts[ja]){this.cachedFonts[ja]=ja;T++;
+var pa="application/x-font-ttf";if("svg"==X||/(\.svg)($|\?)/i.test(ja))pa="image/svg+xml";else if("otf"==X||"embedded-opentype"==X||/(\.otf)($|\?)/i.test(ja))pa="application/x-font-opentype";else if("woff"==X||/(\.woff)($|\?)/i.test(ja))pa="application/font-woff";else if("woff2"==X||/(\.woff2)($|\?)/i.test(ja))pa="application/font-woff2";else if("eot"==X||/(\.eot)($|\?)/i.test(ja))pa="application/vnd.ms-fontobject";else if("sfnt"==X||/(\.sfnt)($|\?)/i.test(ja))pa="application/font-sfnt";this.mapFontUrl(pa,
+ja,mxUtils.bind(this,function(sa,qa){this.loadUrl(qa,mxUtils.bind(this,function(wa){this.cachedFonts[ja]=wa;T--;P()}),mxUtils.bind(this,function(wa){T--;P()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[k].substring(0,U)),X)}P()}else A(k)};Editor.prototype.loadFonts=function(k){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(A){this.resolvedFontCss=A;null!=k&&k()})):null!=k&&k()};Editor.prototype.createGoogleFontCache=
+function(){var k={},A;for(A in Graph.fontMapping)Graph.isCssFontUrl(A)&&(k[A]=Graph.fontMapping[A]);return k};Editor.prototype.embedExtFonts=function(k){var A=this.graph.getCustomFonts();if(0<A.length){var I=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(I.join(""),k)}),U=0;U<A.length;U++)mxUtils.bind(this,function(X,aa){Graph.isCssFontUrl(aa)?null==this.cachedGoogleFonts[aa]?(T++,this.loadUrl(Graph.rewriteGoogleFontUrl(aa),
+mxUtils.bind(this,function(ja){this.cachedGoogleFonts[aa]=ja;I.push(ja+"\n");T--;P()}),mxUtils.bind(this,function(ja){T--;I.push("@import url("+aa+");\n");P()}))):I.push(this.cachedGoogleFonts[aa]+"\n"):I.push('@font-face {font-family: "'+X+'";src: url("'+aa+'")}\n')})(A[U].name,A[U].url);P()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var A=document.getElementsByTagName("style"),I=0;I<A.length;I++){var T=mxUtils.getTextContent(A[I]);
+0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&k[0].appendChild(A[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(k,A){A=null!=A?A:this.absoluteCssFonts(this.fontCss);if(null!=A){var I=mxUtils.getSvgDefs(k),T=A.split("\n");A=[];for(var P=[],U=0;U<T.length;U++)"@import"==T[U].substring(0,7)?A.push(T[U]):P.push(T[U]);k=k.ownerDocument;k=null!=k.createElementNS?k.createElementNS(mxConstants.NS_SVG,"style"):k.createElement("style");k.setAttribute("type","text/css");0<A.length&&(mxUtils.setTextContent(k,
+A.join("\n")),I.appendChild(k));0<P.length&&(k=k.cloneNode(!1),mxUtils.setTextContent(k,P.join("\n")),I.appendChild(k))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(k,A,I){var T=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(T/k,T/A))};Editor.prototype.exportToCanvas=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea,ra,ya){try{U=null!=U?U:!0;X=null!=X?X:!0;qa=null!=qa?qa:this.graph;wa=null!=
+wa?wa:0;var Ca=ja?null:qa.background;Ca==mxConstants.NONE&&(Ca=null);null==Ca&&(Ca=T);null==Ca&&0==ja&&(Ca="dark"==Ea&&"none"!=qa.getAdaptiveColors()?Editor.darkColor:"#ffffff");this.convertImages(qa.getSvg(null,null,wa,Ba,null,X,null,null,null,pa,null,Ea,ra,ya),mxUtils.bind(this,function(Ma){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ra=function(){mxClient.IS_SF?window.setTimeout(function(){Da.drawImage(Ha,0,0);k(Za,Ma)},0):(Da.drawImage(Ha,0,0),k(Za,Ma))},Za=document.createElement("canvas"),
+La=parseInt(Ma.getAttribute("width")),$a=parseInt(Ma.getAttribute("height"));aa=null!=aa?aa:1;null!=A&&(aa=U?Math.min(1,Math.min(3*A/(4*$a),A/La)):A/La);aa=this.getMaxCanvasScale(La,$a,aa);La=Math.ceil(aa*La);$a=Math.ceil(aa*$a);Za.setAttribute("width",La);Za.setAttribute("height",$a);var Da=Za.getContext("2d");null!=Ca&&(Da.beginPath(),Da.rect(0,0,La,$a),Da.fillStyle=Ca,Da.fill());1!=aa&&Da.scale(aa,aa);if(za){var x=qa.view,M=x.scale;x.scale=1;var Q=btoa(unescape(encodeURIComponent(x.createSvgGrid(x.gridColor))));
+x.scale=M;Q="data:image/svg+xml;base64,"+Q;var V=qa.gridSize*x.gridSteps*aa,ia=qa.getGraphBounds(),ka=x.translate.x*M,oa=x.translate.y*M,xa=ka+(ia.x-ka)/M-wa,ta=oa+(ia.y-oa)/M-wa,ua=new Image;ua.onload=function(){try{for(var Fa=-Math.round(V-mxUtils.mod((ka-xa)*aa,V)),Na=-Math.round(V-mxUtils.mod((oa-ta)*aa,V));Fa<La;Fa+=V)for(var Wa=Na;Wa<$a;Wa+=V)Da.drawImage(ua,Fa/aa,Wa/aa);Ra()}catch(Xa){null!=P&&P(Xa)}};ua.onerror=function(Fa){null!=P&&P(Fa)};ua.src=Q}else Ra()}catch(Fa){null!=P&&P(Fa)}});Ha.onerror=
+function(Ra){null!=P&&P(Ra)};pa&&this.graph.addSvgShadow(Ma);this.graph.mathEnabled&&this.addMathCss(Ma);var Aa=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ma,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Ma))}catch(Ra){null!=P&&P(Ra)}});this.embedExtFonts(mxUtils.bind(this,function(Ra){try{null!=Ra&&this.addFontCss(Ma,Ra),this.loadFonts(Aa)}catch(Za){null!=P&&P(Za)}}))}catch(Ra){null!=P&&P(Ra)}}),I,sa)}catch(Ma){null!=P&&P(Ma)}};Editor.crcTable=
+[];for(var u=0;256>u;u++)for(var p=u,B=0;8>B;B++)p=1==(p&1)?3988292384^p>>>1:p>>>1,Editor.crcTable[u]=p;Editor.updateCRC=function(k,A,I,T){for(var P=0;P<T;P++)k=Editor.crcTable[(k^A.charCodeAt(I+P))&255]^k>>>8;return k};Editor.crc32=function(k){for(var A=-1,I=0;I<k.length;I++)A=A>>>8^Editor.crcTable[(A^k.charCodeAt(I))&255];return(A^-1)>>>0};Editor.writeGraphModelToPng=function(k,A,I,T,P){function U(sa,qa){var wa=ja;ja+=qa;return sa.substring(wa,ja)}function X(sa){sa=U(sa,4);return sa.charCodeAt(3)+
+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function aa(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}k=k.substring(k.indexOf(",")+1);k=window.atob?atob(k):Base64.decode(k,!0);var ja=0;if(U(k,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(U(k,4),"IHDR"!=U(k,4))null!=P&&P();else{U(k,17);P=k.substring(0,ja);do{var pa=X(k);if("IDAT"==U(k,4)){P=k.substring(0,ja-8);"pHYs"==A&&"dpi"==I?(I=Math.round(T/.0254),I=aa(I)+
+aa(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==A?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,A,0,4);T=Editor.updateCRC(T,I,0,I.length);P+=aa(I.length)+A+I+aa(T^4294967295);P+=k.substring(ja-8,k.length);break}P+=k.substring(ja-8,ja-4+pa);U(k,pa);U(k,4)}while(pa);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var H=ColorDialog.addRecentColor;
+ColorDialog.addRecentColor=function(k,A){H.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var S=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){S.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}"undefined"!==typeof window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(k,A){var I=null;null!=k.editor.graph.getModel().getParent(A)?I=A.getId():null!=k.currentPage&&(I=k.currentPage.getId());
+return I});if(null!=window.StyleFormatPanel){var G=Format.prototype.init;Format.prototype.init=function(){G.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var O=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?O.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isMathOptionVisible=function(k){return"simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||
+"min"==Editor.currentTheme};var R=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(k){k=R.apply(this,arguments);var A=this.editorUi,I=A.editor.graph;if(I.isEnabled()){var T=A.getCurrentFile();null!=T&&T.isAutosaveOptional()&&k.appendChild(this.createOption(mxResources.get("autosave"),function(){return A.editor.autosave},function(X){A.editor.setAutosave(X);A.editor.autosave&&T.isModified()&&T.fileChanged()},{install:function(X){this.listener=function(){X(A.editor.autosave)};
+A.editor.addListener("autosaveChanged",this.listener)},destroy:function(){A.editor.removeListener(this.listener)}}))}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){var P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(X){A.actions.get("mathematicalTypesetting").funct()},{install:function(X){this.listener=function(){X(I.mathEnabled)};A.addListener("mathEnabledChanged",this.listener)},destroy:function(){A.removeListener(this.listener)}});
+k.appendChild(P);if(!A.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var U=A.menus.createHelpLink("https://www.drawio.com/doc/faq/math-typesetting");U.style.position="absolute";U.style.left="85%";P.appendChild(U)}}return k};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=
+[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:20,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25,isVisible:function(k){return"0"==mxUtils.getValue(k.style,"fixedSize","0")}},{name:"size",dispName:"Slope Angle",type:"float",min:0,defVal:25,isVisible:function(k){return"1"==mxUtils.getValue(k.style,"fixedSize","0")}}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
+type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=
+[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",
+min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",
+type:"float",min:0,defVal:15},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",
+dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=
+mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",
+min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",
+dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",
+dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(k,A,I,T){if(null!=A){var P=mxUtils.bind(this,function(X){if(null!=X)if(I)for(var aa=0;aa<X.length;aa++){if("function"!==typeof X[aa].isVisible||X[aa].isVisible(T,this))A[X[aa].name]=X[aa]}else for(var ja in A){var pa=!1;for(aa=0;aa<X.length;aa++)if(X[aa].name==ja&&X[aa].type==A[ja].type){pa=!0;break}pa||delete A[ja]}}),U=this.editorUi.editor.graph.view.getState(k);null!=U&&null!=U.shape&&(U.shape.commonCustomPropAdded||(U.shape.commonCustomPropAdded=!0,U.shape.customProperties=U.shape.customProperties||
+[],U.cell.vertex?Array.prototype.push.apply(U.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(U.shape.customProperties,Editor.commonEdgeProperties)),P(U.shape.customProperties));k=k.getAttribute("customProperties");if(null!=k)try{P(JSON.parse(k))}catch(X){}}};var c=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var k=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0<this.defaultColorSchemes.length&&"image"!=k.style.shape&&
+!k.containsLabel&&0<k.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));c.apply(this,arguments);if(Editor.enableCustomProperties){for(var A={},I=k.vertices,T=k.edges,P=0;P<I.length;P++)this.findCommonProperties(I[P],A,0==P,k);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],A,0==I.length&&0==P,k);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(A).length&&this.container.appendChild(this.addProperties(this.createPanel(),A,k))}};var f=StyleFormatPanel.prototype.addStyleOps;
+StyleFormatPanel.prototype.addStyleOps=function(k){var A=this.editorUi.getSelectionState();1==A.cells.length?this.addActions(k,["copyStyle","pasteStyle"]):1<=A.cells.length&&this.addActions(k,["pasteStyle","pasteData"]);f.apply(this,arguments);return k};EditorUi.prototype.propertiesCollapsed=!0;BaseFormatPanel.prototype.addProperties=function(k,A,I,T){function P(Da,x,M,Q,V){if(null!=M.valueChanged)M.valueChanged(x,V);else{wa.getModel().beginUpdate();try{V=[];var ia=[];if(null!=M.index){for(var ka=
+[],oa=M.parentRow.nextSibling;oa&&oa.getAttribute("data-pName")==Da;)ka.push(oa.getAttribute("data-pValue")),oa=oa.nextSibling;M.index<ka.length?null!=Q?ka.splice(Q,1):ka[M.index]=x:ka.push(x);null!=M.size&&ka.length>M.size&&(ka=ka.slice(0,M.size));x=ka.join(",");null!=M.countProperty&&(wa.setCellStyles(M.countProperty,ka.length,wa.getSelectionCells()),V.push(M.countProperty),ia.push(ka.length))}wa.setCellStyles(Da,x,wa.getSelectionCells());V.push(Da);ia.push(x);if(null!=M.dependentProps)for(Da=0;Da<
+M.dependentProps.length;Da++){var xa=M.dependentPropsDefVal[Da],ta=M.dependentPropsVals[Da];if(ta.length>x)ta=ta.slice(0,x);else for(var ua=ta.length;ua<x;ua++)ta.push(xa);ta=ta.join(",");wa.setCellStyles(M.dependentProps[Da],ta,wa.getSelectionCells());V.push(M.dependentProps[Da]);ia.push(ta)}if("function"==typeof M.onChange)M.onChange(wa,x);qa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",V,"values",ia,"cells",wa.getSelectionCells()))}finally{wa.getModel().endUpdate()}}}function U(Da,
+x,M){var Q=mxUtils.getOffset(k,!0),V=mxUtils.getOffset(Da,!0);x.style.position="absolute";x.style.left=V.x-Q.x+"px";x.style.top=V.y-Q.y+"px";x.style.width=Da.offsetWidth+"px";x.style.height=Da.offsetHeight-(M?4:0)+"px";x.style.zIndex=5}function X(Da,x,M){function Q(ia){if(null==ia||ia==mxConstants.NONE)V.style.background="url('"+Dialog.prototype.noColorImage+"')";else if("default"==ia)V.style.background="";else{var ka=mxUtils.getLightDarkColor(ia);mxUtils.isLightDarkColor(ia)&&ka.light!=ka.dark?V.style.background=
+"linear-gradient(to right bottom, "+ka.cssText+" 50%, "+mxUtils.invertLightDarkColor(ka).cssText+" 50.3%)":V.style.background=ia}}var V=document.createElement("div");V.style.width="32px";V.style.height="8px";V.style.margin="2px";V.style.borderStyle="solid";V.style.borderWidth="1px";Q(x);btn=mxUtils.button("",mxUtils.bind(qa,function(ia){this.editorUi.pickColor(x,function(ka){P(Da,ka,M);Q(ka)});mxEvent.consume(ia)}));btn.style.height="18px";btn.style.width="40px";btn.style.marginTop="1px";btn.style.marginLeft=
+"1px";btn.className="geColorBtn";btn.appendChild(V);return btn}function aa(Da,x,M,Q,V,ia,ka){null!=x&&(x=x.split(","),Ba.push({name:Da,values:x,type:M,defVal:Q,countProperty:V,parentRow:ia,isDeletable:!0,flipBkg:ka}));btn=mxUtils.button("+",mxUtils.bind(qa,function(oa){for(var xa=ia,ta=0;null!=xa.nextSibling;)if(xa.nextSibling.getAttribute("data-pName")==Da)xa=xa.nextSibling,ta++;else break;var ua={type:M,parentRow:ia,index:ta,isDeletable:!0,defVal:Q,countProperty:V};ta=sa(Da,"",ua,0==ta%2,ka);P(Da,
+Q,ua);xa.parentNode.insertBefore(ta,xa.nextSibling);mxEvent.consume(oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function ja(Da,x,M,Q,V,ia,ka){if(0<V){var oa=Array(V);x=null!=x?x.split(","):[];for(var xa=0;xa<V;xa++)oa[xa]=null!=x[xa]?x[xa]:null!=Q?Q:"";Ba.push({name:Da,values:oa,type:M,defVal:Q,parentRow:ia,flipBkg:ka,size:V})}return document.createElement("div")}function pa(Da,x,M){var Q=document.createElement("input");Q.type="checkbox";Q.checked="1"==
+x;mxEvent.addListener(Q,"change",function(){P(Da,Q.checked?"1":"0",M)});return Q}function sa(Da,x,M,Q,V){var ia=M.dispName,ka=M.type,oa=document.createElement("tr");oa.className="gePropRow"+(V?"Dark":"")+(Q?"Alt":"")+" gePropNonHeaderRow";oa.setAttribute("data-pName",Da);oa.setAttribute("data-pValue",x);Q=!1;null!=M.index&&(oa.setAttribute("data-index",M.index),ia=(null!=ia?ia:"")+"["+M.index+"]",Q=!0);var xa=document.createElement("td");xa.className="gePropRowCell";ia=mxResources.get(ia,null,ia);
+mxUtils.write(xa,ia);xa.setAttribute("title",ia);Q&&(xa.style.textAlign="right");oa.appendChild(xa);xa=document.createElement("td");xa.className="gePropRowCell";xa.setAttribute("title",null!=x?x:mxResources.get("none"));if("color"==ka)xa.appendChild(X(Da,x,M));else if("bool"==ka||"boolean"==ka)xa.appendChild(pa(Da,x,M));else if("enum"==ka){var ta=M.enumList;for(V=0;V<ta.length;V++)if(ia=ta[V],ia.val==x){mxUtils.write(xa,mxResources.get(ia.dispName,null,ia.dispName));break}mxEvent.addListener(xa,"click",
+mxUtils.bind(qa,function(){var ua=document.createElement("select"),Fa=null;U(xa,ua);for(var Na=0;Na<ta.length;Na++){var Wa=ta[Na],Xa=document.createElement("option");Xa.value=mxUtils.htmlEntities(Wa.val);mxUtils.write(Xa,mxResources.get(Wa.dispName,null,Wa.dispName));ua.appendChild(Xa);null==Wa.val&&(Xa.value="null",Fa=Xa)}ua.value=null==x&&null!=Fa?"null":x;k.appendChild(ua);mxEvent.addListener(ua,"change",function(){var ab=mxUtils.htmlEntities(ua.value);if(ua[ua.selectedIndex]==Fa||"null"==ab.value)ab=
+null;P(Da,ab,M)});ua.focus();mxEvent.addListener(ua,"blur",function(){k.removeChild(ua)})}))}else"dynamicArr"==ka?xa.appendChild(aa(Da,x,M.subType,M.subDefVal,M.countProperty,oa,V)):"staticArr"==ka?xa.appendChild(ja(Da,x,M.subType,M.subDefVal,M.size,oa,V)):"readOnly"==ka?(V=document.createElement("input"),V.setAttribute("readonly",""),V.value=x,V.style.borderWidth="0px","id"==Da?(V.style.width="190px",V.style.position="relative",V.style.right="6px",V.style.float="right",V.style.background="none",
+V.style.textAlign="right",oa.firstChild.setAttribute("colspan","2"),V.setAttribute("title",x),oa.firstChild.appendChild(V)):(V.style.width="96px",xa.appendChild(V))):(xa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(x)),mxEvent.addListener(xa,"click",mxUtils.bind(qa,function(){function ua(){var Na=Fa.value;Na=0==Na.length&&"string"!=ka&&"numbers"!=ka?0:Na;M.allowAuto&&(null!=Na.trim&&"auto"==Na.trim().toLowerCase()?(Na="auto",ka="string"):(Na=parseFloat(Na),Na=isNaN(Na)?0:Na));null!=M.min&&Na<
+M.min?Na=M.min:null!=M.max&&Na>M.max&&(Na=M.max);var Wa=null;try{Wa="numbers"==ka?Na.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==ka?parseInt(Na):Na)+"")}catch(Xa){}P(Da,Wa,M,null,Fa)}var Fa=document.createElement("input");U(xa,Fa,!0);Fa.value=decodeURIComponent(x);Fa.className="gePropEditor";"int"!=ka&&"float"!=ka||M.allowAuto||(Fa.type="number",Fa.step="int"==ka?"1":"any",null!=M.min&&(Fa.min=parseFloat(M.min)),null!=M.max&&(Fa.max=parseFloat(M.max)));k.appendChild(Fa);mxEvent.addListener(Fa,
+"keypress",function(Na){13==Na.keyCode&&ua()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){ua()})})));M.isDeletable&&(V=mxUtils.button("-",mxUtils.bind(qa,function(ua){P(Da,"",M,M.index);mxEvent.consume(ua)})),V.style.height="16px",V.style.width="25px",V.style.float="right",V.className="geColorBtn",xa.appendChild(V));oa.appendChild(xa);return oa}var qa=this,wa=this.editorUi.editor.graph,Ba=[];k.style.position="relative";k.style.padding="0";var za=document.createElement("table");za.className=
+"geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ea=document.createElement("tr");Ea.className="gePropHeader";var ra=document.createElement("th");ra.className="gePropHeaderCell";ra.style.paddingLeft="16px";ra.style.backgroundRepeat="no-repeat";ra.style.backgroundPosition="-2px 50%";ra.style.backgroundSize="20px";mxUtils.write(ra,mxResources.get("property"));Ea.style.cursor="pointer";var ya=function(){var Da=za.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){ra.style.backgroundImage=
+"url('"+Editor.arrowRightImage+"')";var x="none";for(var M=k.childNodes.length-1;0<=M;M--)try{var Q=k.childNodes[M],V=Q.nodeName.toUpperCase();"INPUT"!=V&&"SELECT"!=V||k.removeChild(Q)}catch(ia){}}else ra.style.backgroundImage="url('"+Editor.arrowDownImage+"')",x="";for(M=0;M<Da.length;M++)Da[M].style.display=x};mxEvent.addListener(Ea,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;ya()});Ea.appendChild(ra);var Ca=document.createElement("th");Ca.className="gePropHeaderCell";
+Ca.style.paddingLeft="4px";mxUtils.write(Ca,mxResources.get("value"));Ea.appendChild(Ca);za.appendChild(Ea);var Ma=Ca=!1;Ea=null;1==I.vertices.length&&0==I.edges.length?Ea=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(Ea=I.edges[0].id);null==Ea||T||za.appendChild(sa("id",mxUtils.htmlEntities(Ea),{dispName:"id",type:"readOnly"},!0,!1));for(var Ha in A)if(T=A[Ha],"function"!=typeof T.isVisible||T.isVisible(I,this)){var Aa=null!=T.getValue?T.getValue():null!=I.style[Ha]?mxUtils.htmlEntities(I.style[Ha]+
+""):null!=T.getDefaultValue?T.getDefaultValue(I,this):T.defVal;if("separator"==T.type)Ma=!Ma;else{if("staticArr"==T.type)T.size=parseInt(I.style[T.sizeProperty]||A[T.sizeProperty].defVal)||0;else if(null!=T.dependentProps){var Ra=T.dependentProps,Za=[],La=[];for(Ea=0;Ea<Ra.length;Ea++){var $a=I.style[Ra[Ea]];La.push(A[Ra[Ea]].subDefVal);Za.push(null!=$a?$a.split(","):[])}T.dependentPropsDefVal=La;T.dependentPropsVals=Za}za.appendChild(sa(Ha,Aa,T,Ca,Ma));Ca=!Ca}}for(Ea=0;Ea<Ba.length;Ea++)for(T=Ba[Ea],
+A=T.parentRow,I=0;I<T.values.length;I++)Ha=sa(T.name,T.values[I],{type:T.type,parentRow:T.parentRow,isDeletable:T.isDeletable,index:I,defVal:T.defVal,countProperty:T.countProperty,size:T.size},0==I%2,T.flipBkg),A.parentNode.insertBefore(Ha,A.nextSibling),A=Ha;k.appendChild(za);ya();return k};StyleFormatPanel.prototype.addStyles=function(k){if(null!=this.defaultColorSchemes){var A=function(Ba){mxEvent.addListener(Ba,"mouseenter",function(){Ba.style.opacity="1"});mxEvent.addListener(Ba,"mouseleave",
+function(){Ba.style.opacity="0.5"})},I=this.editorUi,T=I.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";P.style.paddingRight="20px";k.style.paddingLeft="16px";k.style.paddingBottom="6px";k.style.position="relative";k.appendChild(P);var U=document.createElement("div");U.style.whiteSpace="nowrap";U.style.position="relative";U.style.textAlign="center";U.style.width="210px";for(var X=[],aa=0;aa<this.defaultColorSchemes.length;aa++){var ja=document.createElement("div");
+ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(Ba){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){pa(Ba)}))})(aa);X.push(ja);U.appendChild(ja)}var pa=mxUtils.bind(this,function(Ba){null!=X[Ba]&&(null!=this.format.currentScheme&&null!=X[this.format.currentScheme]&&
+(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ba,sa(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),sa=mxUtils.bind(this,function(Ba){var za=mxUtils.clone(T.defaultVertexStyle);za[mxConstants.STYLE_STROKECOLOR]=null!=za[mxConstants.STYLE_STROKECOLOR]?za[mxConstants.STYLE_STROKECOLOR]:"default";za[mxConstants.STYLE_FILLCOLOR]=null!=za[mxConstants.STYLE_FILLCOLOR]?za[mxConstants.STYLE_FILLCOLOR]:
+"default";za[mxConstants.STYLE_FONTCOLOR]=null!=za[mxConstants.STYLE_FONTCOLOR]?za[mxConstants.STYLE_FONTCOLOR]:"default";T.replaceDefaultColors(new mxCell,za);var Ea=mxUtils.bind(this,function(ya){var Ca=mxUtils.button("",mxUtils.bind(this,function(Aa){T.getModel().beginUpdate();try{for(var Ra=I.getSelectionState().cells,Za=0;Za<Ra.length;Za++){var La=T.getModel().getStyle(Ra[Za]);null!=ya?(mxEvent.isShiftDown(Aa)||(La=""==ya.fill||null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null):
+mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,ya.fill),La=""==ya.gradient||null==ya.gradient?mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,ya.gradient),mxEvent.isControlDown(Aa)||mxClient.IS_MAC&&mxEvent.isMetaDown(Aa)||!T.getModel().isVertex(Ra[Za])||(La=""==ya.font||null==ya.font?mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,ya.font))),mxEvent.isAltDown(Aa)||(La=""==ya.stroke||
+null==ya.fill?mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,ya.stroke))):(La=mxUtils.setStyle(La,mxConstants.STYLE_FILLCOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_STROKECOLOR,null),La=mxUtils.setStyle(La,mxConstants.STYLE_GRADIENTCOLOR,null),T.getModel().isVertex(Ra[Za])&&(La=mxUtils.setStyle(La,mxConstants.STYLE_FONTCOLOR,null)));T.getModel().setStyle(Ra[Za],La)}}finally{T.getModel().endUpdate()}}));Ca.className="geStyleButton";
+Ca.style.width="36px";Ca.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ca.style.margin="0px 6px 6px 0px";if(null!=ya){var Ma="1px solid";null!=ya.border&&(Ma=ya.border);if(null!=ya.gradient)Ca.style.backgroundImage="linear-gradient("+mxUtils.getLightDarkColor(ya.fill).cssText+" 0px,"+mxUtils.getLightDarkColor(ya.gradient).cssText+" 100%)";else if(ya.fill==mxConstants.NONE)Ca.style.background="url('"+Dialog.prototype.noColorImage+"')";else if(null==ya.fill||""==ya.fill)Ca.style.backgroundColor=
+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff")).cssText;else{var Ha=mxUtils.getLightDarkColor(ya.fill);Ca.style.backgroundImage="linear-gradient(to right bottom, "+Ha.cssText+" 50%, "+Ha.light+" 50.3%)"}null==ya.stroke||ya.stroke==mxConstants.NONE?Ca.style.border=Ma+" transparent":""==ya.stroke?Ca.style.border="1px solid "+mxUtils.getLightDarkColor(mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")).cssText:(Ha=mxUtils.getLightDarkColor(ya.stroke),Ca.style.border=
+Ma+" "+Ha.cssText,Ca.style.borderRightColor=Ha.light,Ca.style.borderBottomColor=Ca.style.borderRightColor);null!=ya.title&&Ca.setAttribute("title",ya.title)}else Ma=mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,"#ffffff"),Ha=mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000"),Ca.style.backgroundColor=Ma,Ca.style.border="1px solid "+Ha;Ca.style.borderRadius="0";P.appendChild(Ca);null!=ya&&null!=ya.gradient&&(Ma=Ca.cloneNode(!1),Ma.style.backgroundImage="linear-gradient(light-dark(transparent, "+
+mxUtils.getLightDarkColor(ya.fill).light+") 0px, light-dark(transparent, "+mxUtils.getLightDarkColor(ya.gradient).light+") 100%)",Ma.style.clipPath="polygon(0 100%, 100% 0, 100% 100%)",Ma.style.backgroundColor="transparent",P.appendChild(Ma),Ma.style.marginLeft="-42px",mxEvent.addListener(Ma,"click",function(){Ca.click()}))});P.innerText="";if(null!=Ba)for(var ra=0;ra<Ba.length;ra++)0<ra&&0==mxUtils.mod(ra,4)&&mxUtils.br(P),Ea(Ba[ra])});null==this.format.currentScheme?pa(Math.min(X.length-1,Editor.isDarkMode()?
+1:"1"==urlParams.sketch?5:0)):pa(this.format.currentScheme);aa=10>=this.defaultColorSchemes.length?28:8;var qa=document.createElement("div");qa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(qa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+aa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(k.appendChild(qa),k.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){pa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));A(qa);A(wa);sa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&k.appendChild(U)}return k}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};
Graph.customFontElements={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||k.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.rewriteGoogleFontUrl=function(k){null!=k&&k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(k=Editor.GOOGLE_FONTS_CSS2+k.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return k};Graph.createFontElement=
-function(k,A){var J=Graph.fontMapping[A];null==J&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==J&&(J='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,J));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,J){if(null!=k&&0<k.length&&null!=
-A&&0<A.length){var U=k.toLowerCase();if("helvetica"!=U&&"arial"!=k&&"sans-serif"!=U){var P=Graph.customFontElements[U];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[U]=P,A=document.getElementsByTagName("head")[0],null!=J&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=J,P.elt.onerror=J):J()),null!=A&&A.appendChild(P.elt)):
-null!=J&&J()}else null!=J&&J()}else null!=J&&J();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var J=k[A].getAttribute("data-font-src");if(null!=J){var U="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=U&&Graph.addFont(U,J)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",
-null);if(null!=A){var J=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=J)try{Graph.addFont(J,decodeURIComponent(A))}catch(U){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=
+function(k,A){var I=Graph.fontMapping[A];null==I&&Graph.isCssFontUrl(A)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",Graph.rewriteGoogleFontUrl(A))):(null==I&&(I='@font-face {\nfont-family: "'+k+'";\nsrc: url("'+A+'");\n}'),k=document.createElement("style"),mxUtils.write(k,I));return k};Graph.addRecentCustomFont=function(k,A){};Graph.addFont=function(k,A,I){if(null!=k&&0<k.length&&null!=
+A&&0<A.length){var T=k.toLowerCase();if("helvetica"!=T&&"arial"!=k&&"sans-serif"!=T){var P=Graph.customFontElements[T];null!=P&&P.url!=A&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=A,"http:"==A.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(A)),P={name:k,url:A,elt:Graph.createFontElement(k,P)},Graph.customFontElements[T]=P,A=document.getElementsByTagName("head")[0],null!=I&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=I,P.elt.onerror=I):I()),null!=A&&A.appendChild(P.elt)):
+null!=I&&I()}else null!=I&&I()}else null!=I&&I();return k};Graph.getFontUrl=function(k,A){k=Graph.customFontElements[k.toLowerCase()];null!=k&&(A=k.url);return A};Graph.processFontAttributes=function(k){k=k.getElementsByTagName("*");for(var A=0;A<k.length;A++){var I=k[A].getAttribute("data-font-src");if(null!=I){var T="FONT"==k[A].nodeName?k[A].getAttribute("face"):k[A].style.fontFamily;null!=T&&Graph.addFont(T,I)}}};Graph.processFontStyle=function(k){if(null!=k){var A=mxUtils.getValue(k,"fontSource",
+null);if(null!=A){var I=mxUtils.getValue(k,mxConstants.STYLE_FONTFAMILY,null);if(null!=I)try{Graph.addFont(I,decodeURIComponent(A))}catch(T){}}}return k};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="drawio-drop-shadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur=
"1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var l=Graph.prototype.init;Graph.prototype.init=function(){function k(P){A=P}l.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var A=null;mxEvent.addListener(this.container,"mouseenter",k);mxEvent.addListener(this.container,"mousemove",k);mxEvent.addListener(this.container,"mouseleave",function(P){A=null});this.isMouseInsertPoint=function(){return null!=
-A};var J=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):J.apply(this,arguments)};var U=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var W=new mxStackLayout(this.graph,!1);W.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;W.marginLeft=T.marginLeft||0;W.marginRight=T.marginRight||0;W.marginTop=
-T.marginTop||0;W.marginBottom=T.marginBottom||0;W.allowGaps=T.allowGaps||0;W.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");W.resizeParent=!1;W.fill=!0;return W}return U.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,J,U,P,T,W,aa,ja,
-pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,J,U){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function T(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}
-function W(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),
+A};var I=this.getInsertPoint;this.getInsertPoint=function(){return null!=A?this.getPointForEvent(A):I.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var U=this.graph.getCellStyle(P);if(null!=U&&"rack"==U.childLayout){var X=new mxStackLayout(this.graph,!1);X.gridSize=null!=U.rackUnitSize?parseFloat(U.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;X.marginLeft=U.marginLeft||0;X.marginRight=U.marginRight||0;X.marginTop=
+U.marginTop||0;X.marginBottom=U.marginBottom||0;X.allowGaps=U.allowGaps||0;X.horizontal="1"==mxUtils.getValue(U,"horizontalRack","0");X.resizeParent=!1;X.fill=!0;return X}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var t=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(k,A){return Graph.processFontStyle(t.apply(this,arguments))};var z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(k,A,I,T,P,U,X,aa,ja,
+pa,sa,qa){z.apply(this,arguments);Graph.processFontAttributes(qa)};var C=mxText.prototype.redraw;mxText.prototype.redraw=function(){C.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(k,A,I,T){function P(){for(var Ea=aa.getSelectionCells(),ra=[],ya=0;ya<Ea.length;ya++)aa.isCellVisible(Ea[ya])&&ra.push(Ea[ya]);aa.setSelectionCells(ra)}function U(Ea){aa.setHiddenTags(Ea?[]:ja.slice());P();aa.refresh()}
+function X(Ea,ra){sa.innerText="";if(0<Ea.length){var ya=document.createElement("table");ya.setAttribute("cellpadding","2");ya.style.boxSizing="border-box";ya.style.tableLayout="fixed";ya.style.width="100%";var Ca=document.createElement("tbody");if(null!=Ea&&0<Ea.length)for(var Ma=0;Ma<Ea.length;Ma++)(function(Ha){function Aa(){var x=aa.getCellsForTags([Ha],null,null,!0);aa.isEnabled()?aa.setSelectionCells(x):aa.highlightCells(x,null,null,70)}var Ra=0>mxUtils.indexOf(aa.hiddenTags,Ha),Za=document.createElement("tr"),
La=document.createElement("td");La.style.align="center";La.style.width="16px";var $a=document.createElement("img");$a.setAttribute("src",Ra?Editor.visibleImage:Editor.hiddenImage);$a.setAttribute("title",mxResources.get(Ra?"hideIt":"show",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";La.appendChild($a);mxEvent.addListener($a,"click",function(x){mxEvent.isShiftDown(x)?
-T(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=
-"invert(100%)";mxEvent.addListener($a,"click",function(x){T(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,
-"click",function(x){if(mxEvent.isShiftDown(x))T(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)T(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);
+U(0<=mxUtils.indexOf(aa.hiddenTags,Ha)):(aa.toggleHiddenTag(Ha),P(),aa.refresh());mxEvent.consume(x)});Za.appendChild(La);La=document.createElement("td");La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.selectImage);$a.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter=
+"invert(100%)";mxEvent.addListener($a,"click",function(x){U(!0);Aa();mxEvent.consume(x)});La.appendChild($a);Za.appendChild(La);La=document.createElement("td");La.style.overflow="hidden";La.style.whiteSpace="nowrap";La.style.textOverflow="ellipsis";La.style.verticalAlign="middle";La.style.cursor="pointer";La.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ra?100:40);La.appendChild(a);mxEvent.addListener(La,
+"click",function(x){if(mxEvent.isShiftDown(x))U(!0),Aa();else if(Ra&&0<aa.hiddenTags.length)U(!0);else{var M=ja.slice(),Q=mxUtils.indexOf(M,Ha);M.splice(Q,1);aa.setHiddenTags(M);P();aa.refresh()}mxEvent.consume(x)});Za.appendChild(La);if(aa.isEnabled()){La=document.createElement("td");La.style.verticalAlign="middle";La.style.textAlign="center";La.style.width="18px";if(null==ra){La.style.align="center";La.style.width="16px";$a=document.createElement("img");$a.setAttribute("src",Editor.trashImage);
$a.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity($a,Ra?75:25);$a.className="geAdaptiveAsset";$a.style.verticalAlign="middle";$a.style.cursor="pointer";$a.style.width="16px";if(A||Editor.isDarkMode())$a.style.filter="invert(100%)";mxEvent.addListener($a,"click",function(x){var M=mxUtils.indexOf(ja,Ha);0<=M&&ja.splice(M,1);aa.removeTagsForCells(aa.model.getDescendants(aa.model.getRoot()),[Ha]);aa.refresh();mxEvent.consume(x)});La.appendChild($a)}else{var Da=document.createElement("input");
Da.setAttribute("type","checkbox");Da.style.margin="0px";Da.defaultChecked=null!=ra&&0<=mxUtils.indexOf(ra,Ha);Da.checked=Da.defaultChecked;Da.style.background="transparent";Da.setAttribute("title",mxResources.get(Da.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(Da,"change",function(x){Da.checked?aa.addTagsForCells(aa.getSelectionCells(),[Ha]):aa.removeTagsForCells(aa.getSelectionCells(),[Ha]);mxEvent.consume(x)});La.appendChild(Da)}Za.appendChild(La)}Ca.appendChild(Za)})(Ea[Ma]);ya.appendChild(Ca);
sa.appendChild(ya)}}var aa=this,ja=aa.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect="none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var sa=document.createElement("div");sa.style.position="absolute";sa.style.boxSizing="border-box";sa.style.userSelect="none";sa.style.overflow="auto";sa.style.padding="3px";sa.style.left="0px";sa.style.right="0px";sa.style.top="0px";sa.style.bottom="0px";pa.appendChild(sa);aa.addListener(mxEvent.ROOT,function(){ja=
-aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?W(ja):W(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=
+aa.hiddenTags.slice()});var qa=mxUtils.bind(this,function(Ea,ra){if(k()){Ea=aa.getAllTags();for(ra=0;ra<Ea.length;ra++)0>mxUtils.indexOf(ja,Ea[ra])&&ja.push(Ea[ra]);ja.sort();aa.isSelectionEmpty()?X(ja):X(ja,aa.getCommonTagsForCells(aa.getSelectionCells()))}});aa.selectionModel.addListener(mxEvent.CHANGE,qa);aa.model.addListener(mxEvent.CHANGE,qa);aa.addListener(mxEvent.REFRESH,qa);var wa=document.createElement("div");wa.className="geToolbarContainer";wa.style.position="absolute";wa.style.display=
"flex";wa.style.bottom="0px";wa.style.left="0px";wa.style.right="0px";wa.style.height="26px";wa.style.overflow="hidden";wa.style.padding="3px 4px 4px 4px";wa.style.borderWidth="1px 0px 0px 0px";wa.style.borderStyle="solid";wa.style.whiteSpace="nowrap";if(aa.isEnabled()){sa.style.bottom="34px";var Ba=document.createElement("a");Ba.className="geToolbarButton geAdaptiveAsset geToggleItem";Ba.style.width="16px";Ba.style.height="18px";Ba.style.backgroundPosition="center center";Ba.style.backgroundRepeat=
-"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=J&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+
-")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){J(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=U&&wa.appendChild(U);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var J=Graph.customFontElements[A];k.push({name:J.name,url:J.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var J=
-Editor.guid();document.execCommand("fontname",!1,J);for(var U=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,T=0;T<U.length;T++)U[T].getAttribute("face")==J&&(P=!0,U[T].setAttribute("face",k),null!=A?U[T].setAttribute("data-font-src",A):U[T].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=
-function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(J){null!=window.console&&console.log("Error in vars URL parameter: "+J)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=
-function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,J,U,P,T,W,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,
-arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=
-Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),
-null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var I=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){I.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ca=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ca.apply(this,arguments);this.enumerationState=
-0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+"</div>"};mxGraphView.prototype.redrawEnumerationState=
-function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var J=k.view.scale,U=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?
-new mxRectangle(k.x+k.width-4*J,k.y+4*J,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==U&&A.scale==J||(A.bounds=k,A.value=U,A.scale=J,A.redraw())}};var ea=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ea.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};
-var X=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){X.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),
-null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var U=!1,P=0,T=0,W=mxUtils.bind(this,function(){U||(U=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){U&&(U=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(T<k.length){var sa=this.stoppingCustomActions,qa=k[T++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,
-J))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,
-!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(W(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){W();var Ba=this.getCellsForAction(qa.show,
-!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(W(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(W(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(W(),this.setCellStyles(qa.style.key,
-qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=J&&null!=qa.explore&&Graph.exploreFromCell(this,
-J,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,
-this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var J=this.getLinkForCell(A);null!=J&&"data:action/json,"==J.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,J));if(this.isHtmlLabel(A)){var U=document.createElement("div");U.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=U.getElementsByTagName("a"),T=!1,
-W=0;W<P.length;W++)J=P[W].getAttribute("href"),null!=J&&"data:action/json,"==J.substring(0,17)&&(P[W].setAttribute("href",this.updateCustomLink(k,J)),T=!0);T&&this.labelChanged(A,U.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var J=JSON.parse(A.substring(17));null!=J.actions&&(this.updateCustomLinkActions(k,J.actions),A="data:action/json,"+JSON.stringify(J))}catch(U){}return A};Graph.prototype.updateCustomLinkActions=function(k,A){for(var J=
-0;J<A.length;J++){var U=A[J],P;for(P in U)this.updateCustomLinkAction(k,U[P],"cells"),this.updateCustomLinkAction(k,U[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,J){if(null!=A&&null!=A[J]){for(var U=[],P=0;P<A[J].length;P++)if("*"==A[J][P])U.push(A[J][P]);else{var T=k[A[J][P]];null!=T?""!=T&&U.push(T):U.push(A[J][P])}A[J]=U}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,null,A));if(null!=k.excludeCells){for(var J=
-[],U=0;U<A.length;U++)0>k.excludeCells.indexOf(A[U].id)&&J.push(A[U]);A=J}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var J=0;J<k.length;J++)if("*"==k[J]){var U=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(T){return T!=U},U))}else{var P=this.model.getCell(k[J]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(k))};
-Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;for(var A=0;A<k.length;A++)if(0>
-mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,J,U){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var T=0,W={},aa=0;aa<k.length;aa++)0<k[aa].length&&(W[k[aa]]=!0,T++);for(aa=0;aa<A.length;aa++)if(J&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=k.length)){for(var sa=pa=
-0;sa<ja.length&&pa<T;sa++)null!=W[ja[sa]]&&pa++;pa=pa==T}pa&&(1!=U||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,J=[],U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);J=[];if(0<P.length){P=P.split(" ");for(var T={},W=0;W<P.length;W++)if(null==A||null!=A[P[W]])T[P[W]]=!0,J.push(P[W]);A=T}else return[]}return J};
-Graph.prototype.getTagsForCells=function(k){for(var A=[],J={},U=0;U<k.length;U++){var P=this.getTagsForCell(k[U]);if(0<P.length){P=P.split(" ");for(var T=0;T<P.length;T++)null==J[P[T]]&&(J[P[T]]=!0,A.push(P[T]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){for(var U=this.getTagsForCell(k[J]),P=U.split(" "),T=!1,W=0;W<
-A.length;W++){var aa=mxUtils.trim(A[W]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(U=0<U.length?U+" "+aa:aa,T=!0)}T&&this.setAttributeForCell(k[J],"tags",U)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var J=0;J<k.length;J++){var U=this.getTagsForCell(k[J]);if(0<U.length){for(var P=U.split(" "),T=!1,W=0;W<A.length;W++){var aa=mxUtils.indexOf(P,A[W]);0<=aa&&(P.splice(aa,1),T=!0)}T&&this.setAttributeForCell(k[J],
-"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var J=0;J<k.length;J++)this.model.setVisible(k[J],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,J,U){for(var P=0;P<k.length;P++)this.highlightCell(k[P],
-A,J,U)};Graph.prototype.highlightCell=function(k,A,J,U,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;J=null!=J?J:1E3;k=this.view.getState(k);var T=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),T=new mxCellHighlight(this,A,P,!1),null!=U&&(T.opacity=U),T.highlight(k),window.setTimeout(function(){null!=T.shape&&(mxUtils.setPrefixedStyle(T.shape.node.style,"transition","all 1200ms ease-in-out"),T.shape.node.style.opacity=0);window.setTimeout(function(){T.destroy()},
-1200)},J));return T};Graph.prototype.addSvgShadow=function(k,A,J,U){J=null!=J?J:!1;U=null!=U?U:!0;var P=k.ownerDocument,T=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");T.setAttribute("id",this.shadowId);var W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");W.setAttribute("in","SourceAlpha");W.setAttribute("stdDeviation",this.svgShadowBlur);W.setAttribute("result","blur");T.appendChild(W);
-W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");W.setAttribute("in","blur");W.setAttribute("dx",this.svgShadowSize);W.setAttribute("dy",this.svgShadowSize);W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");W.setAttribute("flood-color",this.svgShadowColor);W.setAttribute("flood-opacity",this.svgShadowOpacity);W.setAttribute("result","offsetColor");
-T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");W.setAttribute("in","offsetColor");W.setAttribute("in2","offsetBlur");W.setAttribute("operator","in");W.setAttribute("result","offsetBlur");T.appendChild(W);W=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");W.setAttribute("in","SourceGraphic");W.setAttribute("in2","offsetBlur");T.appendChild(W);W=k.getElementsByTagName("defs");
-0==W.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=W[0];P.appendChild(T);J||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&U&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),
-null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return T};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==
-this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var J=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(J),"locked","0"));null!=J&&this.setDefaultParent(J)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=
+"no-repeat";Ba.style.backgroundSize="20px";Ba.style.margin="0 2px";Ba.style.display="inline-block";Ba.style.cursor="pointer";var za=Ba.cloneNode(!1);za.style.backgroundImage="url("+Editor.visibleImage+")";za.setAttribute("title",mxResources.get("reset"));mxEvent.addListener(za,"click",function(Ea){aa.setHiddenTags([]);mxEvent.isShiftDown(Ea)||(ja=aa.hiddenTags.slice());P();aa.refresh();mxEvent.consume(Ea)});wa.appendChild(za);null!=I&&(Ba=Ba.cloneNode(!1),Ba.style.backgroundImage="url("+Editor.plusImage+
+")",Ba.setAttribute("title",mxResources.get("add")),mxEvent.addListener(Ba,"click",function(Ea){I(ja,function(ra){ja=ra;qa()});mxEvent.consume(Ea)}),wa.appendChild(Ba));pa.appendChild(wa)}null!=T&&wa.appendChild(T);return{div:pa,refresh:qa}};Graph.prototype.getCustomFonts=function(){var k=this.extFonts;k=null!=k?k.slice():[];for(var A in Graph.customFontElements){var I=Graph.customFontElements[A];k.push({name:I.name,url:I.url})}return k};Graph.prototype.setFont=function(k,A){Graph.addFont(k,A);var I=
+Editor.guid();document.execCommand("fontname",!1,I);for(var T=this.cellEditor.textarea.getElementsByTagName("font"),P=!1,U=0;U<T.length;U++)T[U].getAttribute("face")==I&&(P=!0,T[U].setAttribute("face",k),null!=A?T[U].setAttribute("data-font-src",A):T[U].removeAttribute("data-font-src"));P||document.execCommand("fontname",!1,k)};var F=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return F.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=
+function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var k=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=k)for(var A in k)this.globalVars[A]=k[A]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var N=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=
+function(k){var A=N.apply(this,arguments);null==A&&null!=this.globalVars&&(A=this.globalVars[k]);return A};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var k=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(k.ownerDocument)).decode(k)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var K=Graph.prototype.getSvg;Graph.prototype.getSvg=function(k,A,I,T,P,U,X,aa,ja,pa,sa,qa,wa,Ba,za,Ea){var ra=K.apply(this,
+arguments);if(null!=qa){var ya=ra.getAttribute("style");null==ya&&(ya="");qa="auto"==qa||"none"==this.getAdaptiveColors()?"none"==this.getAdaptiveColors()?"light":"light dark":qa;ra.setAttribute("style",ya+(" color-scheme: "+qa+";"))}var Ca=this.getCustomFonts();if(sa&&0<Ca.length){var Ma=ra.ownerDocument;ya=null!=Ma.createElementNS?Ma.createElementNS(mxConstants.NS_SVG,"style"):Ma.createElement("style");null!=Ma.setAttributeNS?ya.setAttributeNS("type","text/css"):ya.setAttribute("type","text/css");
+for(var Ha="",Aa="",Ra=0;Ra<Ca.length;Ra++){var Za=Ca[Ra].name,La=Ca[Ra].url;Graph.isCssFontUrl(La)?Ha+="@import url("+Graph.rewriteGoogleFontUrl(La)+");\n":Aa+='@font-face {\nfont-family: "'+Za+'";\nsrc: url("'+La+'");\n}\n'}ya.appendChild(Ma.createTextNode(Ha+Aa));ra.getElementsByTagName("defs")[0].appendChild(ya)}Editor.replaceSvgDataUris&&null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&EditorUi.embedSvgImages(ra);this.mathEnabled&&(document.body.appendChild(ra),Editor.MathJaxRender(ra),
+ra.parentNode.removeChild(ra),ya=ra.ownerDocument.getElementById("MJX-SVG-styles"),null!=ya&&ra.getElementsByTagName("defs")[0].appendChild(ya.cloneNode(!0)));return ra};var J=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=function(k){J.apply(this,arguments);null!=k.secondLabel&&(k.secondLabel.destroy(),k.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(k){return[k.shape,k.text,k.secondLabel,k.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=
+function(){ea.apply(this,arguments);this.enumerationState=0};var da=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(k){null!=k.shape&&this.redrawEnumerationState(k);return da.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(k){k=decodeURIComponent(mxUtils.getValue(k.style,"enumerateValue",""));""==k&&(k=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(k)+
+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(k){var A="1"==mxUtils.getValue(k.style,"enumerate",0);A&&null==k.secondLabel?(k.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),k.secondLabel.size=12,k.secondLabel.state=k,k.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(k,k.secondLabel)):A||null==k.secondLabel||(k.secondLabel.destroy(),k.secondLabel=null);A=k.secondLabel;if(null!=A){var I=k.view.scale,
+T=this.createEnumerationValue(k);k=this.graph.model.isVertex(k.cell)?new mxRectangle(k.x+k.width-4*I,k.y+4*I,0,0):mxRectangle.fromPoint(k.view.getPoint(k));A.bounds.equals(k)&&A.value==T&&A.scale==I||(A.bounds=k,A.value=T,A.scale=I,A.redraw())}};var ca=Graph.prototype.refresh;Graph.prototype.refresh=function(){this.refreshBackgroundImage();ca.apply(this,arguments)};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),
+this.view.validateBackgroundImage())};var W=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){W.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(k,A){"data:action/json,"==k.substring(0,17)&&(k=JSON.parse(k.substring(17)),null!=k.actions&&this.executeCustomActions(k.actions,null,A))};Graph.prototype.executeCustomActions=function(k,A,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&
+window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var T=!1,P=0,U=0,X=mxUtils.bind(this,function(){T||(T=!0,this.model.beginUpdate())}),aa=mxUtils.bind(this,function(){T&&(T=!1,this.model.endUpdate())}),ja=mxUtils.bind(this,function(){0<P&&P--;0==P&&pa()}),pa=mxUtils.bind(this,function(){if(U<k.length){var sa=this.stoppingCustomActions,qa=
+k[U++],wa=[];if(null!=qa.open)if(aa(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open,I))return}else this.openLink(qa.open);null==qa.wait||sa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;ja()}),P++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=qa.wait?parseInt(qa.wait):1E3),aa());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,
+!0)),qa.opacity.value);null!=qa.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,ja,sa?0:qa.fadeIn.delay));null!=qa.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,ja,sa?0:qa.fadeOut.delay));null!=qa.wipeIn&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,!0),!0)));null!=qa.wipeOut&&(wa=wa.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&
+(X(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){X();var Ba=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Ba),1);this.setCellsVisible(Ba,!0)}null!=qa.hide&&(X(),Ba=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Ba),0),this.setCellsVisible(Ba,!1));null!=qa.toggleStyle&&null!=qa.toggleStyle.key&&(X(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:
+"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(X(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Ba=[];null!=qa.select&&this.isEnabled()&&(Ba=this.getCellsForAction(qa.select),this.setSelectionCells(Ba));null!=qa.highlight&&(Ba=this.getCellsForAction(qa.highlight),this.highlightCells(Ba,qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Ba=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&
+this.fitWindow(qa.viewbox,qa.viewbox.border);0<Ba.length&&this.scrollCellToVisible(Ba[0]);null!=I&&null!=qa.explore&&Graph.exploreFromCell(this,I,qa.explore);if(null!=qa.tags){if(null!=qa.tags.toggle){var za=qa.tags.toggle;0==za.length&&(za=this.getAllTags());for(Ba=0;Ba<za.length;Ba++)this.toggleHiddenTag(za[Ba])}za=null;null!=qa.tags.hidden&&(null==za&&(za=[]),za=za.concat(qa.tags.hidden));if(null!=qa.tags.visible){null==za&&(za=[]);var Ea=this.getAllTags();for(Ba=0;Ba<Ea.length;Ba++)0>mxUtils.indexOf(qa.tags.visible,
+Ea[Ba])&&0>mxUtils.indexOf(za,Ea[Ba])&&za.push(Ea[Ba])}null!=za&&this.setHiddenTags(za);this.refresh()}0<wa.length&&(P++,this.executeAnimations(wa,ja,sa?1:qa.steps,sa?0:qa.delay));0==P?pa():aa()}else this.stoppingCustomActions=this.executingCustomActions=!1,aa(),null!=A&&A()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(k,A){var I=this.getLinkForCell(A);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(A,this.updateCustomLink(k,I));if(this.isHtmlLabel(A)){var T=document.createElement("div");
+T.innerHTML=Graph.sanitizeHtml(this.getLabel(A));for(var P=T.getElementsByTagName("a"),U=!1,X=0;X<P.length;X++)I=P[X].getAttribute("href"),null!=I&&"data:action/json,"==I.substring(0,17)&&(P[X].setAttribute("href",this.updateCustomLink(k,I)),U=!0);U&&this.labelChanged(A,T.innerHTML)}};Graph.prototype.updateCustomLink=function(k,A){if("data:action/json,"==A.substring(0,17))try{var I=JSON.parse(A.substring(17));null!=I.actions&&(this.updateCustomLinkActions(k,I.actions),A="data:action/json,"+JSON.stringify(I))}catch(T){}return A};
+Graph.prototype.updateCustomLinkActions=function(k,A){for(var I=0;I<A.length;I++){var T=A[I],P;for(P in T)this.updateCustomLinkAction(k,T[P],"cells"),this.updateCustomLinkAction(k,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(k,A,I){if(null!=A&&null!=A[I]){for(var T=[],P=0;P<A[I].length;P++)if("*"==A[I][P])T.push(A[I][P]);else{var U=k[A[I][P]];null!=U?""!=U&&T.push(U):T.push(A[I][P])}A[I]=T}};Graph.prototype.getCellsForAction=function(k,A){A=this.getCellsById(k.cells).concat(this.getCellsForTags(k.tags,
+null,A));if(null!=k.excludeCells){for(var I=[],T=0;T<A.length;T++)0>k.excludeCells.indexOf(A[T].id)&&I.push(A[T]);A=I}return A};Graph.prototype.getCellsById=function(k){var A=[];if(null!=k)for(var I=0;I<k.length;I++)if("*"==k[I]){var T=this.model.getRoot();A=A.concat(this.model.filterDescendants(function(U){return U!=T},T))}else{var P=this.model.getCell(k[I]);null!=P&&A.push(P)}return A};var ba=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(k){return ba.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(k))};Graph.prototype.setHiddenTags=function(k){this.hiddenTags=k;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(k){var A=mxUtils.indexOf(this.hiddenTags,k);0>A?this.hiddenTags.push(k):0<=A&&this.hiddenTags.splice(A,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(k){if(null==k||0==k.length||0==this.hiddenTags.length)return!1;k=k.split(" ");if(k.length>this.hiddenTags.length)return!1;
+for(var A=0;A<k.length;A++)if(0>mxUtils.indexOf(this.hiddenTags,k[A]))return!1;return!0};Graph.prototype.getCellsForTags=function(k,A,I,T){var P=[];if(null!=k){A=null!=A?A:this.model.getDescendants(this.model.getRoot());for(var U=0,X={},aa=0;aa<k.length;aa++)0<k[aa].length&&(X[k[aa]]=!0,U++);for(aa=0;aa<A.length;aa++)if(I&&this.model.getParent(A[aa])==this.model.root||this.model.isVertex(A[aa])||this.model.isEdge(A[aa])){var ja=this.getTagsForCell(A[aa]),pa=!1;if(0<ja.length&&(ja=ja.split(" "),ja.length>=
+k.length)){for(var sa=pa=0;sa<ja.length&&pa<U;sa++)null!=X[ja[sa]]&&pa++;pa=pa==U}pa&&(1!=T||this.isCellVisible(A[aa]))&&P.push(A[aa])}}return P};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(k){for(var A=null,I=[],T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);I=[];if(0<P.length){P=P.split(" ");for(var U={},X=0;X<P.length;X++)if(null==A||null!=A[P[X]])U[P[X]]=!0,I.push(P[X]);
+A=U}else return[]}return I};Graph.prototype.getTagsForCells=function(k){for(var A=[],I={},T=0;T<k.length;T++){var P=this.getTagsForCell(k[T]);if(0<P.length){P=P.split(" ");for(var U=0;U<P.length;U++)null==I[P[U]]&&(I[P[U]]=!0,A.push(P[U]))}}return A};Graph.prototype.getTagsForCell=function(k){return this.getAttributeForCell(k,"tags","")};Graph.prototype.addTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){for(var T=this.getTagsForCell(k[I]),
+P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.trim(A[X]);""!=aa&&0>mxUtils.indexOf(P,aa)&&(T=0<T.length?T+" "+aa:aa,U=!0)}U&&this.setAttributeForCell(k[I],"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(k,A){if(0<k.length&&0<A.length){this.model.beginUpdate();try{for(var I=0;I<k.length;I++){var T=this.getTagsForCell(k[I]);if(0<T.length){for(var P=T.split(" "),U=!1,X=0;X<A.length;X++){var aa=mxUtils.indexOf(P,A[X]);0<=aa&&(P.splice(aa,1),U=!0)}U&&this.setAttributeForCell(k[I],
+"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(k){this.model.beginUpdate();try{for(var A=0;A<k.length;A++)this.model.setVisible(k[A],!this.model.isVisible(k[A]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(k,A){this.model.beginUpdate();try{for(var I=0;I<k.length;I++)this.model.setVisible(k[I],A)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(k,A,I,T){for(var P=0;P<k.length;P++)this.highlightCell(k[P],
+A,I,T)};Graph.prototype.highlightCell=function(k,A,I,T,P){A=null!=A?A:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;k=this.view.getState(k);var U=null;null!=k&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(k.style,mxConstants.STYLE_STROKEWIDTH,1)+P),U=new mxCellHighlight(this,A,P,!1),null!=T&&(U.opacity=T),U.highlight(k),window.setTimeout(function(){null!=U.shape&&(mxUtils.setPrefixedStyle(U.shape.node.style,"transition","all 1200ms ease-in-out"),U.shape.node.style.opacity=0);window.setTimeout(function(){U.destroy()},
+1200)},I));return U};Graph.prototype.addSvgShadow=function(k,A,I,T){I=null!=I?I:!1;T=null!=T?T:!0;var P=k.ownerDocument,U=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");U.setAttribute("id",this.shadowId);var X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");X.setAttribute("in","SourceAlpha");X.setAttribute("stdDeviation",this.svgShadowBlur);X.setAttribute("result","blur");U.appendChild(X);
+X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");X.setAttribute("in","blur");X.setAttribute("dx",this.svgShadowSize);X.setAttribute("dy",this.svgShadowSize);X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");X.setAttribute("flood-color",this.svgShadowColor);X.setAttribute("flood-opacity",this.svgShadowOpacity);X.setAttribute("result","offsetColor");
+U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");X.setAttribute("in","offsetColor");X.setAttribute("in2","offsetBlur");X.setAttribute("operator","in");X.setAttribute("result","offsetBlur");U.appendChild(X);X=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");X.setAttribute("in","SourceGraphic");X.setAttribute("in2","offsetBlur");U.appendChild(X);X=k.getElementsByTagName("defs");
+0==X.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=k.firstChild?k.insertBefore(P,k.firstChild):k.appendChild(P)):P=X[0];P.appendChild(U);I||(A=null!=A?A:k.getElementsByTagName("g")[0],null!=A&&(A.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(k.getAttribute("width")))&&T&&(k.setAttribute("width",parseInt(k.getAttribute("width"))+6),k.setAttribute("height",parseInt(k.getAttribute("height"))+6),A=k.getAttribute("viewBox"),
+null!=A&&0<A.length&&(A=A.split(" "),3<A.length&&(w=parseFloat(A[2])+6,h=parseFloat(A[3])+6,k.setAttribute("viewBox",A[0]+" "+A[1]+" "+w+" "+h))))));return U};Graph.prototype.setShadowVisible=function(k,A){mxClient.IS_SVG&&!mxClient.IS_SF&&(A=null!=A?A:!0,(this.shadowVisible=k)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),A&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.checkDefaultParent=function(){null==
+this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultParent(null),this.selectUnlockedLayer())};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var k=this.model.getChildCount(this.model.root),A=0;do var I=this.model.getChildAt(this.model.root,A);while(A++<k&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=
[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+
"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=
[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml",STENCIL_PATH+"/kubernetes2.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=
@@ -3452,33 +3453,33 @@ this.defaultParent||this.model.contains(this.defaultParent)||(this.setDefaultPar
"/ibm.xml"];mxStencilRegistry.libraries.ibmcloud=[STENCIL_PATH+"/ibm_cloud.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=
[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];
mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxStencilRegistry.libraries.salesforce=
-[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,J,U,P,T,W,aa,ja,pa){if(null!=J&&null==mxMarker.markers[J]){var sa=this.getPackageForType(J);
-null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,J,U,P,T){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,J){function U(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,
+[STENCIL_PATH+"/salesforce.xml"];mxStencilRegistry.libraries.sap=[SHAPES_PATH+"/mxSAP.js",STENCIL_PATH+"/sap.xml"];mxStencilRegistry.libraries.emoji=[SHAPES_PATH+"/emoji/mxEmoji.js"];mxMarker.getPackageForType=function(k){var A=null;null!=k&&0<k.length&&("ER"==k.substring(0,2)?A="mxgraph.er":"sysML"==k.substring(0,5)&&(A="mxgraph.sysml"));return A};var ha=mxMarker.createMarker;mxMarker.createMarker=function(k,A,I,T,P,U,X,aa,ja,pa){if(null!=I&&null==mxMarker.markers[I]){var sa=this.getPackageForType(I);
+null!=sa&&mxStencilRegistry.getStencil(sa)}return ha.apply(this,arguments)};var ma=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(k,A,I,T,P,U){"1"==mxUtils.getValue(A.style,"lineShape",null)&&k.setFillColor(mxUtils.getValue(A.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return ma.apply(this,arguments)};PrintDialog.prototype.create=function(k,A,I){function T(){Ba.value=Math.max(1,Math.min(pa,Math.max(parseInt(Ba.value),parseInt(wa.value))));wa.value=Math.max(1,Math.min(pa,
Math.min(parseInt(Ba.value),parseInt(wa.value))))}function P(ua){k.lastPrintPagesRadioChecked=qa.checked;k.lastPrintSelectionOnlyChecked=Ea.checked;k.lastPrintCropRadioChecked=ya.checked;k.lastPrintFitRadioChecked=Ca.checked;qa.checked&&wa.value<Ba.value?(k.lastPrintPagesFromInput=wa.value,k.lastPrintPagesToInput=Ba.value):(k.lastPrintPagesFromInput=null,k.lastPrintPagesToInput=null);V.value=Math.max(1,Math.min(1600,parseInt(V.value)))+"%";k.lastPrintZoom=V.value;k.lastPrintBorder=Q.value;k.lastPrintGrid=
ia.checked;k.lastPrintTransparent=ka.checked;k.lastPrintInclude=oa.checked;k.lastPrintSheetsAcross=x.value;k.lastPrintSheetsDown=M.value;var Fa={};Fa.border=parseInt(Q.value);Fa.scale=parseInt(V.value)/100;Fa.grid=ia.checked;Fa.transparent=ka.checked;Fa.includeCopy=oa.checked;Fa.sheetsAcross=parseInt(x.value);Fa.sheetsDown=parseInt(M.value);Fa.pagesFrom=parseInt(wa.value);Fa.pagesTo=parseInt(Ba.value);Fa.allPages=sa.checked;Fa.selection=Ea.checked;Fa.pageView=ra.checked;Fa.crop=ya.checked;Fa.fit=
-Ca.checked;return null!=J?J(!ua,Fa):k.print(!ua,Fa)}var T=k.editor.graph,W=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));W.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",
+Ca.checked;return null!=I?I(!ua,Fa):k.print(!ua,Fa)}var U=k.editor.graph,X=document.createElement("div"),aa=document.createElement("h3");aa.style.width="100%";aa.style.textAlign="center";aa.style.marginTop="0px";mxUtils.write(aa,A||mxResources.get("print"));X.appendChild(aa);var ja=1,pa=1;aa=document.createElement("div");aa.style.whiteSpace="nowrap";var sa=document.createElement("input");sa.style.marginRight="8px";sa.style.marginBottom="8px";sa.setAttribute("type","radio");sa.setAttribute("name",
"pages-printdialog");aa.appendChild(sa);A=document.createElement("span");mxUtils.write(A,mxResources.get("allPages"));mxEvent.addListener(A,"click",function(){sa.checked=!0});aa.appendChild(A);mxUtils.br(aa);var qa=sa.cloneNode(!0);aa.appendChild(qa);A=document.createElement("span");mxUtils.write(A,mxResources.get("pages")+":");aa.appendChild(A);mxEvent.addListener(A,"click",function(){qa.checked=!0});var wa=document.createElement("input");wa.style.margin="0 4px";wa.setAttribute("value","1");wa.setAttribute("type",
-"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",U);mxEvent.addListener(Ba,"change",U);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=
+"number");wa.setAttribute("min","1");wa.style.width="40px";aa.appendChild(wa);A=document.createElement("span");mxUtils.write(A,mxResources.get("to"));aa.appendChild(A);var Ba=wa.cloneNode(!0);aa.appendChild(Ba);mxEvent.addListener(wa,"focus",function(){qa.checked=!0});mxEvent.addListener(Ba,"focus",function(){qa.checked=!0});mxEvent.addListener(wa,"change",T);mxEvent.addListener(Ba,"change",T);if(null!=k.pages&&(pa=k.pages.length,null!=k.currentPage))for(var za=0;za<pa;za++)if(k.currentPage==k.pages[za]){ja=
za+1;break}null!=k.lastPrintPagesFromInput&&null!=k.lastPrintPagesToInput?(wa.value=Math.min(pa,Math.max(1,k.lastPrintPagesFromInput)),Ba.value=Math.min(pa,Math.max(1,k.lastPrintPagesToInput))):(wa.value=ja,Ba.value=ja);wa.setAttribute("max",pa);Ba.setAttribute("max",pa);za=mxUtils.button(mxResources.get("currentPage"),function(ua){wa.value=ja;Ba.value=ja;qa.checked=!0});za.setAttribute("title",mxResources.get("currentPage"));za.style.marginLeft="4px";za.style.maxWidth="100px";za.style.overflow="hidden";
-za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&W.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";T.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");T.isEnabled()&&
-(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(T.isEnabled()||1<pa)&&W.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!T.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;T.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});T=document.createElement("div");T.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=
-"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");T.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ra.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");
-T.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));T.appendChild(A);mxEvent.addListener(T,"click",function(){ya.checked=!0});W.appendChild(T);T=document.createElement("div");T.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=
-"2px";A.appendChild(Ca);T.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(T,"click",function(ua){mxEvent.getSource(ua)!=
+za.style.textOverflow="ellipsis";za.style.whiteSpace="nowrap";aa.appendChild(za);1<pa&&X.appendChild(aa);aa=document.createElement("div");aa.style.borderBottom="1px solid lightGray";aa.style.paddingBottom="12px";aa.style.marginBottom="12px";aa.style.whiteSpace="nowrap";var Ea=document.createElement("input");Ea.setAttribute("name","pages-printdialog");Ea.setAttribute("type",1==pa?"checkbox":"radio");Ea.style.marginRight="8px";U.isSelectionEmpty()&&Ea.setAttribute("disabled","disabled");U.isEnabled()&&
+(aa.appendChild(Ea),A=document.createElement("span"),mxUtils.write(A,mxResources.get("selectionOnly")),aa.appendChild(A));(U.isEnabled()||1<pa)&&X.appendChild(aa);!k.isPagesEnabled()||k.lastPrintPagesRadioChecked?qa.checked=!0:!U.isSelectionEmpty()&&k.lastPrintSelectionOnlyChecked?Ea.checked=!0:sa.checked=!0;U.isSelectionEmpty()||mxEvent.addListener(A,"click",function(){Ea.checked=!Ea.checked});U=document.createElement("div");U.style.whiteSpace="nowrap";var ra=document.createElement("input");ra.style.marginBottom=
+"8px";ra.style.marginRight="8px";ra.setAttribute("type","radio");ra.setAttribute("name","printSize");U.appendChild(ra);A=document.createElement("span");mxUtils.write(A,mxResources.get("pageView"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ra.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var ya=document.createElement("input");ya.style.marginBottom="8px";ya.style.marginRight="8px";ya.setAttribute("type","radio");ya.setAttribute("name","printSize");
+U.appendChild(ya);A=document.createElement("span");mxUtils.write(A,mxResources.get("crop"));U.appendChild(A);mxEvent.addListener(U,"click",function(){ya.checked=!0});X.appendChild(U);U=document.createElement("div");U.style.whiteSpace="nowrap";var Ca=document.createElement("input");Ca.style.marginBottom="8px";Ca.style.marginRight="8px";Ca.setAttribute("type","radio");Ca.setAttribute("name","printSize");A=document.createElement("div");A.style.display="inline-block";A.style.verticalAlign="top";A.style.paddingTop=
+"2px";A.appendChild(Ca);U.appendChild(A);aa=document.createElement("table");aa.style.display="inline-block";aa.style.borderSpacing="0";za=document.createElement("tbody");var Ma=document.createElement("tr"),Ha=Ma.cloneNode(!0),Aa=document.createElement("td"),Ra=Aa.cloneNode(!0),Za=Aa.cloneNode(!0),La=Aa.cloneNode(!0),$a=Aa.cloneNode(!0),Da=Aa.cloneNode(!0);Aa.style.textAlign="right";La.style.textAlign="right";mxUtils.write(Aa,mxResources.get("fitTo"));mxEvent.addListener(U,"click",function(ua){mxEvent.getSource(ua)!=
Ca&&(Ca.checked=!Ca.checked)});var x=document.createElement("input");x.style.margin="0 2px";x.style.boxSizing="border-box";x.setAttribute("value",k.lastPrintSheetsAcross||"1");x.setAttribute("min","1");x.setAttribute("type","number");x.style.width="40px";Ra.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsAcross"));Za.appendChild(A);mxUtils.write(La,mxResources.get("fitToBy"));var M=x.cloneNode(!0);M.setAttribute("value",k.lastPrintSheetsDown||"1");$a.appendChild(M);
mxEvent.addListener(x,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});mxEvent.addListener(M,"click",function(ua){Ca.checked=!0;mxEvent.consume(ua)});k.lastPrintCropRadioChecked?ya.checked=!0:k.lastPrintFitRadioChecked?Ca.checked=!0:ra.checked=!0;A=document.createElement("span");mxUtils.write(A,mxResources.get("fitToSheetsDown"));Da.appendChild(A);Ma.appendChild(Aa);Ma.appendChild(Ra);Ma.appendChild(Za);Ha.appendChild(La);Ha.appendChild($a);Ha.appendChild(Da);za.appendChild(Ma);za.appendChild(Ha);
-aa.appendChild(za);T.appendChild(aa);W.appendChild(T);T=document.createElement("div");T.style.borderTop="1px solid lightGray";T.style.whiteSpace="nowrap";T.style.paddingTop="12px";T.style.marginTop="12px";T.style.paddingLeft="8px";mxUtils.write(T,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;
-T.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");T.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";T.appendChild(V);mxUtils.br(T);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;T.appendChild(ia);A=document.createElement("span");
-A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));T.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=J&&(T.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),T.appendChild(A),
-mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==J||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(T),T.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),T.appendChild(A),mxEvent.addListener(A,
-"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));W.appendChild(T);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=J||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));T=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});T.className="geBtn";k.editor.cancelFirst&&A.appendChild(T);PrintDialog.previewEnabled&&null==J&&(aa=mxUtils.button(mxResources.get("preview"),
-function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=J?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(T);W.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(W.classList.add("geDarkMode"),W.style.colorScheme="dark"):
-(W.classList.remove("geDarkMode"),W.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");W.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=W};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
+aa.appendChild(za);U.appendChild(aa);X.appendChild(U);U=document.createElement("div");U.style.borderTop="1px solid lightGray";U.style.whiteSpace="nowrap";U.style.paddingTop="12px";U.style.marginTop="12px";U.style.paddingLeft="8px";mxUtils.write(U,mxResources.get("borderWidth")+":");var Q=document.createElement("input");Q.setAttribute("type","number");Q.setAttribute("min","0");Q.style.width="40px";Q.style.marginLeft="4px";Q.value=null!=k.lastPrintBorder?k.lastPrintBorder:mxPrintPreview.prototype.pageMargin;
+U.appendChild(Q);A=document.createElement("span");A.style.marginLeft="8px";mxUtils.write(A,mxResources.get("zoom")+":");U.appendChild(A);var V=document.createElement("input");V.style.width="60px";V.style.marginLeft="4px";V.value=null!=k.lastPrintZoom?k.lastPrintZoom:"100%";U.appendChild(V);mxUtils.br(U);var ia=document.createElement("input");ia.setAttribute("type","checkbox");ia.style.marginTop="12px";ia.checked=null!=k.lastPrintGrid?k.lastPrintGrid:!1;U.appendChild(ia);A=document.createElement("span");
+A.style.marginLeft="4px";A.style.marginRight="8px";mxUtils.write(A,mxResources.get("grid"));U.appendChild(A);mxEvent.addListener(A,"click",function(ua){ia.checked=!0;mxEvent.consume(ua)});var ka=document.createElement("input");ka.setAttribute("type","checkbox");ka.style.marginTop="10px";ka.checked=null!=k.lastPrintTransparent?k.lastPrintTransparent:!1;null!=I&&(U.appendChild(ka),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("transparentBackground")),U.appendChild(A),
+mxEvent.addListener(A,"click",function(ua){ka.checked=!0;mxEvent.consume(ua)}));var oa=document.createElement("input");oa.setAttribute("type","checkbox");oa.style.marginTop="10px";oa.checked=null!=k.lastPrintInclude?k.lastPrintInclude:Editor.defaultIncludeDiagram;null==I||mxClient.IS_CHROMEAPP||"draw.io"!=k.getServiceName()||(mxUtils.br(U),U.appendChild(oa),A=document.createElement("span"),A.style.marginLeft="4px",mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram")),U.appendChild(A),mxEvent.addListener(A,
+"click",function(ua){oa.checked=!0;mxEvent.consume(ua)}));X.appendChild(U);A=document.createElement("div");A.style.marginTop="40px";A.style.textAlign="right";A.style.whiteSpace="nowrap";k.isOffline()||null!=I||A.appendChild(k.createHelpIcon("https://www.drawio.com/doc/faq/print-diagram"));U=mxUtils.button(mxResources.get("cancel"),function(){k.hideDialog()});U.className="geBtn";k.editor.cancelFirst&&A.appendChild(U);PrintDialog.previewEnabled&&null==I&&(aa=mxUtils.button(mxResources.get("preview"),
+function(){try{k.hideDialog(),P(!1)}catch(ua){k.handleError(ua)}}),aa.className="geBtn",A.appendChild(aa));aa=mxUtils.button(mxResources.get(null!=I?"export":PrintDialog.previewEnabled?"print":"ok"),function(){try{k.hideDialog(),P(!0)}catch(ua){k.handleError(ua)}});aa.className="geBtn gePrimaryBtn";A.appendChild(aa);k.editor.cancelFirst||A.appendChild(U);X.appendChild(A);if(k.editor.isChromelessView()){var xa=function(){Editor.isDarkMode()?(X.classList.add("geDarkMode"),X.style.colorScheme="dark"):
+(X.classList.remove("geDarkMode"),X.style.colorScheme="light")};k.addListener("darkModeChanged",xa);xa();var ta=function(ua,Fa){ua=Fa.getProperty("dialog");X.parentNode==ua.container&&(k.editor.removeListener(ta),k.removeListener(xa))};k.editor.addListener("hideDialog",ta)}this.container=X};var Y=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||
(this.page.viewState.background=this.color);if(!this.ignoreImage){var k=this.image;null!=k&&null!=k.src&&Graph.isPageLink(k.src)&&(k={originalSrc:k.src});this.page.viewState.backgroundImage=k}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.adaptiveColors&&(this.page.viewState.adaptiveColors=this.adaptiveColors);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else Y.apply(this,
arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.adaptiveColors&&this.adaptiveColors!=this.ui.editor.graph.adaptiveColors&&(k=this.ui.editor.graph.adaptiveColors,this.ui.setAdaptiveColors(this.adaptiveColors),this.adaptiveColors=null!=k?k:"default"),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),
this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),Z=new Image;Z.onload=function(){try{la.getContext("2d").drawImage(Z,0,0);var k=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=k&&6<k.length}catch(A){}};Z.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(k){}Editor.prototype.useCanvasForExport=
!1})();(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};b.afterDecode=function(e,g,m){m.previousColor=m.color;m.previousImage=m.image;m.previousFormat=m.format;m.previousAdaptiveColors=m.adaptiveColors;null!=m.foldingEnabled&&(m.foldingEnabled=!m.foldingEnabled);null!=m.mathEnabled&&(m.mathEnabled=!m.mathEnabled);null!=m.shadowVisible&&(m.shadowVisible=!m.shadowVisible);return m};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.9";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,g,m){m.ui=e.ui;return g};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="26.0.13";EditorUi.compactUi="atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"https://preprod.diagrams.net/"!=window.location.hostname&&"support.draw.io"!=window.location.hostname&&
"test.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=
null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.drawio.com/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.mermaidDiagramTypes="flowchart classDiagram sequenceDiagram stateDiagram mindmap graph erDiagram requirementDiagram journey gantt pie gitGraph".split(" ");
EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};
@@ -3488,7 +3489,7 @@ function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.
"version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(l){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],f=0;f<arguments.length;f++)c.push(arguments[f]);console.log.apply(console,c)}}catch(l){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.embedSvgImages=function(c){c=c.getElementsByTagName("image");
for(var f=[],l=0;l<c.length;l++)f.push(c[l]);for(l=0;l<f.length;l++)EditorUi.replaceSvgImage(f[l])};EditorUi.replaceSvgImage=function(c){try{var f=null;f=null==c.getAttributeNS?c.getAttribute("xlink:href"):c.getAttributeNS(mxConstants.NS_XLINK,"href");var l=EditorUi.getSvgSubtree(f);if(null!=l&&"svg"==l.nodeName){l.setAttribute("x",c.getAttribute("x"));l.setAttribute("y",c.getAttribute("y"));l.setAttribute("width",c.getAttribute("width"));l.setAttribute("height",c.getAttribute("height"));l.style.fontFamily=
"initial";var t=mxUtils.createElementNs(l.ownerDocument,mxConstants.NS_SVG,"g");t.appendChild(l);c.hasAttribute("transform")&&t.setAttribute("transform",c.getAttribute("transform"));c.parentNode.replaceChild(t,c)}}catch(z){}};EditorUi.getSvgSubtree=function(c){var f=Graph.getSvgFromDataUri(c);c=null;if(null!=f){c=Graph.sanitizeNode(mxUtils.parseXml(f).documentElement);f=c.getElementsByTagName("style");if(0<f.length){var l="svg-image-"+Editor.guid();c.setAttribute("id",l);for(var t=document.implementation.createHTMLDocument(""),
-z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var I=K.selectorText.split(","),ca=0;ca<I.length;ca++)I[ca]="#"+l+" "+I[ca];K.selectorText=I.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
+z=document.createElement("style"),C=0;C<f.length;C++){z.textContent=f[C].textContent;t.body.appendChild(z);for(var F="",N=0;N<z.sheet.cssRules.length;N++){var K=z.sheet.cssRules[N];if(null!=K.selectorText){for(var J=K.selectorText.split(","),ea=0;ea<J.length;ea++)J[ea]="#"+l+" "+J[ea];K.selectorText=J.join(",")}F+=K.cssText+"\n"}f[C].textContent=F}}f=c.getElementsByTagName("*");for(l=0;l<f.length;l++)f[l].removeAttribute("data-cell-id")}return c};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';
EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=1200;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=2E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportTheme="auto";EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;EditorUi.prototype.webpSupported=!1;try{var c=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!c.getContext||!c.getContext("2d"))}catch(z){}try{var f=document.createElement("canvas"),
@@ -3498,10 +3499,10 @@ f,l)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalDat
EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){var f=this.editor.graph;f.mathEnabled=c;null!=f.view.backgroundImage&&(f.view.backgroundImage.destroy(),f.view.backgroundImage=null);this.editor.updateGraphComponents();
f.refresh();f.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.setAdaptiveColors=function(c){this.editor.graph.setAdaptiveColors(c);this.editor.graph.view.clear();this.fireEvent(new mxEventObject("adaptiveColorsChanged"))};EditorUi.prototype.isStandaloneApp=function(){return mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()};EditorUi.prototype.isOfflineApp=
function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};EditorUi.prototype.createSpinner=function(c,f,l){var t=null==c||null==f;l=null!=l?l:24;var z=new Spinner({lines:12,length:l,width:Math.round(l/3),radius:Math.round(l/2),rotate:0,color:"light-dark(#000000, #C0C0C0)",
-speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,I=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ea,X,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=X&&(N=window.setTimeout(function(){z.stop();N=null;X({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ea&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/
+speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),C=this.timeout,F=z.spin,N=null,K=null,J=mxUtils.bind(this,function(da){null!=da&&da()});z.spin=function(da,ca,W,ba){ba=null!=ba?ba:C;var ha=!1;if(!this.active){var ma=Date.now();null!=W&&(N=window.setTimeout(function(){z.stop();N=null;W({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout"),retry:K})},ba));F.call(this,da);this.active=!0;null!=ca&&(t&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/
2-2),ha=document.createElement("div"),ha.className="geSpinnerStatus",ha.style.position="absolute",ha.style.whiteSpace="nowrap",ha.style.background="#4B4243",ha.style.color="white",ha.style.fontFamily=Editor.defaultHtmlFont,ha.style.fontSize="9pt",ha.style.padding="6px",ha.style.paddingLeft="10px",ha.style.paddingRight="10px",ha.style.zIndex=2E9,ha.style.left=Math.max(0,c)+"px",ha.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(ha.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(ha.style,
-"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ea.substring(ea.length-3,ea.length)&&"!"!=ea.charAt(ea.length-1)&&(ea+="..."),ha.innerHTML=mxUtils.htmlEntities(ea),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=I;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ea,X,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ea,
-X,ba);try{la()}catch(Z){null!=X&&X(Z)}})}catch(Z){null!=X&&X(Z)}}));this.stop();return Y});ha=!0}return ha};var ca=z.stop;z.stop=function(){ca.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return I};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=
+"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(ha.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=ca.substring(ca.length-3,ca.length)&&"!"!=ca.charAt(ca.length-1)&&(ca+="..."),ha.innerHTML=mxUtils.htmlEntities(ca),da.appendChild(ha),z.status=ha);this.pause=mxUtils.bind(this,function(){var Y=J;this.active&&(ba=Math.max(0,ba-(Date.now()-ma)),Y=mxUtils.bind(this,function(la){this.spin(da,ca,W,ba);if(null!=la)try{la(),K=mxUtils.bind(this,function(){this.spin(da,ca,
+W,ba);try{la()}catch(Z){null!=W&&W(Z)}})}catch(Z){null!=W&&W(Z)}}));this.stop();return Y});ha=!0}return ha};var ea=z.stop;z.stop=function(){ea.call(this);this.active&&(this.active=!1,null!=N&&(window.clearTimeout(N),N=null),null!=z.status&&null!=z.status.parentNode&&z.status.parentNode.removeChild(z.status),z.status=null)};z.pause=function(){return J};return z};EditorUi.prototype.isCompatibleString=function(c){try{var f=mxUtils.parseXml(c),l=this.editor.extractGraphModel(f.documentElement,!0);return null!=
l&&0==l.getElementsByTagName("parsererror").length}catch(t){}return!1};EditorUi.isVisioFilename=function(c){return/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c)};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==
c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;EditorUi.prototype.createKeyHandler=
function(c){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var l=f.getFunction,t=this.editor.graph,z=this;f.getFunction=function(C){if(t.isSelectionEmpty()&&null!=z.pages&&0<z.pages.length){var F=z.getSelectedPageIndex();if(mxEvent.isShiftDown(C)){if(37==C.keyCode)return function(){0<F&&z.movePage(F,F-1)};if(38==C.keyCode)return function(){0<F&&z.movePage(F,0)};if(39==C.keyCode)return function(){F<z.pages.length-1&&z.movePage(F,F+1)};if(40==C.keyCode)return function(){F<
@@ -3510,13 +3511,13 @@ mxEvent.isShiftDown(C)||mxEvent.isControlDown(C)||mxClient.IS_MAC&&mxEvent.isMet
C=this.editor.extractGraphModel(z.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=C?mxUtils.getXml(C):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var f=c.indexOf('<meta charset="utf-8">');0<=f&&(c=c.slice(0,f)+'<meta charset="utf-8"/>'+c.slice(f+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c,f){EditorUi.debug("EditorUi.replaceFileData",[this],"data",[c],"patches",
f);c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var l=null!=c?this.editor.extractGraphModel(c,!0):null;null!=l&&(c=l);if(null!=c){l=this.editor.graph;l.model.beginUpdate();try{var t=null!=this.pages?this.pages.slice():null,z=c.getElementsByTagName("diagram");if(1<z.length||1==z.length&&z[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var C=z.length-1;0<=C;C--){var F=this.updatePageRoot(new DiagramPage(z[C]));null==
F.getName()&&F.setName(mxResources.get("pageWithNumber",[C+1]));l.model.execute(new ChangePage(this,F,0==C?F:null,0))}}else null==this.fileNode&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,
-l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ca=null!=ca?ca:!Editor.defaultCompressed;var X=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=
-"_blank";else X=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ca){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());
-mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}I?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),
-ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ea&&
-(ha=ha.cloneNode(!0),ha.setAttribute("border",ea));c=ca?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,X);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,X,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=
-function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var I=K.getElementsByTagName("mxGraphModel"),ca=0<I.length?I[0]:null;I=K;null==ca&&l?(ca=mxUtils.getNodeValue(K),0<ca.length&&(ca=Graph.decompress(ca),null!=ca&&0<ca.length&&(I=K.cloneNode(!1),I.appendChild(mxUtils.parseXml(ca).documentElement)))):null==ca||l?I=K.cloneNode(!0):(I=K.cloneNode(!1),mxUtils.setTextContent(I,
-Graph.compressNode(ca)));z.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&
+l.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0)));if(null!=t)for(C=0;C<t.length;C++)l.model.execute(new ChangePage(this,t[C],null));var N=this.getCurrentFile();null!=N&&N.fileReplaced(f)}finally{l.model.endUpdate()}}};EditorUi.prototype.createFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){f=null!=f?f:this.editor.graph;z=null!=z?z:!1;K=null!=K?K:!0;ea=null!=ea?ea:!Editor.defaultCompressed;var W=null;if(null==l||l.getMode()==App.MODE_DEVICE||l.getMode()==App.MODE_BROWSER)var ba=
+"_blank";else W=ba=t;if(null==c)return"";var ha=c;if("mxfile"!=ha.nodeName.toLowerCase()){if(ea){var ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());ma.appendChild(c)}else{ma=Graph.zapGremlins(mxUtils.getXml(c));ha=Graph.compress(ma);if(Graph.decompress(ha)!=ma)return ma;ma=c.ownerDocument.createElement("diagram");ma.setAttribute("name",mxResources.get("pageWithNumber",[1]));ma.setAttribute("id",Editor.guid());
+mxUtils.setTextContent(ma,ha)}ha=c.ownerDocument.createElement("mxfile");ha.appendChild(ma)}J?(ha=ha.cloneNode(!0),ha.removeAttribute("modified"),ha.removeAttribute("host"),ha.removeAttribute("agent"),ha.removeAttribute("etag"),ha.removeAttribute("userAgent"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("type")):(ha.removeAttribute("userAgent"),ha.removeAttribute("modified"),ha.removeAttribute("version"),ha.removeAttribute("editor"),ha.removeAttribute("pages"),ha.removeAttribute("type"),
+ha.removeAttribute("etag"),mxClient.IS_CHROMEAPP?ha.setAttribute("host","Chrome"):EditorUi.isElectronApp?ha.setAttribute("host","Electron"):ha.setAttribute("host",window.location.hostname),ha.setAttribute("agent",null!=navigator.userAgent?navigator.userAgent:navigator.appVersion),ha.setAttribute("version",EditorUi.VERSION),1<ha.getElementsByTagName("diagram").length&&null!=this.pages&&ha.setAttribute("pages",this.pages.length));null!=da&&(ha=ha.cloneNode(!0),ha.setAttribute("scale",da));null!=ca&&
+(ha=ha.cloneNode(!0),ha.setAttribute("border",ca));c=ea?mxUtils.getPrettyXml(ha):mxUtils.getXml(ha);if(!C&&!z&&(F||null!=l&&/(\.html)$/i.test(l.getTitle())))c=this.getHtml2(mxUtils.getXml(ha),f,null!=l?l.getTitle():null,ba,W);else if(C||!z&&null!=l&&/(\.svg)$/i.test(l.getTitle()))null==l||l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER||(t=null),l=this.getSvgFileProperties(ha),c=this.getEmbeddedSvg(c,f,t,null,N,K,W,null,null,l.scale,l.border,null,Editor.svgFileTheme);return c};EditorUi.prototype.getXmlFileData=
+function(c,f,l,t){c=null!=c?c:!0;f=null!=f?f:!1;l=null!=l?l:!Editor.defaultCompressed;var z=this.editor.getGraphXml(c,t);if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(K){var J=K.getElementsByTagName("mxGraphModel"),ea=0<J.length?J[0]:null;J=K;null==ea&&l?(ea=mxUtils.getNodeValue(K),0<ea.length&&(ea=Graph.decompress(ea),null!=ea&&0<ea.length&&(J=K.cloneNode(!1),J.appendChild(mxUtils.parseXml(ea).documentElement)))):null==ea||l?J=K.cloneNode(!0):(J=K.cloneNode(!1),mxUtils.setTextContent(J,
+Graph.compressNode(ea)));z.appendChild(J)},EditorUi.removeChildNodes(this.currentPage.node),this.currentPage.node.appendChild(z),z=this.fileNode.cloneNode(!1),f)c(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var C=this.pages[f],F=C.node;if(C!=this.currentPage)if(C.needsUpdate){var N=new mxCodec(mxUtils.createXmlDocument());N=N.encode(new mxGraphModel(C.root));this.editor.graph.saveViewState(C.viewState,N,null,t);EditorUi.removeChildNodes(F);F.appendChild(N);delete C.needsUpdate}else t&&
(this.updatePageRoot(C),null!=C.viewState.backgroundImage&&(null!=C.viewState.backgroundImage.originalSrc?C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.originalSrc,C):Graph.isPageLink(C.viewState.backgroundImage.src)&&(C.viewState.backgroundImage=this.createImageForPageLink(C.viewState.backgroundImage.src,C))),null!=C.viewState.backgroundImage&&null!=C.viewState.backgroundImage.originalSrc&&(N=new mxCodec(mxUtils.createXmlDocument()),N=N.encode(new mxGraphModel(C.root)),
this.editor.graph.saveViewState(C.viewState,N,null,t),F=F.cloneNode(!1),F.appendChild(N)));c(F)}return z};EditorUi.prototype.anonymizeString=function(c,f){for(var l=[],t=0;t<c.length;t++){var z=c.charAt(t);0<=EditorUi.ignoredAnonymizedChars.indexOf(z)?l.push(z):isNaN(parseInt(z))?z.toLowerCase()!=z?l.push(String.fromCharCode(65+Math.round(25*Math.random()))):z.toUpperCase()!=z?l.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(z)?l.push(" "):l.push("?"):l.push(f?"0":Math.round(9*
Math.random()))}return l.join("")};EditorUi.prototype.anonymizePatch=function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var f=0;f<c[EditorUi.DIFF_INSERT].length;f++)try{var l=mxUtils.parseXml(c[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=l.getAttribute("name")&&l.setAttribute("name",this.anonymizeString(l.getAttribute("name")));c[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(l)}catch(C){c[EditorUi.DIFF_INSERT][f].data=C.message}if(null!=c[EditorUi.DIFF_UPDATE]){for(var t in c[EditorUi.DIFF_UPDATE]){var z=
@@ -3524,9 +3525,9 @@ c[EditorUi.DIFF_UPDATE][t];null!=z.name&&(z.name=this.anonymizeString(z.name));n
delete z.cells);mxUtils.isEmptyObject(z)&&delete c[EditorUi.DIFF_UPDATE][t]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,f){if(null!=c.attributes)for(var l=0;l<c.attributes.length;l++)"as"!=c.attributes[l].name&&c.setAttribute(c.attributes[l].name,this.anonymizeString(c.attributes[l].value,f));if(null!=c.childNodes)for(l=0;l<c.childNodes.length;l++)this.anonymizeAttributes(c.childNodes[l],f)};EditorUi.prototype.anonymizeNode=
function(c,f){f=c.getElementsByTagName("mxCell");for(var l=0;l<f.length;l++)null!=f[l].getAttribute("value")&&f[l].setAttribute("value","["+f[l].getAttribute("value").length+"]"),null!=f[l].getAttribute("xmlValue")&&f[l].setAttribute("xmlValue","["+f[l].getAttribute("xmlValue").length+"]"),null!=f[l].getAttribute("style")&&f[l].setAttribute("style","["+f[l].getAttribute("style").length+"]"),null!=f[l].parentNode&&"root"!=f[l].parentNode.nodeName&&null!=f[l].parentNode.parentNode&&(f[l].setAttribute("id",
f[l].parentNode.getAttribute("id")),f[l].parentNode.parentNode.replaceChild(f[l],f[l].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),c?f.reloadFile(mxUtils.bind(this,function(){this.spinner.stop();f.handleFileSuccess("manual"==
-DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){z=null!=z?z:!0;C=null!=C?C:!1;I=null!=I?I:!Editor.defaultCompressed;var X=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=
-this.pages[0]){var ba=X.getGlobalVariable;X=this.createTemporaryGraph(X.getStylesheet());X.setBackgroundImage=this.editor.graph.setBackgroundImage;X.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?X.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&X.setBackgroundImage(ha.viewState.backgroundImage);X.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:
-ba.apply(this,arguments)};document.body.appendChild(X.container);null!=ha&&X.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,I,ca);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,X,K,window.location.href,c,f,l,t,z,N,I,da,ea);X!=this.editor.graph&&X.container.parentNode.removeChild(X.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());
+DrawioFile.SYNC)}),mxUtils.bind(this,function(l){this.spinner.stop();f.handleFileError(l,!0)})):f.synchronizeFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(l){f.handleFileError(l,!0)}))))};EditorUi.prototype.getFileData=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){z=null!=z?z:!0;C=null!=C?C:!1;J=null!=J?J:!Editor.defaultCompressed;var W=this.editor.graph;if((f||!c&&null!=K&&/(\.svg)$/i.test(K.getTitle()))&&null!=this.pages&&this.currentPage!=
+this.pages[0]){var ba=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());W.setBackgroundImage=this.editor.graph.setBackgroundImage;W.background=this.editor.graph.background;var ha=null!=this.pages?this.pages[0]:null;null==ha||this.currentPage==ha?W.setBackgroundImage(this.editor.graph.backgroundImage):null!=ha.viewState&&null!=ha.viewState&&W.setBackgroundImage(ha.viewState.backgroundImage);W.getGlobalVariable=function(ma){return"page"==ma&&null!=ha?ha.getName():"pagenumber"==ma?1:
+ba.apply(this,arguments)};document.body.appendChild(W.container);null!=ha&&W.model.setRoot(ha.root)}F=null!=F?F:this.getXmlFileData(z,C,J,ea);K=null!=K?K:this.getCurrentFile();c=this.createFileData(F,W,K,window.location.href,c,f,l,t,z,N,J,da,ca);W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);return c};EditorUi.prototype.getHtml=function(c,f,l,t,z,C){C=null!=C?C:!0;var F=null,N=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=C?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());
var K=f.view.scale;C=Math.floor(F.x/K-f.view.translate.x);K=Math.floor(F.y/K-f.view.translate.y);F=f.background;null==z&&(f=this.getBasenames().join(";"),0<f.length&&(N=EditorUi.drawHost+"/embed.js?s="+f));c.setAttribute("x0",C);c.setAttribute("y0",K)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=t&&c.setAttribute("edit",t));null!=z&&(z=z.replace(/&/g,"&amp;"));c=
null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";t=Graph.compress(c);Graph.decompress(t)!=c&&(t=encodeURIComponent(c));return(null==z?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=z?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==z?null!=l?"<title>"+mxUtils.htmlEntities(l)+"</title>\n":"":"<title>draw.io</title>\n")+(null!=z?'<meta http-equiv="refresh" content="0;URL=\''+z+"'\"/>\n":"")+"</head>\n<body"+
(null==z&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+t+"</div>\n</div>\n"+(null==z?'<script type="text/javascript" src="'+N+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};
@@ -3535,21 +3536,21 @@ EditorUi.prototype.getHtml2=function(c,f,l,t,z){f=window.DRAWIO_VIEWER_URL||Edit
z+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var f=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,l=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(l)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[f],"cause",[l]),Error(mxResources.get("notADiagramFile")+
" ("+l+")");c=null!=f?this.editor.extractGraphModel(f,!0):null;null!=c&&(f=c);if(null!=f&&"mxfile"==f.nodeName&&(c=f.getElementsByTagName("diagram"),l={},0<c.length)){var t=this.getHashObject(),z=null;this.fileNode=f;this.pages=[];for(var C=0;C<c.length;C++){null==c[C].getAttribute("id")&&c[C].setAttribute("id",C);f=new DiagramPage(c[C]);null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[C+1]));this.pages.push(f);if(null==t.pageId&&null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]||
null!=t.pageId&&f.getId()==t.pageId)z=f;if(null==l[f.getId()])l[f.getId()]=f;else throw Error(f.getId()+": Duplicate page ID");}this.currentPage=null!=z?z:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);
-this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var I=K[C];N.setVisible(I,f[I.id]||!1)}}catch(ca){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();
+this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root,this.currentPage.setDiagramModified(!1),this.scrollToPage());if(null!=urlParams["layer-ids"])try{var F=decodeURIComponent(urlParams["layer-ids"]).split(" ");f={};for(C=0;C<F.length;C++)f[F[C]]=!0;var N=this.editor.graph.getModel(),K=N.getChildren(N.root);for(C=0;C<K.length;C++){var J=K[C];N.setVisible(J,f[J.id]||!1)}}catch(ea){}};EditorUi.prototype.getBaseFilename=function(c){var f=this.getCurrentFile();
f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(c,f,l,t,z,
-C,F,N,K,I,ca,da,ea,X,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ca?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
-c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(U,P){try{return this.createDownloadRequest(U,c,t,P,F,z,N,K,I,ca,da,void 0,void 0,!C,ea,X,ba,ha)}catch(T){this.handleError(T)}}));else{var Z=null,k=mxUtils.bind(this,function(U){U.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",U,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;
-if(F||A==mxConstants.NONE)A=null;var J=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(J);this.editor.convertImages(J,mxUtils.bind(this,mxUtils.bind(this,function(U){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(U))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(U){this.spinner.stop();k(U)}),t)}}catch(U){this.handleError(U)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,
-I,ca,da,ea,X,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,J=null;if(!EditorUi.isElectronApp&&
-(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};I=I?"1":"0";"pdf"==f&&(null!=ca?(k=ca.from,A=ca.to):0==C&&(J="1"));"xmlpng"==f&&(I="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};
-K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:J,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:I,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ea&&isFinite(ea)?ea:null,crop:null!=X&&X?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,
+C,F,N,K,J,ea,da,ca,W,ba,ha){try{t=null!=t?t:this.editor.graph.isSelectionEmpty();var ma=this.getBaseFilename(!z),Y=ma+("xml"==c||"pdf"==c&&ea?".drawio":"")+"."+c;if("xml"==c){var la=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,t,z,null,null,null,f);this.saveData(Y,c,la,"text/xml")}else if("html"==c)la=this.getHtml2(this.getFileData(!0),this.editor.graph,ma),this.saveData(Y,c,la,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==
+c?Y=ma+".png":"jpeg"==c&&(Y=ma+".jpg"),this.saveRequest(Y,c,mxUtils.bind(this,function(T,P){try{return this.createDownloadRequest(T,c,t,P,F,z,N,K,J,ea,da,void 0,void 0,!C,ca,W,ba,ha)}catch(U){this.handleError(U)}}));else{var Z=null,k=mxUtils.bind(this,function(T){T.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(Z)}))});if("svg"==c){var A=this.editor.graph.background;
+if(F||A==mxConstants.NONE)A=null;var I=this.editor.graph.getSvg(A,null,null,null,null,t);l&&this.editor.graph.addSvgShadow(I);this.editor.convertImages(I,mxUtils.bind(this,mxUtils.bind(this,function(T){this.spinner.stop();k(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(T))})))}else Y=ma+".svg",Z=this.getFileData(!1,!0,null,mxUtils.bind(this,function(T){this.spinner.stop();k(T)}),t)}}catch(T){this.handleError(T)}};EditorUi.prototype.createDownloadRequest=function(c,f,l,t,z,C,F,N,K,
+J,ea,da,ca,W,ba,ha,ma,Y){c=this.downloadRequestBuilder(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y);f="";for(var la in c)l=c[la],null!=l&&(f+=la+"="+encodeURIComponent(l)+"&");return new mxXmlRequest(EXPORT_URL,f)};EditorUi.prototype.downloadRequestBuilder=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha,ma,Y){var la=this.editor.graph,Z=la.getGraphBounds();l=this.getFileData(!0,null,null,null,l,0==C?!1:"xmlpng"!=f,null,null,null,!Editor.defaultCompressed,"pdf"==f);var k=null,A=null,I=null;if(!EditorUi.isElectronApp&&
+(Z.width*Z.height>MAX_AREA||l.length>MAX_REQUEST_SIZE))throw{message:mxResources.get("drawingTooLarge")};J=J?"1":"0";"pdf"==f&&(null!=ea?(k=ea.from,A=ea.to):0==C&&(I="1"));"xmlpng"==f&&(J="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(C=0;C<this.pages.length;C++)if(this.pages[C]==this.currentPage){k=C;break}C=la.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!z?z||null!=C&&C!=mxConstants.NONE||(C="#ffffff"):C=mxConstants.NONE;z={globalVars:la.getExportVariables()};
+K&&(z.grid={size:la.gridSize,steps:la.view.gridSteps,color:Editor.isDarkMode()&&"pdf"==f?mxGraphView.prototype.defaultGridColor:la.view.gridColor});Graph.translateDiagram&&(z.diagramLanguage=Graph.diagramLanguage);return{format:f,from:k,to:A,allPages:I,bg:null!=C?C:mxConstants.NONE,base64:t,embedXml:J,xml:l,filename:null!=c?c:"",extras:JSON.stringify(z),scale:F,border:N,pageMargin:ba,w:da&&isFinite(da)?da:null,h:ca&&isFinite(ca)?ca:null,crop:null!=W&&W?"1":"0",fit:null!=ha&&ha?"1":"0",sheetsAcross:ma,
sheetsDown:Y}};EditorUi.prototype.setMode=function(c,f){this.mode=c};EditorUi.prototype.getDiagramId=function(){var c=window.location.hash;null!=c&&0<c.length&&(c=c.substring(1));if(null!=c&&1<c.length){var f=c.indexOf("#");0<=f&&(c=c.substring(0,f))}return c};EditorUi.prototype.getHashObject=function(){var c=window.location.hash,f={};if(null!=c&&0<c.length){var l=c.lastIndexOf("#");if(0<l){c=decodeURIComponent(c.substring(l+1));try{f=JSON.parse(c)}catch(t){}}}return f};EditorUi.prototype.updateHashObject=
function(){if(null!=this.currentFile&&null!=this.currentPage&&""!=this.currentFile.getHash()){var c=this.getHashObject();c.pageId=this.currentPage.getId();this.setHashObject(c)}else this.setHashObject(null)};EditorUi.prototype.setHashObject=function(c){if(Editor.enableHashObjects){var f=window.location.hash;if(null==f||""==f)f="#";var l=f.lastIndexOf("#");0<l&&(f=f.substring(0,l));try{null==c||mxUtils.isEmptyObject(c)||(f=f+"#"+encodeURIComponent(JSON.stringify(c)))}catch(t){}0<l&&0<f.lastIndexOf("#")?
-window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ea){this.editor.undoManager.clear();
-this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,I=null,ca=mxUtils.bind(this,function(){var ea=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(X){ea===this.currentPage&&(200<=X.getStatus()&&300>=X.getStatus()?(this.updateDiagram(X.getText()),da()):this.handleError({message:mxResources.get("error")+" "+X.getStatus()}))}),mxUtils.bind(this,
-function(X){this.handleError(X)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(ca,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ca()}));da();ca()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||
-z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,J){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var I=mxUtils.parseXml(K).documentElement;
-if(null!=I)if("1"==I.getAttribute("replace-value"))C.setValue(N,I);else for(var ca=I.attributes,da=0;da<ca.length;da++)z.setAttributeForCell(N,ca[da].nodeName,0<ca[da].nodeValue.length?ca[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ea=c.getAttribute("style");null!=ea&&z.model.setStyle(N,ea)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var X=c.getAttribute("icon");if(null!=X){var ba=0<X.length?JSON.parse(X):
+window.location.hash=f:window.location.replace(f)}};EditorUi.prototype.loadDescriptor=function(c,f,l){var t=window.location.hash,z=mxUtils.bind(this,function(F){var N=null!=c.data?c.data:"";null!=F&&0<F.length&&(0<N.length&&(N+="\n"),N+=F);F=new LocalFile(this,"csv"!=c.format&&0<N.length?N:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);F.getHash=function(){return t};this.fileLoaded(F);"csv"==c.format&&this.importCsv(N,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();
+this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var K=null!=c.interval?parseInt(c.interval):6E4,J=null,ea=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(W){ca===this.currentPage&&(200<=W.getStatus()&&300>=W.getStatus()?(this.updateDiagram(W.getText()),da()):this.handleError({message:mxResources.get("error")+" "+W.getStatus()}))}),mxUtils.bind(this,
+function(W){this.handleError(W)}))}),da=mxUtils.bind(this,function(){window.clearTimeout(J);J=window.setTimeout(ea,K)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){da();ea()}));da();ea()}null!=f&&f()});if(null!=c.url&&0<c.url.length){var C=this.editor.getProxiedUrl(c.url);this.editor.loadUrl(C,mxUtils.bind(this,function(F){z(F)}),mxUtils.bind(this,function(F){null!=l&&l(F)}))}else z("")};EditorUi.prototype.updateDiagram=function(c){function f(Z){var k=new mxCellOverlay(Z.image||
+z.warningImage,Z.tooltip,Z.align,Z.valign,Z.offset);k.addListener(mxEvent.CLICK,function(A,I){t.alert(Z.tooltip)});return k}var l=null,t=this;if(null!=c&&0<c.length&&(l=mxUtils.parseXml(c),c=null!=l?l.documentElement:null,null!=c&&"updates"==c.nodeName)){var z=this.editor.graph,C=z.getModel();C.beginUpdate();var F=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var N=C.getCell(c.getAttribute("id"));if(null!=N){try{var K=c.getAttribute("value");if(null!=K){var J=mxUtils.parseXml(K).documentElement;
+if(null!=J)if("1"==J.getAttribute("replace-value"))C.setValue(N,J);else for(var ea=J.attributes,da=0;da<ea.length;da++)z.setAttributeForCell(N,ea[da].nodeName,0<ea[da].nodeValue.length?ea[da].nodeValue:null)}}catch(Z){null!=window.console&&console.log("Error in value for "+N.id+": "+Z)}try{var ca=c.getAttribute("style");null!=ca&&z.model.setStyle(N,ca)}catch(Z){null!=window.console&&console.log("Error in style for "+N.id+": "+Z)}try{var W=c.getAttribute("icon");if(null!=W){var ba=0<W.length?JSON.parse(W):
null;null!=ba&&ba.append||z.removeCellOverlays(N);null!=ba&&z.addCellOverlay(N,f(ba))}}catch(Z){null!=window.console&&console.log("Error in icon for "+N.id+": "+Z)}try{var ha=c.getAttribute("geometry");if(null!=ha){ha=JSON.parse(ha);var ma=z.getCellGeometry(N);if(null!=ma){ma=ma.clone();for(key in ha){var Y=parseFloat(ha[key]);"dx"==key?ma.x+=Y:"dy"==key?ma.y+=Y:"dw"==key?ma.width+=Y:"dh"==key?ma.height+=Y:ma[key]=parseFloat(ha[key])}z.model.setGeometry(N,ma)}}}catch(Z){null!=window.console&&console.log("Error in icon for "+
N.id+": "+Z)}}}else if("model"==c.nodeName){for(var la=c.firstChild;null!=la&&la.nodeType!=mxConstants.NODETYPE_ELEMENT;)la=la.nextSibling;null!=la&&(new mxCodec(c.firstChild)).decode(la,C)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(z.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))z.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==c.nodeName&&(F=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):
1);c=c.nextSibling}}finally{C.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return l};EditorUi.prototype.getCopyFilename=function(c,f){var l=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var t=l.lastIndexOf(".");0<=t&&(c=l.substring(t),l=l.substring(0,t));if(f){f=l;var z=new Date;l=z.getFullYear();t=z.getMonth()+1;var C=z.getDate(),F=z.getHours(),N=z.getMinutes();z=z.getSeconds();l=f+(" "+(l+"-"+t+"-"+C+"-"+F+"-"+N+"-"+z))}return l=mxResources.get("copyOf",
@@ -3560,7 +3561,7 @@ mxUtils.htmlEntities(mxResources.get("readOnly"))+'">'+mxUtils.htmlEntities(mxRe
c.getMode()){var F="1"==urlParams.sketch?"sketch":uiTheme;if(null==F)F="default";else if("sketch"==F||"min"==F)F+=Editor.isDarkMode()?"-dark":"-light"}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(N){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+
1),mxSettings.save()}catch(N){}}catch(N){this.fileLoadedError=N;if(null!=c)try{c.close()}catch(K){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=t?this.fileLoaded(t)||C():C()});f?c():(null!=N.fallbackFileData&&(N.alternateAction={label:mxResources.get("makeCopy"),funct:mxUtils.bind(this,function(){this.hideDialog();var K=new LocalFile(this,N.fallbackFileData,this.defaultFilename,
!0);this.fileLoaded(K)})}),this.handleError(N,mxResources.get("errorLoadingFile"),c,!0,null,null,!0))}else C();return z};EditorUi.prototype.getHashValueForPages=function(c,f){var l=0,t=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var C=0;C<c.length;C++){this.updatePageRoot(c[C]);var F=c[C].node.cloneNode(!1);F.removeAttribute("name");t.root=c[C].root;var N=z.encode(t);this.editor.graph.saveViewState(c[C].viewState,N,!0);N.removeAttribute("pageWidth");
-N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,I,ca,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=I&&"y"!=I&&"width"!=I&&"height"!=I?da&&"mxCell"==K.nodeName&&"previous"==I?null:ca:Math.round(ca)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&
+N.removeAttribute("pageHeight");F.appendChild(N);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);l=(l<<5)-l+this.hashValue(F,function(K,J,ea,da){return!da||"mxGeometry"!=K.nodeName&&"mxPoint"!=K.nodeName||"x"!=J&&"y"!=J&&"width"!=J&&"height"!=J?da&&"mxCell"==K.nodeName&&"previous"==J?null:ea:Math.round(ea)},f)<<0}return l};EditorUi.prototype.hashValue=function(c,f,l){var t=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&
"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(t^=this.hashValue(c.nodeName,f,l));if(null!=c.attributes){null!=l&&(l.attrCount+=c.attributes.length);for(var z=0;z<c.attributes.length;z++){var C=c.attributes[z].name,F=null!=f?f(c,C,c.attributes[z].value,!0):c.attributes[z].value;null!=F&&(t^=this.hashValue(C,f,l)+this.hashValue(F,f,l))}}if(null!=c.childNodes)for(z=0;z<c.childNodes.length;z++)t=(t<<5)-t+this.hashValue(c.childNodes[z],f,l)<<0}else if(null!=c&&"function"!==
typeof c){c=String(c);f=0;null!=l&&(l.byteCount+=c.length);for(z=0;z<c.length;z++)f=(f<<5)-f+c.charCodeAt(z)<<0;t^=f}return t};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,f,l,t,z,C,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,
".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){if(!Editor.defaultCompressed)for(var f=0;f<c.length;f++)null!=c[f].xml&&"<"!=c[f].xml.charAt(0)&&(c[f].xml=mxUtils.trim(Graph.decompress(c[f].xml)));f=mxUtils.createXmlDocument();var l=f.createElement("mxlibrary");mxUtils.setTextContent(l,JSON.stringify(c,null,2));
@@ -3569,50 +3570,50 @@ f){var l=this.sidebar.getEntryContainer();if(!this.sidebar.appendCustomLibraries
this.libraryLoaded(c,t,l.documentElement.getAttribute("title"),f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};EditorUi.prototype.showSidebar=function(){null!=this.sidebarWindow?this.sidebarWindow.window.setVisible(!0):this.toggleShapesPanel(!0)};EditorUi.prototype.libraryLoaded=function(c,f,l,t){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());var z=null;if(c.constructor!=StorageLibrary||
".scratchpad"!=c.title){null==this.openLibraries&&(this.openLibraries=[]);for(var C=0;C<this.openLibraries.length;C++)if(this.openLibraries[C].file.getHash()==c.getHash()){mxUtils.remove(this.openLibraries[C],this.openLibraries);break}z={file:c,images:f,title:l,expand:t};this.openLibraries.push(z)}else this.scratchpad=c;C=this.sidebar.palettes[c.getHash()];C=null!=C?C[C.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var F=null,N=mxUtils.bind(this,function(Y,la){0==Y.length&&c.isEditable()?
(null==F&&(F=document.createElement("div"),F.className="geDropTarget",mxUtils.write(F,mxResources.get("dragElementsHere"))),la.appendChild(F)):this.addLibraryEntries(Y,la)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==l&&(l=c.getTitle(),null!=l&&/(\.xml)$/i.test(l)&&(l=l.substring(0,l.lastIndexOf("."))));var K=this.sidebar.addPalette(c.getHash(),l,null!=t?t:!0,mxUtils.bind(this,function(Y){N(f,Y)}));null!=z&&(z.div=K);this.repositionLibrary(C,"L.scratchpad"!=c.getHash());t=K.parentNode.previousSibling;
-l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var I=document.createElement("div");I.style.backgroundColor="inherit";t.style.position="relative";var ca=document.createElement("img");ca.className="geAdaptiveAsset";ca.setAttribute("src",Editor.crossImage);ca.setAttribute("title",mxResources.get("close"));ca.setAttribute("valign","absmiddle");ca.setAttribute("border","0");ca.style.position="relative";ca.style.top="2px";
-ca.style.width="14px";ca.style.cursor="pointer";ca.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)I.appendChild(ca),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ea=
-this.editor.graph,X=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X),X=ca.cloneNode(!1),X.setAttribute("src",Editor.spinImage),X.setAttribute("title",mxResources.get("saving")),X.style.cursor="default",X.style.marginRight="2px",X.style.marginTop="-2px",I.insertBefore(X,I.firstChild),this.saveLibrary(c.getTitle(),
-f,c,c.getMode(),!0,!0,function(){null!=X&&null!=X.parentNode&&X.parentNode.removeChild(X)})):null==da&&(da=ca.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),I.insertBefore(da,I.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,
-function(Y,la,Z,k){Y=ea.cloneCells(mxUtils.sortCells(ea.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var J=ea.getCellGeometry(Y[A]);null!=J&&J.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),
-F=null)}),ma=mxUtils.bind(this,function(Y){if(ea.isSelectionEmpty())ea.getRubberband().isActive()?(ea.getRubberband().execute(Y),ea.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ea.getSelectionCells(),Z=ea.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ea.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ea.view.translate.x;Z.y-=ea.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),
-mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.panningManager&&null!=ea.graphHandler.first&&(ea.graphHandler.suspend(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ea.panningManager.stop(),ea.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ea.isMouseDown&&
-null!=ea.panningManager&&null!=ea.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ea.panningManager.stop(),ea.graphHandler.reset(),ea.isMouseDown=!1,ea.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ea.isMouseDown&&null!=ea.graphHandler.first&&(ea.graphHandler.resume(),null!=ea.graphHandler.hint&&(ea.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",
-ea.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,
-Z,k,A,J,U,P,T,W){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,J,U),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,J,U),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==
+l=t.getAttribute("title");null!=l&&0<l.length&&".scratchpad"!=c.title&&t.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+l);var J=document.createElement("div");J.style.backgroundColor="inherit";t.style.position="relative";var ea=document.createElement("img");ea.className="geAdaptiveAsset";ea.setAttribute("src",Editor.crossImage);ea.setAttribute("title",mxResources.get("close"));ea.setAttribute("valign","absmiddle");ea.setAttribute("border","0");ea.style.position="relative";ea.style.top="2px";
+ea.style.width="14px";ea.style.cursor="pointer";ea.style.margin="0 3px";var da=null;if(".scratchpad"!=c.title||this.closableScratchpad)J.appendChild(ea),mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){if(!mxEvent.isConsumed(Y)){var la=mxUtils.bind(this,function(){null!=z&&mxUtils.remove(z,this.openLibraries);this.closeLibrary(c)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,la,mxResources.get("cancel"),mxResources.get("discardChanges")):la();mxEvent.consume(Y)}}));if(c.isEditable()){var ca=
+this.editor.graph,W=null;l=mxUtils.bind(this,function(Y){this.showLibraryDialog(c.getTitle(),K,f,c,c.getMode());mxEvent.consume(Y)});var ba=mxUtils.bind(this,function(Y){c.setModified(!0);c.isAutosave()?(null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W),W=ea.cloneNode(!1),W.setAttribute("src",Editor.spinImage),W.setAttribute("title",mxResources.get("saving")),W.style.cursor="default",W.style.marginRight="2px",W.style.marginTop="-2px",J.insertBefore(W,J.firstChild),this.saveLibrary(c.getTitle(),
+f,c,c.getMode(),!0,!0,function(){null!=W&&null!=W.parentNode&&W.parentNode.removeChild(W)})):null==da&&(da=ea.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),J.insertBefore(da,J.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(la){this.saveLibrary(c.getTitle(),f,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==da||c.isModified()||(da.parentNode.removeChild(da),da=null)});mxEvent.consume(la)})))}),ha=mxUtils.bind(this,
+function(Y,la,Z,k){Y=ca.cloneCells(mxUtils.sortCells(ca.model.getTopmostCells(Y)));for(var A=0;A<Y.length;A++){var I=ca.getCellGeometry(Y[A]);null!=I&&I.translate(-la.x,-la.y)}K.appendChild(this.sidebar.createVertexTemplateFromCells(Y,la.width,la.height,k||"",!0,null,!1));Y=mxUtils.getXml(this.editor.graph.encodeCells(Y));Editor.defaultCompressed&&(Y=Graph.compress(Y));la={xml:Y,w:la.width,h:la.height};null!=k&&(la.title=k);f.push(la);ba(Z);null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),
+F=null)}),ma=mxUtils.bind(this,function(Y){if(ca.isSelectionEmpty())ca.getRubberband().isActive()?(ca.getRubberband().execute(Y),ca.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var la=ca.getSelectionCells(),Z=ca.view.getBounds(la);if(null!=Z&&0<Z.width&&0<Z.height){var k=ca.view.scale;Z.x/=k;Z.y/=k;Z.width/=k;Z.height/=k;Z.x-=ca.view.translate.x;Z.y-=ca.view.translate.y;ha(la,Z)}else this.showError(mxResources.get("error"),
+mxResources.get("invalidSel"),mxResources.get("ok"))}mxEvent.consume(Y)});mxEvent.addGestureListeners(K,function(){},mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.panningManager&&null!=ca.graphHandler.first&&(ca.graphHandler.suspend(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="hidden"),K.style.backgroundColor="light-dark(#fefefe, #000000)",K.style.cursor="copy",ca.panningManager.stop(),ca.autoScroll=!1,mxEvent.consume(Y))}),mxUtils.bind(this,function(Y){ca.isMouseDown&&
+null!=ca.panningManager&&null!=ca.graphHandler&&(K.style.backgroundColor="",K.style.cursor="default",this.sidebar.showTooltips=!0,ca.panningManager.stop(),ca.graphHandler.reset(),ca.isMouseDown=!1,ca.autoScroll=!0,ma(Y),mxEvent.consume(Y))}));mxEvent.addListener(K,"mouseleave",mxUtils.bind(this,function(Y){ca.isMouseDown&&null!=ca.graphHandler.first&&(ca.graphHandler.resume(),null!=ca.graphHandler.hint&&(ca.graphHandler.hint.style.visibility="visible"),K.style.backgroundColor="",K.style.cursor="",
+ca.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(Y){K.style.backgroundColor="light-dark(#fefefe, #000000)";Y.dataTransfer.dropEffect="copy";K.style.cursor="copy";this.sidebar.hideTooltip();Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"drop",mxUtils.bind(this,function(Y){K.style.cursor="";K.style.backgroundColor="";0<Y.dataTransfer.files.length&&this.importFiles(Y.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(la,
+Z,k,A,I,T,P,U,X){if(null!=la&&"image/"==Z.substring(0,6))la="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(la),la=[new mxCell("",new mxGeometry(0,0,I,T),la)],la[0].vertex=!0,ha(la,new mxRectangle(0,0,I,T),Y,mxEvent.isAltDown(Y)?null:P.substring(0,P.lastIndexOf(".")).replace(/_/g," ")),null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null);else{var aa=!1,ja=mxUtils.bind(this,function(pa,sa){null!=pa&&"application/pdf"==
sa&&(sa=Editor.extractGraphModelFromPdf(pa),null!=sa&&0<sa.length&&(pa=sa));if(null!=pa)if(pa=mxUtils.parseXml(pa),"mxlibrary"==pa.documentElement.nodeName)try{var qa=JSON.parse(mxUtils.getTextContent(pa.documentElement));N(qa,K);f=f.concat(qa);ba(Y);this.spinner.stop();aa=!0}catch(Ea){}else if("mxfile"==pa.documentElement.nodeName)try{var wa=pa.documentElement.getElementsByTagName("diagram");for(qa=0;qa<wa.length;qa++){var Ba=this.stringToCells(Editor.getDiagramNodeXml(wa[qa])),za=this.editor.graph.getBoundingBoxFromGeometry(Ba);
-null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=W&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(W,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=W?this.isExternalDataComms()?
-this.parseFile(W,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=
-"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ca=ca.cloneNode(!1);ca.setAttribute("src",Editor.editImage);ca.setAttribute("title",mxResources.get("edit"));I.insertBefore(ca,I.firstChild);mxEvent.addListener(ca,"click",l);l=ca.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));I.insertBefore(l,I.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=
-c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",I.insertBefore(l,I.firstChild))}t.appendChild(I);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+null!=za&&ha(Ba,new mxRectangle(0,0,za.width,za.height),Y)}aa=!0}catch(Ea){null!=window.console&&console.log("error in drop handler:",Ea)}aa||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=F&&null!=F.parentNode&&0<f.length&&(F.parentNode.removeChild(F),F=null)});null!=X&&null!=P&&EditorUi.isVisioFilename(P)?this.importVisio(X,function(pa){ja(pa,"text/xml")},null,P):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(la,P)&&null!=X?this.isExternalDataComms()?
+this.parseFile(X,mxUtils.bind(this,function(pa){4==pa.readyState&&(this.spinner.stop(),200<=pa.status&&299>=pa.status?ja(pa.responseText,"text/xml"):this.handleError({message:mxResources.get(413==pa.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):ja(la,Z)}}));Y.stopPropagation();Y.preventDefault()})),mxEvent.addListener(K,"dragleave",function(Y){K.style.cursor=
+"";K.style.backgroundColor="";Y.stopPropagation();Y.preventDefault()}));ea=ea.cloneNode(!1);ea.setAttribute("src",Editor.editImage);ea.setAttribute("title",mxResources.get("edit"));J.insertBefore(ea,J.firstChild);mxEvent.addListener(ea,"click",l);l=ea.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));J.insertBefore(l,J.firstChild);mxEvent.addListener(l,"click",ma);".scratchpad"==c.title&&(this.addSelectionToScratchpad=ma);this.isOffline()||".scratchpad"!=
+c.title||null==EditorUi.scratchpadHelpLink||(l=this.createHelpIcon(EditorUi.scratchpadHelpLink),C=l.getElementsByTagName("img")[0],l.style.marginRight="1px",C.style.marginTop="-2px",C.style.opacity="",J.insertBefore(l,J.firstChild))}t.appendChild(J);this.editor.fireEvent(new mxEventObject("libraryLoaded"))}};EditorUi.prototype.addLibraryEntries=function(c,f){for(var l=0;l<c.length;l++)try{var t=c[l],z=t.data;if(null!=z){z="data:"==z.substring(0,5)?this.convertDataUri(z):z;var C="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
"fixed"==t.aspect&&(C+="aspect=fixed;");C=C+"image="+z+";";null!=t.style&&(C+=t.style);f.appendChild(this.sidebar.createVertexTemplate(C,t.w,t.h,"",t.title||"",!1,null,!0))}else if(null!=t.xml){var F=this.stringToCells("<"==t.xml.charAt(0)?t.xml:Graph.decompress(t.xml)),N=0==F.length?mxResources.get("drawingEmpty"):null!=t.title?t.title:"";f.appendChild(this.sidebar.createVertexTemplateFromCells(F,t.w,t.h,N,!0,null,!0))}}catch(K){N=null!=K.message?mxResources.get("error")+": "+K.message:String(K),
C=this.sidebar.createVertexTemplateFromCells(null,t.w,t.h,N,!0,null,!0),f.appendChild(C)}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=
"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38);"sketch"!=Editor.currentTheme||window.DRAWIO_PUBLIC_BUILD||(Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config")};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(c,f,l,t,z,C,F){c=new ImageDialog(this,c,f,l,t,z,C,F);this.showDialog(c.container,
-Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,z,C){var F=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=C&&C(N),N==F)this.hideDialog();else{if(0<N.length){var K=JSON.parse(N);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(I){this.handleError(I)}}),
+Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showLocalStorageDialog=function(c,f,l,t,z,C){var F=localStorage.getItem(f);c=new TextareaDialog(this,c,null!=F?JSON.stringify(JSON.parse(F),null,2):"",mxUtils.bind(this,function(N){if(null!=N)try{if(null!=C&&C(N),N==F)this.hideDialog();else{if(0<N.length){var K=JSON.parse(N);localStorage.setItem(f,JSON.stringify(K))}else localStorage.removeItem(f);this.hideDialog();this.alert(mxResources.get("restartForChangeRequired"))}}catch(J){this.handleError(J)}}),
null,mxResources.get("close"),null,null,null,!0,null,null,z,l,t);this.showDialog(c.container,660,480,!0,!1);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,f,l,t){c=null!=c?c:mxUtils.bind(this,function(z,C,F,N){C||(z=new ChangePageSetup(this,t?F:null,z),z.ignoreColor=!t,null!=N&&t&&(z.shadowVisible=N),this.editor.graph.model.execute(z))});c=new BackgroundImageDialog(this,c,f,l,t);this.showDialog(c.container,400,t?240:220,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,
f,l,t,z){c=new LibraryDialog(this,c,f,l,t,z);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,function(C){C&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var g=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var f=g.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(l){this.editor.graph.isSelectionEmpty()&&f.refresh()}));return f};EditorUi.prototype.handleError=function(c,f,l,
-t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ea){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),
-!1);var I=mxResources.get("ok"),ca=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(I=mxResources.get("cancel"),ca=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=
+t,z,C,F){var N=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},K=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{F||EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,c.columnNumber,c,"INFO"),"1"!=urlParams.test&&!F||null==window.console||console.error("EditorUi.handleError:",c)}catch(ca){}if(null!=K||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"),
+!1);var J=mxResources.get("ok"),ea=null;f=null!=f?f:mxResources.get("error");if(null!=K){null!=K.retry&&(J=mxResources.get("cancel"),ea=function(){N();K.retry()});if(404==K.code||404==K.status||403==K.code){F=403==K.code?null!=K.message?mxUtils.htmlEntities(K.message,!1):mxUtils.htmlEntities(mxResources.get("accessDenied"),!1):null!=z?z:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.email+")":""),!1);var da=null!=z?null:null!=
C?C:window.location.hash;if(null!=da&&("#G"==da.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==da.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==K.code||404==K.status)){da="#U"==da.substring(0,2)?da.substring(45,da.lastIndexOf("%26ex")):da.substring(2);this.showError(f,F,mxResources.get("tryOpeningViaThisPage"),
-mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ca,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ea(){ma.innerText="";for(var Y=0;Y<X.length;Y++){var la=document.createElement("option");mxUtils.write(la,X[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(la,"<"+X[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=
-document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=X.length;ma.appendChild(la)}var X=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ea();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=X.length!=Y;la&&this.drive.setUser(X[Y]);
-this.drive.authorize(la,mxUtils.bind(this,function(){la||(X=this.drive.getUsersList(),ea())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,
+mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+da);null!=t&&t()}),ea,mxResources.get("changeUser"),mxUtils.bind(this,function(){function ca(){ma.innerText="";for(var Y=0;Y<W.length;Y++){var la=document.createElement("option");mxUtils.write(la,W[Y].displayName);la.value=Y;ma.appendChild(la);la=document.createElement("option");la.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(la,"<"+W[Y].email+">");la.setAttribute("disabled","disabled");ma.appendChild(la)}la=
+document.createElement("option");mxUtils.write(la,mxResources.get("addAccount"));la.value=W.length;ma.appendChild(la)}var W=this.drive.getUsersList(),ba=document.createElement("div"),ha=document.createElement("div");ha.style.marginBottom="6px";mxUtils.write(ha,mxResources.get("changeUser")+": ");ba.appendChild(ha);var ma=document.createElement("select");ma.style.width="100%";ca();mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){var Y=ma.value,la=W.length!=Y;la&&this.drive.setUser(W[Y]);
+this.drive.authorize(la,mxUtils.bind(this,function(){la||(W=this.drive.getUsersList(),ca())}),mxUtils.bind(this,function(Z){this.handleError(Z)}),!0)}));ba.appendChild(ma);ba=new CustomDialog(this,ba,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(ba.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=l&&l()}),520,150);return}}null!=K.message?F=""==K.message&&null!=K.name?mxUtils.htmlEntities(K.name,
!1):mxUtils.htmlEntities(K.message,!1):null!=K.response&&null!=K.response.error?F=mxUtils.htmlEntities(K.response.error,!1):"undefined"!==typeof window.App&&(K.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout"),!1):K.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy"),!1):"string"===typeof K&&0<K.length&&(F=mxUtils.htmlEntities(K,!1)))}z=c=null;null!=K&&null!=K.helpLink?(c=mxResources.get("help"),z=mxUtils.bind(this,function(){return this.editor.graph.openLink(K.helpLink)})):
-null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,I,l,ca,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
-l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var I=!1;if(!(this.bannerShowing||this["hideBanner"+
-c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ca=z?500:1E3;I=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+
-";"+I;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ca+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ea=document.createElement("img");ea.setAttribute("src",IMAGE_PATH+"/logo.png");ea.setAttribute("border","0");ea.setAttribute("align","absmiddle");ea.style.cssText=
-"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ea);ea=document.createElement("img");ea.setAttribute("src",Dialog.prototype.closeImage);ea.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ea.setAttribute("border","0");ea.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ea)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=
-!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var X=document.createElement("input");X.setAttribute("type","checkbox");X.setAttribute("id","geDoNotShowAgainCheckbox");X.style.marginRight="6px";if(!t){f.appendChild(X);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);
-da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,X.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ea&&mxEvent.addListener(ea,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,
-function(){ha()}),ca)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=X&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ca/2);window.setTimeout(ma,z?4E3:3E4);I=!0}return I};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+null!=K&&null!=K.ownerEmail?(c=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+c+": "+K.ownerEmail+")",!1),z=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(K.ownerEmail))})):null!=K&&null!=K.alternateAction&&(c=K.alternateAction.label,z=K.alternateAction.funct);this.showError(f,F,J,l,ea,null,null,c,z,null,null,null,t?l:null)}else null!=l&&l()};EditorUi.prototype.alert=function(c,f,l){c=new ErrorDialog(this,null,c,mxResources.get("ok"),f);this.showDialog(c.container,
+l||340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(c,f,l,t,z,C){c=null!=c?c:"";var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},N=Math.min(220,28*Math.ceil(Math.max(1,c.length)/50));c=new ConfirmDialog(this,c,function(){F();null!=f&&f()},function(){F();null!=l&&l()},t,z,null,null,null,null,N);this.showDialog(c.container,340,46+N,!0,C);c.init()};EditorUi.prototype.showBanner=function(c,f,l,t,z,C,F,N,K){var J=!1;if(!(this.bannerShowing||this["hideBanner"+
+c]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+c])){C=null!=C?C:"bottom:10px;left:50%;";F=null!=F?F:"translate(-50%,120%)";N=null!=N?N:"translate(-50%,0%)";var ea=z?500:1E3;J=z?"padding:4px;border-radius:6px;font-size:11px;height:12px;font-weight:normal;":"font-size:16px;padding:18px 34px 12px 20px;font-weight:bold;";var da=document.createElement("div");da.style.cssText="position:absolute;"+C+";max-width:90%;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+
+";"+J;mxUtils.setPrefixedStyle(da.style,"transform",F);mxUtils.setPrefixedStyle(da.style,"transition","all "+ea+"ms ease");da.className="geBtn gePrimaryBtn"+(z?" geSmallBanner":"");Editor.isDarkMode()||mxUtils.setPrefixedStyle(da.style,"box-shadow","1px 1px 2px 0px #ddd");null!=K&&mxUtils.setPrefixedStyle(da.style,"transform-origin",K);if(!z){var ca=document.createElement("img");ca.setAttribute("src",IMAGE_PATH+"/logo.png");ca.setAttribute("border","0");ca.setAttribute("align","absmiddle");ca.style.cssText=
+"margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";da.appendChild(ca);ca=document.createElement("img");ca.setAttribute("src",Dialog.prototype.closeImage);ca.setAttribute("title",mxResources.get(t?"doNotShowAgain":"close"));ca.setAttribute("border","0");ca.style.cssText=(z?"right:6px;top:9px;":"right:10px;top:12px;")+"position:absolute;filter:invert(1);padding:6px;margin:-6px;cursor:default;";da.appendChild(ca)}mxUtils.write(da,f);document.body.appendChild(da);this.bannerShowing=
+!0;f=document.createElement("div");f.style.cssText="display:flex;align-items:center;justify-content:center;padding-top:6px;font-size:11px;text-align:center;font-weight:normal;";var W=document.createElement("input");W.setAttribute("type","checkbox");W.setAttribute("id","geDoNotShowAgainCheckbox");W.style.marginRight="6px";if(!t){f.appendChild(W);var ba=document.createElement("label");ba.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(ba,mxResources.get("doNotShowAgain"));f.appendChild(ba);
+da.style.paddingBottom=z?"16px":"30px";da.appendChild(f)}var ha=mxUtils.bind(this,function(){null!=da.parentNode&&(da.parentNode.removeChild(da),this.bannerShowing=!1,W.checked||t)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});null!=ca&&mxEvent.addListener(ca,"click",mxUtils.bind(this,function(Y){mxEvent.consume(Y);ha()}));var ma=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",F);window.setTimeout(mxUtils.bind(this,
+function(){ha()}),ea)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(Y){var la=mxEvent.getSource(Y);la!=W&&la!=ba?(null!=l&&l(),ha(),mxEvent.consume(Y)):ma()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(da.style,"transform",N)}),ea/2);window.setTimeout(ma,z?4E3:3E4);J=!0}return J};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,f,l,t){c=c.toDataURL("image/"+l);if(null!=c&&6<c.length)null!=f&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(f))),0<t&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",t));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,f,l,t,z){var C="jpeg"==l?"jpg":l;t=this.getBaseFilename(t)+(null!=f?".drawio":"")+"."+C;c=this.createImageDataUri(c,
f,l,z);this.saveData(t,C,c.substring(c.lastIndexOf(",")+1),"image/"+l,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,f){c=new TextareaDialog(this,c,f,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,f,l,t,z,C){"text/xml"!=l||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=C?C:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=t?this.base64ToBlob(c,l):new Blob([c],{type:l}),navigator.msSaveOrOpenBlob(c,f);else if(mxClient.IS_IE)l=window.open("about:blank","_blank"),null==l?mxUtils.popup(c,!0):(l.document.write(c),
l.document.close(),l.document.execCommand("SaveAs",!0,f),l.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==l||"image/"!=l.substring(0,6)?this.showTextDialog(f+":",c):this.openInNewWindow(c,l,t);else{var F=document.createElement("a");C=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var N=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);C=65==(N?parseInt(N[2],10):
!1)?!1:C}if(C||this.isOffline()){F.href=URL.createObjectURL(t?this.base64ToBlob(c,l):new Blob([c],{type:l}));C?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(K){}}else this.createEchoRequest(c,f,l,t,z).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,f,l,t,z,C){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
-l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ca,da,ea,X){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,
-450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ca,l,t,null,N);else if(null!=ca&&0<ca.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ca,l,t,da,Y)}catch(la){this.handleError(la)}});null!=X?ma(X):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||
-z.push("_blank");var I=new SaveDialog(this,f,mxUtils.bind(this,function(ca,da,ea){K(ca.value,da,ca,ea);this.hideDialog(null,null,I.container)}),z,c,l,t);this.showDialog(I.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));I.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;
+l?"&mime="+l:"")+(null!=z?"&format="+z:"")+(null!=C?"&base64="+C:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(t?"&binary=1":""))};EditorUi.prototype.saveLocalFile=function(c,f,l,t,z,C,F,N){C=null!=C?C:!1;F=null!=F?F:"vsdx"!=z&&(!mxClient.IS_IOS||!navigator.standalone);var K=mxUtils.bind(this,function(ea,da,ca,W){try{if("_blank"==da)if(null!=l&&"image/"==l.substring(0,6))this.openInNewWindow(c,l,t);else if(null!=l&&"text/html"==l.substring(0,9)){var ba=new EmbedDialog(this,c);this.showDialog(ba.container,
+450,240,!0,!0);ba.init()}else{var ha=window.open("about:blank");null==ha?mxUtils.popup(c,!0):(ha.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),ha.document.close())}else if(da==App.MODE_DEVICE||"download"==da)this.doSaveLocalFile(c,ea,l,t,null,N);else if(null!=ea&&0<ea.length){var ma=mxUtils.bind(this,function(Y){try{this.exportFile(c,ea,l,t,da,Y)}catch(la){this.handleError(la)}});null!=W?ma(W):this.pickFolder(da,ma)}}catch(Y){this.handleError(Y)}});z=[];C||z.push(App.MODE_BROWSER);F||
+z.push("_blank");var J=new SaveDialog(this,f,mxUtils.bind(this,function(ea,da,ca){K(ea.value,da,ea,ca);this.hideDialog(null,null,J.container)}),z,c,l,t);this.showDialog(J.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));J.init()};EditorUi.prototype.openInNewWindow=function(c,f,l){var t=window.open("about:blank");if(null==t||null==t.document)mxUtils.popup(c,!0);else{var z="background: light-dark(rgb(255, 255, 255), rgb(18, 18, 18))";if("image/svg+xml"==f){var C=mxUtils.parseXml(c).documentElement.style.backgroundColor;
""!=C&&(z="background: "+C+";")}z='<html><head><meta charset="UTF-8"></head><body style="color-scheme: light dark; '+z+'">';"image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||l?(C=l?c:btoa(unescape(encodeURIComponent(c))),t.document.write(z+'<img style="max-width:100%;" src="data:'+f+";base64,"+C+'"/></body></html>')):t.document.write(z+c+"</body></html>"):t.document.write(z+"<pre>"+mxUtils.htmlEntities(c,!1)+"</pre></body></html>");t.document.close()}};var m=EditorUi.prototype.addChromelessToolbarItems;
EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=c(mxUtils.bind(this,function(t){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),
!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=
@@ -3626,18 +3627,18 @@ null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(
speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);document.body.appendChild(this.exportDialog);mxEvent.addListener(this.editor.graph.container,"click",z);this.editor.exportToCanvas(mxUtils.bind(this,function(N){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var K=this.createImageDataUri(N,null,"png");N=document.createElement("img");N.style.maxWidth="140px";N.style.maxHeight="140px";
N.style.cursor="pointer";N.style.backgroundColor="white";N.setAttribute("title",mxResources.get("openInNewWindow"));N.setAttribute("border","0");N.setAttribute("src",K);this.exportDialog.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.openInNewWindow(K.substring(K.indexOf(",")+1),"image/png",!0);z.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(N){F.stop();null!=this.exportDialog&&null!=this.exportDialog.parentNode&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
this.exportDialog=null);this.handleError(N)}),null,null,null,null,null,null,null,Editor.defaultBorder)}mxEvent.consume(t)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,f,l,t,z){this.isLocalFileSave()?this.saveLocalFile(l,c,t,z,f):this.saveRequest(c,f,mxUtils.bind(this,function(C,F){return this.createEchoRequest(l,C,t,z,f,F)}),l,z,t)};EditorUi.prototype.saveRequest=function(c,f,l,t,z,C,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;var N=mxUtils.bind(this,
-function(I,ca,da,ea){if("_blank"==ca||null!=I&&0<I.length){var X=l("_blank"==ca?null:I,ca==App.MODE_DEVICE||"download"==ca||null==ca||"_blank"==ca?"0":"1");null!=X&&(ca==App.MODE_DEVICE||"download"==ca||"_blank"==ca?X.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&X.send(mxUtils.bind(this,function(){this.spinner.stop();
-if(200<=X.getStatus()&&299>=X.getStatus())try{this.exportFile(X.getText(),I,C,!0,ca,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ea?da(ea):this.pickFolder(ca,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(I,ca,da){N(I.value,ca,I,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");
+function(J,ea,da,ca){if("_blank"==ea||null!=J&&0<J.length){var W=l("_blank"==ea?null:J,ea==App.MODE_DEVICE||"download"==ea||null==ea||"_blank"==ea?"0":"1");null!=W&&(ea==App.MODE_DEVICE||"download"==ea||"_blank"==ea?W.simulate(document,"_blank"):(da=mxUtils.bind(this,function(ba){C=null!=C?C:"pdf"==f?"application/pdf":"image/"+f;if(null!=t)try{this.exportFile(t,J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.spinner.spin(document.body,mxResources.get("saving"))&&W.send(mxUtils.bind(this,function(){this.spinner.stop();
+if(200<=W.getStatus()&&299>=W.getStatus())try{this.exportFile(W.getText(),J,C,!0,ea,ba)}catch(ha){this.handleError(ha)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(ha){this.spinner.stop();this.handleError(ha)}))}),null!=ca?da(ca):this.pickFolder(ea,da)))}});z=[App.MODE_BROWSER];F||z.push("_blank");var K=new SaveDialog(this,c,mxUtils.bind(this,function(J,ea,da){N(J.value,ea,J,da);this.hideDialog(null,null,K.container)}),z,null,"application/pdf");
this.showDialog(K.container,420,110,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));K.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,f,l,t,z,C){};EditorUi.prototype.getServiceForName=function(c){return null};EditorUi.prototype.getTitleForService=function(c){return mxResources.get(c)};EditorUi.prototype.pickFolder=function(c,f,l){f(null)};EditorUi.prototype.exportSvg=
-function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(U){Editor.addRetryToError(U,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X)}));this.handleError(U)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;
-Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==I?"_blank":"self"==I?"_top":null,null,!ea,ca,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";X=null!=X?X:mxUtils.bind(this,function(U){this.isLocalFileSave()||U.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",U,"image/svg+xml"):
-this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});var k=mxUtils.bind(this,function(U){this.spinner.stop();z&&U.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));X(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(U))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(U){Editor.replaceSvgDataUris&&
-C&&EditorUi.embedSvgImages(U);Editor.foreignObjectImages&&ea?this.replaceAlternateContent(U,ca,k):k(U)}),J=mxUtils.bind(this,function(U){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(U,A,this.thumbImageCache)):A(U)});ea?this.embedFonts(la,J):(this.editor.addFontCss(la),J(la))}catch(U){this.handleError(U)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ea,X,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,
-mxConstants.NS_SVG,"image");ma.setAttribute("x",ea);ma.setAttribute("y",X+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ca.length)ca[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,
-function(){counter--;0==counter&&l(c)}),K={},I={},ca=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ea=da.getElementsByTagName("div");if(0<ea.length)try{var X=ea[0].cloneNode(!0),ba=parseInt(X.style.marginLeft),ha=parseInt(X.style.paddingTop),ma=X.getElementsByTagName("div")[1],Y=ea=!1,la=X.style.alignItems,Z=X.style.justifyContent;if(null!=X.style.writingMode){var k=X.style.writingMode;Y="vertical-"==k.substring(0,9);ea="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==X.style.width||
-Y&&"1px"==X.style.height;if(!Y&&"1px"==X.style.height||Y&&"1px"==X.style.width)X.style.alignItems=Y&&ea?"unsafe flex-end":"unsafe flex-start";A&&(X.style.justifyContent="unsafe flex-start");X.style.paddingTop="";X.style.marginLeft="";var J=X.outerHTML,U=K[J];null==U&&(X.style.position="absolute",X.style.visibility="hidden",document.body.appendChild(X),k=1,k="1px"==X.style.width?ma.offsetWidth:parseInt(X.style.width),A=1,A="1px"==X.style.height?ma.offsetHeight:parseInt(X.style.height),document.body.removeChild(X),
-U=new mxRectangle(ba,ha,k,A),K[J]=U);"1px"==X.style.height&&("unsafe center"==la?ha-=U.height/2:"unsafe flex-end"==la&&(ha-=U.height));if("1px"==X.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=U.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ea&&"unsafe flex-end"==la||ea&&"unsafe flex-start"==la))ba-=U.width;U=new mxRectangle(ba,ha,U.width,U.height+parseInt(ma.style.fontSize)/4);ca.push(mxUtils.bind(this,function(P){var T=I[J];null==T?Graph.htmlToPng(J,U.width,U.height,mxUtils.bind(this,
-function(W){t(da,ba,ha,U,W);I[J]=W;P()}),C):(t(da,ba,ha,U,T),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&
+function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W){if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(T){Editor.addRetryToError(T,mxUtils.bind(this,function(){this.exportSvg(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W)}));this.handleError(T)})))try{var ba=this.editor.graph.isSelectionEmpty();l=null!=l?l:ba;var ha=f?null:this.editor.graph.background;ha==mxConstants.NONE&&(ha=null);null==ha&&0==f&&(ha=this.editor.graph.shapeBackgroundColor);var ma=this.editor.graph.addForeignObjectWarning;
+Editor.foreignObjectImages&&(this.editor.graph.addForeignObjectWarning=function(){});var Y=this.editor.graph.createSvgImageExport(z),la=this.editor.graph.getSvg(ha,c,F,N,null,l,null,Y,"blank"==J?"_blank":"self"==J?"_top":null,null,!ca,ea,da);this.editor.graph.addForeignObjectWarning=ma;t&&this.editor.graph.addSvgShadow(la);var Z=this.getBaseFilename()+(z?".drawio":"")+".svg";W=null!=W?W:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(Z,"svg",T,"image/svg+xml"):
+this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var k=mxUtils.bind(this,function(T){this.spinner.stop();z&&T.setAttribute("content",this.getFileData(!0,null,null,null,l,K,null,null,null,null,null,c,F));W(Graph.xmlDeclaration+"\n"+(z?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(la);var A=mxUtils.bind(this,function(T){Editor.replaceSvgDataUris&&
+C&&EditorUi.embedSvgImages(T);Editor.foreignObjectImages&&ca?this.replaceAlternateContent(T,ea,k):k(T)}),I=mxUtils.bind(this,function(T){C&&!this.isOffline()&&this.canvasSupported?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,A,this.thumbImageCache)):A(T)});ca?this.embedFonts(la,I):(this.editor.addFontCss(la),I(la))}catch(T){this.handleError(T)}};EditorUi.prototype.replaceAlternateContent=function(c,f,l){function t(da,ca,W,ba,ha){var ma=mxUtils.createElementNs(c.ownerDocument,
+mxConstants.NS_SVG,"image");ma.setAttribute("x",ca);ma.setAttribute("y",W+.5);ma.setAttribute("width",ba.width);ma.setAttribute("height",ba.height);null==ma.setAttributeNS?ma.setAttribute("xlink:href",ha):ma.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",ha);da.replaceChild(ma,da.lastChild);N()}function z(){if(F<ea.length)ea[F++](z)}var C="";f=c.getElementsByTagName("style");for(var F=0;F<f.length;F++)C+=f[F].innerHTML;f=c.getElementsByTagName("switch");counter=f.length;var N=mxUtils.bind(this,
+function(){counter--;0==counter&&l(c)}),K={},J={},ea=[];for(F=0;F<f.length;F++)mxUtils.bind(this,function(da){var ca=da.getElementsByTagName("div");if(0<ca.length)try{var W=ca[0].cloneNode(!0),ba=parseInt(W.style.marginLeft),ha=parseInt(W.style.paddingTop),ma=W.getElementsByTagName("div")[1],Y=ca=!1,la=W.style.alignItems,Z=W.style.justifyContent;if(null!=W.style.writingMode){var k=W.style.writingMode;Y="vertical-"==k.substring(0,9);ca="-rl"==k.substring(k.length-3)}var A=!Y&&"1px"==W.style.width||
+Y&&"1px"==W.style.height;if(!Y&&"1px"==W.style.height||Y&&"1px"==W.style.width)W.style.alignItems=Y&&ca?"unsafe flex-end":"unsafe flex-start";A&&(W.style.justifyContent="unsafe flex-start");W.style.paddingTop="";W.style.marginLeft="";var I=W.outerHTML,T=K[I];null==T&&(W.style.position="absolute",W.style.visibility="hidden",document.body.appendChild(W),k=1,k="1px"==W.style.width?ma.offsetWidth:parseInt(W.style.width),A=1,A="1px"==W.style.height?ma.offsetHeight:parseInt(W.style.height),document.body.removeChild(W),
+T=new mxRectangle(ba,ha,k,A),K[I]=T);"1px"==W.style.height&&("unsafe center"==la?ha-=T.height/2:"unsafe flex-end"==la&&(ha-=T.height));if("1px"==W.style.width)if(!Y&&"unsafe center"==Z||Y&&"unsafe center"==la)ba-=T.width/2;else if(!Y&&"unsafe flex-end"==Z||Y&&(!ca&&"unsafe flex-end"==la||ca&&"unsafe flex-start"==la))ba-=T.width;T=new mxRectangle(ba,ha,T.width,T.height+parseInt(ma.style.fontSize)/4);ea.push(mxUtils.bind(this,function(P){var U=J[I];null==U?Graph.htmlToPng(I,T.width,T.height,mxUtils.bind(this,
+function(X){t(da,ba,ha,T,X);J[I]=X;P()}),C):(t(da,ba,ha,T,U),P())}))}catch(P){N()}else N()})(f[F]);0==counter&&l(c);F=0;z()};EditorUi.prototype.addRadiobox=function(c,f,l,t,z,C,F){return this.addCheckbox(c,l,t,z,C,F,!0,f)};EditorUi.prototype.addCheckbox=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;var K=document.createElement("input");K.style.marginRight="8px";K.style.marginTop="16px";K.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();K.id=F;null!=N&&K.setAttribute("name",N);l&&
(K.setAttribute("checked","checked"),K.defaultChecked=!0);t&&K.setAttribute("disabled","disabled");C&&(c.appendChild(K),l=document.createElement("label"),mxUtils.write(l,f),l.setAttribute("for",F),c.appendChild(l),z||mxUtils.br(c));return K};EditorUi.prototype.addEditButton=function(c,f){var l=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);l.style.marginLeft="24px";var t=this.getCurrentFile(),z="";null!=t&&t.getMode()!=App.MODE_DEVICE&&t.getMode()!=App.MODE_BROWSER&&(z=window.location.href);
var C=document.createElement("select");C.style.maxWidth="200px";C.style.width="auto";C.style.marginLeft="8px";C.style.marginRight="10px";C.className="geBtn";t=document.createElement("option");t.setAttribute("value","blank");mxUtils.write(t,mxResources.get("makeCopy"));C.appendChild(t);var F=document.createElement("option");F.setAttribute("value","custom");mxUtils.write(F,mxResources.get("custom")+"...");C.appendChild(F);c.appendChild(C);mxEvent.addListener(C,"change",mxUtils.bind(this,function(){if("custom"==
C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!=K?(z=K,F.setAttribute("title",K)):(C.value="blank",F.removeAttribute("title"))},mxResources.get("url"),null,null,null,null,function(){C.value="blank"});this.showDialog(N.container,300,80,!0,!1);N.init()}}));mxEvent.addListener(l,"change",mxUtils.bind(this,function(){l.checked&&(null==f||f.checked)?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return l.checked?
@@ -3645,161 +3646,162 @@ C.value){var N=new FilenameDialog(this,z,mxResources.get("ok"),function(K){null!
"')");F.innerText="";F.appendChild(N)}mxUtils.write(c,mxResources.get("links")+":");var t=document.createElement("select");t.style.width="100px";t.style.padding="0px";t.style.marginLeft="8px";t.style.marginRight="10px";t.className="geBtn";var z=document.createElement("option");z.setAttribute("value","auto");mxUtils.write(z,mxResources.get("automatic"));t.appendChild(z);z=document.createElement("option");z.setAttribute("value","blank");mxUtils.write(z,mxResources.get("openInNewWindow"));t.appendChild(z);
z=document.createElement("option");z.setAttribute("value","self");mxUtils.write(z,mxResources.get("openInThisWindow"));t.appendChild(z);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),t.appendChild(f));c.appendChild(t);mxUtils.write(c,mxResources.get("borderColor")+":");var C="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(N){this.pickColor(C||"none",function(K){C=K;l()});
mxEvent.consume(N)}));l();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";c.appendChild(F);mxUtils.br(c);return{getColor:function(){return C},getTarget:function(){return t.value},focus:function(){t.focus()}}};EditorUi.prototype.createUrlParameters=function(c,f,l,t,z,C){C=null!=C?C:[];l&&(C.push("lightbox=1"),
-"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,I,ca){var da=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==da||""==da.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,
-null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+da.getHash(),c=!1);c&&null!=da&&null!=da.getTitle()&&da.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(da.getTitle()));I&&1<l.length&&(K.push("open="+l.substring(1)),l="");ca&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());return(t&&(null!=F||null!=da&&da.getMode()!=App.MODE_GITHUB&&da.getMode()!=App.MODE_GITLAB)?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){this.getBasenames();var X={};""!=z&&z!=mxConstants.NONE&&(X.highlight=z);"auto"!==t&&(X.target=t);I||(X.lightbox=!1);X.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(X.zoom=l/100);l=[];F&&(l.push("pages"),X.resize=!0,null!=this.pages&&null!=this.currentPage&&
-(X.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),X.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ea&&(X["dark-mode"]=ea);0<l.length&&(I&&l.push("lightbox"),X.toolbar=l.join(" "));null!=ca&&0<ca.length&&(X.edit=ca);null!=c?X.url=c:X.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(X))+'"></div>';c=null!=c?"&fetch="+
-encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace="nowrap";var C=document.createElement("h3");
-mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");C=N.cloneNode(!0);C.setAttribute("value",
-"copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var I=this.getCurrentFile();null==l&&null!=I&&I.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,mxResources.get("share")),F.appendChild(K),
-mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(I.getId(),I)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ca=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));da.appendChild(K);K=document.createElement("option");
-K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ea=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,":");var X=document.createElement("input");
-X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";X.style.marginLeft="4px";X.style.marginRight="12px";X.value="100%";z.appendChild(X);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=
-this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ea.checked,X.value,ca.getTarget(),ca.getColor(),ba.checked,ha.checked,ma.checked,Y.checked,la.checked,
-null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K){var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";I.appendChild(ca);var da=document.createElement("select");c=30;da.className=
-"geBtn";da.style.marginBottom="8px";da.style.marginLeft="0px";da.style.width="100%";da.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),da.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value","auth");da.appendChild(ca);null!=N&&
-""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");da.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),da.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));I.appendChild(da);mxUtils.br(I);da.focus();var ea=null,X=null;if(null!=f||null!=l)c+=30,mxUtils.write(I,mxResources.get("width")+
-":"),ea=document.createElement("input"),ea.setAttribute("type","text"),ea.style.marginRight="16px",ea.style.width="50px",ea.style.marginLeft="6px",ea.style.marginRight="16px",ea.style.marginBottom="10px",ea.value="100%",I.appendChild(ea),mxUtils.write(I,mxResources.get("height")+":"),X=document.createElement("input"),X.setAttribute("type","text"),X.style.width="50px",X.style.marginLeft="6px",X.style.marginBottom="10px",X.value=l+"px",I.appendChild(X),mxUtils.br(I);var ba=this.addLinkSection(I,t),
-ha=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),ha=this.addCheckbox(I,mxResources.get("selectedPage")+": "+f));var ma=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!t),Y=this.addEditButton(I,ma),la=Y.getEditInput();t&&(la.style.marginLeft=ma.style.marginLeft,ma.style.display="none",c-=20);var Z=this.addCheckbox(I,mxResources.get("layers"),!0);
-Z.style.marginLeft=la.style.marginLeft;Z.style.marginTop="8px";var k=this.addCheckbox(I,mxResources.get("tags"),!0);k.style.marginLeft=la.style.marginLeft;k.style.marginBottom="16px";k.style.marginTop="16px";mxEvent.addListener(ma,"change",function(){ma.checked?(Z.removeAttribute("disabled"),la.removeAttribute("disabled"),k.removeAttribute("disabled")):(Z.setAttribute("disabled","disabled"),la.setAttribute("disabled","disabled"),k.setAttribute("disabled","disabled"));la.checked&&ma.checked?Y.getEditSelect().removeAttribute("disabled"):
-Y.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,I,mxUtils.bind(this,function(){K(ba.getTarget(),ba.getColor(),null==ha?!1:ha.checked,ma.checked,Y.getLink(),Z.checked,null!=ea?ea.value:null,null!=X?X.value:null,k.checked,da.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ea?(ea.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ea.select():document.execCommand("selectAll",!1,null)):null==da.parentNode;ba.focus()};
-EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft=
-"4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var I=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ca=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),
-Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom="16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ea=parseInt(N.value)/100||1,X=parseInt(K.value)||0;l(!I.checked,null!=ca?ca.checked:!1,null!=da?da.checked:!1,ea,X)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=
-function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var I=document.createElement("div");I.style.whiteSpace="nowrap";var ca=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ea=document.createElement("h3");mxUtils.write(ea,c);ea.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";I.appendChild(ea);mxUtils.write(I,mxResources.get("zoom")+":");var X=document.createElement("input");X.setAttribute("type","text");X.style.marginRight="16px";X.style.width="60px";
-X.style.marginLeft="4px";X.style.marginRight="12px";X.value=this.lastExportZoom||"100%";I.appendChild(X);mxUtils.write(I,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";I.appendChild(ba);mxUtils.br(I);var ha=this.addCheckbox(I,mxResources.get("selectionOnly"),!1,ca.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop=
-"16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft="8px";c=["selectionOnly","diagram","page"];for(ea=0;ea<c.length;ea++)if(!ca.isSelectionEmpty()||"selectionOnly"!=c[ea]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ea]));la.setAttribute("value",c[ea]);Y.appendChild(la)}K?(mxUtils.write(I,mxResources.get("size")+
-":"),I.appendChild(Y),mxUtils.br(I),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(I.appendChild(ma),mxUtils.write(I,mxResources.get("crop")),mxUtils.br(I),da+=30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ca.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",
-ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(I,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");
-K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(I,mxResources.get("appearance")+":");I.appendChild(k);mxUtils.br(I);da+=26;var A=this.addCheckbox(I,mxResources.get("shadow"),
-ca.shadowVisible),J=null;if("png"==N||"jpeg"==N||"webp"==N)J=this.addCheckbox(I,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var U=this.addCheckbox(I,mxResources.get("includeCopyOfMyDiagram")+":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){U.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ca=document.createElement("option"),ca.setAttribute("value",
-"allPages"),mxUtils.write(ca,mxResources.get("allPages")),P.appendChild(ca),ca=document.createElement("option"),ca.setAttribute("value","currentPage"),mxUtils.write(ca,mxResources.get("currentPage")),P.appendChild(ca),U.style.marginBottom="12px",P.style.marginBottom="16px",I.appendChild(P),mxUtils.br(I),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(U,"change",F),F()):U.style.marginBottom="16px";var T=document.createElement("input");T.style.marginBottom="16px";
-T.style.marginRight="8px";T.setAttribute("type","checkbox");var W=document.createElement("input");W.style.marginBottom="16px";W.style.marginRight="8px";W.setAttribute("type","checkbox");f&&(T.checked=null!=this.lastEmbedImages?this.lastEmbedImages:!0,I.appendChild(T),mxUtils.write(I,mxResources.get("embedImages")),mxUtils.br(I),W.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,I.appendChild(W),mxUtils.write(I,mxResources.get("embedFonts")),mxUtils.br(I),da+=50);var aa=document.createElement("select");
-aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,
-mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(I,mxResources.get("links")+":"),I.appendChild(aa),I.appendChild(F),mxUtils.br(I),mxUtils.br(I),da+=50);l=new CustomDialog(this,I,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=X.value;this.lastEmbedImages=T.checked;this.lastEmbedFonts=W.checked;this.lastEmbedInclude=P.value;z(X.value,Z.checked,!ha.checked,A.checked,U.checked,T.checked&&f,ba.value,ma.checked,("png"==N||
-"svg"==N)&&"currentPage"==P.value,aa.value,null!=J?J.checked:null,null!=k?k.value:null,Y.value,W.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);X.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?X.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,
-f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),I=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&t,!t),ca=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ea=this.addEditButton(C,da),X=ea.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=X.style.marginLeft;ha.style.marginBottom=
-"12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),X.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&da.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,I.checked,ca.checked,da.checked,ea.getLink(),ha.checked)}),null,mxResources.get("embed"),
-z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(X){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+
-(null!=ca?"&page="+ca:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(I.width)+'" height="'+Math.round(I.height)+'"');F('<img src="'+X+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var I=this.editor.graph.getGraphBounds(),ca=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(X){var ba=t?this.getFileData(!0):null;X=this.createImageDataUri(X,
-ba,"png");K(X)}),null,null,null,mxUtils.bind(this,function(X){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),I.width*I.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*I.width)+"&h="+Math.round(2*I.height));var ea=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ea.send(mxUtils.bind(this,function(){200<=ea.getStatus()&&299>=ea.getStatus()?
-K("data:image/png;base64,"+ea.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var I=0;I<K.length;I++){var ca=K[I].getAttribute("href");null!=ca&&"#"==ca.charAt(0)&&"_blank"==K[I].getAttribute("target")&&K[I].removeAttribute("target")}t&&N.setAttribute("content",
-this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ea="";t&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",
-ea+="cursor:pointer;");c&&(ea+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(X){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(X))+'"'+(""!=ea?' style="'+ea+'"':"")+da+"/>")}))}else ea="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ea+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ea+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ea&&N.setAttribute("style",ea),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
+"auto"!=c&&C.push("target="+c),null!=f&&f!=mxConstants.NONE&&C.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=t&&0<t.length&&C.push("edit="+encodeURIComponent(t)),z&&C.push("layers=1"),this.editor.graph.foldingEnabled&&C.push("nav=1"));return C};EditorUi.prototype.createLink=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){var W=this.getCurrentFile();K=this.createUrlParameters(c,f,t,z,C,K);c=!0;null!=F?l="#U"+encodeURIComponent(F):N||null==W||""==W.getHash()?l="#R"+encodeURIComponent(l?this.getFileData(!0,
+null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(l="#"+W.getHash(),c=!1);c&&null!=W&&null!=W.getTitle()&&W.getTitle()!=this.defaultFilename&&K.push("title="+encodeURIComponent(W.getTitle()));J&&1<l.length&&(K.push("open="+l.substring(1)),l="");ea&&null!=this.currentPage&&K.push("page-id="+this.currentPage.getId());da&&K.push("transparent=1");null!=ca&&K.push("dark="+ca);return(t&&(null!=F||null!=W&&W.getMode()!=App.MODE_GITHUB&&W.getMode()!=App.MODE_GITLAB)?
+EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<K.length?"?"+K.join("&"):"")+l};EditorUi.prototype.createHtml=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){this.getBasenames();var W={};""!=z&&z!=mxConstants.NONE&&(W.highlight=z);"auto"!==t&&(W.target=t);J||(W.lightbox=!1);W.nav=this.editor.graph.foldingEnabled;l=parseInt(l);isNaN(l)||100==l||(W.zoom=l/100);l=[];F&&(l.push("pages"),
+W.resize=!0,null!=this.pages&&null!=this.currentPage&&(W.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(l.push("zoom"),W.resize=!0);N&&l.push("layers");K&&l.push("tags");null!=ca&&(W["dark-mode"]=ca);0<l.length&&(J&&l.push("lightbox"),W.toolbar=l.join(" "));null!=ea&&0<ea.length&&(W.edit=ea);null!=c?W.url=c:W.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(C?"max-width:100%;":"")+(""!=l?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(W))+
+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";da(f,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,f,l,t){var z=document.createElement("div");z.style.whiteSpace=
+"nowrap";var C=document.createElement("h3");mxUtils.write(C,mxResources.get("html"));C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(C);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var N=document.createElement("input");N.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";N.setAttribute("value","url");N.setAttribute("type","radio");N.setAttribute("name","type-embedhtmldialog");
+C=N.cloneNode(!0);C.setAttribute("value","copy");F.appendChild(C);var K=document.createElement("span");mxUtils.write(K,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(K);mxUtils.br(F);F.appendChild(N);K=document.createElement("span");mxUtils.write(K,mxResources.get("publicDiagramUrl"));F.appendChild(K);var J=this.getCurrentFile();null==l&&null!=J&&J.constructor==window.DriveFile&&(K=document.createElement("a"),K.style.paddingLeft="12px",K.style.color="gray",K.style.cursor="pointer",mxUtils.write(K,
+mxResources.get("share")),F.appendChild(K),mxEvent.addListener(K,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(J.getId(),J)})));C.setAttribute("checked","checked");null==l&&N.setAttribute("disabled","disabled");z.appendChild(F);F=380;var ea=this.addLinkSection(z),da=document.createElement("select");da.style.maxWidth="260px";da.style.marginLeft="8px";da.style.marginTop="16px";K=document.createElement("option");K.setAttribute("value","light");mxUtils.write(K,mxResources.get("light"));
+da.appendChild(K);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));da.appendChild(K);K=document.createElement("option");K.setAttribute("value","auto");mxUtils.write(K,mxResources.get("automatic"));K.setAttribute("selected","selected");da.appendChild(K);K.setAttribute("selected","selected");mxUtils.write(z,mxResources.get("appearance")+":");z.appendChild(da);mxUtils.br(z);F+=26;var ca=this.addCheckbox(z,mxResources.get("zoom"),!0,null,!0);mxUtils.write(z,
+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value="100%";z.appendChild(W);var ba=this.addCheckbox(z,mxResources.get("fit"),!0);K=null!=this.pages&&1<this.pages.length;var ha=ha=this.addCheckbox(z,mxResources.get("allPages"),K,!K),ma=this.addCheckbox(z,mxResources.get("layers"),!0),Y=this.addCheckbox(z,mxResources.get("tags"),!0),la=this.addCheckbox(z,mxResources.get("lightbox"),
+!0),Z=null;if(EditorUi.enableHtmlEditOption){Z=this.addEditButton(z,la);var k=Z.getEditInput();k.style.marginBottom="16px";F+=50;mxEvent.addListener(la,"change",function(){la.checked?k.removeAttribute("disabled"):k.setAttribute("disabled","disabled");k.checked&&la.checked?Z.getEditSelect().removeAttribute("disabled"):Z.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,z,mxUtils.bind(this,function(){t(N.checked?l:null,ca.checked,W.value,ea.getTarget(),ea.getColor(),ba.checked,
+ha.checked,ma.checked,Y.checked,la.checked,null!=Z?Z.getLink():null,null!=da?da.value:null)}),null,c,f);this.showDialog(c.container,340,F,!0,!0);C.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,f,l,t,z,C,F,N,K,J,ea){var da=document.createElement("div");da.style.whiteSpace="nowrap";var ca=document.createElement("h3");mxUtils.write(ca,c||mxResources.get("publish"));ca.style.width="100%";ca.style.textAlign="center";ca.style.marginTop="2px";ca.style.marginBottom="20px";da.appendChild(ca);
+var W=document.createElement("select");c=30;W.className="geBtn";W.style.marginBottom="8px";W.style.marginLeft="0px";W.style.width="100%";W.style.boxSizing="border-box";if(null==N||""==N.getHash())z=null!=z?z:"https://www.drawio.com/doc/faq/publish-diagram-as-link",ca=document.createElement("option"),mxUtils.write(ca,mxResources.get("makeCopy")),ca.setAttribute("value","copy"),W.appendChild(ca);ca=document.createElement("option");mxUtils.write(ca,mxResources.get("authorizationRequired"));ca.setAttribute("value",
+"auth");W.appendChild(ca);null!=N&&""!=N.getHash()||ca.setAttribute("disabled","disabled");N=document.createElement("option");N.setAttribute("value","public");W.appendChild(N);null!=F?(mxUtils.write(N,mxResources.get("publicDiagramUrl")),N.setAttribute("title",F),W.value="public"):(mxUtils.write(N,mxResources.get("publicDiagramUrl")+" ("+mxResources.get("diagramIsNotPublic")+")"),N.setAttribute("disabled","disabled"));da.appendChild(W);mxUtils.br(da);W.focus();var ba=null,ha=null;if(null!=f||null!=
+l)c+=30,mxUtils.write(da,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",da.appendChild(ba),mxUtils.write(da,mxResources.get("height")+":"),ha=document.createElement("input"),ha.setAttribute("type","text"),ha.style.width="50px",ha.style.marginLeft="6px",ha.style.marginBottom="10px",ha.value=l+"px",da.appendChild(ha),
+mxUtils.br(da);var ma=this.addLinkSection(da,t),Y=J?this.addCheckbox(da,mxResources.get("transparentBackground"),!1):null;null!=Y&&(c+=20);var la=null;null!=this.pages&&null!=this.currentPage&&0<this.getPageIndex(this.currentPage)&&(c+=30,f=null!=this.currentPage?this.currentPage.getName():"",16<f.length&&(f=f.substring(0,16)+"..."),la=this.addCheckbox(da,mxResources.get("selectedPage")+": "+f));var Z=document.createElement("select");Z.style.maxWidth="260px";Z.style.marginLeft="8px";Z.style.marginTop=
+"16px";f=document.createElement("option");f.setAttribute("value","0");mxUtils.write(f,mxResources.get("light"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","1");mxUtils.write(f,mxResources.get("dark"));Z.appendChild(f);f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));f.setAttribute("selected","selected");Z.appendChild(f);ea&&(mxUtils.write(da,mxResources.get("appearance")+":"),da.appendChild(Z),mxUtils.br(da),
+c+=30);var k=this.addCheckbox(da,mxResources.get("lightbox"),!0,null,null,!t),A=this.addEditButton(da,k),I=A.getEditInput();t&&(I.style.marginLeft=k.style.marginLeft,k.style.display="none",c-=20);var T=this.addCheckbox(da,mxResources.get("layers"),!0);T.style.marginLeft=I.style.marginLeft;T.style.marginTop="8px";var P=this.addCheckbox(da,mxResources.get("tags"),!0);P.style.marginLeft=I.style.marginLeft;P.style.marginBottom="16px";P.style.marginTop="16px";mxEvent.addListener(k,"change",function(){k.checked?
+(T.removeAttribute("disabled"),I.removeAttribute("disabled"),P.removeAttribute("disabled")):(T.setAttribute("disabled","disabled"),I.setAttribute("disabled","disabled"),P.setAttribute("disabled","disabled"));I.checked&&k.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled","disabled")});t=new CustomDialog(this,da,mxUtils.bind(this,function(){K(ma.getTarget(),ma.getColor(),null==la?!1:la.checked,k.checked,A.getLink(),T.checked,null!=ba?ba.value:null,null!=
+ha?ha.value:null,P.checked,W.value,null!=Y?Y.checked:!1,Z.value)}),null,mxResources.get("create"),z,C);this.showDialog(t.container,340,296+c,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):null==W.parentNode;ma.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));
+F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(z?"10":"4")+"px";C.appendChild(F);if(z){mxUtils.write(C,mxResources.get("zoom")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.marginRight="16px";N.style.width="60px";N.style.marginLeft="4px";N.style.marginRight="12px";N.value=this.lastExportZoom||"100%";C.appendChild(N);mxUtils.write(C,mxResources.get("borderWidth")+":");var K=document.createElement("input");K.setAttribute("type","text");
+K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.value=this.lastExportBorder||"0";C.appendChild(K);mxUtils.br(C)}var J=this.addCheckbox(C,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),ea=t?null:this.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var da=t?null:this.addCheckbox(C,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=da&&(da.style.marginBottom=
+"16px");c=new CustomDialog(this,C,mxUtils.bind(this,function(){var ca=parseInt(N.value)/100||1,W=parseInt(K.value)||0;l(!J.checked,null!=ea?ea.checked:!1,null!=da?da.checked:!1,ca,W)}),null,c,f);this.showDialog(c.container,300,(z?25:0)+(t?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,f,l,t,z,C,F,N,K){F=null!=F?F:Editor.defaultIncludeDiagram;var J=document.createElement("div");J.style.whiteSpace="nowrap";var ea=this.editor.graph,da="jpeg"==N||"webp"==N?220:320,ca=document.createElement("h3");
+mxUtils.write(ca,c);ca.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";J.appendChild(ca);mxUtils.write(J,mxResources.get("zoom")+":");var W=document.createElement("input");W.setAttribute("type","text");W.style.marginRight="16px";W.style.width="60px";W.style.marginLeft="4px";W.style.marginRight="12px";W.value=this.lastExportZoom||"100%";J.appendChild(W);mxUtils.write(J,mxResources.get("borderWidth")+":");var ba=document.createElement("input");ba.setAttribute("type","text");
+ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.value=this.lastExportBorder||"0";J.appendChild(ba);mxUtils.br(J);var ha=this.addCheckbox(J,mxResources.get("selectionOnly"),!1,ea.isSelectionEmpty()),ma=document.createElement("input");ma.style.marginTop="16px";ma.style.marginRight="8px";ma.style.marginLeft="24px";ma.setAttribute("disabled","disabled");ma.setAttribute("type","checkbox");var Y=document.createElement("select");Y.style.marginTop="16px";Y.style.marginLeft=
+"8px";c=["selectionOnly","diagram","page"];for(ca=0;ca<c.length;ca++)if(!ea.isSelectionEmpty()||"selectionOnly"!=c[ca]){var la=document.createElement("option");mxUtils.write(la,mxResources.get(c[ca]));la.setAttribute("value",c[ca]);Y.appendChild(la)}K?(mxUtils.write(J,mxResources.get("size")+":"),J.appendChild(Y),mxUtils.br(J),da+=26,mxEvent.addListener(Y,"change",function(){"selectionOnly"==Y.value&&(ha.checked=!0)})):C&&(J.appendChild(ma),mxUtils.write(J,mxResources.get("crop")),mxUtils.br(J),da+=
+30,mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled","disabled")}));ea.isSelectionEmpty()?K&&(ha.style.display="none",ha.nextSibling.style.display="none",ha.nextSibling.nextSibling.style.display="none",da-=30):(Y.value="diagram",ma.setAttribute("checked","checked"),ma.defaultChecked=!0,mxEvent.addListener(ha,"change",function(){Y.value=ha.checked?"selectionOnly":"diagram"}));var Z=this.addCheckbox(J,mxResources.get("transparentBackground"),
+!1,null,null,"jpeg"!=N&&"webp"!=N),k=document.createElement("select");k.style.maxWidth="260px";k.style.marginLeft="8px";k.style.marginTop="16px";C=document.createElement("option");C.setAttribute("value","light");mxUtils.write(C,mxResources.get("light"));k.appendChild(C);K=document.createElement("option");K.setAttribute("value","dark");mxUtils.write(K,mxResources.get("dark"));k.appendChild(K);"svg"==N?(C=document.createElement("option"),C.setAttribute("value","auto"),mxUtils.write(C,mxResources.get("automatic")),
+C.setAttribute("selected","selected"),k.appendChild(C)):Editor.isDarkMode()?K.setAttribute("selected","selected"):C.setAttribute("selected","selected");mxUtils.write(J,mxResources.get("appearance")+":");J.appendChild(k);mxUtils.br(J);da+=26;var A=this.addCheckbox(J,mxResources.get("shadow"),ea.shadowVisible),I=null;if("png"==N||"jpeg"==N||"webp"==N)I=this.addCheckbox(J,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var T=this.addCheckbox(J,mxResources.get("includeCopyOfMyDiagram")+
+":",F,null,null,"jpeg"!=N&&"webp"!=N),P=document.createElement("select");P.style.maxWidth="260px";P.style.marginLeft="28px";"png"==N||"svg"==N?(F=function(){T.checked?P.removeAttribute("disabled"):P.setAttribute("disabled","disabled")},ea=document.createElement("option"),ea.setAttribute("value","allPages"),mxUtils.write(ea,mxResources.get("allPages")),P.appendChild(ea),ea=document.createElement("option"),ea.setAttribute("value","currentPage"),mxUtils.write(ea,mxResources.get("currentPage")),P.appendChild(ea),
+T.style.marginBottom="12px",P.style.marginBottom="16px",J.appendChild(P),mxUtils.br(J),da+=20,null!=this.lastEmbedInclude&&(P.value=this.lastEmbedInclude),mxEvent.addListener(T,"change",F),F()):T.style.marginBottom="16px";var U=document.createElement("input");U.style.marginBottom="16px";U.style.marginRight="8px";U.setAttribute("type","checkbox");var X=document.createElement("input");X.style.marginBottom="16px";X.style.marginRight="8px";X.setAttribute("type","checkbox");f&&(U.checked=null!=this.lastEmbedImages?
+this.lastEmbedImages:!0,J.appendChild(U),mxUtils.write(J,mxResources.get("embedImages")),mxUtils.br(J),X.checked=null!=this.lastEmbedFonts?this.lastEmbedImages:!0,J.appendChild(X),mxUtils.write(J,mxResources.get("embedFonts")),mxUtils.br(J),da+=50);var aa=document.createElement("select");aa.style.maxWidth="260px";aa.style.marginLeft="8px";C=document.createElement("option");C.setAttribute("value","auto");mxUtils.write(C,mxResources.get("automatic"));aa.appendChild(C);F=document.createElement("option");
+F.setAttribute("value","blank");mxUtils.write(F,mxResources.get("openInNewWindow"));aa.appendChild(F);F=document.createElement("option");F.setAttribute("value","self");mxUtils.write(F,mxResources.get("openInThisWindow"));aa.appendChild(F);F=document.createElement("div");mxUtils.write(F,mxResources.get("LinksLost"));F.style.margin="7px";F.style.display="none";"svg"==N&&(mxUtils.write(J,mxResources.get("links")+":"),J.appendChild(aa),J.appendChild(F),mxUtils.br(J),mxUtils.br(J),da+=50);l=new CustomDialog(this,
+J,mxUtils.bind(this,function(){this.lastExportBorder=ba.value;this.lastExportZoom=W.value;this.lastEmbedImages=U.checked;this.lastEmbedFonts=X.checked;this.lastEmbedInclude=P.value;z(W.value,Z.checked,!ha.checked,A.checked,T.checked,U.checked&&f,ba.value,ma.checked,("png"==N||"svg"==N)&&"currentPage"==P.value,aa.value,null!=I?I.checked:null,null!=k?k.value:null,Y.value,X.checked)}),null,l,t);this.showDialog(l.container,340,da,!0,!0,null,null,null,null,!0);W.focus();mxClient.IS_GC||mxClient.IS_FF||
+5<=document.documentMode?W.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,f,l,t,z){var C=document.createElement("div");C.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var N=document.createElement("h3");mxUtils.write(N,f);N.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(N)}var K=this.addCheckbox(C,mxResources.get("fit"),!0),J=this.addCheckbox(C,mxResources.get("shadow"),F.shadowVisible&&
+t,!t),ea=this.addCheckbox(C,l),da=this.addCheckbox(C,mxResources.get("lightbox"),!0),ca=this.addEditButton(C,da),W=ca.getEditInput(),ba=1<F.model.getChildCount(F.model.getRoot()),ha=this.addCheckbox(C,mxResources.get("layers"),ba,!ba);ha.style.marginLeft=W.style.marginLeft;ha.style.marginBottom="12px";ha.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(ba&&ha.removeAttribute("disabled"),W.removeAttribute("disabled")):(ha.setAttribute("disabled","disabled"),W.setAttribute("disabled",
+"disabled"));W.checked&&da.checked?ca.getEditSelect().removeAttribute("disabled"):ca.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,C,mxUtils.bind(this,function(){c(K.checked,J.checked,ea.checked,da.checked,ca.getLink(),ha.checked)}),null,mxResources.get("embed"),z);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,f,l,t,z,C,F,N){function K(W){var ba=" ",ha="";t&&(ba=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=ea?"&page="+ea:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}})(this);\"",ha+="cursor:pointer;");c&&(ha+="max-width:100%;");var ma="";l&&(ma=' width="'+Math.round(J.width)+'" height="'+Math.round(J.height)+'"');F('<img src="'+W+'"'+ma+(""!=ha?' style="'+ha+'"':"")+ba+"/>")}var J=this.editor.graph.getGraphBounds(),ea=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(W){var ba=t?this.getFileData(!0):
+null;W=this.createImageDataUri(W,ba,"png");K(W)}),null,null,null,mxUtils.bind(this,function(W){N({message:mxResources.get("unknownError")})}),null,!0,l?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),J.width*J.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var da="";l&&(da="&w="+Math.round(2*J.width)+"&h="+Math.round(2*J.height));var ca=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(t?"1":"0")+da+"&xml="+encodeURIComponent(f));ca.send(mxUtils.bind(this,function(){200<=
+ca.getStatus()&&299>=ca.getStatus()?K("data:image/png;base64,"+ca.getText()):N({message:mxResources.get("unknownError")})}))}else N({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,f,l,t,z,C,F){var N=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!l,"auto"),K=N.getElementsByTagName("a");if(null!=K)for(var J=0;J<K.length;J++){var ea=K[J].getAttribute("href");null!=ea&&"#"==ea.charAt(0)&&"_blank"==K[J].getAttribute("target")&&K[J].removeAttribute("target")}t&&
+N.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(N);if(l){var da=" ",ca="";t&&(da="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(z?"&edit=_blank":"")+(C?"&layers=1":
+"")+"');}})(this);\"",ca+="cursor:pointer;");c&&(ca+="max-width:100%;");this.editor.convertImages(N,mxUtils.bind(this,function(W){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(W))+'"'+(""!=ca?' style="'+ca+'"':"")+da+"/>")}))}else ca="",t&&(f=this.getSelectedPageIndex(),N.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(z?"&edit=_blank":"")+(C?"&layers=1":"")+"');}}})(this);"),ca+="cursor:pointer;"),c&&(c=parseInt(N.getAttribute("width")),z=parseInt(N.getAttribute("height")),N.setAttribute("viewBox","-0.5 -0.5 "+c+" "+z),ca+="max-width:100%;max-height:"+z+"px;",N.removeAttribute("height")),""!=ca&&N.setAttribute("style",ca),this.editor.addFontCss(N),this.editor.graph.mathEnabled&&this.editor.addMathCss(N),F(mxUtils.getXml(N))};EditorUi.prototype.timeSince=
function(c){c=Math.floor((new Date-c)/1E3);var f=Math.floor(c/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(c/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(c/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(c/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(c/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,f){if(null!=c){var l=null;if("diagram"==
c.nodeName)l=c;else if("mxfile"==c.nodeName){var t=c.getElementsByTagName("diagram");if(0<t.length){l=t[0];var z=f.getGlobalVariable;f.getGlobalVariable=function(C){return"page"==C?l.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==C?1:z.apply(this,arguments)}}}null!=l&&(c=Editor.parseDiagramNode(l))}t=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(c)}catch(C){}finally{this.editor.graph=t}return c};EditorUi.prototype.getSvgFileProperties=function(c){return this.getPngFileProperties(c)};
EditorUi.prototype.getPngFileProperties=function(c){var f=1,l=0;if(null!=c){if(c.hasAttribute("scale")){var t=parseFloat(c.getAttribute("scale"));!isNaN(t)&&0<t&&(f=t)}c.hasAttribute("border")&&(t=parseInt(c.getAttribute("border")),!isNaN(t)&&0<t&&(l=t))}return{scale:f,border:l}};EditorUi.prototype.getEmbeddedPng=function(c,f,l,t,z){try{var C=this.editor.graph,F=null;if(null!=l&&0<l.length)C=this.createTemporaryGraph(C.getStylesheet()),document.body.appendChild(C.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(l).documentElement,
-!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(I){return"page"==I?K.getName():"pagenumber"==I?1:N.apply(this,arguments)};document.body.appendChild(C.container);
-C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(I){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=I.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(F));c(ca.substring(ca.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(I){null!=f&&f(I)}),null,null,t,null,C.shadowVisible,null,
-C,z,null,null,null,"diagram",null)}catch(I){null!=f&&f(I)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){N=null!=N?N:!0;ca=null!=ca?ca:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,I,ca,null,null,C,null,K,null,f.shadowVisible||da,null,ea,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ca);null!=c&&C.setAttribute("content",c);null!=
-l&&C.setAttribute("resource",l);var X=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){X(ha)})):X(ba)}));else return X(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
-this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,I,ca,da,
-ea)}));this.handleError(ba)}))){var X=this.editor.graph.isSelectionEmpty();l=null!=l?l:X;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ca)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),
-null,l,c||1,f,t,null,null,C,F,I,da,ea)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<
-c.length){K.model.beginUpdate();try{var I=mxUtils.parseXml(c);c={};var ca=this.editor.extractGraphModel(I.documentElement,null!=this.pages);if(null!=ca&&"mxfile"==ca.nodeName&&null!=this.pages){var da=ca.getElementsByTagName("diagram");if(1==da.length&&!C){if(ca=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ea=da[0].getAttribute("name");null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,
-ea))}}else if(0<da.length){C=[];var X=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ea=da[0].getAttribute("name"),null!=ea&&""!=ea&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ea)),ca=Editor.parseDiagramNode(da[0]),t=!1,X=1);for(;X<da.length;X++){var ba=da[X].getAttribute("id");da[X].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[X]));c[ba]=da[X].getAttribute("id");var ma=this.pages.length;
-null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ca&&"mxGraphModel"===ca.nodeName){N=K.importGraphModel(ca,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),X=0;X<N.length;X++)this.updatePageLinksForCell(c,N[X]);var Y=K.parseBackgroundImage(ca.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,
+!0),C),F=l;else if(null!=this.pages&&this.currentPage!=this.pages[0]){C=this.createTemporaryGraph(C.getStylesheet());var N=C.getGlobalVariable;C.setBackgroundImage=this.editor.graph.setBackgroundImage;var K=this.pages[0];this.currentPage==K?C.setBackgroundImage(this.editor.graph.backgroundImage):null!=K.viewState&&null!=K.viewState&&C.setBackgroundImage(K.viewState.backgroundImage);C.getGlobalVariable=function(J){return"page"==J?K.getName():"pagenumber"==J?1:N.apply(this,arguments)};document.body.appendChild(C.container);
+C.model.setRoot(K.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(J){try{null==F&&(F=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ea=J.toDataURL("image/png");ea=Editor.writeGraphModelToPng(ea,"tEXt","mxfile",encodeURIComponent(F));c(ea.substring(ea.lastIndexOf(",")+1));C!=this.editor.graph&&C.container.parentNode.removeChild(C.container)}catch(da){null!=f&&f(da)}}),null,null,null,mxUtils.bind(this,function(J){null!=f&&f(J)}),null,null,t,null,C.shadowVisible,null,
+C,z,null,null,null,"diagram",null)}catch(J){null!=f&&f(J)}};EditorUi.prototype.getEmbeddedSvg=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){N=null!=N?N:!0;ea=null!=ea?ea:0;F=null!=K?K:f.background;F==mxConstants.NONE&&(F=null);null==F&&"none"==f.getAdaptiveColors()&&(F="#ffffff");K=this.editor.graph.createSvgImageExport(null!=c);C=f.getSvg(F,J,ea,null,null,C,null,K,null,f.shadowVisible||da,null,ca,"diagram");(f.shadowVisible||da)&&f.addSvgShadow(C,null,null,0==ea);null!=c&&C.setAttribute("content",c);null!=
+l&&C.setAttribute("resource",l);var W=mxUtils.bind(this,function(ba){ba=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(ba);null!=z&&z(ba);return ba});f.mathEnabled&&this.editor.addMathCss(C);if(null!=z)this.embedFonts(C,mxUtils.bind(this,function(ba){N?this.editor.convertImages(ba,mxUtils.bind(this,function(ha){W(ha)})):W(ba)}));else return W(C)};EditorUi.prototype.embedFonts=function(c,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=
+this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(l){try{null!=l&&this.editor.addFontCss(c,l),f(c)}catch(t){f(c)}}))}catch(l){f(c)}}))};EditorUi.prototype.exportImage=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){K=null!=K?K:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"),mxUtils.bind(this,function(ba){Editor.addRetryToError(ba,mxUtils.bind(this,function(){this.exportImage(c,f,l,t,z,C,F,N,K,J,ea,da,
+ca)}));this.handleError(ba)}))){var W=this.editor.graph.isSelectionEmpty();l=null!=l?l:W;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(ba){this.spinner.stop();try{this.saveCanvas(ba,z?this.getFileData(!0,null,null,null,l,N,null,null,null,null,null,c,C):null,K,null==this.pages||0==this.pages.length,ea)}catch(ha){this.handleError(ha)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(ba){this.spinner.stop();this.handleError(ba)}),
+null,l,c||1,f,t,null,null,C,F,J,da,ca)}catch(ba){this.spinner.stop(),this.handleError(ba)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.addLocalPagesToMapping=function(c){c=null!=c?c:{};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)c[this.pages[f].getId()]=this.pages[f].getId();return c};EditorUi.prototype.importXml=function(c,f,l,t,z,C,F){f=null!=f?f:0;l=null!=l?l:0;var N=[];try{var K=this.editor.graph;if(null!=c&&0<
+c.length){K.model.beginUpdate();try{var J=mxUtils.parseXml(c);c={};var ea=this.editor.extractGraphModel(J.documentElement,null!=this.pages);if(null!=ea&&"mxfile"==ea.nodeName&&null!=this.pages){var da=ea.getElementsByTagName("diagram");if(1==da.length&&!C){if(ea=Editor.parseDiagramNode(da[0]),null!=this.currentPage&&(c[da[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ca=da[0].getAttribute("name");null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.currentPage,
+ca))}}else if(0<da.length){C=[];var W=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[da[0].getAttribute("id")]=this.pages[0].getId(),ca=da[0].getAttribute("name"),null!=ca&&""!=ca&&this.editor.graph.model.execute(new RenamePage(this,this.pages[0],ca)),ea=Editor.parseDiagramNode(da[0]),t=!1,W=1);for(;W<da.length;W++){var ba=da[W].getAttribute("id");da[W].removeAttribute("id");var ha=this.updatePageRoot(new DiagramPage(da[W]));c[ba]=da[W].getAttribute("id");var ma=this.pages.length;
+null==ha.getName()&&ha.setName(mxResources.get("pageWithNumber",[ma+1]));K.model.execute(new ChangePage(this,ha,ha,ma,!0));C.push(ha)}this.updatePageLinks(c,C)}}if(null!=ea&&"mxGraphModel"===ea.nodeName){N=K.importGraphModel(ea,f,l,t);if(null!=N)for(this.addLocalPagesToMapping(c),W=0;W<N.length;W++)this.updatePageLinksForCell(c,N[W]);var Y=K.parseBackgroundImage(ea.getAttribute("backgroundImage"));if(null!=Y&&null!=Y.originalSrc){this.updateBackgroundPageLink(c,Y);var la=new ChangePageSetup(this,
null,Y);la.ignoreColor=!0;K.model.execute(la)}}F&&K.pasteCellStyles(K.includeDescendants(N),K.defaultVertexStyle,K.defaultEdgeStyle)}finally{K.model.endUpdate()}}}catch(Z){if(z)throw Z;this.handleError(Z)}return N};EditorUi.prototype.updatePageLinks=function(c,f){for(var l=0;l<f.length;l++)this.updatePageLinksForCell(c,f[l].root),null!=f[l].viewState&&this.updateBackgroundPageLink(c,f[l].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var l=
c[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=l&&(f.originalSrc="data:page/id,"+l)}}catch(t){}};EditorUi.prototype.updatePageLinksForCell=function(c,f){var l=document.createElement("div"),t=this.editor.graph,z=t.getLinkForCell(f);null!=z&&t.setLinkForCell(f,this.updatePageLink(c,z));if(t.isHtmlLabel(f)){l.innerHTML=Graph.sanitizeHtml(t.getLabel(f));for(var C=l.getElementsByTagName("a"),F=!1,N=0;N<C.length;N++)z=C[N].getAttribute("href"),null!=z&&(C[N].setAttribute("href",this.updatePageLink(c,
z)),F=!0);F&&t.labelChanged(f,l.innerHTML)}for(N=0;N<t.model.getChildCount(f);N++)this.updatePageLinksForCell(c,t.model.getChildAt(f,N))};EditorUi.prototype.updatePageLink=function(c,f){if(Graph.isPageLink(f)){var l=c[f.substring(f.indexOf(",")+1)];f=null!=l?"data:page/id,"+l:null}else if("data:action/json,"==f.substring(0,17))try{var t=JSON.parse(f.substring(17));if(null!=t.actions){for(var z=0;z<t.actions.length;z++){var C=t.actions[z];if(null!=C.open&&Graph.isPageLink(C.open)){var F=C.open.substring(C.open.indexOf(",")+
1);l=c[F];null!=l?C.open="data:page/id,"+l:null==this.getPageById(F)&&delete C.open}}f="data:action/json,"+JSON.stringify(t)}}catch(N){}return f};EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,f,l,t,z){var C=mxUtils.bind(this,function(F){this.loadingExtensions=!1;null!=l?l(F):this.handleError(F)});this.createTimeout(null,mxUtils.bind(this,function(F){t=null!=t?t:c.name;var N=mxUtils.bind(this,
-function(I){F.clear()&&C(I)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var I=this.isRemoteVisioFormat(t);try{var ca=t.lastIndexOf(".");if(0<=ca&&ca<t.length)t.substring(ca+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(X){}if(I)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{I=new FormData;
-I.append("file1",c,t);var ea=new XMLHttpRequest;ea.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ea.responseType="blob";this.addRemoteServiceSecurityCheck(ea);null!=z&&ea.setRequestHeader("x-convert-custom",z);ea.onreadystatechange=mxUtils.bind(this,function(){if(4==ea.readyState&&F.clear())if(200<=ea.status&&299>=ea.status)try{var X=ea.response;if("text/xml"==X.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});
-ba.readAsText(X)}else this.doImportVisio(X,f,N,t)}catch(ha){N(ha)}else try{""==ea.responseType||"text"==ea.responseType?N({message:ea.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ea.response))}catch(ha){N({})}});ea.send(I)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(X){N(X)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
+function(J){F.clear()&&C(J)}),K=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var J=this.isRemoteVisioFormat(t);try{var ea=t.lastIndexOf(".");if(0<=ea&&ea<t.length)t.substring(ea+1).toUpperCase();else{var da=t.lastIndexOf("/");0<=da&&da<t.length&&(t=t.substring(da+1))}}catch(W){}if(J)if(null==VSD_CONVERT_URL||this.isOffline())N({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{J=new FormData;
+J.append("file1",c,t);var ca=new XMLHttpRequest;ca.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(t)?"?stencil=1":""));ca.responseType="blob";this.addRemoteServiceSecurityCheck(ca);null!=z&&ca.setRequestHeader("x-convert-custom",z);ca.onreadystatechange=mxUtils.bind(this,function(){if(4==ca.readyState&&F.clear())if(200<=ca.status&&299>=ca.status)try{var W=ca.response;if("text/xml"==W.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(ha){try{f(ha.target.result)}catch(ma){N({message:mxResources.get("errorLoadingFile")})}});
+ba.readAsText(W)}else this.doImportVisio(W,f,N,t)}catch(ha){N(ha)}else try{""==ca.responseType||"text"==ca.responseType?N({message:ca.responseText}):(ba=new FileReader,ba.onload=function(){try{N({message:JSON.parse(ba.result).Message})}catch(ha){N(ha)}},ba.readAsText(ca.response))}catch(ha){N({})}});ca.send(J)}else if(F.clear())try{this.doImportVisio(c,f,N,t)}catch(W){N(W)}}else N({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?
K():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",K,null,null,null,N))}),C)};EditorUi.prototype.importGraphML=function(c,f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if(this.doImportGraphML)try{this.doImportGraphML(c,f,t)}catch(N){C(N)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});
this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?F():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.exportVisio=function(c){if(this.spinner.spin(document.body,mxResources.get("loading"))){var f=mxUtils.bind(this,function(l){this.loadingExtensions=!1;this.handleError(l)});this.createTimeout(null,mxUtils.bind(this,function(l){var t=mxUtils.bind(this,function(C){l.clear()&&f(C)}),z=mxUtils.bind(this,function(){this.loadingExtensions=
!1;if(l.clear())if("undefined"!==typeof VsdxExport)try{this.spinner.stop(),(new VsdxExport(this)).exportCurrentDiagrams(c)||t({message:mxResources.get("unknownError")})}catch(C){t(C)}else t({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(z,0):(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,t))}),f)}};EditorUi.prototype.convertLucidChart=function(c,
f,l){var t=mxUtils.bind(this,function(z){this.loadingExtensions=!1;null!=l?l(z):this.handleError(z)});this.createTimeout(null,mxUtils.bind(this,function(z){var C=mxUtils.bind(this,function(N){z.clear()&&t(N)}),F=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(z.clear())if("undefined"!==typeof window.LucidImporter)try{var N=JSON.parse(c);f(LucidImporter.importState(N));try{if(null!=window.console&&"1"==urlParams.test){var K=[(new Date).toISOString(),"convertLucidChart",N];null!=N.state&&
-K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var I=0;I<N.svgThumbs.length;I++)K.push(Editor.createSvgDataUri(N.svgThumbs[I]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ca){}}catch(ca){null!=window.console&&console.error(ca),C(ca)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
+K.push(JSON.parse(N.state));if(null!=N.svgThumbs)for(var J=0;J<N.svgThumbs.length;J++)K.push(Editor.createSvgDataUri(N.svgThumbs[J]));null!=N.thumb&&K.push(N.thumb);console.log.apply(console,K)}}catch(ea){}}catch(ea){null!=window.console&&console.error(ea),C(ea)}else C({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",F,null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C)},null,null,null,C):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))}),t)};EditorUi.prototype.createMermaidXml=function(c,f,l,t,z,C){var F=new Graph(document.createElement("div"));
l=F.insertVertex(null,null,null,0,0,t,z,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+l+";");F.setAttributeForCell(l,"mermaidData",JSON.stringify({data:c,config:f},null,2));null!=C&&F.setAttributeForCell(l,"templatePrompt",C);c=(new mxCodec).encode(F.getModel());return mxUtils.getXml(c)};EditorUi.prototype.generateOpenAiMermaidDiagram=function(c,f,l){var t=0,z=mxUtils.bind(this,function(){this.createTimeout(1E4,mxUtils.bind(this,function(C){var F=new mxXmlRequest("https://www.draw.io/generate/v2",
-c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ca=mxUtils.trim(K.getText());this.generateMermaidImage(ca,null,mxUtils.bind(this,function(da,ea,X){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ca),f(ca,da,ea,X))}),N)}),N,mxUtils.bind(this,function(da){3>
-t++?C.clear()&&z():N(da)}))}),N);else{var I={message:mxResources.get("error")+" "+K.getStatus()};try{I=JSON.parse(K.getText()),I=I.error}catch(ca){}N(I)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?
+c,"POST"),N=mxUtils.bind(this,function(K){C.clear()&&l(K)});F.send(mxUtils.bind(this,function(K){if(C.isAlive())if(200<=K.getStatus()&&299>=K.getStatus())this.tryAndHandle(mxUtils.bind(this,function(){var ea=mxUtils.trim(K.getText());this.generateMermaidImage(ea,null,mxUtils.bind(this,function(da,ca,W){this.tryAndHandle(mxUtils.bind(this,function(){C.clear()&&(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresult:",ea),f(ea,da,ca,W))}),N)}),N,mxUtils.bind(this,function(da){3>
+t++?C.clear()&&z():N(da)}))}),N);else{var J={message:mxResources.get("error")+" "+K.getStatus()};try{J=JSON.parse(K.getText()),J=J.error}catch(ea){}N(J)}}),N)}),l)});z()};EditorUi.prototype.extractMermaidDeclaration=function(c){c=mxUtils.trim(c);"o\n\n"==c.substring(0,3)&&(c=c.substring(3));var f=c.split("```");f=1<f.length?f:c.split("<pre>");f=1<f.length?f:c.split("~~~");f=1<f.length?f:c.split("%%");f=1<f.length?f:c.split("(Begins)");c=mxUtils.trim(1>=f.length?c:f[1]);f=c.split("\n");var l=1<f.length?
f[1]:null;if(null!=l){var t=l.indexOf("-");0<t&&(l=l.substring(0,t))}if(0<f.length&&"mermaid"==mxUtils.trim(f[0])||null!=l&&0<=mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l))f.shift(),c=mxUtils.trim(f.join("\n")),f=c.split("\n");l=f[0].split(" ")[0].replace(/:$/,"");t=l.indexOf("-");0<t&&(l=l.substring(0,t));try{"mindmap"==l&&2<f.length&&(c=extractMermaidMindmap(f))}catch(z){}0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,l)&&(c=null);return c};EditorUi.prototype.generateMermaidImage=function(c,
f,l,t,z){var C=mxUtils.bind(this,function(N){this.loadingMermaid=!1;null!=t?t(N):this.handleError(N)}),F=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig);f.securityLevel="strict";f.startOnLoad=!1;"undefined"!==typeof mxMermaidToDrawio&&f.flowchart&&0<=c.indexOf("$$")&&(f.flowchart.htmlLabels=!0,mxMermaidToDrawio.htmlLabels=!0);Editor.isDarkMode()&&(f.theme="dark");var N=mxUtils.bind(this,function(K){try{if(mxClient.IS_IE||mxClient.IS_IE11)K=
-K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var I=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<I.length&&"error"!=I[0].getAttribute("aria-roledescription")){var ca=parseFloat(I[0].getAttribute("width")),da=parseFloat(I[0].getAttribute("height"));if(isNaN(ca)||isNaN(da))try{var ea=I[0].getAttribute("viewBox").split(/\s+/);ca=parseFloat(ea[2]);da=parseFloat(ea[3])}catch(X){ca=ca||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),
-ca,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(X){t(X)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,
-null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,I){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|I>>6;c4=I&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+
+K.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var J=mxUtils.parseXml(K).getElementsByTagName("svg");if(0<J.length&&"error"!=J[0].getAttribute("aria-roledescription")){var ea=parseFloat(J[0].getAttribute("width")),da=parseFloat(J[0].getAttribute("height"));if(isNaN(ea)||isNaN(da))try{var ca=J[0].getAttribute("viewBox").split(/\s+/);ea=parseFloat(ca[2]);da=parseFloat(ca[3])}catch(W){ea=ea||100,da=da||100}l(this.convertDataUri(Editor.createSvgDataUri(K)),
+ea,da)}else null!=z?z():t({message:mxResources.get("invalidInput")})}catch(W){t(W)}});mermaid.mermaidAPI.initialize(f);mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c).then(function(K){N(K.svg)}).catch(function(K){null!=z?z(K):t(K)})}catch(K){t(K)}});"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?window.setTimeout(F,0):(this.loadingMermaid=!0,"1"==urlParams.dev?("1"==urlParams.mermaidToDrawioTest&&mxMermaidToDrawio.addListener(mxUtils.bind(this,function(N){this.importXml(N,
+null,null,null,null,null,!0)})),mxscript("js/mermaid/mermaid.min.js",F,null,null,null,C)):mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",F,null,null,null,C))};EditorUi.prototype.generatePlantUmlImage=function(c,f,l,t){function z(N,K,J){c1=N>>2;c2=(N&3)<<4|K>>4;c3=(K&15)<<2|J>>6;c4=J&63;r="";r+=C(c1&63);r+=C(c2&63);r+=C(c3&63);return r+=C(c4&63)}function C(N){if(10>N)return String.fromCharCode(48+N);N-=10;if(26>N)return String.fromCharCode(65+N);N-=26;if(26>N)return String.fromCharCode(97+
N);N-=26;return 0==N?"-":1==N?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(N){r="";for(i=0;i<N.length;i+=3)r=i+2==N.length?r+z(N.charCodeAt(i),N.charCodeAt(i+1),0):i+1==N.length?r+z(N.charCodeAt(i),0,0):r+z(N.charCodeAt(i),N.charCodeAt(i+1),N.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(N){if(200<=this.status&&300>this.status)if("txt"==
-f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(I){var ca=new Image;ca.onload=function(){try{var da=ca.width,ea=ca.height;if(0==da&&0==ea){var X=K.result,ba=X.indexOf(","),ha=decodeURIComponent(escape(atob(X.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ea=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ea)}catch(Y){t(Y)}};ca.src=K.result};K.onerror=function(I){t(I)}}else t(N)};
+f)l(this.response);else{var K=new FileReader;K.readAsDataURL(this.response);K.onloadend=function(J){var ea=new Image;ea.onload=function(){try{var da=ea.width,ca=ea.height;if(0==da&&0==ca){var W=K.result,ba=W.indexOf(","),ha=decodeURIComponent(escape(atob(W.substring(ba+1)))),ma=mxUtils.parseXml(ha).getElementsByTagName("svg");0<ma.length&&(da=parseFloat(ma[0].getAttribute("width")),ca=parseFloat(ma[0].getAttribute("height")))}l(K.result,da,ca)}catch(Y){t(Y)}};ea.src=K.result};K.onerror=function(J){t(J)}}else t(N)};
F.onerror=function(N){t(N)};F.send()};EditorUi.prototype.insertAsPreText=function(c,f,l){var t=this.editor.graph,z=null;t.getModel().beginUpdate();try{z=t.insertVertex(null,null,"<pre>"+c+"</pre>",f,l,1,1,"text;html=1;align=left;verticalAlign=top;"),t.updateCellSize(z,!0)}finally{t.getModel().endUpdate()}return z};EditorUi.prototype.insertTextAt=function(c,f,l,t,z,C,F,N){C=null!=C?C:!0;F=null!=F?F:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ea){4==ea.readyState&&200<=ea.status&&299>=ea.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ea.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var I=Editor.extractGraphModelFromPdf(c);if(null!=
-I&&0<I.length)return this.importXml(I,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(I=Editor.extractGraphModelFromPng(c),null!=I&&0<I.length))return this.importXml(I,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{I=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(I=c.substring(c.indexOf(",")+1),I=window.atob&&!mxClient.IS_SF?atob(I):Base64.decode(I,!0)):I=decodeURIComponent(c.substring(c.indexOf(",")+1));var ca=this.importXml(I,f,l,C,!0,N);if(0<ca.length)return ca}catch(ea){}this.loadImage(c,
-mxUtils.bind(this,function(ea){if("data:"==c.substring(0,5))this.resizeImage(ea,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var X=Math.min(1,Math.min(this.maxImageSize/ea.width,this.maxImageSize/ea.height)),ba=Math.round(ea.width*X);ea=Math.round(ea.height*
-X);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ea,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ea=null;K.getModel().beginUpdate();try{ea=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ea),K.fireEvent(new mxEventObject("textInserted","cells",[ea]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ea)}))}else{c=
-Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ea){this.editor.graph.setSelectionCells(this.importXml(ea,f,l,C,null,N))}),mxUtils.bind(this,function(ea){this.handleError(ea)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(ca){4==ca.readyState&&200<=ca.status&&299>=ca.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ca.responseText,f,l,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(z||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var K=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var J=Editor.extractGraphModelFromPdf(c);if(null!=
+J&&0<J.length)return this.importXml(J,f,l,C,!0,N)}if(Editor.isPngDataUrl(c)&&(J=Editor.extractGraphModelFromPng(c),null!=J&&0<J.length))return this.importXml(J,f,l,C,!0,N);if("data:image/svg+xml;"==c.substring(0,19))try{J=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(J=c.substring(c.indexOf(",")+1),J=window.atob&&!mxClient.IS_SF?atob(J):Base64.decode(J,!0)):J=decodeURIComponent(c.substring(c.indexOf(",")+1));var ea=this.importXml(J,f,l,C,!0,N);if(0<ea.length)return ea}catch(ca){}this.loadImage(c,
+mxUtils.bind(this,function(ca){if("data:"==c.substring(0,5))this.resizeImage(ca,c,mxUtils.bind(this,function(ha,ma,Y){K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ma,Y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(ha)+";"))}),F,this.maxImageSize);else{var W=Math.min(1,Math.min(this.maxImageSize/ca.width,this.maxImageSize/ca.height)),ba=Math.round(ca.width*W);ca=Math.round(ca.height*
+W);K.setSelectionCell(K.insertVertex(null,null,"",K.snap(f),K.snap(l),ba,ca,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";"))}}),mxUtils.bind(this,function(){var ca=null;K.getModel().beginUpdate();try{ca=K.insertVertex(K.getDefaultParent(),null,c,K.snap(f),K.snap(l),1,1,"text;"+(t?"html=1;":"")),K.updateCellSize(ca),K.fireEvent(new mxEventObject("textInserted","cells",[ca]))}finally{K.getModel().endUpdate()}K.setSelectionCell(ca)}))}else{c=
+Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,f,l,C,null,N);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,function(ca){this.editor.graph.setSelectionCells(this.importXml(ca,f,l,C,null,N))}),mxUtils.bind(this,function(ca){this.handleError(ca)}));else{K=this.editor.graph;z=null;K.getModel().beginUpdate();try{z=K.insertVertex(K.getDefaultParent(),null,"",K.snap(f),K.snap(l),1,1,"text;whiteSpace=wrap;"+(t?"html=1;":""));
K.fireEvent(new mxEventObject("textInserted","cells",[z]));t&&(c=K.sanitizeHtml(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+"...");z.value=c;K.updateCellSize(z);if(0<this.maxTextWidth&&z.geometry.width>this.maxTextWidth){var da=K.getPreferredSizeForCell(z,this.maxTextWidth);z.geometry.width=da.width;z.geometry.height=da.height}Graph.isLink(z.value)&&K.setLinkForCell(z,z.value);z.geometry.width+=K.gridSize;z.geometry.height+=K.gridSize}finally{K.getModel().endUpdate()}return[z]}}return[]};
EditorUi.prototype.formatFileSize=function(c){var f=-1;do c/=1024,f++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var f=c.indexOf(";");0<f&&(c=c.substring(0,f)+c.substring(c.indexOf(",",f+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,f){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=
c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,f){if(c&&Graph.fileSupport){if(null==this.importFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.importFiles(l.files,null,null,this.maxImageSize),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.importFileInputElt=
l}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,N){StorageFile.listFiles(this,"F",F,N)});window.openBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.getFileContent(this,F,N,K)});window.deleteBrowserFile=mxUtils.bind(this,function(F,N,K){StorageFile.deleteFile(this,F,N,K)});if(!f){var t=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));
window.openFile.setConsumer(mxUtils.bind(this,function(F,N){null!=N&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(N)?(F=new Blob([F],{type:"application/octet-stream"}),this.importVisio(F,mxUtils.bind(this,function(K){this.importXml(K,0,0,!0)}),null,N)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var z=this.dialog,C=z.close;
-this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(I,ca){I=ca.name.toLowerCase();"diagram/diagram.xml"==I?(K=!0,ca.async("string").then(function(da){0==
-da.indexOf("<mxfile ")?f(da):l()})):0==I.indexOf("versions/")&&(I=parseInt(I.substr(9)),I>F&&(F=I,N=ca))});0<F?N.async("string").then(function(I){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(I,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(I,mxUtils.bind(this,function(ca){4==ca.readyState&&(200<=ca.status&&299>=ca.status?f(ca.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||
-this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,I,ca,da){I=null!=I?I:!0;var ea=!1,X=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,I,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=
-!1,"image/png"==f.substring(0,9)&&(ca=ca?null:this.extractGraphModelFromPng(c),null!=ca&&0<ca.length&&(X=this.importXml(ca,l,t,I,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ca=c.indexOf(";"),0<ca&&(c=c.substring(0,ca)+c.substring(c.indexOf(",",ca+1))),I&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ca="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ca+="editableCssRules=.*;"),
-X=[K.insertVertex(null,null,"",l,t,z,C,ca+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ea=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ea=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ea=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),
-413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ea=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I);N(X)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(X=this.insertTextAt(this.validateFileData(c),l,t,!0,null,I,null,null!=da?mxEvent.isControlDown(da):null));ea||null==N||N(X);return X};EditorUi.prototype.importFiles=
-function(c,f,l,t,z,C,F,N,K,I,ca,da,ea){t=null!=t?t:this.maxImageSize;I=null!=I?I:this.maxImageBytes;var X=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ca||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(W,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=
-W&&"<mxlibrary"==W.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,W,wa)),this.showSidebar(),null;this.isCompatibleString(W)&&1==c.length&&null!=ea&&"drop"==ea.type&&this.isBlankFile()&&!this.canUndo()&&(X=!1,pa=ja=0);return this.importFile(W,aa,ja,pa,sa,qa,wa,Ba,za,X,da,ea)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(W){Z.setSelectionCells(W)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,
-J=A,U=[],P=mxUtils.bind(this,function(W,aa){U[W]=aa;if(0==--J){this.spinner.stop();if(null!=N)N(U);else{var ja=[];Z.getModel().beginUpdate();try{for(W=0;W<U.length;W++){var pa=U[W]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),T=0;T<A;T++)mxUtils.bind(this,function(W){var aa=c[W];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),
-qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(W,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");
+this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=t;C.apply(z,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};EditorUi.prototype.importZipFile=function(c,f,l){var t=this,z=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(C){if(mxUtils.isEmptyObject(C.files))l();else{var F=0,N,K=!1;C.forEach(function(J,ea){J=ea.name.toLowerCase();"diagram/diagram.xml"==J?(K=!0,ea.async("string").then(function(da){0==
+da.indexOf("<mxfile ")?f(da):l()})):0==J.indexOf("versions/")&&(J=parseInt(J.substr(9)),J>F&&(F=J,N=ea))});0<F?N.async("string").then(function(J){(new XMLHttpRequest).upload&&t.isRemoteFileFormat(J,c.name)?t.isOffline()?t.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l):t.parseFileData(J,mxUtils.bind(this,function(ea){4==ea.readyState&&(200<=ea.status&&299>=ea.status?f(ea.responseText):l())}),c.name):l()}):K||l()}},function(C){l(C)}):l()});"undefined"!==typeof JSZip||this.loadingExtensions||
+this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript(window.DRAWIO_SERVER_URL+"js/extensions.min.js",z,null,null,null,l))};EditorUi.prototype.importFile=function(c,f,l,t,z,C,F,N,K,J,ea,da){J=null!=J?J:!0;var ca=!1,W=null,ba=mxUtils.bind(this,function(ha){var ma=null;null!=ha&&"<mxlibrary"==ha.substring(0,10)?(this.loadLibrary(new LocalLibrary(this,ha,F)),this.showSidebar()):ma=this.importXml(ha,l,t,J,null,null!=da?mxEvent.isControlDown(da):null);null!=N&&N(ma)});"image"==f.substring(0,5)?(K=
+!1,"image/png"==f.substring(0,9)&&(ea=ea?null:this.extractGraphModelFromPng(c),null!=ea&&0<ea.length&&(W=this.importXml(ea,l,t,J,null,null!=da?mxEvent.isControlDown(da):null),K=!0)),K||(K=this.editor.graph,ea=c.indexOf(";"),0<ea&&(c=c.substring(0,ea)+c.substring(c.indexOf(",",ea+1))),J&&K.isGridEnabled()&&(l=K.snap(l),t=K.snap(t)),ea="shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;","image/svg"==f.substring(0,9)&&(ea+="editableCssRules=.*;"),
+W=[K.insertVertex(null,null,"",l,t,z,C,ea+"image="+c+";")])):/(\.*<graphml )/.test(c)?(ca=!0,this.importGraphML(c,ba)):null!=K&&null!=F&&EditorUi.isVisioFilename(F)?(ca=!0,this.importVisio(K,ba)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ca=!0,f=mxUtils.bind(this,function(ha){4==ha.readyState&&(200<=ha.status&&299>=ha.status?ba(ha.responseText):null!=N&&(N(null),this.showError(mxResources.get("error"),
+413==ha.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))))}),null!=c?this.parseFileData(c,f,F):this.parseFile(K,f,F)):0==c.indexOf("PK")&&null!=K?(ca=!0,this.importZipFile(K,ba,mxUtils.bind(this,function(){W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J);N(W)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(W=this.insertTextAt(this.validateFileData(c),l,t,!0,null,J,null,null!=da?mxEvent.isControlDown(da):null));ca||null==N||N(W);return W};EditorUi.prototype.importFiles=
+function(c,f,l,t,z,C,F,N,K,J,ea,da,ca){t=null!=t?t:this.maxImageSize;J=null!=J?J:this.maxImageBytes;var W=null!=f&&null!=l,ba=!0;f=null!=f?f:0;l=null!=l?l:0;var ha=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var ma=ea||this.resampleThreshold,Y=0;Y<c.length;Y++)if("image/svg"!==c[Y].type.substring(0,9)&&"image/"===c[Y].type.substring(0,6)&&c[Y].size>ma){ha=!0;break}var la=mxUtils.bind(this,function(){var Z=this.editor.graph,k=Z.gridSize;z=null!=z?z:mxUtils.bind(this,function(X,aa,ja,pa,sa,qa,wa,Ba,za){try{if(null!=
+X&&"<mxlibrary"==X.substring(0,10))return this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,X,wa)),this.showSidebar(),null;this.isCompatibleString(X)&&1==c.length&&null!=ca&&"drop"==ca.type&&this.isBlankFile()&&!this.canUndo()&&(W=!1,pa=ja=0);return this.importFile(X,aa,ja,pa,sa,qa,wa,Ba,za,W,da,ca)}catch(Ea){return this.handleError(Ea),null}});C=null!=C?C:mxUtils.bind(this,function(X){Z.setSelectionCells(X)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var A=c.length,
+I=A,T=[],P=mxUtils.bind(this,function(X,aa){T[X]=aa;if(0==--I){this.spinner.stop();if(null!=N)N(T);else{var ja=[];Z.getModel().beginUpdate();try{for(X=0;X<T.length;X++){var pa=T[X]();null!=pa&&(ja=ja.concat(pa))}}finally{Z.getModel().endUpdate()}}C(ja)}}),U=0;U<A;U++)mxUtils.bind(this,function(X){var aa=c[X];if(null!=aa){var ja=new FileReader;ja.onload=mxUtils.bind(this,function(pa){if(null==F||F(aa))try{if("image/"==aa.type.substring(0,6))if("image/svg"==aa.type.substring(0,9)){var sa=Graph.clipSvgDataUri(pa.target.result),
+qa=sa.indexOf(","),wa=decodeURIComponent(escape(atob(sa.substring(qa+1)))),Ba=mxUtils.parseXml(wa),za=Ba.getElementsByTagName("svg");if(0<za.length){var Ea=za[0],ra=da?null:Ea.getAttribute("content");null!=ra&&"<"!=ra.charAt(0)&&"%"!=ra.charAt(0)&&(ra=unescape(window.atob?atob(ra):Base64.decode(ra,!0)));null!=ra&&"%"==ra.charAt(0)&&(ra=decodeURIComponent(ra));null==ra||"<mxfile "!==ra.substring(0,8)&&"<mxGraphModel "!==ra.substring(0,14)?P(X,mxUtils.bind(this,function(){try{if(null!=Ba){var Ma=Ba.getElementsByTagName("svg");
if(0<Ma.length){var Ha=Ma[0],Aa=Ha.getAttribute("width"),Ra=Ha.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;Ra=null!=Ra&&"%"!=Ra.charAt(Ra.length-1)?parseFloat(Ra):NaN;var Za=Ha.getAttribute("viewBox");if(null==Za||0==Za.length)Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);else if(isNaN(Aa)||isNaN(Ra)){var La=Za.split(" ");3<La.length&&(Aa=parseFloat(La[2]),Ra=parseFloat(La[3]))}sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var $a=Math.min(1,Math.min(t/Math.max(1,
-Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+W*k,l+W*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",
-sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(W,mxUtils.bind(this,function(){return z(ra,"text/xml",f+W*k,l+W*k,0,0,aa.name)}))}else P(W,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(W,mxUtils.bind(this,function(){return z(ya,"text/xml",f+W*k,l+W*k,Ca.width,Ca.height,aa.name)}));
-qa=!0}}qa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(W,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<I){var Za=ba&&this.isResampleImageSize(aa.size,
-ca)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+W*k,l+W*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ca,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+W*k,l+W*k,240,160,aa.name,function(Ma){P(W,function(){return Ma})},aa)}catch(Ma){P(W,mxUtils.bind(this,function(){return null})),null!=window.console&&
-console.error(Ma,aa)}else P(W,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+W*k,l+W*k,240,160,aa.name,function(pa){P(W,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(T)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
+Aa)),t/Math.max(1,Ra)),Da=z(sa,aa.type,f+X*k,l+X*k,Math.max(1,Math.round(Aa*$a)),Math.max(1,Math.round(Ra*$a)),aa.name);if(null!=Da&&(isNaN(Aa)||isNaN(Ra))){var x=new Image;x.onload=mxUtils.bind(this,function(){Aa=Math.max(1,x.width);Ra=Math.max(1,x.height);Da[0].geometry.width=Aa;Da[0].geometry.height=Ra;Ha.setAttribute("viewBox","0 0 "+Aa+" "+Ra);sa=Editor.createSvgDataUri(mxUtils.getXml(Ha));var M=sa.indexOf(";");0<M&&(sa=sa.substring(0,M)+sa.substring(sa.indexOf(",",M+1)));Z.setCellStyles("image",
+sa,[Da[0]])});x.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}return Da}}}catch(M){}return null})):P(X,mxUtils.bind(this,function(){return z(ra,"text/xml",f+X*k,l+X*k,0,0,aa.name)}))}else P(X,mxUtils.bind(this,function(){return null}))}else{qa=!1;if("image/png"==aa.type){var ya=da?null:this.extractGraphModelFromPng(pa.target.result);if(null!=ya&&0<ya.length){var Ca=new Image;Ca.src=pa.target.result;P(X,mxUtils.bind(this,function(){return z(ya,"text/xml",f+X*k,l+X*k,Ca.width,Ca.height,aa.name)}));
+qa=!0}}qa||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(pa.target.result,mxUtils.bind(this,function(Ma){this.resizeImage(Ma,pa.target.result,mxUtils.bind(this,function(Ha,Aa,Ra){P(X,mxUtils.bind(this,function(){if(null!=Ha&&Ha.length<J){var Za=ba&&this.isResampleImageSize(aa.size,
+ea)?Math.min(1,Math.min(t/Aa,t/Ra)):1;return z(Ha,aa.type,f+X*k,l+X*k,Math.round(Aa*Za),Math.round(Ra*Za),aa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),ba,t,ea,aa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else sa=pa.target.result,z(sa,aa.type,f+X*k,l+X*k,240,160,aa.name,function(Ma){P(X,function(){return Ma})},aa)}catch(Ma){P(X,mxUtils.bind(this,function(){return null})),null!=window.console&&
+console.error(Ma,aa)}else P(X,mxUtils.bind(this,function(){return null}))});EditorUi.isVisioFilename(aa.name)?z(null,aa.type,f+X*k,l+X*k,240,160,aa.name,function(pa){P(X,function(){return pa})},aa):"image"==aa.type.substring(0,5)||"application/pdf"==aa.type?ja.readAsDataURL(aa):ja.readAsText(aa)}})(U)});if(ha){ha=[];for(Y=0;Y<c.length;Y++)ha.push(c[Y]);c=ha;this.confirmImageResize(function(Z){ba=Z;la()},K)}else la()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&
this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,f){f=null!=f?f:!1;var l=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},t=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,z=function(C,F){if(C||f)mxSettings.setResizeImages(C?F:null),mxSettings.save();l();c(F)};null==t||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(C){z(C,
!0)},function(C){z(C,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?226:200,!0,!0):z(!1,t)};EditorUi.prototype.parseFile=function(c,f,l){l=null!=l?l:c.name;var t=new FileReader;t.onload=mxUtils.bind(this,function(){this.parseFileData(t.result,f,l)});t.readAsText(c)};EditorUi.prototype.parseFileData=
function(c,f,l){var t=new XMLHttpRequest;t.open("POST",OPEN_URL);t.setRequestHeader("Content-Type","application/x-www-form-urlencoded");t.onreadystatechange=function(){f(t)};t.send("format=xml&filename="+encodeURIComponent(l)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(z){}};EditorUi.prototype.isResampleImageSize=function(c,f){f=null!=f?f:this.resampleThreshold;return c>f};EditorUi.prototype.resizeImage=function(c,f,l,t,z,C,
-F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),I=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ca=Math.max(N/z,K/z);if(1<ca){var da=Math.round(N/ca),ea=Math.round(K/ca),X=document.createElement("canvas");X.width=da;X.height=ea;X.getContext("2d").drawImage(c,0,0,da,ea);var ba=X.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ea;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ea)}}}catch(Y){}t&&I!=f&&z>
+F){z=null!=z?z:this.maxImageSize;var N=Math.max(1,c.width),K=Math.max(1,c.height),J=f;if(t&&this.isResampleImageSize(null!=F?F:f.length,C))try{var ea=Math.max(N/z,K/z);if(1<ea){var da=Math.round(N/ea),ca=Math.round(K/ea),W=document.createElement("canvas");W.width=da;W.height=ca;W.getContext("2d").drawImage(c,0,0,da,ca);var ba=W.toDataURL();if(ba.length<f.length){var ha=document.createElement("canvas");ha.width=da;ha.height=ca;var ma=ha.toDataURL();ba!==ma&&(f=ba,N=da,K=ca)}}}catch(Y){}t&&J!=f&&z>
this.maxImageSize/2&&f.length>this.maxImageBytes?this.resizeImage(c,f,l,t,z/1.5,C,F):l(f,N,K)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,f,l){try{var t=new Image;t.onload=function(){t.width=0<t.width?t.width:120;t.height=0<t.height?t.height:120;f(t)};null!=l&&(t.onerror=l);t.src=c}catch(z){if(null!=l)l(z);else throw z;}};EditorUi.prototype.getDefaultSketchMode=function(){var c="1"==urlParams.sketch;return"0"!=
(null!=urlParams.rough?urlParams.rough:c)};var u=EditorUi.prototype.createUi;EditorUi.prototype.createUi=function(){Editor.isSettingsEnabled()&&(null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());u.apply(this,arguments);Editor.isSettingsEnabled()&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough&&null==urlParams.sketch?mxSettings.settings.sketchMode:this.getDefaultSketchMode())};
var p=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();var c=this,f=this.editor.graph,l=f.isEnabled;f.isEnabled=function(){return l.apply(this,arguments)&&!c.isLocked()};Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(k){var A=k.getEvent();return null==k.getState()&&!mxEvent.isMouseEvent(A)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(A)&&(null==k.getState()||mxEvent.isControlDown(A)||mxEvent.isShiftDown(A))});
-f.cellEditor.editPlantUmlData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("plantUml")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,U.format,function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==U.format)f.labelChanged(k,"<pre>"+T+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(T),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=
-W,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:U.format}))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,J){var U=JSON.parse(J);A=new TextareaDialog(c,mxResources.get("mermaid")+":",U.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,U.config,
-function(T,W,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",T,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,W),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:U.config},null,2))}finally{f.getModel().endUpdate()}},function(T){c.handleError(T)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=
-function(k,A){try{var J=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=J)this.editPlantUmlData(k,A,J);else if(J=this.graph.getAttributeForCell(k,"mermaidData"),null!=J&&window.isMermaidEnabled)this.editMermaidData(k,A,J);else{var U=f.getCellStyle(k);"1"==mxUtils.getValue(U,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var J=!1;try{var U=this.getGraphBounds();
-c.handleCustomLink(k,A);J=!0;c.chromelessResize&&!U.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return J};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var J=k.indexOf(",");if(0<J)for(k=k.substring(J+1),A=A.getProperty("patches"),J=0;J<A.length;J++)if(null!=A[J][EditorUi.DIFF_UPDATE]&&null!=A[J][EditorUi.DIFF_UPDATE][k]||
-null!=A[J][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[J][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var J=F.apply(this,arguments);null!=J&&null!=J.originalSrc&&(J=A?c.createImageForPageLink(J.originalSrc,null,null,!0):{src:J.originalSrc});return J};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");
-if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,J){var U=A;A=function(P,T,W){if(null==T){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(T=aa.getAttribute("href"))}null!=
-T&&f.isCustomLink(T)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(T,W)&&mxEvent.consume(P);null!=U&&U(P,T,W)};K.call(this,k,A,J)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var I=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,J){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,J);I.apply(this,arguments);
-f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,J);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,J)};var ca=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,J){if(c.editor.graph.isSelectionEmpty())ca.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,J);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,J):this.addPopupMenuArrangeItems(k,
-A,J),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,J),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,J),this.addMenuItems(k,["lockUnlock","-"],null,J),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var U=f.getModel().getGeometry(A);null!=U&&null!=U.points&&0<U.points.length&&this.addMenuItems(k,
-["clearWaypoints"],null,J)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,J);U=c.getSelectionState();null!=U.mergeCell?this.addMenuItem(k,"mergeCells"):(1<U.style.colspan||1<U.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
-this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ea=f.getGlobalVariable;f.getGlobalVariable=
-function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ea.apply(this,arguments)};var X=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;X!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),
-f.view.validate());X=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,J){var U=A.getAttribute("href");if(null==U||!f.isCustomLink(U)||!mxEvent.isTouchEvent(J)&&mxEvent.isPopupTrigger(J))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(U),f.getRubberband().reset();mxEvent.consume(J)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};
+f.cellEditor.editPlantUmlData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("plantUml")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(P,T.format,function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{if("txt"==T.format)f.labelChanged(k,"<pre>"+U+"</pre>"),f.updateCellSize(k,!0);else{f.setCellStyles("image",c.convertDataUri(U),[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=
+X,ja.height=aa,f.cellsResized([k],[ja],!1))}f.setAttributeForCell(k,"plantUmlData",JSON.stringify({data:P,format:T.format}))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};f.cellEditor.editMermaidData=function(k,A,I){var T=JSON.parse(I);A=new TextareaDialog(c,mxResources.get("mermaid")+":",T.data,function(P){null!=P&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generateMermaidImage(P,T.config,
+function(U,X,aa){c.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",U,[k]);var ja=f.model.getGeometry(k);null!=ja&&(ja=ja.clone(),ja.width=Math.max(ja.width,X),ja.height=Math.max(ja.height,aa),f.cellsResized([k],[ja],!1));f.setAttributeForCell(k,"mermaidData",JSON.stringify({data:P,config:T.config},null,2))}finally{f.getModel().endUpdate()}},function(U){c.handleError(U)})},null,null,400,220);c.showDialog(A.container,420,300,!0,!0);A.init()};var t=f.cellEditor.startEditing;f.cellEditor.startEditing=
+function(k,A){try{var I=this.graph.getAttributeForCell(k,"plantUmlData");if(null!=I)this.editPlantUmlData(k,A,I);else if(I=this.graph.getAttributeForCell(k,"mermaidData"),null!=I&&window.isMermaidEnabled)this.editMermaidData(k,A,I);else{var T=f.getCellStyle(k);"1"==mxUtils.getValue(T,"metaEdit","0")?c.showDataDialog(k):t.apply(this,arguments)}}catch(P){c.handleError(P)}};f.getLinkTitle=function(k){return c.getLinkTitle(k)};f.customLinkClicked=function(k,A){var I=!1;try{var T=this.getGraphBounds();
+c.handleCustomLink(k,A);I=!0;c.chromelessResize&&!T.equals(this.getGraphBounds())&&(c.chromelessResize(),this.scrollCellToVisible(A))}catch(P){c.handleError(P)}return I};var z=f.parseBackgroundImage;f.parseBackgroundImage=function(k){var A=z.apply(this,arguments);null!=A&&null!=A.src&&Graph.isPageLink(A.src)&&(A={originalSrc:A.src});return A};var C=f.setBackgroundImage;f.setBackgroundImage=function(k){null!=k&&null!=k.originalSrc&&(k=c.createImageForPageLink(k.originalSrc,c.currentPage,this));C.apply(this,
+arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(k,A){k=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=k){var I=k.indexOf(",");if(0<I)for(k=k.substring(I+1),A=A.getProperty("patches"),I=0;I<A.length;I++)if(null!=A[I][EditorUi.DIFF_UPDATE]&&null!=A[I][EditorUi.DIFF_UPDATE][k]||
+null!=A[I][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(A[I][EditorUi.DIFF_REMOVE],k)){f.refreshBackgroundImage();break}}}));var F=f.getBackgroundImageObject;f.getBackgroundImageObject=function(k,A){var I=F.apply(this,arguments);null!=I&&null!=I.originalSrc&&(I=A?c.createImageForPageLink(I.originalSrc,null,null,!0):{src:I.originalSrc});return I};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.drawio.com/doc/faq/predefined-placeholders");
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var N=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(k){k=null!=k?k:"";"1"==urlParams.dev&&(k+=(0<k.length?"&":"?")+"dev=1");return N.apply(this,arguments)};var K=f.addClickHandler;f.addClickHandler=function(k,A,I){var T=A;A=function(P,U,X){if(null==U){var aa=mxEvent.getSource(P);"a"==aa.nodeName.toLowerCase()&&(U=aa.getAttribute("href"))}null!=
+U&&f.isCustomLink(U)&&(mxEvent.isTouchEvent(P)||!mxEvent.isPopupTrigger(P))&&f.customLinkClicked(U,X)&&mxEvent.consume(P);null!=T&&T(P,U,X)};K.call(this,k,A,I)};p.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var J=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(k,A,I){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["zoomIn","zoomOut","-"],null,I);J.apply(this,arguments);
+f.isSelectionEmpty()||null==c.addSelectionToScratchpad||this.addMenuItems(k,["-","addToScratchpad"],null,I);f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(k,["-","exitGroup","home"],null,I)};var ea=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(k,A,I){if(c.editor.graph.isSelectionEmpty())ea.apply(this,arguments),c.menus.addMenuItems(k,["copyAsImage"],null,I);else if(this.isShowCellEditItems()?this.addPopupDeleteItem(k,A,I):this.addPopupMenuArrangeItems(k,
+A,I),this.addMenuItems(k,"- cut copy copyAsImage duplicate -".split(" "),null,I),this.isShowCellEditItems()||this.addPopupDeleteItem(k,A,I),this.addMenuItems(k,["lockUnlock","-"],null,I),!this.isShowStyleItems()){if(1==f.getSelectionCount()&&!f.isCellLocked(A)&&f.isCellEditable(A)&&(this.addSubmenu("editCell",k,null,mxResources.get("edit")),k.addSeparator(),f.getModel().isEdge(A))){this.addSubmenu("line",k);var T=f.getModel().getGeometry(A);null!=T&&null!=T.points&&0<T.points.length&&this.addMenuItems(k,
+["clearWaypoints"],null,I)}1==f.getSelectionCount()&&this.addMenuItems(k,["enterGroup"],null,I);T=c.getSelectionState();null!=T.mergeCell?this.addMenuItem(k,"mergeCells"):(1<T.style.colspan||1<T.style.rowspan)&&this.addMenuItem(k,"unmergeCells")}};this.menus.isShowStyleItems=function(){return"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme};this.menus.isShowHistoryItems=function(){return"simple"!=Editor.currentTheme};this.menus.isShowArrangeItems=this.menus.isShowStyleItems;
+this.menus.isShowCellEditItems=this.menus.isShowStyleItems}this.defaultFilename=mxResources.get("untitledDiagram");var da=f.getExportVariables;f.getExportVariables=function(){var k=da.apply(this,arguments),A=c.getCurrentFile();null!=A&&(k.filename=A.getTitle());k.pagecount=null!=c.pages?c.pages.length:1;k.page=null!=c.currentPage?c.currentPage.getName():"";k.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return k};var ca=f.getGlobalVariable;f.getGlobalVariable=
+function(k){var A=c.getCurrentFile();return"filename"==k&&null!=A?A.getTitle():"page"==k&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==k?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:"pagecount"==k?null!=c.pages?c.pages.length:1:ca.apply(this,arguments)};var W=null,ba=null;this.addListener("fileDescriptorChanged",mxUtils.bind(this,function(){var k=this.getCurrentFile(),A=null!=k&&null!=k.getTitle()?k.getTitle():this.defaultFilename;W!=A&&k==ba&&(f.invalidateDescendantsWithPlaceholders(f.model.getRoot()),
+f.view.validate());W=A;ba=k}));var ha=f.labelLinkClicked;f.labelLinkClicked=function(k,A,I){var T=A.getAttribute("href");if(null==T||!f.isCustomLink(T)||!mxEvent.isTouchEvent(I)&&mxEvent.isPopupTrigger(I))ha.apply(this,arguments);else{if(!f.isEnabled()||null!=k&&f.isCellLocked(k.cell))f.customLinkClicked(T),f.getRubberband().reset();mxEvent.consume(I)}};this.editor.getOrCreateFilename=function(){var k=c.defaultFilename,A=c.getCurrentFile();null!=A&&(k=null!=A.getTitle()?A.getTitle():k);return k};
var ma=this.actions.get("print");ma.setEnabled(!mxClient.IS_IOS||!navigator.standalone);ma.visible=ma.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(75,!0,"tags"),this.keyHandler.bindAction(65,!1,"insertText"),this.keyHandler.bindAction(83,!1,"insertNote"),this.keyHandler.bindAction(68,!1,"insertRectangle"),this.keyHandler.bindAction(70,!1,"insertEllipse"),this.keyHandler.bindAction(76,
!1,"insertLink"),this.keyHandler.bindAction(82,!1,"insertRhombus"),this.keyHandler.bindAction(67,!1,"insertEdge"),this.keyHandler.bindAction(88,!1,"insertFreehand"),this.keyHandler.bindAction(75,!0,"toggleShapes",!0),this.keyHandler.bindAction(54,!0,"adaptiveColors",!0),this.altShiftActions[81]="copyStyle",this.altShiftActions[87]="pasteStyle",this.altShiftActions[83]="synchronize","1"==urlParams.embedInline&&f.addListener(mxEvent.ESCAPE,function(k,A){null!=A&&f.isEnabled()&&!f.isEditing()&&null!=
-A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,J=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(U){null!=J&&(J.parentNode.removeChild(J),J=null);U.stopPropagation();
-U.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(U){null==J&&(!mxClient.IS_IE||10<document.documentMode)&&(J=this.highlightElement(A));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(U){null!=J&&(J.parentNode.removeChild(J),J=null);if(0<U.dataTransfer.files.length)this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,function(T,W,aa,ja,pa,sa){f.insertImage(T,pa,sa)},function(){},function(T){return"image/"==T.type.substring(0,
-6)},function(T){for(var W=0;W<T.length;W++)T[W]()},mxEvent.isControlDown(U));else if(0<=mxUtils.indexOf(U.dataTransfer.types,"text/uri-list")){var P=U.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(T){var W=Math.max(1,T.width);T=Math.max(1,T.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,W)),aa/Math.max(1,T));f.insertImage(decodeURIComponent(P),W*aa,T*aa)})):document.execCommand("insertHTML",
-!1,U.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(U.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(U.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,U.dataTransfer.getData("text/plain"));U.stopPropagation();U.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:
+A.getProperty("event")&&c.actions.get("exit").funct()}),this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(k){var A=f.cellEditor.text2,I=null;null!=A&&(mxEvent.addListener(A,"dragleave",function(T){null!=I&&(I.parentNode.removeChild(I),I=null);T.stopPropagation();
+T.preventDefault()}),mxEvent.addListener(A,"dragover",mxUtils.bind(this,function(T){null==I&&(!mxClient.IS_IE||10<document.documentMode)&&(I=this.highlightElement(A));T.stopPropagation();T.preventDefault()})),mxEvent.addListener(A,"drop",mxUtils.bind(this,function(T){null!=I&&(I.parentNode.removeChild(I),I=null);if(0<T.dataTransfer.files.length)this.importFiles(T.dataTransfer.files,0,0,this.maxImageSize,function(U,X,aa,ja,pa,sa){f.insertImage(U,pa,sa)},function(){},function(U){return"image/"==U.type.substring(0,
+6)},function(U){for(var X=0;X<U.length;X++)U[X]()},mxEvent.isControlDown(T));else if(0<=mxUtils.indexOf(T.dataTransfer.types,"text/uri-list")){var P=T.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(U){var X=Math.max(1,U.width);U=Math.max(1,U.height);var aa=this.maxImageSize;aa=Math.min(1,Math.min(aa/Math.max(1,X)),aa/Math.max(1,U));f.insertImage(decodeURIComponent(P),X*aa,U*aa)})):document.execCommand("insertHTML",
+!1,T.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(T.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(T.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,T.dataTransfer.getData("text/plain"));T.stopPropagation();T.preventDefault()})))}));if(Editor.isSettingsEnabled()){ma=this.editor.graph.view;var Y=mxSettings.getUnit();ma.setUnit(Y);Editor.pageSizeUnit=Y==mxConstants.METERS?mxConstants.MILLIMETERS:
Y;ma.addListener("unitChanged",function(k,A){k=A.getProperty("unit");mxSettings.setUnit(k);mxSettings.save();Editor.pageSizeUnit=k==mxConstants.METERS?mxConstants.MILLIMETERS:k});this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,ma.unit);this.refresh()}if("1"==urlParams.styledev){ma=document.getElementById("geFooter");null!=ma&&(this.styleInput=document.createElement("input"),
this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),ma.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
mxUtils.bind(this,function(k,A){0<this.editor.graph.getSelectionCount()?(k=this.editor.graph.getSelectionCell(),k=this.editor.graph.getModel().getStyle(k),this.styleInput.value=k||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var la=this.isSelectionAllowed;this.isSelectionAllowed=function(k){return mxEvent.getSource(k)==this.styleInput?!0:la.apply(this,arguments)}}ma=document.getElementById("geInfo");null!=ma&&ma.parentNode.removeChild(ma);if(Graph.fileSupport&&
(!this.editor.chromeless||this.editor.editable)){var Z=null;mxEvent.addListener(f.container,"dragleave",function(k){f.isEnabled()&&(null!=Z&&(Z.parentNode.removeChild(Z),Z=null),k.stopPropagation(),k.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(k){null==Z&&(!mxClient.IS_IE||10<document.documentMode)&&(Z=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();k.stopPropagation();k.preventDefault()}));mxEvent.addListener(f.container,
-"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),J=k.dataTransfer.files,U=f.view.translate,P=f.view.scale,T=A.x/P-U.x,W=A.y/P-U.y;if(0<J.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(J,!0)):(mxEvent.isAltDown(k)&&(W=T=null),this.importFiles(J,T,W,this.maxImageSize,
-null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(W=T=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,T,W,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);
-var pa=null;J=A.getElementsByTagName("img");null!=J&&1==J.length?(ja=J[0].getAttribute("src"),null==ja&&(ja=J[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(J=A.getElementsByTagName("a"),null!=J&&1==J.length?ja=J[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,T,W,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=
-ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",T,W,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,T,W,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),T,W,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();
-this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),J=c.embedViewport.x+c.embedViewport.width,U=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),
-T=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,J-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(U,T-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,
+"drop",mxUtils.bind(this,function(k){null!=Z&&(Z.parentNode.removeChild(Z),Z=null);if(f.isEnabled()){var A=mxUtils.convertPoint(f.container,mxEvent.getClientX(k),mxEvent.getClientY(k)),I=k.dataTransfer.files,T=f.view.translate,P=f.view.scale,U=A.x/P-T.x,X=A.y/P-T.y;if(0<I.length)"1"!=urlParams.embed&&mxEvent.isShiftDown(k)?(this.isBlankFile()&&!this.canUndo()&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(I,!0)):(mxEvent.isAltDown(k)&&(X=U=null),this.importFiles(I,U,X,this.maxImageSize,
+null,null,null,null,mxEvent.isControlDown(k),null,null,mxEvent.isShiftDown(k),k));else{mxEvent.isAltDown(k)&&(X=U=0);var aa=0<=mxUtils.indexOf(k.dataTransfer.types,"text/uri-list")?k.dataTransfer.getData("text/uri-list"):null;A=this.extractGraphModelFromEvent(k,null!=this.pages);if(null!=A)f.setSelectionCells(this.importXml(A,U,X,!0));else if(0<=mxUtils.indexOf(k.dataTransfer.types,"text/html")){var ja=k.dataTransfer.getData("text/html");A=document.createElement("div");A.innerHTML=Graph.sanitizeHtml(ja);
+var pa=null;I=A.getElementsByTagName("img");null!=I&&1==I.length?(ja=I[0].getAttribute("src"),null==ja&&(ja=I[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(ja)||(pa=!0)):(I=A.getElementsByTagName("a"),null!=I&&1==I.length?ja=I[0].getAttribute("href"):(A=A.getElementsByTagName("pre"),null!=A&&1==A.length&&(ja=mxUtils.getTextContent(A[0]))));var sa=!0,qa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(ja,U,X,!0,pa,null,sa,mxEvent.isControlDown(k)))});pa&&null!=
+ja&&ja.length>this.resampleThreshold?this.confirmImageResize(function(wa){sa=wa;qa()},mxEvent.isControlDown(k)):qa()}else null!=aa&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(aa)?this.loadImage(decodeURIComponent(aa),mxUtils.bind(this,function(wa){var Ba=Math.max(1,wa.width);wa=Math.max(1,wa.height);var za=this.maxImageSize;za=Math.min(1,Math.min(za/Math.max(1,Ba)),za/Math.max(1,wa));f.setSelectionCell(f.insertVertex(null,null,"",U,X,Ba*za,wa*za,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+aa+";"))}),mxUtils.bind(this,function(wa){f.setSelectionCells(this.insertTextAt(aa,U,X,!0))})):0<=mxUtils.indexOf(k.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(k.dataTransfer.getData("text/plain"),U,X,!0))}}k.stopPropagation();k.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.addListener("currentThemeChanged",mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.updateEntries();this.updateButtonContainer();this.updateDocumentTitle();
+this.refresh()}));this.addListener("darkModeChanged",function(){mxClient.IS_SF&&f.view.validateBackground()});f.addListener("enabledChanged",mxUtils.bind(this,function(){f.isEnabled()||this.hideShapePicker()}));c=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==c.embedViewport)mxUtils.fit(this.div);else{var k=parseInt(this.div.offsetLeft),A=parseInt(this.div.offsetWidth),I=c.embedViewport.x+c.embedViewport.width,T=parseInt(this.div.offsetTop),P=parseInt(this.div.offsetHeight),
+U=c.embedViewport.y+c.embedViewport.height;this.div.style.left=Math.max(c.embedViewport.x,Math.min(k,I-A))+"px";this.div.style.top=Math.max(c.embedViewport.y,Math.min(T,U-P))+"px";this.div.style.height=Math.min(c.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(c.embedViewport.width,parseInt(this.div.style.width))+"px"}};if(!this.editor.chromeless||this.editor.editable)if(ma=Editor.currentTheme,"simple"==ma||"sketch"==ma)Editor.currentTheme="",this.doSetCurrentTheme(ma,
mxUtils.bind(this,function(){"1"==urlParams.embedInline?this.initializeInlineEmbedMode():(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)<Editor.smallScreenWidth&&this.toggleFormatPanel(!1);this.fireEvent(new mxEventObject("themeInitialized"))}),!0);ma=!1;null!=urlParams.dark?ma=urlParams.dark:(ma="dark"==Editor.currentTheme,!Editor.isSettingsEnabled()||"1"==urlParams.embed||ma&&"auto"!=mxSettings.settings.darkMode||(ma=mxSettings.settings.darkMode));"auto"==ma&&
this.isAutoDarkModeSupported()&&(ma=window.matchMedia("(prefers-color-scheme: dark)").matches);this.setDarkMode("string"===typeof ma?"1"==ma:ma);if(this.isAutoDarkModeSupported())try{window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",mxUtils.bind(this,function(k){this.isAutoDarkMode()&&this.setDarkMode(k.matches)}))}catch(k){this.actions.get("autoMode").setEnabled(!1)}"1"==urlParams["high-contrast"]?this.setHighContrast(!0):Editor.isSettingsEnabled()&&!this.editor.graph.isLightboxView()&&
null!=mxSettings.settings.highContrast&&this.setHighContrast(mxSettings.settings.highContrast);this.installSettings();this.addListener("enableAnimationsChanged",mxUtils.bind(this,function(k,A){f.enableFlowAnimation=Editor.enableAnimations;f.refresh()}));f.enableFlowAnimation=Editor.enableAnimations;screen.width<=Editor.smallScreenWidth&&(this.formatWidth=0);"1"==urlParams.prefetchFonts&&c.editor.loadFonts()};var B=EditorUi.prototype.windowResized;EditorUi.prototype.windowResized=function(){if("simple"==
Editor.currentTheme){var c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,f=Editor.smallScreenWidth;null!=this.lastWindowWidth&&this.lastWindowWidth>=f&&c<f?this.isFormatPanelVisible()&&this.toggleFormatPanel(!1):null!=this.lastWindowWidth&&this.lastWindowWidth<f&&c>=f&&(this.isFormatPanelVisible()||this.toggleFormatPanel(!0));this.lastWindowWidth=c}B.apply(this,arguments)};EditorUi.prototype.initializeInlineEmbedMode=function(){var c=this.sketchFooterMenuElt,f=
-this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(I){mxEvent.getSource(I)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(I),mxEvent.getClientY(I)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=
-"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(I){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,
-mxUtils.bind(this,function(I){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(I);t.popupMenuHandler.hideMenu();mxEvent.consume(I)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(I){var ca=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(I)-C)+"px",ca=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(I)-F)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
-fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(I){null==C&&null==F||mxEvent.consume(I);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";
-this.addListener("editInlineStart",mxUtils.bind(this,function(I){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(I){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,
+this.sketchMainMenuElt,l=this.sketchPickerMenuElt,t=this.editor.graph;l.style.transform="";mxEvent.addGestureListeners(this.diagramContainer.parentNode,mxUtils.bind(this,function(J){mxEvent.getSource(J)==this.diagramContainer.parentNode&&(this.embedExitPoint=new mxPoint(mxEvent.getClientX(J),mxEvent.getClientY(J)),this.sendEmbeddedSvgExport())}));document.body.style.cursor="text";var z=document.createElement("div");z.style.position="absolute";z.style.width="10px";z.style.height="10px";z.style.borderRadius=
+"5px";z.style.border="1px solid gray";z.style.background="#ffffff";z.style.cursor="row-resize";this.diagramContainer.parentNode.appendChild(z);this.bottomResizer=z;var C=null,F=null,N=null,K=null;mxEvent.addGestureListeners(z,mxUtils.bind(this,function(J){K=parseInt(this.diagramContainer.style.height);F=mxEvent.getClientY(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));z=z.cloneNode(!1);z.style.cursor="col-resize";this.diagramContainer.parentNode.appendChild(z);this.rightResizer=z;mxEvent.addGestureListeners(z,
+mxUtils.bind(this,function(J){N=parseInt(this.diagramContainer.style.width);C=mxEvent.getClientX(J);t.popupMenuHandler.hideMenu();mxEvent.consume(J)}));mxEvent.addGestureListeners(document.body,null,mxUtils.bind(this,function(J){var ea=!1;null!=C&&(this.diagramContainer.style.width=Math.max(20,N+mxEvent.getClientX(J)-C)+"px",ea=!0);null!=F&&(this.diagramContainer.style.height=Math.max(20,K+mxEvent.getClientY(J)-F)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",
+fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),this.inlineSizeChanged(),this.refresh())}),function(J){null==C&&null==F||mxEvent.consume(J);F=C=null});document.body.style.backgroundColor="transparent";this.diagramContainer.style.borderRadius="4px";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";this.sketchMenubarElt.style.display="none";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none";
+this.addListener("editInlineStart",mxUtils.bind(this,function(J){this.inlineSizeChanged();this.fitWindows()}));this.addListener("editInlineStop",mxUtils.bind(this,function(J){this.diagramContainer.style.width="10px";this.diagramContainer.style.height="10px";this.diagramContainer.style.border="";this.bottomResizer.style.visibility="hidden";this.rightResizer.style.visibility="hidden";f.style.visibility="hidden";c.style.visibility="hidden";l.style.display="none"}));this.windowResized=mxUtils.bind(this,
function(){});this.inlineSizeChanged()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var l=f.clipboardData||f.originalEvent.clipboardData,t=!1,z=0;z<l.types.length;z++)if("text/"===l.types[z].substring(0,5)){t=!0;break}if(!t){var C=l.items;for(index in C){var F=C[index];if("file"===F.kind){if(c.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,
-function(K,I,ca,da,ea,X){c.insertImage(K,ea,X)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var I=0;I<K.length;I++)K[I]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
+function(K,J,ea,da,ca,W){c.insertImage(K,ca,W)},function(){},function(K){return"image/"==K.type.substring(0,6)},function(K){for(var J=0;J<K.length;J++)K[J]()});else{var N=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],N.x,N.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(K){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){l.innerHTML="&nbsp;";l.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,
l=document.createElement("div");l.setAttribute("autocomplete","off");l.setAttribute("autocorrect","off");l.setAttribute("autocapitalize","off");l.setAttribute("spellcheck","false");l.style.textRendering="optimizeSpeed";l.style.fontFamily="monospace";l.style.wordBreak="break-all";l.style.background="transparent";l.style.color="transparent";l.style.position="absolute";l.style.whiteSpace="nowrap";l.style.overflow="hidden";l.style.display="block";l.style.fontSize="1";l.style.zIndex="-1";l.style.resize=
"none";l.style.outline="none";l.style.width="1px";l.style.height="1px";mxUtils.setOpacity(l,0);l.contentEditable=!0;l.innerHTML="&nbsp;";var t=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(C){var F=mxEvent.getSource(C);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||"true"==F.contentEditable||
224!=C.keyCode&&(mxClient.IS_MAC||17!=C.keyCode)&&(!mxClient.IS_MAC||91!=C.keyCode&&93!=C.keyCode)||t||(l.style.left=f.container.scrollLeft+10+"px",l.style.top=f.container.scrollTop+10+"px",C=f.container.scrollLeft,F=f.container.scrollTop,f.container.appendChild(l),t=!0,l.focus(),document.execCommand("selectAll",!1,null),f.container.scrollLeft=C,f.container.scrollTop=F)}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(C){var F=C.keyCode;window.setTimeout(mxUtils.bind(this,function(){!t||
@@ -3871,21 +3873,21 @@ this.editor.graph;f.isSelectionEmpty()||(c=mxUtils.sortCells(f.getExportableCell
C.getSelectionCount()){z=C.getStartEditingCell(C.getSelectionCell(),t);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==C.getCurrentCellStyle(z)[mxConstants.STYLE_SHAPE])C.setCellStyles(mxConstants.STYLE_IMAGE,c,[z]);else{C.model.beginUpdate();try{C.labelChanged(z,c),Graph.isLink(c)&&C.setLinkForCell(z,c)}finally{C.model.endUpdate()}}C.setSelectionCell(z)}else F=C.getInsertPoint(),C.isMouseInsertPoint()&&(N=0,C.lastPasteXml==c&&0<C.pasteCounter&&C.pasteCounter--),F=this.insertTextAt(c,F.x+N,
F.y+N,z),C.setSelectionCells(F);C.isSelectionEmpty()||(C.scrollCellToVisible(C.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(C.view.getState(C.getSelectionCell())));return F};EditorUi.prototype.pasteCells=function(c,f,l,t){if(!mxEvent.isConsumed(c)){var z=f,C=!1;if(l&&null!=c.clipboardData&&c.clipboardData.getData){var F=c.clipboardData.getData("text/plain"),N=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var K=decodeURIComponent(F);this.isCompatibleString(K)&&
(N=!0,F=K)}catch(ba){}N=N?null:c.clipboardData.getData("text/html");null!=N&&0<N.length?(z=this.parseHtmlData(N),C="text/plain"!=z.getAttribute("data-type")):null!=F&&0<F.length&&(z=document.createElement("div"),mxUtils.setTextContent(z,N))}F=z.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))l=F[0].getAttribute("data-lucid-content"),null!=l&&0<l.length&&(this.convertLucidChart(l,mxUtils.bind(this,function(ba){var ha=
-this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var I=!1,ca="";ca=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==
-z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ca.lastIndexOf("%3E");0<=da&&da<ca.length-3&&(ca=ca.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ca))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(I=!0,ca=
-K)}catch(ba){}try{if(null!=ca&&0<ca.length){if(0==ca.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ea=mxUtils.bind(this,function(){try{ca=(new MiroImporter).importMiroJson(JSON.parse(ca)),this.pasteXml(ca,t,I,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ea):ea()}else this.pasteXml(ca,t,I,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var X=this.editor.graph;X.lastPasteXml=null;X.pasteCounter=
+this.editor.graph;ha.lastPasteXml==ba?ha.pasteCounter++:(ha.lastPasteXml=ba,ha.pasteCounter=0);var ma=ha.pasteCounter*ha.gridSize;ha.setSelectionCells(this.importXml(ba,ma,ma));ha.scrollCellToVisible(ha.getSelectionCell())}),mxUtils.bind(this,function(ba){this.handleError(ba)})),mxEvent.consume(c));else{var J=!1,ea="";ea=C?null!=z.textContent&&"<mxfile"==z.textContent.substring(0,7)&&"</mxfile>"==z.textContent.substring(z.textContent.length-9)||"<mxGraphModel"==z.textContent.substring(0,13)&&"</mxGraphModel>"==
+z.textContent.substring(z.textContent.length-15)?z.textContent.replace(/\u00a0/g," "):z.innerHTML:mxUtils.trim(null==z.innerText?mxUtils.getTextContent(z):z.innerText);try{var da=ea.lastIndexOf("%3E");0<=da&&da<ea.length-3&&(ea=ea.substring(0,da+3))}catch(ba){}try{F=z.getElementsByTagName("span"),(K=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(ea))&&(this.isCompatibleString(K)||0==K.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(J=!0,ea=
+K)}catch(ba){}try{if(null!=ea&&0<ea.length){if(0==ea.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ca=mxUtils.bind(this,function(){try{ea=(new MiroImporter).importMiroJson(JSON.parse(ea)),this.pasteXml(ea,t,J,c)}catch(ba){console.log("Miro import error:",ba)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ca):ca()}else this.pasteXml(ea,t,J,c,C);try{mxEvent.consume(c)}catch(ba){}}else if(!l){var W=this.editor.graph;W.lastPasteXml=null;W.pasteCounter=
0}}catch(ba){this.handleError(ba)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.showPrintDialog=function(c,f){var l=320;this.editor.graph.isEnabled()&&(l+=40);null!=this.pages&&1<this.pages.length&&(l+=40,this.editor.graph.isEnabled()||(l+=10));null==f||mxClient.IS_CHROMEAPP||"draw.io"!=this.getServiceName()||(l+=20);this.showDialog((new PrintDialog(this,c,f)).container,320,l,!0,!0)};EditorUi.prototype.print=function(c,f){var l=this.editor,t=l.graph,z=this.getPageIndex(this.currentPage),C=null!=z?z+
-1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,J=ma.currentScale,U=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var T=ma.getGraphBounds(),W=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);
-var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(T.height/ma.view.scale),ja.width*qa/(T.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),W-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(T=t.getBoundingBox(t.getSelectionCells())),ja.width=(T.width+1)*qa/ma.view.scale,ja.height=(T.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*
-ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,W,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;W=f.border;isNaN(W)||(Y.pageMargin=W);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),
+1:1,F=mxUtils.bind(this,function(ma,Y,la,Z){var k=ma.useCssTransforms,A=ma.currentTranslate,I=ma.currentScale,T=ma.view.translate,P=ma.view.scale;ma.useCssTransforms&&(ma.useCssTransforms=!1,ma.currentTranslate=new mxPoint(0,0),ma.currentScale=1,ma.view.translate=new mxPoint(0,0),ma.view.scale=1);var U=ma.getGraphBounds(),X=0,aa=0,ja=mxRectangle.fromRectangle(ma.pageFormat),pa=f.fit||f.crop||!ma.pageVisible,sa=f.scale;ja.width=Math.ceil(ja.width*ma.pageScale);ja.height=Math.ceil(ja.height*ma.pageScale);
+var qa=1;if(f.fit){qa=f.sheetsAcross;var wa=f.sheetsDown;isNaN(sa)||(ja.width=Math.ceil(ja.width*sa),ja.height=Math.ceil(ja.height*sa));qa=Math.min(ja.height*wa/(U.height/ma.view.scale),ja.width*qa/(U.width/ma.view.scale))}else qa=isNaN(sa)?1:sa;qa*=1;!pa&&ma.pageVisible?(sa=ma.getPageLayout(),X-=sa.x*ja.width,aa-=sa.y*ja.height):pa=!0;f.crop&&(f.selection&&(U=t.getBoundingBox(t.getSelectionCells())),ja.width=(U.width+1)*qa/ma.view.scale,ja.height=(U.height+1)*qa/ma.view.scale);ja.width=Math.ceil(1*
+ja.width);ja.height=Math.ceil(1*ja.height);Z=null!=Z?"page/id,"+Z:null;if(null==Y){Y=PrintDialog.createPrintPreview(ma,qa,null,0,X,aa,pa);Y.title=this.getBaseFilename(!0);Y.pageSelector=!1;Y.mathEnabled=!1;X=f.border;isNaN(X)||(Y.pageMargin=X);f.selection&&(Y.isCellVisible=function(ra){return ma.isCellSelected(ra)});var Ba=Y.writeHead;Y.writeHead=function(ra){Ba.apply(this,arguments);mxClient.IS_GC&&(ra.writeln('<style type="text/css">'),ra.writeln("@media print {"),ra.writeln(".MathJax svg { shape-rendering: crispEdges; }"),
ra.writeln("}"),ra.writeln("</style>"));null!=l.fontCss&&(ra.writeln('<style type="text/css">'),ra.writeln(mxUtils.htmlEntities(l.fontCss,!1,!1,!1)),ra.writeln("</style>"));for(var ya=ma.getCustomFonts(),Ca=0;Ca<ya.length;Ca++){var Ma=ya[Ca].name,Ha=ya[Ca].url;Graph.isCssFontUrl(Ha)?ra.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(Graph.rewriteGoogleFontUrl(Ha))+'" charset="UTF-8" type="text/css">'):(ra.writeln('<style type="text/css">'),ra.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(Ma)+
'";\nsrc: url("'+mxUtils.htmlEntities(Ha)+'");\n}'),ra.writeln("</style>"))}};if(Editor.replaceSvgDataUris){var za=Y.drawBackgroundImage;Y.drawBackgroundImage=function(ra){za.apply(this,arguments);null!=ra.node&&(EditorUi.embedSvgImages(ra.node),t.disableSvgLinks(ra.node,function(ya){ya.setAttribute("href","javascript:void(0)")}))}}var Ea=Y.addGraphFragment;Y.addGraphFragment=function(ra,ya,Ca,Ma,Ha,Aa){Ea.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:Ha.classList.add("geDisableMathJax")};
-f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{T=ma.background;if(null==T||""==T||T==mxConstants.NONE)T="#ffffff";Y.backgroundColor=T;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,
-W,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)W=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(W)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&
-(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=J,ma.view.translate=U,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,I=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{I&&(I=f.selection||N==C&&K==C);if(!I&&null!=this.pages&&this.pages.length){I=0;C=this.pages.length-1;f.allPages||(I=parseInt(N)-1,C=parseInt(K)-1);for(var ca=I;ca<=C;ca++){var da=this.pages[ca];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);
-N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;I=!1;var ea=null,X=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,I=da.viewState.mathEnabled,ea=da.viewState.background,X=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=X&&null!=X.originalSrc&&(X=this.createImageForPageLink(X.originalSrc,da));N.background=ea;N.backgroundImage=null!=
-X?new mxImage(X.src,X.width,X.height,X.x,X.y):null;N.pageVisible=K;N.mathEnabled=I;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?
-ca+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ca!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),
+f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.open(null,null,la,!0,Z,ja,f.selection?ma.getSelectionCells():null)}else{U=ma.background;if(null==U||""==U||U==mxConstants.NONE)U="#ffffff";Y.backgroundColor=U;Y.autoOrigin=pa;f.grid&&(Y.gridSize=ma.gridSize,Y.gridSteps=ma.view.gridSteps,Y.gridColor=Editor.isDarkMode()?mxGraphView.prototype.defaultGridColor:ma.view.gridColor);Y.appendGraph(ma,qa,
+X,aa,la,!0,Z,ja,f.selection?ma.getSelectionCells():null);la=ma.getCustomFonts();if(null!=Y.wnd)for(ja=0;ja<la.length;ja++)X=la[ja].name,aa=la[ja].url,Graph.isCssFontUrl(aa)?Y.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(aa)+'" charset="UTF-8" type="text/css">'):(Y.wnd.document.writeln('<style type="text/css">'),Y.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(X)+'";\nsrc: url("'+mxUtils.htmlEntities(aa)+'");\n}'),Y.wnd.document.writeln("</style>"))}k&&
+(ma.useCssTransforms=k,ma.currentTranslate=A,ma.currentScale=I,ma.view.translate=T,ma.view.scale=P);return Y}),N=f.pagesFrom,K=f.pagesTo,J=!f.allPages;z=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(this,f);else{J&&(J=f.selection||N==C&&K==C);if(!J&&null!=this.pages&&this.pages.length){J=0;C=this.pages.length-1;f.allPages||(J=parseInt(N)-1,C=parseInt(K)-1);for(var ea=J;ea<=C;ea++){var da=this.pages[ea];N=da==this.currentPage?t:null;if(null==N){N=this.createTemporaryGraph(t.stylesheet);
+N.shapeForegroundColor=t.shapeForegroundColor;N.shapeBackgroundColor=t.shapeBackgroundColor;K=!0;J=!1;var ca=null,W=null;null==da.viewState&&null==da.root&&this.updatePageRoot(da);null!=da.viewState&&(K=da.viewState.pageVisible,J=da.viewState.mathEnabled,ca=da.viewState.background,W=da.viewState.backgroundImage,N.pageFormat=da.viewState.pageFormat,N.gridSize=da.viewState.gridSize);null!=W&&null!=W.originalSrc&&(W=this.createImageForPageLink(W.originalSrc,da));N.background=ca;N.backgroundImage=null!=
+W?new mxImage(W.src,W.width,W.height,W.x,W.y):null;N.pageVisible=K;N.mathEnabled=J;var ba=N.getGraphBounds;N.getGraphBounds=function(){var ma=ba.apply(this,arguments),Y=this.backgroundImage;if(null!=Y&&null!=Y.width&&null!=Y.height){var la=this.view.translate,Z=this.view.scale;ma=mxRectangle.fromRectangle(ma);ma.add(new mxRectangle((la.x+Y.x)*Z,(la.y+Y.y)*Z,Y.width*Z,Y.height*Z))}return ma};var ha=N.getGlobalVariable;N.getGlobalVariable=function(ma){return"page"==ma?da.getName():"pagenumber"==ma?
+ea+1:"pagecount"==ma?null!=this.pages?this.pages.length:1:ha.apply(this,arguments)};document.body.appendChild(N.container);this.updatePageRoot(da);N.model.setRoot(da.root)}z=F(N,z,ea!=C,da.getId());N!=t&&N.container.parentNode.removeChild(N.container)}}else z=F(t);null==z||null==z.wnd?this.handleError({message:mxResources.get("errorUpdatingPreview")}):(z.mathEnabled&&(F=z.wnd.document,c||(z.wnd.IMMEDIATE_PRINT=!0),F.writeln('<script type="text/javascript" src="js/math-print.js">\x3c/script>')),z.closeDocument(),
Graph.rewritePageLinks(z.wnd.document,!0),z.mathEnabled||c||PrintDialog.printPreview(z));return z}};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var f=null,l=0;l<c.length;l++)mxEvent.addListener(c[l],"dragleave",function(t){null!=f&&(f.parentNode.removeChild(f),f=null);t.stopPropagation();t.preventDefault()}),mxEvent.addListener(c[l],"dragover",mxUtils.bind(this,function(t){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&
12>document.documentMode)&&(f=this.highlightElement());t.stopPropagation();t.preventDefault()})),mxEvent.addListener(c[l],"drop",mxUtils.bind(this,function(t){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<t.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(t.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(t)&&!mxEvent.isShiftDown(t)):this.openFiles(t.dataTransfer.files,!0);
else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTransfer?t.dataTransfer:t.clipboardData;null!=C&&(10==document.documentMode||11==document.documentMode?z=C.getData("Text"):(z=null,z=0<=mxUtils.indexOf(C.types,"text/uri-list")?t.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(C.types,"text/html")?C.getData("text/html"):null,null!=z&&0<z.length?(C=document.createElement("div"),C.innerHTML=Graph.sanitizeHtml(z),C=C.getElementsByTagName("img"),0<C.length&&(z=C[0].getAttribute("src"))):
@@ -3893,7 +3895,7 @@ else{var z=this.extractGraphModelFromEvent(t);if(null==z){var C=null!=t.dataTran
413==F.getStatus()?mxResources.get("diagramTooLarge"):mxResources.get("unknownError"))})):/^https?:\/\//.test(z)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(z):window.geOpenWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(z)))))}else this.openLocalFile(z,null,!0)}t.stopPropagation();t.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var f=0,l=0;if(null==c){var t=document.body;
var z=document.documentElement;var C=(t.clientWidth||z.clientWidth)-3;t=Math.max(t.clientHeight||0,z.clientHeight)-3}else f=c.offsetTop,l=c.offsetLeft,C=c.clientWidth,t=c.clientHeight;z=document.createElement("div");z.style.zIndex=mxPopupMenu.prototype.zIndex+2;z.style.border="3px dotted rgb(254, 137, 12)";z.style.pointerEvents="none";z.style.position="absolute";z.style.top=f+"px";z.style.left=l+"px";z.style.width=Math.max(0,C-3)+"px";z.style.height=Math.max(0,t-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?
this.editor.graph.container.appendChild(z):document.body.appendChild(z);return z};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var f=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=f){var l=new mxCodec(f.ownerDocument),t=new mxGraphModel;l.decode(f,t);f=t.getChildAt(t.getRoot(),0);for(l=0;l<t.getChildCount(f);l++)c.push(t.getChildAt(f,l))}return c};EditorUi.prototype.openFileHandle=function(c,f,l,t,z,C){if(null!=f&&0<f.length){if(!this.useCanvasForExport&&/(\.png)$/i.test(f)||
-/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,
+/(\.pdf)$/i.test(f))f=f.substring(0,f.length-4),/(\.drawio)$/i.test(f)||(f+=".drawio");var F=mxUtils.bind(this,function(K){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==K.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,K,f)),this.showSidebar()}catch(J){this.handleError(J,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(K,
f,t)});if(EditorUi.isVisioFilename(f))this.importVisio(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(l,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),
200<=K.status&&299>=K.status?F(K.responseText):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,function(K){this.spinner.stop();this.openLocalFile(K,f,t)}),mxUtils.bind(this,function(K){this.spinner.stop();this.handleError(K)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();
null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,t);try{this.loadLibrary(new LocalLibrary(this,c,l.name)),this.showSidebar()}catch(K){this.handleError(K,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(l,mxUtils.bind(this,function(K){this.spinner.stop();F(K)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,f,t)}));else{if("image/png"==l.type.substring(0,9))c=this.extractGraphModelFromPng(c);
@@ -3904,70 +3906,70 @@ F&&F.isModified()?this.confirm(mxResources.get("allChangesLost"),null,N,mxResour
function(c,f){function l(F){if(null!=F){var N=F.lastIndexOf(".");0<N&&(F=F.substring(N+1,F.length));null==f[F]&&(f[F]=!0)}}var t=this.editor.graph,z=t.getCellStyle(c);l(mxStencilRegistry.getBasenameForStencil(z[mxConstants.STYLE_SHAPE]));t.model.isEdge(c)&&(l(mxMarker.getPackageForType(z[mxConstants.STYLE_STARTARROW])),l(mxMarker.getPackageForType(z[mxConstants.STYLE_ENDARROW])));z=t.model.getChildCount(c);for(var C=0;C<z;C++)this.addBasenamesForCell(t.model.getChildAt(c,C),f)};EditorUi.prototype.setGraphEnabled=
function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=c&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme?"":"none";this.editor.graph.setEnabled(c);null!=this.tabContainer&&(this.tabContainer.style.visibility=c&&0<parseInt(this.tabContainer.style.height)?"":"hidden");null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=
c?"":"hidden");c||this.hideWindows()};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(f,l,t,z){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;
-this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(I){console.log(I)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
+this.setFileData(f);if(z)try{var C=this.editor.graph;C.setGridEnabled(!1);C.pageVisible=!1;var F=C.model.cells,N;for(N in F){var K=F[N];null!=K&&null!=K.style&&(K.style+=";sketch=1;"+(-1==K.style.indexOf("fontFamily=")||-1<K.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(J){console.log(J)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();
this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=t?t:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,
f){null!=c?this.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(mxUtils.bind(this,function(l){this.spinner.stop();f(l)})):f(null)};EditorUi.prototype.createLoadMessage=function(c){var f=this.editor.graph;return{event:c,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){try{var f=this.editor.graph;
f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var l=window.opener||window.parent;if(this.editor.modified){var t=f.background;if(null==t||t==mxConstants.NONE)t=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(z){l.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(z)}),"*")}),null,null,!0,t,1,this.embedExportBorder,null,this.embedExportTheme)}else c||
-l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,I){this.editor.modified&&
-"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var I=K.data,ca=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):
-"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ea=!1;try{I=JSON.parse(I),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[I])}catch(ra){I=null}try{if(null==I)return;if("dialog"==I.action){this.showError(null!=
-I.titleKey?mxResources.get(I.titleKey):I.title,null!=I.messageKey?mxResources.get(I.messageKey):mxUtils.htmlEntities(I.message),null!=I.buttonKey?mxResources.get(I.buttonKey):I.button);null!=I.modified&&(this.editor.modified=I.modified);return}if("layout"==I.action){this.executeLayouts(this.editor.graph.createLayouts(I.layouts));return}if("prompt"==I.action){this.spinner.stop();var X=new FilenameDialog(this,I.defaultValue||"",null!=I.okKey?mxResources.get(I.okKey):I.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",
-value:ra,message:I}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")},null!=I.titleKey?mxResources.get(I.titleKey):I.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:I}),"*")});this.showDialog(X.container,300,80,!0,!1);X.init();return}if("draft"==I.action){var ba=da(I.xml);this.spinner.stop();X=new DraftDialog(this,mxResources.get("draftFound",[I.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();
-F.postMessage(JSON.stringify({event:"draft",result:"edit",message:I}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:I}),"*")}),I.editKey?mxResources.get(I.editKey):null,I.discardKey?mxResources.get(I.discardKey):null,I.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:I}),"*")}):null);this.showDialog(X.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&
-this.actions.get("exit").funct()}));try{X.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:I}),"*")}return}if("template"==I.action){this.spinner.stop();var ha=1==I.enableRecent,ma=1==I.enableSearch,Y=1==I.enableCustomTemp;X=new NewDialog(this,!1,I.templatesOnly?!1:null!=I.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=I.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,
-libs:Ma,builtIn:!0,message:I}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,I.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",
-docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==I.withoutType);this.showDialog(X.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));X.init();return}if("textContent"==I.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:I}),"*");return}if("status"==
-I.action){null!=I.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(I.messageKey))):null!=I.message&&this.editor.setStatus(mxUtils.htmlEntities(I.message));null!=I.modified&&(this.editor.modified=I.modified);return}if("spinner"==I.action){var Z=null!=I.messageKey?mxResources.get(I.messageKey):I.message;null==I.show||I.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==I.action){this.actions.get("exit").funct();return}if("viewport"==I.action){null!=I.viewport&&
-(this.embedViewport=I.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==I.action){X=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),X=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=I.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=X&&this.restoreScrollState(X);return}if("snapshot"==I.action){this.sendEmbeddedSvgExport(!0);
-return}if("export"==I.action){if("png"==I.format||"xmlpng"==I.format){if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){var A=null!=I.xml?I.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var J=this.editor.graph,U=mxUtils.bind(this,function(ra,ya){if(I.withSvg)I.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){U(ra,Ma)},null,null,I.embedImages,this.editor.graph.background,I.scale,I.border,I.shadow,
-"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=I.format;Ca.message=I;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==I.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));J!=this.editor.graph&&J.container.parentNode.removeChild(J.container);U(ra)}),T=I.pageId||(null!=this.pages?I.currentPage?this.currentPage.getId():
-this.pages[0].getId():null);if(this.isExportToCanvas()){var W=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=T){var ra=J.getGlobalVariable;J=this.createTemporaryGraph(J.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==T){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);J.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(J.container);
-J.model.setRoot(ya.root)}if(null!=I.layerIds){var Ma=J.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<I.layerIds.length;Ca++)Aa[I.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;I.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),I.width,null,I.background,mxUtils.bind(this,function(){P(null)}),null,null,I.scale,I.transparent,I.shadow,null,J,I.border,null,
-I.grid,Ca)});null!=I.xml&&0<I.xml.length&&(l=!0,this.setFileData(A),l=!1);W()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==I.format?"1":"0")+(null!=T?"&pageId="+T:"")+(null!=I.layerIds&&0<I.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:I.layerIds})):"")+(null!=I.scale?"&scale="+I.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?U("data:image/png;base64,"+ra.getText()):P(null)}),
-mxUtils.bind(this,function(){P(null)}))}}else if(W=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=I;if("html2"==I.format||"html"==I.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=I.format}else if("html"==I.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=I.format;
-else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=I.background?I.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";I.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=I.theme&&(Ma=I.theme);if("xmlsvg"==I.format){if(null==
-I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=I.theme&&(Ma=I.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,I.embedImages,ya,I.scale,I.border,I.shadow,Ma)}}else if(null==I.spin&&null==I.spinKey||this.spinner.spin(document.body,null!=I.spinKey?mxResources.get(I.spinKey):I.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,
-I.scale,I.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||I.shadow,null,Ma),(this.editor.graph.shadowVisible||I.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){I.embedImages||null==I.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=I.xml&&0<I.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;
-Editor.onMathJaxDone=function(){aa.apply(this,arguments);W()}}l=!0;this.setFileData(I.xml);l=!1;this.editor.graph.mathEnabled||W()}else W();return}if("load"==I.action){ea=I.toSketch;t=1==I.autosave;this.hideDialog();null!=I.modified&&null==urlParams.modified&&(urlParams.modified=I.modified);null!=I.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=I.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||
-this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=I.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=I.noSaveBtn);if(null!=I.rough){var ja=Editor.sketchMode;this.doSetSketchMode(I.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=I.dark&&this.setDarkMode(I.dark);null!=I.border&&(this.embedExportBorder=
-I.border);null!=I.theme&&(this.embedExportTheme=I.theme);null!=I.background&&(this.embedExportBackground=I.background);null!=I.viewport&&(this.embedViewport=I.viewport);this.embedExitPoint=null;if(null!=I.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,I.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,I.rect.top)+"px";this.minInlineWidth=I.minWidth;this.minInlineHeight=I.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";var sa=I.maxFitScale,qa=I.rect.width+2*pa,wa=I.rect.height+2*pa;ca=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*
-pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[I]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&
-(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=I.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=I.noExitBtn);null!=I.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,I.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),
-this.embedFilenameSpan=ba);try{I.libs&&this.sidebar.showEntries(I.libs)}catch(ra){}I=null!=I.xmlpng?this.extractGraphModelFromPng(I.xmlpng):null!=I.descriptor?I.descriptor:I.xml}else{if("merge"==I.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(I.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:I}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:I,error:ra}),"*")}))}else"remoteInvokeReady"==I.action?
-this.handleRemoteInvokeReady(F):"remoteInvoke"==I.action?this.handleRemoteInvoke(I,K.origin):"remoteInvokeResponse"==I.action?this.handleRemoteInvokeResponse(I):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(I)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,
-ya,null,ea)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",
-f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ca&&ca()});null!=I&&"function"===typeof I.substring&&"data:application/vnd.visio;base64,"==
-I.substring(0,34)?(da="0M8R4KGxGuE"==I.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(I.substring(I.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=I&&"function"===typeof I.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(I,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&
-299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=I&&"function"===typeof I.substring&&this.isLucidChartData(I)?this.convertLucidChart(I,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==I||"object"!==typeof I||null==I.format||null==I.data&&null==I.url?(I=da(I),Ea(I,K)):this.loadDescriptor(I,
-mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,I,ca){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:I,allowOpener:ca}),"*")}}};EditorUi.prototype.createEmbedButton=
+l.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))}catch(z){c||this.handleError(z)}};EditorUi.prototype.installMessageHandler=function(c){var f=null,l=!1,t=!1,z=null,C=mxUtils.bind(this,function(K,J){this.editor.modified&&
+"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,C);mxEvent.addListener(window,"message",mxUtils.bind(this,function(K){if(K.source==(window.opener||window.parent)){var J=K.data,ea=null,da=mxUtils.bind(this,function(ra){if(null!=ra&&"function"===typeof ra.charAt&&"<"!=ra.charAt(0))try{Editor.isPngDataUrl(ra)?ra=Editor.extractGraphModelFromPng(ra):
+"data:image/svg+xml;base64,"==ra.substring(0,26)?ra=atob(ra.substring(26)):"data:image/svg+xml;utf8,"==ra.substring(0,24)&&(ra=ra.substring(24)),null!=ra&&(""==ra.trim()?ra=null:"%"==ra.charAt(0)?ra=decodeURIComponent(ra):"<"!=ra.charAt(0)&&(ra=Graph.decompress(ra)))}catch(ya){}return ra});if("json"==urlParams.proto){var ca=!1;try{J=JSON.parse(J),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[K],"data",[J])}catch(ra){J=null}try{if(null==J)return;if("dialog"==J.action){this.showError(null!=
+J.titleKey?mxResources.get(J.titleKey):J.title,null!=J.messageKey?mxResources.get(J.messageKey):mxUtils.htmlEntities(J.message),null!=J.buttonKey?mxResources.get(J.buttonKey):J.button);null!=J.modified&&(this.editor.modified=J.modified);return}if("layout"==J.action){this.executeLayouts(this.editor.graph.createLayouts(J.layouts));return}if("prompt"==J.action){this.spinner.stop();var W=new FilenameDialog(this,J.defaultValue||"",null!=J.okKey?mxResources.get(J.okKey):J.ok,function(ra){null!=ra?F.postMessage(JSON.stringify({event:"prompt",
+value:ra,message:J}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")},null!=J.titleKey?mxResources.get(J.titleKey):J.title,null,null,null,null,function(){F.postMessage(JSON.stringify({event:"prompt-cancel",message:J}),"*")});this.showDialog(W.container,300,80,!0,!1);W.init();return}if("draft"==J.action){var ba=da(J.xml);this.spinner.stop();W=new DraftDialog(this,mxResources.get("draftFound",[J.name||this.defaultFilename]),ba,mxUtils.bind(this,function(){this.hideDialog();
+F.postMessage(JSON.stringify({event:"draft",result:"edit",message:J}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",message:J}),"*")}),J.editKey?mxResources.get(J.editKey):null,J.discardKey?mxResources.get(J.discardKey):null,J.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:J}),"*")}):null);this.showDialog(W.container,640,480,!0,!1,mxUtils.bind(this,function(ra){ra&&
+this.actions.get("exit").funct()}));try{W.init()}catch(ra){F.postMessage(JSON.stringify({event:"draft",error:ra.toString(),message:J}),"*")}return}if("template"==J.action){this.spinner.stop();var ha=1==J.enableRecent,ma=1==J.enableSearch,Y=1==J.enableCustomTemp;W=new NewDialog(this,!1,J.templatesOnly?!1:null!=J.callback,mxUtils.bind(this,function(ra,ya,Ca,Ma){ra=ra||this.emptyDiagramXml;null!=J.callback?F.postMessage(JSON.stringify({event:"template",xml:ra,blank:ra==this.emptyDiagramXml,name:ya,tempUrl:Ca,
+libs:Ma,builtIn:!0,message:J}),"*"):(c(ra,K,ra!=this.emptyDiagramXml,J.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,ha?mxUtils.bind(this,function(ra){this.remoteInvoke("getRecentDiagrams",[null],null,ra,function(){ra(null,"Network Error!")})}):null,ma?mxUtils.bind(this,function(ra,ya){this.remoteInvoke("searchDiagrams",[ra,null],null,ya,function(){ya(null,"Network Error!")})}):null,mxUtils.bind(this,function(ra,ya,Ca){F.postMessage(JSON.stringify({event:"template",
+docUrl:ra,info:ya,name:Ca}),"*")}),null,null,Y?mxUtils.bind(this,function(ra){this.remoteInvoke("getCustomTemplates",null,null,ra,function(){ra({},0)})}):null,1==J.withoutType);this.showDialog(W.container,620,460,!0,!1,mxUtils.bind(this,function(ra){null!=this.sidebar&&this.sidebar.hideTooltip();ra&&this.actions.get("exit").funct()}));W.init();return}if("textContent"==J.action){var la=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:la,message:J}),"*");return}if("status"==
+J.action){null!=J.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(J.messageKey))):null!=J.message&&this.editor.setStatus(mxUtils.htmlEntities(J.message));null!=J.modified&&(this.editor.modified=J.modified);return}if("spinner"==J.action){var Z=null!=J.messageKey?mxResources.get(J.messageKey):J.message;null==J.show||J.show?this.spinner.spin(document.body,Z):this.spinner.stop();return}if("exit"==J.action){this.actions.get("exit").funct();return}if("viewport"==J.action){null!=J.viewport&&
+(this.embedViewport=J.viewport,this.editor.graph.refresh(),this.fireEvent(new mxEventObject("embedViewportChanged")));return}if("fullscreenChanged"==J.action){W=null;try{var k=this.diagramContainer.getAttribute("data-scrollState");null!=k&&(this.diagramContainer.removeAttribute("data-scrollState"),W=JSON.parse(k))}catch(ra){}Editor.inlineFullscreen=J.value;this.fireEvent(new mxEventObject("inlineFullscreenChanged"));null!=W&&this.restoreScrollState(W);return}if("snapshot"==J.action){this.sendEmbeddedSvgExport(!0);
+return}if("export"==J.action){if("png"==J.format||"xmlpng"==J.format){if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){var A=null!=J.xml?J.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var I=this.editor.graph,T=mxUtils.bind(this,function(ra,ya){if(J.withSvg)J.withSvg=!1,this.getEmbeddedSvg(A,this.editor.graph,null,!0,function(Ma){T(ra,Ma)},null,null,J.embedImages,this.editor.graph.background,J.scale,J.border,J.shadow,
+"auto");else{this.editor.graph.setEnabled(!0);this.spinner.stop();var Ca=this.createLoadMessage("export");Ca.format=J.format;Ca.message=J;Ca.data=ra;Ca.svg=ya;Ca.xml=A;F.postMessage(JSON.stringify(Ca),"*")}}),P=mxUtils.bind(this,function(ra){null==ra&&(ra=Editor.blankImage);"xmlpng"==J.format&&(ra=Editor.writeGraphModelToPng(ra,"tEXt","mxfile",encodeURIComponent(A)));I!=this.editor.graph&&I.container.parentNode.removeChild(I.container);T(ra)}),U=J.pageId||(null!=this.pages?J.currentPage?this.currentPage.getId():
+this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var ra=I.getGlobalVariable;I=this.createTemporaryGraph(I.getStylesheet());for(var ya,Ca=0;Ca<this.pages.length;Ca++)if(this.pages[Ca].getId()==U){ya=this.updatePageRoot(this.pages[Ca]);break}null==ya&&(ya=this.currentPage);I.getGlobalVariable=function(Ra){return"page"==Ra?ya.getName():"pagenumber"==Ra?1:ra.apply(this,arguments)};document.body.appendChild(I.container);
+I.model.setRoot(ya.root)}if(null!=J.layerIds){var Ma=I.model,Ha=Ma.getChildCells(Ma.getRoot()),Aa={};for(Ca=0;Ca<J.layerIds.length;Ca++)Aa[J.layerIds[Ca]]=!0;for(Ca=0;Ca<Ha.length;Ca++)Ma.setVisible(Ha[Ca],Aa[Ha[Ca].id]||!1)}Ca=null;J.keepTheme&&(Ca=Editor.isDarkMode()?"dark":"light");this.editor.exportToCanvas(mxUtils.bind(this,function(Ra){P(Ra.toDataURL("image/png"))}),J.width,null,J.background,mxUtils.bind(this,function(){P(null)}),null,null,J.scale,J.transparent,J.shadow,null,I,J.border,null,
+J.grid,Ca)});null!=J.xml&&0<J.xml.length&&(l=!0,this.setFileData(A),l=!1);X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==J.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=J.layerIds&&0<J.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:J.layerIds})):"")+(null!=J.scale?"&scale="+J.scale:"")+"&base64=1&xml="+encodeURIComponent(A))).send(mxUtils.bind(this,function(ra){200<=ra.getStatus()&&299>=ra.getStatus()?T("data:image/png;base64,"+ra.getText()):P(null)}),
+mxUtils.bind(this,function(){P(null)}))}}else if(X=mxUtils.bind(this,function(){var ra=this.createLoadMessage("export");ra.message=J;if("html2"==J.format||"html"==J.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var ya=this.getXmlFileData();ra.xml=mxUtils.getXml(ya);ra.data=this.getFileData(null,null,!0,null,null,null,ya);ra.format=J.format}else if("html"==J.format)ya=this.editor.getGraphXml(),ra.data=this.getHtml(ya,this.editor.graph),ra.xml=mxUtils.getXml(ya),ra.format=J.format;
+else{mxSvgCanvas2D.prototype.foAltText=null;ya=null!=J.background?J.background:this.editor.graph.background;ya==mxConstants.NONE&&(ya=null);ra.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);ra.format="svg";var Ca=mxUtils.bind(this,function(Ha){this.editor.graph.setEnabled(!0);this.spinner.stop();ra.data=Editor.createSvgDataUri(Ha);F.postMessage(JSON.stringify(ra),"*")}),Ma="auto";J.keepTheme&&(Ma=Editor.isDarkMode()?"dark":"light");null!=J.theme&&(Ma=J.theme);if("xmlsvg"==J.format){if(null==
+J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin)){Ma=null;if(this.isAutoDarkMode()||Editor.isDarkMode())Ma="auto";null!=J.theme&&(Ma=J.theme);this.getEmbeddedSvg(ra.xml,this.editor.graph,null,!0,Ca,null,null,J.embedImages,ya,J.scale,J.border,J.shadow,Ma)}}else if(null==J.spin&&null==J.spinKey||this.spinner.spin(document.body,null!=J.spinKey?mxResources.get(J.spinKey):J.spin))this.editor.graph.setEnabled(!1),ya=this.editor.graph.getSvg(ya,
+J.scale,J.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||J.shadow,null,Ma),(this.editor.graph.shadowVisible||J.shadow)&&this.editor.graph.addSvgShadow(ya),this.embedFonts(ya,mxUtils.bind(this,function(Ha){J.embedImages||null==J.embedImages?this.editor.convertImages(Ha,mxUtils.bind(this,function(Aa){Ca(mxUtils.getXml(Aa))})):Ca(mxUtils.getXml(Ha))}));return}F.postMessage(JSON.stringify(ra),"*")}),null!=J.xml&&0<J.xml.length){if(this.editor.graph.mathEnabled){var aa=Editor.onMathJaxDone;
+Editor.onMathJaxDone=function(){aa.apply(this,arguments);X()}}l=!0;this.setFileData(J.xml);l=!1;this.editor.graph.mathEnabled||X()}else X();return}if("load"==J.action){ca=J.toSketch;t=1==J.autosave;this.hideDialog();null!=J.modified&&null==urlParams.modified&&(urlParams.modified=J.modified);null!=J.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=J.saveAndExit);if("1"==urlParams.saveAndExit||"1"==urlParams.publishClose)if(this.actions.get("save").shortcut=null,!this.editor.chromeless||
+this.editor.editable)this.keyHandler.bindAction(83,!0,"saveAndExit"),"1"!=urlParams.noSaveBtn&&(this.actions.get("save").shortcut=Editor.ctrlKey+"+Shift+S",this.keyHandler.bindAction(83,!0,"save",!0));null!=J.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=J.noSaveBtn);if(null!=J.rough){var ja=Editor.sketchMode;this.doSetSketchMode(J.rough);ja!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=J.dark&&this.setDarkMode(J.dark);null!=J.border&&(this.embedExportBorder=
+J.border);null!=J.theme&&(this.embedExportTheme=J.theme);null!=J.background&&(this.embedExportBackground=J.background);null!=J.viewport&&(this.embedViewport=J.viewport);this.embedExitPoint=null;if(null!=J.rect){var pa=this.embedExportBorder;this.diagramContainer.style.left=Math.max(60,J.rect.left)+"px";this.diagramContainer.style.top=Math.max(40,J.rect.top)+"px";this.minInlineWidth=J.minWidth;this.minInlineHeight=J.minHeight;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.bottom=
+"";this.diagramContainer.style.right="";var sa=J.maxFitScale,qa=J.rect.width+2*pa,wa=J.rect.height+2*pa;ea=mxUtils.bind(this,function(){var ra=mxUtils.getDocumentSize();qa=Math.min(null!=this.minInlineWidth?Math.max(this.minInlineWidth,qa):qa,ra.width-80);ra=Math.min(null!=this.minInlineHeight?Math.max(this.minInlineHeight,wa):wa,ra.height-80);this.diagramContainer.style.width=qa+"px";this.diagramContainer.style.height=ra+"px";var ya=this.editor.graph;ra=ya.maxFitScale;ya.maxFitScale=sa;ya.fit(2*
+pa,null,null,null,null,null,wa);this.setPageVisible(!1);if(null!=this.minInlineWidth&&ya.getGraphBounds().width<this.minInlineWidth){var Ca=ya.container.scrollTop;this.resetScrollbars();ya.container.scrollTop=Ca}ya.maxFitScale=ra;ya.container.scrollTop-=pa;ya.container.scrollLeft-=pa;window.setTimeout(mxUtils.bind(this,function(){this.fireEvent(new mxEventObject("editInlineStart","data",[J]));ya.container.focus();null!=this.formatWindow&&null!=this.formatWindow.window&&this.formatWindow.window.isVisible()&&
+(this.formatWindow.window.div.style.top=ya.container.style.top);var Ma=ya.getGraphBounds();ya.container.clientWidth>Ma.width+2*pa&&(ya.container.scrollLeft=Ma.x+(Ma.width+pa-ya.container.clientWidth)/2)}),10)})}null!=J.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=J.noExitBtn);null!=J.title&&null!=this.buttonContainer&&(ba=this.createStatusDiv(""),mxUtils.write(ba,J.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(ba),
+this.embedFilenameSpan=ba);try{J.libs&&this.sidebar.showEntries(J.libs)}catch(ra){}J=null!=J.xmlpng?this.extractGraphModelFromPng(J.xmlpng):null!=J.descriptor?J.descriptor:J.xml}else{if("merge"==J.action){var Ba=this.getCurrentFile();null!=Ba&&(ba=da(J.xml),null!=ba&&""!=ba&&Ba.mergeFile(new LocalFile(this,ba),function(){F.postMessage(JSON.stringify({event:"merge",message:J}),"*")},function(ra){F.postMessage(JSON.stringify({event:"merge",message:J,error:ra}),"*")}))}else"remoteInvokeReady"==J.action?
+this.handleRemoteInvokeReady(F):"remoteInvoke"==J.action?this.handleRemoteInvoke(J,K.origin):"remoteInvokeResponse"==J.action?this.handleRemoteInvokeResponse(J):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(J)}),"*");return}}catch(ra){this.handleError(ra)}}var za=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Ea=mxUtils.bind(this,function(ra,ya){l=!0;try{c(ra,
+ya,null,ca)}catch(Ca){this.handleError(Ca)}l=!1;null!=urlParams.modified&&this.editor.setStatus("");z=za();t&&null==f&&(f=mxUtils.bind(this,function(Ca,Ma){Ca=za();Ca==z||l||(Ma=this.createLoadMessage("autosave"),Ma.xml=Ca,(window.opener||window.parent).postMessage(JSON.stringify(Ma),"*"));z=Ca}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",
+f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)ya=this.createLoadMessage("load"),ya.xml=ra,F.postMessage(JSON.stringify(ya),"*");null!=ea&&ea()});null!=J&&"function"===typeof J.substring&&"data:application/vnd.visio;base64,"==
+J.substring(0,34)?(da="0M8R4KGxGuE"==J.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(J.substring(J.indexOf(",")+1)),function(ra){Ea(ra,K)},mxUtils.bind(this,function(ra){this.handleError(ra)}),da)):null!=J&&"function"===typeof J.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(J,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(J,mxUtils.bind(this,function(ra){4==ra.readyState&&(200<=ra.status&&
+299>=ra.status&&"<mxGraphModel"==ra.responseText.substring(0,13)?Ea(ra.responseText,K):this.handleError({message:413==ra.status?mxResources.get("diagramTooLarge"):mxResources.get("unknownError")}))}),""):null!=J&&"function"===typeof J.substring&&this.isLucidChartData(J)?this.convertLucidChart(J,mxUtils.bind(this,function(ra){Ea(ra)}),mxUtils.bind(this,function(ra){this.handleError(ra)})):null==J||"object"!==typeof J||null==J.format||null==J.data&&null==J.url?(J=da(J),Ea(J,K)):this.loadDescriptor(J,
+mxUtils.bind(this,function(ra){Ea(za(),K)}),mxUtils.bind(this,function(ra){this.handleError(ra,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;C="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(C,"*");if("json"==urlParams.proto){var N=this.editor.graph.openLink;this.editor.graph.openLink=function(K,J,ea){N.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:K,target:J,allowOpener:ea}),"*")}}};EditorUi.prototype.createEmbedButton=
function(c,f,l,t){var z="simple"==Editor.currentTheme||"sketch"==Editor.currentTheme||"min"==Editor.currentTheme,C=document.createElement("button");C.setAttribute("title",c+(null!=l?" ("+l+")":""));C.style.marginLeft="6px";mxUtils.write(C,c);z?(C.className=t?"gePrimaryBtn":"",C.style.marginLeft="8px",C.style.padding="6px"):C.className="geBigButton"+(t?"":" geBigStandardButton");mxEvent.addListener(C,"click",f);return C};EditorUi.prototype.addEmbedButtons=function(){var c=document.createElement("div");
-c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style["float"]="right","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
+c.style.display="inline-flex";c.style.alignItems="center";c.style.marginLeft="auto";"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme&&(c.style.marginRight="66px",c.style.order="1","atlas"==Editor.currentTheme&&(c.style.marginTop="2px"));document.createElement("button").className="geBigButton";"1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S",!0)):(c.appendChild(this.createEmbedButton(mxResources.get("save"),mxUtils.bind(this,function(){this.actions.get("save").funct(!1)}),"1"==urlParams.saveAndExit?Editor.ctrlKey+"+Shift+S":Editor.ctrlKey+"+S",!0)),"1"==urlParams.saveAndExit&&c.appendChild(this.createEmbedButton(mxResources.get("saveAndExit"),this.actions.get("saveAndExit").funct,Editor.ctrlKey+"+S")));"1"!=urlParams.noExitBtn&&c.appendChild(this.createEmbedButton("1"==urlParams.publishClose?
-mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,
-mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=new TextareaDialog(this,mxResources.get("layout"),
-c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?t.select():document.execCommand("selectAll",!1,null);
-document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),
-this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",
-l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,I=null,ca=null,da=null,ea=null,X=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",
-Y=null,la=null,Z="",k="auto",A="auto",J=!1,U=null,P=null,T=40,W=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&
-"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?X=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ca=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==Ha&&0<Aa.length&&"-"!=Aa?ea=Aa:"styles"==
-Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?I=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?J="true"==Aa:"left"==Ha&&0<Aa.length?U=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):"edgespacing"==Ha?T=parseFloat(Aa):
-"nodespacing"==Ha?W=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==N[Ea[Za].to]&&(N[Ea[Za].to]=
-{});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,sa,0,0),ca||"whiteSpace=wrap;html=1;");
-M.collapsed=J;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,J);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=X&&null!=ha){var V=ha[M.getAttribute(X)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ea&&null!=da){var ia=da[M.getAttribute(ea)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,I);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted",
-"cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=null!=la?0:qa;Ca=null!=la?0:wa;null!=U&&null!=Da.getAttribute(U)&&
-(Da.geometry.x=$a+parseFloat(Da.getAttribute(U)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?
-Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+W}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,I),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=
-Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,I);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=
-lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,I)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,I));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,I):K.createCurrentEdgeStyle();eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?
-mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,I));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,
-Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=T;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));
-pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());
-Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=W;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==
-za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=W;cb.parallelEdgeSpacing=T;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,W),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());
-Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*W;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=
-function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+mxResources.get("close"):mxResources.get("exit"),this.actions.get("exit").funct));"simple"!=Editor.currentTheme&&"sketch"!=Editor.currentTheme&&"min"!=Editor.currentTheme||null==this.buttonContainer?null!=this.menubar&&(this.toolbar.container.style.paddingLeft="6px",this.toolbar.container.appendChild(c),this.toolbar.staticElements.push(c)):(this.buttonContainer.appendChild(c),this.editor.fireEvent(new mxEventObject("statusChanged")))};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&
+(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.showCustomLayoutDialog=function(c){this.loadOrgChartLayouts(mxUtils.bind(this,function(){var f=
+new TextareaDialog(this,mxResources.get("layout"),c,mxUtils.bind(this,function(l){if(0<l.length)try{var t=JSON.parse(l);this.executeLayouts(this.editor.graph.createLayouts(t));this.customLayoutConfig=t;this.hideDialog()}catch(z){this.handleError(z)}}),null,null,null,null,mxUtils.bind(this,function(l,t){var z=mxUtils.button(mxResources.get("copy"),mxUtils.bind(this,function(){try{var C=t.value;t.value=JSON.stringify(JSON.parse(C));t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
+t.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");this.alert(mxResources.get("copiedToClipboard"));t.value=C}catch(F){this.handleError(F)}}));z.setAttribute("title","copy");z.className="geBtn";l.appendChild(z)}),!0,null,null,"https://www.drawio.com/doc/faq/apply-layouts");this.showDialog(f.container,620,460,!0,!0);f.init()}))};EditorUi.prototype.loadOrgChartLayouts=function(c){this.createTimeout(null,mxUtils.bind(this,function(f){var l=mxUtils.bind(this,function(){this.loadingOrgChart=
+!1;f.clear()&&(Graph.layoutNames.push("mxOrgChartLayout"),this.spinner.stop(),c())}),t=mxUtils.bind(this,function(z){this.loadingOrgChart=!1;f.clear()&&this.handleError(z)});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?l():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",l,null,null,null,t)},null,null,null,t)},null,null,null,t)},null,null,null,t):mxscript(window.DRAWIO_SERVER_URL+"js/orgchart.min.js",l,null,null,null,t))}),onerror)};EditorUi.prototype.importCsv=function(c,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,f)}))};EditorUi.prototype.doImportCsv=function(c,f){try{var l=c.split("\n"),t=[],z=[],C=[],F={};if(0<l.length){var N={},K=this.editor.graph,J=null,ea=null,da=null,ca=
+null,W=null,ba=null,ha=null,ma="whiteSpace=wrap;html=1;",Y=null,la=null,Z="",k="auto",A="auto",I=!1,T=null,P=null,U=40,X=40,aa=100,ja=0,pa=mxUtils.bind(this,function(){null!=f?f(ua):(K.setSelectionCells(ua),K.scrollCellToVisible(K.getSelectionCell()));null!=this.chromelessResize&&window.setTimeout(mxUtils.bind(this,function(){this.chromelessResize(!0)}),0)}),sa=K.getFreeInsertPoint(),qa=sa.x,wa=sa.y;sa=wa;var Ba=null,za="auto";la=null;for(var Ea=[],ra=null,ya=null,Ca=0;Ca<l.length&&"#"==l[Ca].charAt(0);){c=
+l[Ca].replace(/\r$/,"");for(Ca++;Ca<l.length&&"\\"==c.charAt(c.length-1)&&"#"==l[Ca].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(l[Ca].substring(1)),Ca++;if("#"!=c.charAt(1)){var Ma=c.indexOf(":");if(0<Ma){var Ha=mxUtils.trim(c.substring(1,Ma)),Aa=mxUtils.trim(c.substring(Ma+1));"label"==Ha?Ba=Graph.sanitizeHtml(Aa):"labelname"==Ha&&0<Aa.length&&"-"!=Aa?W=Aa:"labels"==Ha&&0<Aa.length&&"-"!=Aa?ha=JSON.parse(Aa):"style"==Ha?ea=Aa:"parentstyle"==Ha?ma=Aa:"unknownStyle"==Ha&&"-"!=Aa?ba=Aa:"stylename"==
+Ha&&0<Aa.length&&"-"!=Aa?ca=Aa:"styles"==Ha&&0<Aa.length&&"-"!=Aa?da=JSON.parse(Aa):"vars"==Ha&&0<Aa.length&&"-"!=Aa?J=JSON.parse(Aa):"identity"==Ha&&0<Aa.length&&"-"!=Aa?Y=Aa:"parent"==Ha&&0<Aa.length&&"-"!=Aa?la=Aa:"namespace"==Ha&&0<Aa.length&&"-"!=Aa?Z=Aa:"width"==Ha?k=Aa:"height"==Ha?A=Aa:"collapsed"==Ha&&"-"!=Aa?I="true"==Aa:"left"==Ha&&0<Aa.length?T=Aa:"top"==Ha&&0<Aa.length?P=Aa:"ignore"==Ha?ya=Aa.split(","):"connect"==Ha?Ea.push(JSON.parse(Aa)):"link"==Ha?ra=Aa:"padding"==Ha?ja=parseFloat(Aa):
+"edgespacing"==Ha?U=parseFloat(Aa):"nodespacing"==Ha?X=parseFloat(Aa):"levelspacing"==Ha?aa=parseFloat(Aa):"layout"==Ha&&(za=Aa)}}}if(null==l[Ca])throw Error(mxResources.get("invalidOrMissingFile"));var Ra=this.editor.csvToArray(l[Ca].replace(/\r$/,""));Ma=c=null;Ha=[];for(Aa=0;Aa<Ra.length;Aa++)Y==Ra[Aa]&&(c=Aa),la==Ra[Aa]&&(Ma=Aa),Ha.push(mxUtils.trim(Ra[Aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Ba&&(Ba="%"+Ha[0]+"%");if(null!=Ea)for(var Za=0;Za<Ea.length;Za++)null==
+N[Ea[Za].to]&&(N[Ea[Za].to]={});Y=[];for(Aa=Ca+1;Aa<l.length;Aa++){var La=this.editor.csvToArray(l[Aa].replace(/\r$/,""));if(null==La){var $a=40<l[Aa].length?l[Aa].substring(0,40)+"...":l[Aa];throw Error($a+" ("+Aa+"):\n"+mxResources.get("containsValidationErrors"));}0<La.length&&Y.push(La)}K.model.beginUpdate();try{for(Aa=0;Aa<Y.length;Aa++){La=Y[Aa];var Da=null,x=null!=c?Z+La[c]:null;l=!1;null!=x&&(Da=K.model.getCell(x),l=null==Da||0<=mxUtils.indexOf(t,Da));var M=new mxCell(Ba,new mxGeometry(qa,
+sa,0,0),ea||"whiteSpace=wrap;html=1;");M.collapsed=I;M.vertex=!0;M.id=x;null==Da||l||K.model.setCollapsed(Da,I);for(var Q=0;Q<La.length;Q++)K.setAttributeForCell(M,Ha[Q],La[Q]),null==Da||l||K.setAttributeForCell(Da,Ha[Q],La[Q]);if(null!=W&&null!=ha){var V=ha[M.getAttribute(W)];null!=V&&(K.labelChanged(M,V),null==Da||l||K.cellLabelChanged(Da,V))}if(null!=ca&&null!=da){var ia=da[M.getAttribute(ca)];null!=ia&&(M.style=ia)}K.setAttributeForCell(M,"placeholders","1");M.style=K.replacePlaceholders(M,M.style,
+J);null==Da||l?K.fireEvent(new mxEventObject("cellsInserted","cells",[M])):(K.model.setStyle(Da,M.style),0>mxUtils.indexOf(C,Da)&&C.push(Da),K.fireEvent(new mxEventObject("cellsInserted","cells",[Da])));l=null!=Da;Da=M;if(!l)for(Za=0;Za<Ea.length;Za++)N[Ea[Za].to][Da.getAttribute(Ea[Za].to)]=Da;null!=ra&&"link"!=ra&&(K.setLinkForCell(Da,Da.getAttribute(ra)),K.setAttributeForCell(Da,ra,null));var ka=this.editor.graph.getPreferredSizeForCell(Da);la=null!=Ma?K.model.getCell(Z+La[Ma]):null;if(Da.vertex){$a=
+null!=la?0:qa;Ca=null!=la?0:wa;null!=T&&null!=Da.getAttribute(T)&&(Da.geometry.x=$a+parseFloat(Da.getAttribute(T)));null!=P&&null!=Da.getAttribute(P)&&(Da.geometry.y=Ca+parseFloat(Da.getAttribute(P)));var oa="@"==k.charAt(0)?Da.getAttribute(k.substring(1)):null;Da.geometry.width=null!=oa&&"auto"!=oa?parseFloat(Da.getAttribute(k.substring(1))):"auto"==k||"auto"==oa?ka.width+ja:parseFloat(k);var xa="@"==A.charAt(0)?Da.getAttribute(A.substring(1)):null;Da.geometry.height=null!=xa&&"auto"!=xa&&"width"!=
+A?parseFloat(xa):"auto"==A||"auto"==xa?ka.height+ja:"width"==A?Da.geometry.width:parseFloat(A);sa+=Da.geometry.height+X}l?(null==F[x]&&(F[x]=[]),F[x].push(Da)):(t.push(Da),null!=la?(la.style=K.replacePlaceholders(la,ma,J),K.addCell(Da,la),z.push(la)):C.push(K.addCell(Da)))}for(Aa=0;Aa<z.length;Aa++)oa="@"==k.charAt(0)?z[Aa].getAttribute(k.substring(1)):null,xa="@"==A.charAt(0)?z[Aa].getAttribute(A.substring(1)):null,"auto"!=k&&"auto"!=oa||"auto"!=A&&"auto"!=xa||K.updateGroupBounds([z[Aa]],ja,!0);
+var ta=C.slice(),ua=C.slice();for(Za=0;Za<Ea.length;Za++){var Fa=Ea[Za];for(Aa=0;Aa<t.length;Aa++){Da=t[Aa];var Na=mxUtils.bind(this,function(mb,pb,db){var qb=pb.getAttribute(db.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var nb=0;nb<qb.length;nb++){var lb=N[db.to][qb[nb]];if(null==lb&&null!=ba){lb=new mxCell(qb[nb],new mxGeometry(qa,wa,0,0),ba);lb.style=K.replacePlaceholders(pb,lb.style,J);var eb=this.editor.graph.getPreferredSizeForCell(lb);lb.geometry.width=eb.width+ja;lb.geometry.height=eb.height+
+ja;N[db.to][qb[nb]]=lb;lb.vertex=!0;lb.id=qb[nb];C.push(K.addCell(lb))}if(null!=lb){eb=db.label;null!=db.fromlabel&&(eb=(pb.getAttribute(db.fromlabel)||"")+(eb||""));null!=db.sourcelabel&&(eb=K.replacePlaceholders(pb,db.sourcelabel,J)+(eb||""));null!=db.tolabel&&(eb=(eb||"")+(lb.getAttribute(db.tolabel)||""));null!=db.targetlabel&&(eb=(eb||"")+K.replacePlaceholders(lb,db.targetlabel,J));var tb="target"==db.placeholders==!db.invert?lb:mb;tb=null!=db.style?K.replacePlaceholders(tb,db.style,J):K.createCurrentEdgeStyle();
+eb=K.insertEdge(null,null,eb||"",db.invert?lb:mb,db.invert?mb:lb,tb);if(null!=db.labels)for(tb=0;tb<db.labels.length;tb++){var ob=db.labels[tb],ub=new mxCell(ob.label||tb,new mxGeometry(null!=ob.x?ob.x:0,null!=ob.y?ob.y:0,0,0),"resizable=0;html=1;");ub.vertex=!0;ub.connectable=!1;ub.geometry.relative=!0;null!=ob.placeholders&&(ub.value=K.replacePlaceholders("target"==ob.placeholders==!db.invert?lb:mb,ub.value,J));if(null!=ob.dx||null!=ob.dy)ub.geometry.offset=new mxPoint(null!=ob.dx?ob.dx:0,null!=
+ob.dy?ob.dy:0);eb.insert(ub)}if(null!=db.data)for(var Ab in db.data)K.setAttributeForCell(eb,Ab,db.data[Ab]);ua.push(eb);mxUtils.remove(db.invert?mb:lb,ta)}}}});Na(Da,Da,Fa);if(null!=F[Da.id])for(Q=0;Q<F[Da.id].length;Q++)Na(Da,F[Da.id][Q],Fa)}}if(null!=ya)for(Aa=0;Aa<t.length;Aa++)for(Da=t[Aa],Q=0;Q<ya.length;Q++)K.setAttributeForCell(Da,mxUtils.trim(ya[Q]),null);if(0<C.length){var Wa=new mxParallelEdgeLayout(K);Wa.spacing=U;Wa.checkOverlap=!0;var Xa=function(){0<Wa.spacing&&Wa.execute(K.getDefaultParent());
+for(var mb=0;mb<C.length;mb++){var pb=K.getCellGeometry(C[mb]);pb.x=Math.round(K.snap(pb.x));pb.y=Math.round(K.snap(pb.y));"auto"==k&&(pb.width=Math.round(K.snap(pb.width)));"auto"==A&&(pb.height=Math.round(K.snap(pb.height)))}};if("["==za.charAt(0)){var ab=pa;K.view.validate();this.executeLayouts(K.createLayouts(JSON.parse(za)),function(){Xa();ab()});pa=null}else if("circle"==za){var Oa=new mxCircleLayout(K);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Qa=Oa.isVertexIgnored;Oa.isVertexIgnored=function(mb){return Qa.apply(this,
+arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Oa.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("horizontaltree"==za||"verticaltree"==za||"auto"==za&&ua.length==2*C.length-1&&1==ta.length){K.view.validate();var kb=new mxCompactTreeLayout(K,"horizontaltree"==za);kb.levelDistance=X;kb.edgeRouting=!1;kb.resetEdges=!1;kb.sortEdges=!0;this.executeLayout(function(){kb.execute(K.getDefaultParent(),0<ta.length?ta[0]:null)},!0,pa);pa=null}else if("horizontalflow"==za||"verticalflow"==
+za||"auto"==za&&1==ta.length){K.view.validate();var cb=new mxHierarchicalLayout(K,"horizontalflow"==za?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);cb.intraCellSpacing=X;cb.parallelEdgeSpacing=U;cb.interRankCellSpacing=aa;cb.disableEdgeStyle=!1;this.executeLayout(function(){cb.execute(K.getDefaultParent(),ua);K.moveCells(ua,qa,wa)},!0,pa);pa=null}else if("orgchart"==za){K.view.validate();var Ya=new mxOrgChartLayout(K,2,aa,X),gb=Ya.isVertexIgnored;Ya.isVertexIgnored=function(mb){return gb.apply(this,
+arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){Ya.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}else if("organic"==za||"auto"==za&&ua.length>C.length){K.view.validate();var hb=new mxFastOrganicLayout(K);hb.forceConstant=3*X;hb.disableEdgeStyle=!1;hb.resetEdges=!1;var vb=hb.isVertexIgnored;hb.isVertexIgnored=function(mb){return vb.apply(this,arguments)||0>mxUtils.indexOf(C,mb)};this.executeLayout(function(){hb.execute(K.getDefaultParent());Xa()},!0,pa);pa=null}}this.hideDialog()}finally{K.model.endUpdate()}null!=
+pa&&pa()}}catch(mb){this.handleError(mb)}};EditorUi.prototype.getSearch=function(c){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var l="?",t;for(t in urlParams)0>mxUtils.indexOf(c,t)&&null!=urlParams[t]&&(f+=l+t+"="+urlParams[t],l="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var f=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var l="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
t;for(t in urlParams)0>mxUtils.indexOf(l,t)&&(c=0==f?c+"?":c+"&",null!=urlParams[t]&&(c+=t+"="+urlParams[t],f++))}return c};EditorUi.prototype.showLinkDialog=function(c,f,l,t,z){c=new LinkDialog(this,c,f,l,!0,t,z);this.showDialog(c.container,440,120,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;c&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),f=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var l=("1"!=urlParams.embed||"1"==urlParams.embedRT||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!l);
this.actions.get("print").setEnabled(!l);this.menus.get("exportAs").setEnabled(!l);this.menus.get("embed").setEnabled(!l);l="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(l);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(l),this.menus.get("newLibrary").setEnabled(l));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);
@@ -3979,23 +3981,23 @@ l.image&&0<l.cells.length);this.actions.get("crop").setEnabled(t&&l.image&&0<l.c
this.actions.get("createShape").setEnabled(t);this.actions.get("createRevision").setEnabled(t);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(t&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("removeFormat").setEnabled(c.isEnabled()&&!c.isSelectionEmpty()&&!c.isEditing());this.actions.get("tags").setEnabled("hidden"!=
this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.actions.get("properties").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=
this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"");c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(t&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var R=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);R.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=
-!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var I=c.getFileData(!0,null,null,null,null,!0),ca=K.getGraphBounds(),da=Math.floor(ca.width*z/K.view.scale),ea=Math.floor(ca.height*z/K.view.scale);if(I.length<=MAX_REQUEST_SIZE&&da*ea<MAX_AREA)if(c.hideDialog(),
-"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var X={globalVars:K.getExportVariables()};N&&(X.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(X))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ea+"&border="+C+"&xml="+encodeURIComponent(I))})}else"png"==l?c.exportImage(z,
+!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(c,f,l,t,z,C,F,N){var K=c.editor.graph;if("xml"==l)c.hideDialog(),c.saveData(f,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==l)c.hideDialog(),c.saveData(f,"svg",mxUtils.getXml(K.getSvg(t,z,C)),"image/svg+xml");else{var J=c.getFileData(!0,null,null,null,null,!0),ea=K.getGraphBounds(),da=Math.floor(ea.width*z/K.view.scale),ca=Math.floor(ea.height*z/K.view.scale);if(J.length<=MAX_REQUEST_SIZE&&da*ca<MAX_AREA)if(c.hideDialog(),
+"png"!=l&&"jpg"!=l&&"jpeg"!=l||!c.isExportToCanvas()){var W={globalVars:K.getExportVariables()};N&&(W.grid={size:K.gridSize,steps:K.view.gridSteps,color:K.view.gridColor});c.saveRequest(f,l,function(ba,ha){return new mxXmlRequest(EXPORT_URL,"format="+l+"&base64="+(ha||"0")+(null!=ba?"&filename="+encodeURIComponent(ba):"")+"&extras="+encodeURIComponent(JSON.stringify(W))+(0<F?"&dpi="+F:"")+"&bg="+(null!=t?t:"none")+"&w="+da+"&h="+ca+"&border="+C+"&xml="+encodeURIComponent(J))})}else"png"==l?c.exportImage(z,
null==t||"none"==t,!0,!1,!1,C,!0,!1,null,N,F):c.exportImage(z,!1,!0,!1,!1,C,!0,!1,"jpeg",N);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,f="";if(null!=this.pages)for(var l=0;l<this.pages.length;l++){var t=c;this.currentPage!=this.pages[l]&&(t=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[l]),t.model.setRoot(this.pages[l].root));f+=this.pages[l].getName()+
" "+t.getIndexableText()+" "}else f=c.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var f={},l=document.createElement("div");l.style.whiteSpace="nowrap";var t=document.createElement("h3");mxUtils.write(t,mxUtils.htmlEntities(c));t.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";l.appendChild(t);var z=document.createElement("div");z.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";
-z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(I){}this.remoteInvoke("getCustomLibraries",null,null,function(I){z.innerText="";if(0==I.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
-"</div>";else for(var ca=0;ca<I.length;ca++){var da=I[ca];C[da.id]&&(f[da.id]=da);var ea=this.addCheckbox(z,da.title,C[da.id]);(function(X,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[X.id]=X:delete f[X.id]})})(da,ea)}},mxUtils.bind(this,function(I){z.innerText="";var ca=document.createElement("div");ca.style.padding="8px";ca.style.textAlign="center";mxUtils.write(ca,mxResources.get("error")+": ");mxUtils.write(ca,null!=I&&null!=I.message?I.message:mxResources.get("unknownError"));
-z.appendChild(ca)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var I=0,ca;for(ca in f)null==C[ca]&&(I++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ea){I--;0==I&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ea,da)),this.showSidebar()}catch(X){this.handleError(X,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){I--;
-0==I&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ca]));for(ca in C)f[ca]||this.closeLibrary(new RemoteLibrary(this,null,C[ca]));0==I&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,
+z.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var C={};try{var F=mxSettings.getCustomLibraries();for(c=0;c<F.length;c++){var N=F[c];if("R"==N.substring(0,1)){var K=JSON.parse(decodeURIComponent(N.substring(1)));C[K[0]]={id:K[0],title:K[1],downloadUrl:K[2]}}}}catch(J){}this.remoteInvoke("getCustomLibraries",null,null,function(J){z.innerText="";if(0==J.length)z.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+
+"</div>";else for(var ea=0;ea<J.length;ea++){var da=J[ea];C[da.id]&&(f[da.id]=da);var ca=this.addCheckbox(z,da.title,C[da.id]);(function(W,ba){mxEvent.addListener(ba,"change",function(){this.checked?f[W.id]=W:delete f[W.id]})})(da,ca)}},mxUtils.bind(this,function(J){z.innerText="";var ea=document.createElement("div");ea.style.padding="8px";ea.style.textAlign="center";mxUtils.write(ea,mxResources.get("error")+": ");mxUtils.write(ea,null!=J&&null!=J.message?J.message:mxResources.get("unknownError"));
+z.appendChild(ea)}));l.appendChild(z);l=new CustomDialog(this,l,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var J=0,ea;for(ea in f)null==C[ea]&&(J++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ca){J--;0==J&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ca,da)),this.showSidebar()}catch(W){this.handleError(W,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){J--;
+0==J&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[ea]));for(ea in C)f[ea]||this.closeLibrary(new RemoteLibrary(this,null,C[ea]));0==J&&this.spinner.stop()}),null,null,"https://www.drawio.com/doc/faq/custom-libraries-confluence-cloud");this.showDialog(l.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,
allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var f=0;f<this.remoteInvokeQueue.length;f++)c.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var f=c.msgMarkers,l=this.remoteInvokeCallbacks[f.callbackId];if(null==
l)throw Error("No callback for "+(null!=f?f.callbackId:"null"));c.error?l.error&&l.error(c.error.errResp):l.callback&&l.callback.apply(this,c.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,f,l,t,z){var C=!0,F=window.setTimeout(mxUtils.bind(this,function(){C=!1;z({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),N=mxUtils.bind(this,function(){window.clearTimeout(F);C&&t.apply(this,arguments)}),K=mxUtils.bind(this,function(){window.clearTimeout(F);
-C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(I,ca){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ca?da.error={errResp:ca}:null!=I&&
-(da.resp=I);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(I){l(null,I||"Unkown Error")}),
-this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(I){l(null,"Invalid Call: An error occurred, "+I.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",
+C&&z.apply(this,arguments)});l=l||{};l.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:N,error:K});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:f,msgMarkers:l});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,f){var l=mxUtils.bind(this,function(J,ea){var da={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=ea?da.error={errResp:ea}:null!=J&&
+(da.resp=J);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var t=c.funtionName,z=this.remoteInvokableFns[t];if(null!=z&&"function"===typeof this[t]){if(z.allowedDomains){for(var C=!1,F=0;F<z.allowedDomains.length;F++)if(f=="https://"+z.allowedDomains[F]){C=!0;break}if(!C){l(null,"Invalid Call: "+t+" is not allowed.");return}}var N=c.functionArgs;Array.isArray(N)||(N=[]);if(z.isAsync)N.push(function(){l(Array.prototype.slice.apply(arguments))}),N.push(function(J){l(null,J||"Unkown Error")}),
+this[t].apply(this,N);else{var K=this[t].apply(this,N);l([K])}}else l(null,"Invalid Call: "+t+" is not found.")}catch(J){l(null,"Invalid Call: An error occurred, "+J.message)}};EditorUi.prototype.openDatabase=function(c,f){if(null==this.database){var l=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=l)try{var t=l.open("database",2);t.onupgradeneeded=function(z){try{var C=t.result;1>z.oldVersion&&C.createObjectStore("objects",{keyPath:"key"});2>z.oldVersion&&(C.createObjectStore("files",
{keyPath:"title"}),C.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};t.onsuccess=mxUtils.bind(this,function(z){try{var C=t.result;this.database=C;EditorUi.migrateStorageFiles&&(StorageFile.migrate(C),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var N=
-document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,I=!1,ca,da=0,ea=mxUtils.bind(this,function(){I=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),X=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ca.length)ea();else{var ma=
-ca[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):X()}),X)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],X,X,["filesInfo","files"])}catch(Y){console.log(Y)}});
-F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||I||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ca=Y.resp[0],K=!1,ba()):ea():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):X())}}catch(la){console.log(la)}});
+document.createElement("iframe");N.style.display="none";N.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(N);var K=!0,J=!1,ea,da=0,ca=mxUtils.bind(this,function(){J=!0;this.setDatabaseItem(".drawioMigrated3",!0);N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),W=mxUtils.bind(this,function(){da++;ba()}),ba=mxUtils.bind(this,function(){try{if(da>=ea.length)ca();else{var ma=
+ea[da];StorageFile.getFileContent(this,ma,mxUtils.bind(this,function(Y){null==Y||".scratchpad"==ma&&Y==this.emptyLibraryXml?N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[ma]}),"*"):W()}),W)}}catch(Y){console.log(Y)}}),ha=mxUtils.bind(this,function(ma){try{this.setDatabaseItem(null,[{title:ma.title,size:ma.data.length,lastModified:Date.now(),type:ma.isLib?"L":"F"},{title:ma.title,data:ma.data}],W,W,["filesInfo","files"])}catch(Y){console.log(Y)}});
+F=mxUtils.bind(this,function(ma){try{if(ma.source==N.contentWindow){var Y={};try{Y=JSON.parse(ma.data)}catch(la){}"init"==Y.event?(N.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),N.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=Y.event||J||(K?null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?(ea=Y.resp[0],K=!1,ba()):ca():null!=Y.resp&&0<Y.resp.length&&null!=Y.resp[0]?ha(Y.resp[0]):W())}}catch(la){console.log(la)}});
window.addEventListener("message",F)}})));c(C);C.onversionchange=function(){C.close()}}catch(F){null!=f?f(F):null!=window.console&&console.warn(F)}});t.onerror=f;t.onblocked=function(){}}catch(z){null!=f?f(z):null!=window.console&&console.error(z)}else null!=f&&f(Error("IndexedDB not supported"))}else c(this.database)};EditorUi.prototype.setDatabaseItem=function(c,f,l,t,z){this.openDatabase(mxUtils.bind(this,function(C){try{z=z||"objects";Array.isArray(z)||(z=[z],c=[c],f=[f]);var F=C.transaction(z,
"readwrite");F.oncomplete=l;F.onerror=t;for(C=0;C<z.length;C++)F.objectStore(z[C]).put(null!=c&&null!=c[C]?{key:c[C],data:f[C]}:f[C])}catch(N){null!=t&&t(N)}}),t)};EditorUi.prototype.removeDatabaseItem=function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";Array.isArray(t)||(t=[t],c=[c]);var C=z.transaction(t,"readwrite");C.oncomplete=f;C.onerror=l;for(z=0;z<t.length;z++)C.objectStore(t[z]).delete(c[z])}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItem=
function(c,f,l,t){this.openDatabase(mxUtils.bind(this,function(z){try{t=t||"objects";var C=z.transaction([t],"readonly").objectStore(t).get(c);C.onsuccess=function(){f(C.result)};C.onerror=l}catch(F){null!=l&&l(F)}}),l)};EditorUi.prototype.getDatabaseItems=function(c,f,l){this.openDatabase(mxUtils.bind(this,function(t){try{l=l||"objects";var z=t.transaction([l],"readonly").objectStore(l).openCursor(IDBKeyRange.lowerBound(0)),C=[];z.onsuccess=function(F){null==F.target.result?c(C):(C.push(F.target.result.value),
@@ -4004,31 +4006,31 @@ this.getCurrentFile();return null!=c?c.commentsRefreshNeeded():!0};EditorUi.prot
c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,f){var l=this.getCurrentFile();return null!=l?l.newComment(c,f):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,f){var l=this.getCurrentFile();null!=
l&&l.getRevisions?l.getRevisions(c,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,f,l,t,z,C,F,N){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");
return this.editor.loadUrl(c,f,l,t,z,C,F,N)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(c,f)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");
-return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,I,ca,da,ea,X,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
+return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,f,l,t,z,C,F,N,K,J,ea,da,ca,W,ba,ha)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");
return this.editor.convertImages(c,f,l,t)};EditorUi.prototype.convertImageToDataUri=function(c,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,f)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=function(c,f,l,t){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,f,l,t)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");
return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,f,l,t,z){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,f,l,t,z)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var c=[],f=0;f<localStorage.length;f++){var l=localStorage.key(f),t=localStorage.getItem(l);if(0<l.length&&(".scratchpad"==l||"."!=l.charAt(0))&&0<t.length){var z=
"<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12);t="<mxlibrary>"===t.substring(0,11);(z||t)&&c.push(l)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(c);return{title:c,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(J);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");
-A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var J=document.createElement("div");J.className="geCommentEditBtns";var U=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});U.className="geCommentEditBtn";J.appendChild(U);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",
-mxUtils.bind(this,function(T){mxEvent.isConsumed(T)||((mxEvent.isControlDown(T)||mxClient.IS_MAC&&mxEvent.isMetaDown(T))&&13==T.keyCode?(P.click(),mxEvent.consume(T)):27==T.keyCode&&(U.click(),mxEvent.consume(T)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";J.appendChild(P);ha.insertBefore(J,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));
+var CommentsWindow=function(b,e,g,m,u,p){function B(){for(var ba=F.getElementsByTagName("div"),ha=0,ma=0;ma<ba.length;ma++)"none"!=ba[ma].style.display&&ba[ma].parentNode==F&&ha++;N.style.display=0==ha?"block":"none"}function H(ba,ha,ma,Y){function la(){ha.removeChild(A);ha.removeChild(I);k.style.display="block";Z.style.display="block"}t={div:ha,comment:ba,saveCallback:ma,deleteOnCancel:Y};var Z=ha.querySelector(".geCommentTxt"),k=ha.querySelector(".geCommentActionsList"),A=document.createElement("textarea");
+A.className="geCommentEditTxtArea";A.style.minHeight=Z.offsetHeight+"px";A.value=ba.content;ha.insertBefore(A,Z);var I=document.createElement("div");I.className="geCommentEditBtns";var T=mxUtils.button(mxResources.get("cancel"),function(){Y?(ha.parentNode.removeChild(ha),B()):la();t=null});T.className="geCommentEditBtn";I.appendChild(T);var P=mxUtils.button(mxResources.get("save"),function(){Z.innerText="";ba.content=A.value;mxUtils.write(Z,ba.content);la();ma(ba);t=null});mxEvent.addListener(A,"keydown",
+mxUtils.bind(this,function(U){mxEvent.isConsumed(U)||((mxEvent.isControlDown(U)||mxClient.IS_MAC&&mxEvent.isMetaDown(U))&&13==U.keyCode?(P.click(),mxEvent.consume(U)):27==U.keyCode&&(T.click(),mxEvent.consume(U)))}));P.focus();P.className="geCommentEditBtn gePrimaryBtn";I.appendChild(P);ha.insertBefore(I,Z);k.style.display="none";Z.style.display="none";A.focus()}function S(ba,ha){ha.innerText="";ba=new Date(ba.modifiedDate);var ma=b.timeSince(ba);null==ma&&(ma=mxResources.get("lessThanAMinute"));
mxUtils.write(ha,mxResources.get("timeAgo",[ma],"{1} ago"));ha.setAttribute("title",ba.toLocaleDateString()+" "+ba.toLocaleTimeString())}function G(ba){var ha=document.createElement("img");ha.className="geCommentBusyImg";ha.src=IMAGE_PATH+"/spin.gif";ba.appendChild(ha);ba.busyImg=ha}function O(ba){ba.style.border="1px solid red";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function R(ba){ba.style.border="";ba.busyImg.parentNode==ba&&ba.removeChild(ba.busyImg)}function c(ba,ha,ma,Y,la){function Z(aa,
-ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});W.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=J;aa(ba);return{pdiv:pa,
-replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var J=
-document.createElement("div");J.className="geCommentContainer";J.setAttribute("data-commentId",ba.id);J.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var U=document.createElement("div");U.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;U.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";U.appendChild(P);var T=document.createElement("div");
-T.className="geCommentUsername";mxUtils.write(T,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(T);T=document.createElement("div");T.className="geCommentDate";T.setAttribute("data-commentId",ba.id);S(ba,T);P.appendChild(T);J.appendChild(U);U=document.createElement("div");U.className="geCommentTxt";mxUtils.write(U,ba.content||"");J.appendChild(U);ba.isLocked&&(J.style.opacity="0.5");U=document.createElement("div");U.className="geCommentActions";var W=document.createElement("ul");
-W.className="geCommentActionsList";U.appendChild(W);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,J,function(){G(J);ba.editComment(ba.content,function(){R(J)},function(ja){O(J);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),
-function(){b.confirm(mxResources.get("areYouSure"),function(){G(J);ba.deleteComment(function(aa){if(!0===aa){aa=J.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=J.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(J);J.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==
-F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(J);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=
-"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});J.appendChild(U);null!=ma?F.insertBefore(J,ma.nextSibling):F.appendChild(J);for(ma=0;null!=ba.replies&&
-ma<ba.replies.length;ma++)U=ba.replies[ma],U.isResolved=ba.isResolved,c(U,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,J,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return J}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+
+ja,pa){var sa=document.createElement("li");sa.className="geCommentAction";var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,aa);sa.appendChild(qa);mxEvent.addListener(qa,"click",function(wa){ja(wa,ba);wa.preventDefault();mxEvent.consume(wa)});X.appendChild(sa);pa&&(sa.style.display="none")}function k(){function aa(sa){ja.push(pa);if(null!=sa.replies)for(var qa=0;qa<sa.replies.length;qa++)pa=pa.nextSibling,aa(sa.replies[qa])}var ja=[],pa=I;aa(ba);return{pdiv:pa,
+replies:ja}}function A(aa,ja,pa,sa,qa){function wa(){G(ra);ba.addReply(Ea,function(ya){Ea.id=ya;ba.replies.push(Ea);R(ra);pa&&pa()},function(ya){Ba();O(ra);b.handleError(ya,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},sa,qa)}function Ba(){H(Ea,ra,function(ya){wa()},!0)}var za=k().pdiv,Ea=b.newComment(aa,b.getCurrentUser());Ea.pCommentId=ba.id;null==ba.replies&&(ba.replies=[]);var ra=c(Ea,ba.replies,za,Y+1);ja?Ba():wa()}if(la||!ba.isResolved){N.style.display="none";var I=
+document.createElement("div");I.className="geCommentContainer";I.setAttribute("data-commentId",ba.id);I.style.marginLeft=20*Y+5+"px";ba.isResolved&&(z.style.opacity="0.7");var T=document.createElement("div");T.className="geCommentHeader";var P=document.createElement("img");P.className="geCommentUserImg";P.src=null!=ba.user&&null!=ba.user.pictureUrl?ba.user.pictureUrl:Editor.userImage;T.appendChild(P);P=document.createElement("div");P.className="geCommentHeaderTxt";T.appendChild(P);var U=document.createElement("div");
+U.className="geCommentUsername";mxUtils.write(U,null!=ba.user?ba.user.displayName:mxResources.get("unknownUser"));P.appendChild(U);U=document.createElement("div");U.className="geCommentDate";U.setAttribute("data-commentId",ba.id);S(ba,U);P.appendChild(U);I.appendChild(T);T=document.createElement("div");T.className="geCommentTxt";mxUtils.write(T,ba.content||"");I.appendChild(T);ba.isLocked&&(I.style.opacity="0.5");T=document.createElement("div");T.className="geCommentActions";var X=document.createElement("ul");
+X.className="geCommentActionsList";T.appendChild(X);f||ba.isLocked||0!=Y&&!l||Z(mxResources.get("reply"),function(){A("",!0)},ba.isResolved);P=b.getCurrentUser();null==P||null==ba.user||P.id!=ba.user.id||f||ba.isLocked||(Z(mxResources.get("edit"),function(){function aa(){H(ba,I,function(){G(I);ba.editComment(ba.content,function(){R(I)},function(ja){O(I);aa();b.handleError(ja,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}aa()},ba.isResolved),Z(mxResources.get("delete"),
+function(){b.confirm(mxResources.get("areYouSure"),function(){G(I);ba.deleteComment(function(aa){if(!0===aa){aa=I.querySelector(".geCommentTxt");aa.innerText="";mxUtils.write(aa,mxResources.get("msgDeleted"));var ja=I.querySelectorAll(".geCommentAction");for(aa=0;aa<ja.length;aa++)ja[aa].parentNode.removeChild(ja[aa]);R(I);I.style.opacity="0.5"}else{ja=k(ba).replies;for(aa=0;aa<ja.length;aa++)F.removeChild(ja[aa]);for(aa=0;aa<ha.length;aa++)if(ha[aa]==ba){ha.splice(aa,1);break}N.style.display=0==
+F.getElementsByTagName("div").length?"block":"none"}},function(aa){O(I);b.handleError(aa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},ba.isResolved));f||ba.isLocked||0!=Y||Z(ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(aa){function ja(){var pa=aa.target;pa.innerText="";ba.isResolved=!ba.isResolved;mxUtils.write(pa,ba.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var sa=ba.isResolved?"none":"",qa=k(ba).replies,wa=
+"light-dark("+(ba.isResolved?"ghostWhite":"white")+", transparent)",Ba=0;Ba<qa.length;Ba++){qa[Ba].style.backgroundColor=wa;for(var za=qa[Ba].querySelectorAll(".geCommentAction"),Ea=0;Ea<za.length;Ea++)za[Ea]!=pa.parentNode&&(za[Ea].style.display=sa);da||(qa[Ba].style.display="none")}B()}ba.isResolved?A(mxResources.get("reOpened")+": ",!0,ja,!1,!0):A(mxResources.get("markedAsResolved"),!1,ja,!0)});I.appendChild(T);null!=ma?F.insertBefore(I,ma.nextSibling):F.appendChild(I);for(ma=0;null!=ba.replies&&
+ma<ba.replies.length;ma++)T=ba.replies[ma],T.isResolved=ba.isResolved,c(T,ba.replies,null,Y+1,la);null!=t&&(t.comment.id==ba.id?(la=ba.content,ba.content=t.comment.content,H(ba,I,t.saveCallback,t.deleteOnCancel),ba.content=la):null==t.comment.id&&t.comment.pCommentId==ba.id&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel)));return I}}var f=!b.canComment(),l=b.canReplyToReplies(),t=null,z=document.createElement("div");z.className="geCommentsWin";z.style.background="light-dark(whiteSmoke, "+
Editor.darkColor+")";var C=EditorUi.compactUi?"26px":"30px",F=document.createElement("div");F.className="geCommentsList";F.style.backgroundColor="light-dark(whiteSmoke, "+Editor.darkColor+")";F.style.bottom=parseInt(C)+7+"px";z.appendChild(F);var N=document.createElement("span");N.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(N,mxResources.get("noCommentsFound"));var K=document.createElement("div");K.className="geToolbarContainer geCommentsToolbar";K.style.height=
-C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var I=C.cloneNode();I.style.backgroundImage="url("+Editor.plusImage+")";I.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(I,
-"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ea.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ea,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(I)}var ca=C.cloneNode();ca.classList.add("geToggleItem");ca.style.backgroundImage="url("+Editor.checkImage+")";ca.setAttribute("title",mxResources.get("showResolved"));
-var da=!1;mxEvent.addListener(ca,"click",function(ba){(da=!da)?ca.classList.add("geActiveItem"):ca.classList.remove("geActiveItem");X();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ca);b.commentsRefreshNeeded()&&(I=C.cloneNode(),I.style.backgroundImage="url("+Editor.refreshImage+")",I.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(I,"click",function(ba){X();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(I));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=
-'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ea=[],X=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;
+C;K.style.padding="3px 4px 4px 4px";C=document.createElement("a");C.className="geToolbarButton geAdaptiveAsset geToggleItem";C.style.width="16px";C.style.height="18px";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="20px";C.style.margin="0 2px";C.style.display="inline-block";C.style.cursor="pointer";if(!f){var J=C.cloneNode();J.style.backgroundImage="url("+Editor.plusImage+")";J.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(J,
+"click",function(ba){function ha(){H(ma,Y,function(la){G(Y);b.addComment(la,function(Z){la.id=Z;ca.push(la);R(Y)},function(Z){O(Y);ha();b.handleError(Z,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var ma=b.newComment("",b.getCurrentUser()),Y=c(ma,ca,null,0);ha();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(J)}var ea=C.cloneNode();ea.classList.add("geToggleItem");ea.style.backgroundImage="url("+Editor.checkImage+")";ea.setAttribute("title",mxResources.get("showResolved"));
+var da=!1;mxEvent.addListener(ea,"click",function(ba){(da=!da)?ea.classList.add("geActiveItem"):ea.classList.remove("geActiveItem");W();ba.preventDefault();mxEvent.consume(ba)});K.appendChild(ea);b.commentsRefreshNeeded()&&(J=C.cloneNode(),J.style.backgroundImage="url("+Editor.refreshImage+")",J.setAttribute("title",mxResources.get("refresh")),mxEvent.addListener(J,"click",function(ba){W();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(J));b.commentsSaveNeeded()&&(C=C.cloneNode(),C.innerHTML=
+'<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',C.setAttribute("title",mxResources.get("save")),C.className="geButton geAdaptiveAsset",mxEvent.addListener(C,"click",function(ba){p();ba.preventDefault();mxEvent.consume(ba)}),K.appendChild(C));z.appendChild(K);var ca=[],W=mxUtils.bind(this,function(){this.hasError=!1;if(null!=t)try{t.div=t.div.cloneNode(!0);var ba=t.div.querySelector(".geCommentEditTxtArea"),ha=t.div.querySelector(".geCommentEditBtns");t.comment.content=ba.value;
ba.parentNode.removeChild(ba);ha.parentNode.removeChild(ha)}catch(ma){b.handleError(ma)}F.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";l=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(ma){function Y(la){if(null!=la){la.sort(function(k,A){return new Date(k.modifiedDate)-new Date(A.modifiedDate)});for(var Z=0;Z<la.length;Z++)Y(la[Z].replies)}}ma.sort(function(la,
-Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ea=ma;for(ma=0;ma<ea.length;ma++)Y(ea[ma].replies),c(ea[ma],ea,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
-X();this.refreshComments=X;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ea.length;Y++)ba(ea[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=
+Z){return new Date(la.modifiedDate)-new Date(Z.modifiedDate)});F.innerText="";F.appendChild(N);N.style.display="block";ca=ma;for(ma=0;ma<ca.length;ma++)Y(ca[ma].replies),c(ca[ma],ca,null,0,da);null!=t&&null==t.comment.id&&null==t.comment.pCommentId&&(F.appendChild(t.div),H(t.comment,t.div,t.saveCallback,t.deleteOnCancel))},mxUtils.bind(this,function(ma){F.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(ma&&ma.message?": "+ma.message:""));this.hasError=!0})):F.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});
+W();this.refreshComments=W;K=mxUtils.bind(this,function(){function ba(Z){var k=ma[Z.id];if(null!=k)for(S(Z,k),k=0;null!=Z.replies&&k<Z.replies.length;k++)ba(Z.replies[k])}if(this.window.isVisible()){for(var ha=F.querySelectorAll(".geCommentDate"),ma={},Y=0;Y<ha.length;Y++){var la=ha[Y];ma[la.getAttribute("data-commentId")]=la}for(Y=0;Y<ca.length;Y++)ba(ca[Y])}});setInterval(K,6E4);this.refreshCommentsTime=K;this.window=new mxWindow(mxResources.get("comments"),z,e,g,m,u,!0,!0);this.window.minimumSize=
new mxRectangle(0,0,260,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,g,m,u,p,B,H,S,G,O){var R=document.createElement("div");R.style.textAlign="center";O=null!=O?O:44;var c=document.createElement("div");c.style.padding="6px";c.style.overflow="auto";c.style.maxHeight=
O+"px";c.style.lineHeight="1.2em";mxUtils.write(c,e);R.appendChild(c);null!=G&&(c=document.createElement("div"),c.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",G),c.appendChild(e),R.appendChild(c));G=document.createElement("div");G.style.textAlign="center";G.style.whiteSpace="nowrap";var f=document.createElement("input");f.setAttribute("type","checkbox");p=mxUtils.button(p||mxResources.get("cancel"),function(){b.hideDialog();null!=m&&m(f.checked)});p.className="geBtn";
null!=H&&(p.innerHTML=H+"<br>"+p.innerHTML,p.style.paddingBottom="8px",p.style.paddingTop="8px",p.style.height="auto",p.style.width="40%");b.editor.cancelFirst&&G.appendChild(p);var l=mxUtils.button(u||mxResources.get("ok"),function(){b.hideDialog();null!=g&&g(f.checked)});G.appendChild(l);null!=B?(l.innerHTML=B+"<br>"+l.innerHTML+"<br>",l.style.paddingBottom="8px",l.style.paddingTop="8px",l.style.height="auto",l.className="geBtn",l.style.width="40%"):l.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
@@ -4109,29 +4111,29 @@ u.nextSibling,u.parentNode.removeChild(u),u=m;null!=u;){m=u.nextSibling;if(u.nod
function(G){return this.isTreeEdge(G)}))};Graph.prototype.getIncomingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(m,u){return this.getTreeEdges(m,u,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function m(Y){return t.isVertex(Y)&&p(Y)}function u(Y){var la=!1;null!=Y&&(la=
"1"==l.getCurrentCellStyle(Y).treeMoving);return la}function p(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),la="tree"==(null!=la?la.style:l.getCellStyle(Y)).containerType);return la}function B(Y){var la=!1;null!=Y&&(Y=t.getParent(Y),la=l.view.getState(Y),l.view.getState(Y),la=null!=(null!=la?la.style:l.getCellStyle(Y)).childLayout);return la}function H(Y){Y=l.view.getState(Y);if(null!=Y){var la=l.getIncomingTreeEdges(Y.cell);if(0<la.length&&(la=l.view.getState(la[0]),null!=la&&(la=
la.absolutePoints,null!=la&&0<la.length&&(la=la[la.length-1],null!=la)))){if(la.y==Y.y&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_SOUTH;if(la.y==Y.y+Y.height&&Math.abs(la.x-Y.getCenterX())<Y.width/2)return mxConstants.DIRECTION_NORTH;if(la.x>Y.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function S(Y,la){la=null!=la?la:!0;l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=l.cloneCells([k[0],Y]);l.model.setTerminal(A[0],
-l.model.getTerminal(k[0],!0),!0);var J=H(Y),U=Z.geometry;J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=U.x,A[1].geometry.y-=U.y);var P=l.view.getState(Y),T=l.view.scale;if(null!=P){var W=mxRectangle.fromRectangle(P);J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH?W.x+=(la?Y.geometry.width+10:-A[1].geometry.width-
-10)*T:W.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*T;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=J==mxConstants.DIRECTION_SOUTH||J==mxConstants.DIRECTION_NORTH,pa=U=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(J==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(W,qa)&&(k=10+Math.max(k,(Math.min(W.x+W.width,qa.x+qa.width)-Math.max(W.x,
-qa.x))/T),U=10+Math.max(U,(Math.min(W.y+W.height,qa.y+qa.height)-Math.max(W.y,qa.y))/T))}}ja?U=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),J==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*U)}}}return l.addCells(A,
-Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),J=A.geometry,U=[];l.view.currentRoot!=A&&(k[1].geometry.x-=J.x,k[1].geometry.y-=J.y);l.traverse(Y,!0,function(W,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&U.push(aa);(null==aa||ja)&&U.push(W);return null==aa||ja});var P=Y.geometry.width+40,
-T=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,T=-T):la==mxConstants.DIRECTION_WEST?(P=-P,T=0):la==mxConstants.DIRECTION_EAST&&(T=0);l.moveCells(U,P,T);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var J=l.cloneCells([k[0],Y]);l.model.setTerminal(J[0],Y,!0);
-null==l.model.getTerminal(J[0],!1)&&(l.model.setTerminal(J[0],J[1],!1),l.applyNewEdgeStyle(J[1],[J[0]],A));k=l.getOutgoingTreeEdges(Y);var U=Z.geometry;la=[];l.view.currentRoot==Z&&(U=new mxRectangle);for(var P=0;P<k.length;P++){var T=l.model.getTerminal(k[P],!1);null!=T&&la.push(T)}var W=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x-U.x+10,J[1].geometry.y+=
-J[1].geometry.height-U.y+40):A==mxConstants.DIRECTION_NORTH?(J[1].geometry.x=null==W?Y.geometry.x+(Y.geometry.width-J[1].geometry.width)/2:(W.x+W.width)/ja-aa.x+-U.x+10,J[1].geometry.y-=J[1].geometry.height+U.y+40):(J[1].geometry.x=A==mxConstants.DIRECTION_WEST?J[1].geometry.x-(J[1].geometry.width+U.x+40):J[1].geometry.x+(J[1].geometry.width-U.x+40),J[1].geometry.y=null==W?Y.geometry.y+(Y.geometry.height-J[1].geometry.height)/2:(W.y+W.height)/ja-aa.y+-U.y+10);return l.addCells(J,Z)}finally{l.model.endUpdate()}}
-function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var J=l.view.getState(l.model.getTerminal(Y[A],!1));null!=J&&(!la&&Math.min(J.x+J.width,Z.x+Z.width)>=Math.max(J.x,Z.x)||la&&Math.min(J.y+J.height,Z.y+Z.height)>=Math.max(J.y,Z.y))&&k.push(J)}k.sort(function(U,P){return la?U.x+U.width-P.x-P.width:U.y+U.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;
+l.model.getTerminal(k[0],!0),!0);var I=H(Y),T=Z.geometry;I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?A[1].geometry.x+=la?Y.geometry.width+10:-A[1].geometry.width-10:A[1].geometry.y+=la?Y.geometry.height+10:-A[1].geometry.height-10;l.view.currentRoot!=Z&&(A[1].geometry.x-=T.x,A[1].geometry.y-=T.y);var P=l.view.getState(Y),U=l.view.scale;if(null!=P){var X=mxRectangle.fromRectangle(P);I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH?X.x+=(la?Y.geometry.width+10:-A[1].geometry.width-
+10)*U:X.y+=(la?Y.geometry.height+10:-A[1].geometry.height-10)*U;var aa=l.getOutgoingTreeEdges(l.model.getTerminal(k[0],!0));if(null!=aa){for(var ja=I==mxConstants.DIRECTION_SOUTH||I==mxConstants.DIRECTION_NORTH,pa=T=k=0;pa<aa.length;pa++){var sa=l.model.getTerminal(aa[pa],!1);if(I==H(sa)){var qa=l.view.getState(sa);sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY())&&mxUtils.intersects(X,qa)&&(k=10+Math.max(k,(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,
+qa.x))/U),T=10+Math.max(T,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/U))}}ja?T=0:k=0;for(pa=0;pa<aa.length;pa++)if(sa=l.model.getTerminal(aa[pa],!1),I==H(sa)&&(qa=l.view.getState(sa),sa!=Y&&null!=qa&&(ja&&la!=qa.getCenterX()<P.getCenterX()||!ja&&la!=qa.getCenterY()<P.getCenterY()))){var wa=[];l.traverse(qa.cell,!0,function(Ba,za){var Ea=null!=za&&l.isTreeEdge(za);Ea&&wa.push(za);(null==za||Ea)&&wa.push(Ba);return null==za||Ea});l.moveCells(wa,(la?1:-1)*k,(la?1:-1)*T)}}}return l.addCells(A,
+Z)}finally{l.model.endUpdate()}}function G(Y){l.model.beginUpdate();try{var la=H(Y),Z=l.getIncomingTreeEdges(Y),k=l.cloneCells([Z[0],Y]);l.model.setTerminal(Z[0],k[1],!1);l.model.setTerminal(k[0],k[1],!0);l.model.setTerminal(k[0],Y,!1);var A=l.model.getParent(Y),I=A.geometry,T=[];l.view.currentRoot!=A&&(k[1].geometry.x-=I.x,k[1].geometry.y-=I.y);l.traverse(Y,!0,function(X,aa){var ja=null!=aa&&l.isTreeEdge(aa);ja&&T.push(aa);(null==aa||ja)&&T.push(X);return null==aa||ja});var P=Y.geometry.width+40,
+U=Y.geometry.height+40;la==mxConstants.DIRECTION_SOUTH?P=0:la==mxConstants.DIRECTION_NORTH?(P=0,U=-U):la==mxConstants.DIRECTION_WEST?(P=-P,U=0):la==mxConstants.DIRECTION_EAST&&(U=0);l.moveCells(T,P,U);return l.addCells(k,A)}finally{l.model.endUpdate()}}function O(Y,la){l.model.beginUpdate();try{var Z=l.model.getParent(Y),k=l.getIncomingTreeEdges(Y),A=H(Y);0==k.length&&(k=[l.createEdge(Z,null,"",null,null,l.createCurrentEdgeStyle())],A=la);var I=l.cloneCells([k[0],Y]);l.model.setTerminal(I[0],Y,!0);
+null==l.model.getTerminal(I[0],!1)&&(l.model.setTerminal(I[0],I[1],!1),l.applyNewEdgeStyle(I[1],[I[0]],A));k=l.getOutgoingTreeEdges(Y);var T=Z.geometry;la=[];l.view.currentRoot==Z&&(T=new mxRectangle);for(var P=0;P<k.length;P++){var U=l.model.getTerminal(k[P],!1);null!=U&&la.push(U)}var X=l.view.getBounds(la),aa=l.view.translate,ja=l.view.scale;A==mxConstants.DIRECTION_SOUTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x-T.x+10,I[1].geometry.y+=
+I[1].geometry.height-T.y+40):A==mxConstants.DIRECTION_NORTH?(I[1].geometry.x=null==X?Y.geometry.x+(Y.geometry.width-I[1].geometry.width)/2:(X.x+X.width)/ja-aa.x+-T.x+10,I[1].geometry.y-=I[1].geometry.height+T.y+40):(I[1].geometry.x=A==mxConstants.DIRECTION_WEST?I[1].geometry.x-(I[1].geometry.width+T.x+40):I[1].geometry.x+(I[1].geometry.width-T.x+40),I[1].geometry.y=null==X?Y.geometry.y+(Y.geometry.height-I[1].geometry.height)/2:(X.y+X.height)/ja-aa.y+-T.y+10);return l.addCells(I,Z)}finally{l.model.endUpdate()}}
+function R(Y,la,Z){Y=l.getOutgoingTreeEdges(Y);Z=l.view.getState(Z);var k=[];if(null!=Z&&null!=Y){for(var A=0;A<Y.length;A++){var I=l.view.getState(l.model.getTerminal(Y[A],!1));null!=I&&(!la&&Math.min(I.x+I.width,Z.x+Z.width)>=Math.max(I.x,Z.x)||la&&Math.min(I.y+I.height,Z.y+Z.height)>=Math.max(I.y,Z.y))&&k.push(I)}k.sort(function(T,P){return la?T.x+T.width-P.x-P.width:T.y+T.height-P.y-P.height})}return k}function c(Y,la){var Z=H(Y),k=la==mxConstants.DIRECTION_EAST||la==mxConstants.DIRECTION_WEST;
(Z==mxConstants.DIRECTION_EAST||Z==mxConstants.DIRECTION_WEST)==k&&Z!=la?f.actions.get("selectParent").funct():Z==la?(la=l.getOutgoingTreeEdges(Y),null!=la&&0<la.length&&l.setSelectionCell(l.model.getTerminal(la[0],!1))):(Z=l.getIncomingTreeEdges(Y),null!=Z&&0<Z.length&&(k=R(l.model.getTerminal(Z[0],!0),k,Y),Y=l.view.getState(Y),null!=Y&&(Y=mxUtils.indexOf(k,Y),0<=Y&&(Y+=la==mxConstants.DIRECTION_NORTH||la==mxConstants.DIRECTION_WEST?-1:1,0<=Y&&Y<=k.length-1&&l.setSelectionCell(k[Y].cell)))))}var f=
this,l=f.editor.graph,t=l.getModel(),z=f.menus.createPopupMenu;f.menus.createPopupMenu=function(Y,la,Z){z.apply(this,arguments);if(1==l.getSelectionCount()){la=l.getSelectionCell();var k=l.getOutgoingTreeEdges(la);Y.addSeparator();0<k.length&&(m(l.getSelectionCell())&&this.addMenuItems(Y,["selectChildren"],null,Z),this.addMenuItems(Y,["selectDescendants"],null,Z));m(l.getSelectionCell())?(Y.addSeparator(),0<l.getIncomingTreeEdges(la).length&&this.addMenuItems(Y,["selectSiblings","selectParent"],null,
Z)):0<l.model.getEdgeCount(la)&&this.addMenuItems(Y,["selectConnections"],null,Z)}};f.actions.addAction("selectChildren",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell();Y=mxEvent.isControlDown(Y)?null:l.getOutgoingTreeEdges(la);if(null!=Y&&0<Y.length){la=[];for(var Z=0;Z<Y.length;Z++)la.push(l.model.getTerminal(Y[Z],!1));l.setSelectionCells(la)}else l.setSelectionCells(l.model.getChildren(la))}},null,null,"Alt+Shift+C");f.actions.addAction("selectDescendants",function(Y){var la=
-l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var J=null!=A&&l.isTreeEdge(A);J&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||J)&&Z.push(k);return null==A||J});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),
+l.getSelectionCell();if(l.isEnabled()&&null!=la){var Z=[];mxEvent.isControlDown(Y)||l.traverse(la,!0,function(k,A){var I=null!=A&&l.isTreeEdge(A);I&&mxEvent.isControlDown(Y)&&Z.push(A);(null==A||I)&&Z.push(k);return null==A||I});if(0==Z.length||1==Z.length&&Z[0]==la)Z=l.model.getDescendants(la);l.setSelectionCells(Z)}},null,null,"Alt+Shift+X");f.actions.addAction("selectParent",function(Y){var la=l.getSelectionCell();l.isEnabled()&&null!=la&&(Y=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la),
null!=Y&&0<Y.length?l.setSelectionCell(l.model.getTerminal(Y[0],!0)):l.selectParentCell())},null,null,"Alt+Shift+P");f.actions.addAction("selectSiblings",function(Y){if(l.isEnabled()&&1==l.getSelectionCount()){var la=l.getSelectionCell(),Z=mxEvent.isControlDown(Y)?null:l.getIncomingTreeEdges(la);Y=[];if(null!=Z&&0<Z.length&&(Z=l.getOutgoingTreeEdges(l.model.getTerminal(Z[0],!0)),null!=Z))for(var k=0;k<Z.length;k++)Y.push(l.model.getTerminal(Z[k],!1));0==Y.length&&(Y=l.model.getChildren(l.model.getParent(la)));
-l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var J=[];l.traverse(A,!0,function(U,P){var T=null!=P&&l.isTreeEdge(P);T&&J.push(P);(null==P||T)&&J.push(U);return null==P||T});0<J.length&&(Z=Z.concat(J),A=l.getIncomingTreeEdges(Y[k]),
-Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var J=l.getIncomingTreeEdges(A.cell);for(A=0;A<J.length;A++)mxUtils.remove(J[A],Y)}}this.model.beginUpdate();try{var U=F.call(this,
-Y,la);if(U.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(U[k]);J=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<J.length){var T=this.cloneCell(J[0]);this.addEdge(T,l.getDefaultParent(),this.model.getTerminal(J[0],!0),U[k])}}}finally{this.model.endUpdate()}return U};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,J,U){for(var P=null,T=[],W=0;W<Y.length;W++)(u(Y[W])||m(Y[W]))&&!B(Y[W])&&this.isCellCollapsed(Y[W])?T=T.concat(this.getSubtree(Y[W])):T.push(Y[W]);Y=
-mxUtils.removeDuplicates(T);this.model.beginUpdate();try{T=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(W=0;W<Y.length;W++)if(m(Y[W])||l.model.isEdge(Y[W])&&null==l.model.getTerminal(Y[W],!0)){A=l.model.getParent(Y[W]);break}if(null!=T&&A!=T&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(T);null!=sa&&(la=(sa.getCenterX()-
-pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(W=0;W<P.length;W++)if(this.model.isEdge(P[W]))m(T)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[W],!0))&&this.model.setTerminal(P[W],T,!0);else if(m(Y[W])&&(ja=l.getIncomingTreeEdges(Y[W]),0<ja.length))if(!k)m(T)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],T,!0);else if(0==l.getIncomingTreeEdges(P[W]).length){aa=
-T;if(null==aa||aa==l.model.getParent(Y[W]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[W])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,J=null;A.beginUpdate();try{if(J=K.apply(this,arguments),m(Y))for(var U=0;U<J.length;U++)if(A.isEdge(J[U])&&null==A.getTerminal(J[U],!0)){A.setTerminal(J[U],Y,!0);var P=l.getCellGeometry(J[U]);P.points=null;
-null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return J}}var I={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ca={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?I[Y.keyCode]:mxEvent.isAltDown(Y)?
-ca[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):
-38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ea=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,J,U){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var T=H(Y),W=T==mxConstants.DIRECTION_EAST||T==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==
-mxConstants.DIRECTION_WEST;return T==la||0==P.length?O(Y,la):W==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ea.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var X=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){X.apply(this,
+l.setSelectionCells(Y)}},null,null,"Alt+Shift+S");var C=l.removeCells;l.removeCells=function(Y,la){la=null!=la?la:!0;null==Y&&(Y=this.getDeletableCells(this.getSelectionCells()));la&&(Y=this.getDeletableCells(this.addAllEdges(Y)));for(var Z=[],k=0;k<Y.length;k++){var A=Y[k];t.isEdge(A)&&p(A)&&(Z.push(A),A=t.getTerminal(A,!1));if(m(A)){var I=[];l.traverse(A,!0,function(T,P){var U=null!=P&&l.isTreeEdge(P);U&&I.push(P);(null==P||U)&&I.push(T);return null==P||U});0<I.length&&(Z=Z.concat(I),A=l.getIncomingTreeEdges(Y[k]),
+Y=Y.concat(A))}else null!=A&&Z.push(Y[k])}Y=Z;return C.apply(this,arguments)};f.hoverIcons.getStateAt=function(Y,la,Z){return m(Y.cell)?null:this.graph.view.getState(this.graph.getCellAt(la,Z))};var F=l.duplicateCells;l.duplicateCells=function(Y,la){Y=null!=Y?Y:this.getSelectionCells();for(var Z=Y.slice(0),k=0;k<Z.length;k++){var A=l.view.getState(Z[k]);if(null!=A&&m(A.cell)){var I=l.getIncomingTreeEdges(A.cell);for(A=0;A<I.length;A++)mxUtils.remove(I[A],Y)}}this.model.beginUpdate();try{var T=F.call(this,
+Y,la);if(T.length==Y.length)for(k=0;k<Y.length;k++)if(m(Y[k])){var P=l.getIncomingTreeEdges(T[k]);I=l.getIncomingTreeEdges(Y[k]);if(0==P.length&&0<I.length){var U=this.cloneCell(I[0]);this.addEdge(U,l.getDefaultParent(),this.model.getTerminal(I[0],!0),T[k])}}}finally{this.model.endUpdate()}return T};var N=l.moveCells;l.moveCells=function(Y,la,Z,k,A,I,T){for(var P=null,U=[],X=0;X<Y.length;X++)(u(Y[X])||m(Y[X]))&&!B(Y[X])&&this.isCellCollapsed(Y[X])?U=U.concat(this.getSubtree(Y[X])):U.push(Y[X]);Y=
+mxUtils.removeDuplicates(U);this.model.beginUpdate();try{U=A;var aa=this.getCurrentCellStyle(A);if(null!=Y&&m(A)&&"1"==mxUtils.getValue(aa,"treeFolding","0")){for(X=0;X<Y.length;X++)if(m(Y[X])||l.model.isEdge(Y[X])&&null==l.model.getTerminal(Y[X],!0)){A=l.model.getParent(Y[X]);break}if(null!=U&&A!=U&&null!=this.view.getState(Y[0])){var ja=l.getIncomingTreeEdges(Y[0]);if(0<ja.length){var pa=l.view.getState(l.model.getTerminal(ja[0],!0));if(null!=pa){var sa=l.view.getState(U);null!=sa&&(la=(sa.getCenterX()-
+pa.getCenterX())/l.view.scale,Z=(sa.getCenterY()-pa.getCenterY())/l.view.scale)}}}}P=N.apply(this,arguments);if(null!=P&&null!=Y&&P.length==Y.length)for(X=0;X<P.length;X++)if(this.model.isEdge(P[X]))m(U)&&0>mxUtils.indexOf(P,this.model.getTerminal(P[X],!0))&&this.model.setTerminal(P[X],U,!0);else if(m(Y[X])&&(ja=l.getIncomingTreeEdges(Y[X]),0<ja.length))if(!k)m(U)&&0>mxUtils.indexOf(Y,this.model.getTerminal(ja[0],!0))&&this.model.setTerminal(ja[0],U,!0);else if(0==l.getIncomingTreeEdges(P[X]).length){aa=
+U;if(null==aa||aa==l.model.getParent(Y[X]))aa=l.model.getTerminal(ja[0],!0);k=this.cloneCell(ja[0]);this.addEdge(k,l.getDefaultParent(),aa,P[X])}}finally{this.model.endUpdate()}return P};if(null!=f.sidebar){var K=f.sidebar.dropAndConnect;f.sidebar.dropAndConnect=function(Y,la,Z,k){var A=l.model,I=null;A.beginUpdate();try{if(I=K.apply(this,arguments),m(Y))for(var T=0;T<I.length;T++)if(A.isEdge(I[T])&&null==A.getTerminal(I[T],!0)){A.setTerminal(I[T],Y,!0);var P=l.getCellGeometry(I[T]);P.points=null;
+null!=P.getTerminalPoint(!0)&&P.setTerminalPoint(null,!0)}}finally{A.endUpdate()}return I}}var J={67:f.actions.get("selectChildren"),88:f.actions.get("selectDescendants"),80:f.actions.get("selectParent"),83:f.actions.get("selectSiblings")},ea={67:f.actions.get("copyStyle"),86:f.actions.get("pasteStyle")},da=f.onKeyDown;f.onKeyDown=function(Y){try{var la=l.getSelectionCell();if(l.isEnabled()&&!l.isEditing()&&null!=la){var Z=mxEvent.isAltDown(Y)&&mxEvent.isShiftDown(Y)?J[Y.keyCode]:mxEvent.isAltDown(Y)?
+ea[Y.keyCode]:null;null!=Z?(Z.funct(Y),mxEvent.consume(Y)):m(la)&&(Z=null,0<l.getIncomingTreeEdges(la).length&&(9==Y.which?Z=mxEvent.isShiftDown(Y)?G(la):O(la):13==Y.which&&(Z=S(la,!mxEvent.isShiftDown(Y)))),null!=Z&&0<Z.length?(1==Z.length&&l.model.isEdge(Z[0])?l.setSelectionCell(l.model.getTerminal(Z[0],!1)):l.setSelectionCell(Z[Z.length-1]),null!=f.hoverIcons&&f.hoverIcons.update(l.view.getState(la)),l.startEditingAtCell(la),mxEvent.consume(Y)):37==Y.keyCode?(c(la,mxConstants.DIRECTION_WEST),mxEvent.consume(Y)):
+38==Y.keyCode?(c(la,mxConstants.DIRECTION_NORTH),mxEvent.consume(Y)):39==Y.keyCode?(c(la,mxConstants.DIRECTION_EAST),mxEvent.consume(Y)):40==Y.keyCode&&(c(la,mxConstants.DIRECTION_SOUTH),mxEvent.consume(Y)))}}catch(k){f.handleError(k)}mxEvent.isConsumed(Y)||da.apply(this,arguments)};var ca=l.connectVertex;l.connectVertex=function(Y,la,Z,k,A,I,T){var P=l.getIncomingTreeEdges(Y);if(m(Y)){var U=H(Y),X=U==mxConstants.DIRECTION_EAST||U==mxConstants.DIRECTION_WEST,aa=la==mxConstants.DIRECTION_EAST||la==
+mxConstants.DIRECTION_WEST;return U==la||0==P.length?O(Y,la):X==aa?G(Y):S(Y,la!=mxConstants.DIRECTION_NORTH&&la!=mxConstants.DIRECTION_WEST)}return ca.apply(this,arguments)};l.getSubtree=function(Y){var la=[Y];!u(Y)&&!m(Y)||B(Y)||l.traverse(Y,!0,function(Z,k){var A=null!=k&&l.isTreeEdge(k);A&&0>mxUtils.indexOf(la,k)&&la.push(k);(null==k||A)&&0>mxUtils.indexOf(la,Z)&&la.push(Z);return null==k||A});return la};var W=mxVertexHandler.prototype.refresh;mxVertexHandler.prototype.refresh=function(){W.apply(this,
arguments);(u(this.state.cell)||m(this.state.cell))&&!B(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&!this.graph.isCellCollapsed(this.state.cell)?null==this.moveHandle&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),
this.redrawMoveHandle(),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(Y){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(Y),mxEvent.getClientY(Y),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(Y);this.graph.isMouseDown=!0;f.hoverIcons.reset();mxEvent.consume(Y)}))):null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)};var ba=mxVertexHandler.prototype.redrawHandles;
mxVertexHandler.prototype.redrawHandles=function(){ba.apply(this,arguments);this.redrawMoveHandle()};mxVertexHandler.prototype.redrawMoveHandle=function(){null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ha=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(Y){ha.apply(this,arguments);null!=
@@ -4170,24 +4172,24 @@ var G=Menus.prototype.init;Menus.prototype.init=function(){G.apply(this,argument
620,420,!0,!1);t.init()}));var f="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),l=function(t,z,C,F){t.addItem(C,null,mxUtils.bind(this,function(){var N=new CreateGraphDialog(c,C,F);c.showDialog(N.container,620,420,!0,!1);N.init()}),z)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(t,z){for(var C=0;C<f.length;C++)"-"==f[C]?t.addSeparator(z):l(t,z,mxResources.get(f[C])+"...",f[C])})))};EditorUi.prototype.installFormatToolbar=function(c){var f=
this.editor.graph,l=document.createElement("div");l.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";f.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,z){0<f.getSelectionCount()?(c.appendChild(l),l.innerHTML="Selected: "+f.getSelectionCount()):null!=l.parentNode&&l.parentNode.removeChild(l)}))};var O=!1;EditorUi.prototype.initFormatWindow=
function(){if(!O&&null!=this.formatWindow){O=!0;var c=this.formatWindow.window.toggleMinimized,f=240;this.formatWindow.window.toggleMinimized=function(){c.apply(this,arguments);this.minimized?(f=parseInt(this.div.style.width),this.div.style.width="140px",this.table.style.width="140px",this.div.style.left=parseInt(this.div.style.left)+f-140+"px"):(this.div.style.width=f+"px",this.table.style.width=this.div.style.width,this.div.style.left=Math.max(0,parseInt(this.div.style.left)-f+140)+"px");this.fit()};
-mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ca.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),I);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=
+mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(l){mxEvent.getSource(l)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var R=EditorUi.prototype.init;EditorUi.prototype.init=function(){function c(ja,pa,sa){var qa=F.menus.get(ja),wa=ea.addMenu(mxResources.get(ja),mxUtils.bind(this,function(){wa.classList.contains("mxDisabled")||qa.funct.apply(this,arguments)}),J);wa.className="geMenuItem";wa.style.display="inline-block";wa.style.boxSizing=
"border-box";wa.style.top="6px";wa.style.marginRight="6px";wa.style.height="30px";wa.style.paddingTop="6px";wa.style.paddingBottom="6px";wa.style.cursor="pointer";wa.setAttribute("title",mxResources.get(ja));F.menus.menuCreated(qa,wa,"geMenuItem");null!=sa?(wa.style.backgroundImage="url("+sa+")",wa.style.backgroundPosition="center center",wa.style.backgroundRepeat="no-repeat",wa.style.backgroundSize="24px 24px",wa.style.width="34px",wa.innerText=""):pa||(wa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+
")",wa.style.backgroundPosition="right 6px center",wa.style.backgroundRepeat="no-repeat",wa.style.paddingRight="22px");return wa}function f(ja,pa,sa,qa,wa,Ba){var za=document.createElement("a");za.className="geMenuItem";za.style.display="inline-block";za.style.boxSizing="border-box";za.style.height="30px";za.style.padding="6px";za.style.position="relative";za.style.verticalAlign="top";za.style.top="0px";null!=F.statusContainer?K.insertBefore(za,F.statusContainer):K.appendChild(za);null!=Ba?(za.style.backgroundImage=
"url("+Ba+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.width="34px"):mxUtils.write(za,ja);mxEvent.addListener(za,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(Ea){Ea.preventDefault()}));mxEvent.addListener(za,"click",function(Ea){"disabled"!=za.getAttribute("disabled")&&pa(Ea);mxEvent.consume(Ea)});null==sa&&(za.style.marginRight="4px");null!=qa&&za.setAttribute("title",qa);null!=wa&&(ja=
function(){wa.isEnabled()?(za.removeAttribute("disabled"),za.style.cursor="pointer"):(za.setAttribute("disabled","disabled"),za.style.cursor="default")},wa.addListener("stateChanged",ja),N.addListener("enabledChanged",ja),ja());return za}function l(ja,pa,sa){sa=document.createElement("div");sa.className="geMenuItem";sa.style.display="inline-block";sa.style.verticalAlign="top";sa.style.marginRight="6px";sa.style.padding="0 4px 0 4px";sa.style.height="30px";sa.style.position="relative";sa.style.top=
-"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}I=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
-ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?X:null);l([pa,f(mxResources.get("delete"),
-F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([U,P],60),520<=m&&l([T,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?
+"0px";for(var qa=0;qa<ja.length;qa++)null!=ja[qa]&&(ja[qa].style.margin="0px",ja[qa].style.boxShadow="none",sa.appendChild(ja[qa]));null!=pa&&mxUtils.setOpacity(sa,pa);null!=F.statusContainer?K.insertBefore(sa,F.statusContainer):K.appendChild(sa);return sa}function t(){for(var ja=K.firstChild;null!=ja;){var pa=ja.nextSibling;"geMenuItem"!=ja.className&&"geItem"!=ja.className||ja.parentNode.removeChild(ja);ja=pa}J=K.firstChild;m=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;
+ja=1E3>m;var sa=null;ja||(sa=c("diagram"));pa=ja?c("diagram",null,Editor.menuImage):null;null!=pa&&(sa=pa);l([sa,f(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ja?Editor.shapesImage:null),f(mxResources.get("format"),F.actions.get("format").funct,null,mxResources.get("format")+" ("+F.actions.get("format").shortcut+")",F.actions.get("image"),ja?Editor.formatImage:null)],ja?60:null);pa=c("insert",!0,ja?W:null);l([pa,f(mxResources.get("delete"),
+F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ja?Editor.trashImage:null)],ja?60:null);N.isEnabled()||pa.classList.add("mxDisabled");411<=m&&(l([T,P],60),520<=m&&l([U,640<=m?f("",la.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",la,Editor.zoomInImage):null,640<=m?f("",Z.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Z,Editor.zoomOutImage):null],60))}R.apply(this,arguments);var z=mxUtils.isAncestorNode(document.body,this.container)?
this.container:this.editor.graph.container;null!=z&&(z.classList.add("geSimple"),z.classList.add("geMinimal"));z=Editor.enableCustomLibraries&&("1"!=urlParams.embed||"1"==urlParams.libraries);var C=document.createElement("div");C.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";C.style.bottom=z?"32px":"0px";this.sidebar=this.createSidebar(C);if(1E3<=m||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])g(this,!0),null!=this.sidebar&&
-null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var I=null,ca=new Menubar(F,K);F.statusContainer=F.createStatusContainer();
-F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ea=F.descriptorChanged;F.descriptorChanged=function(){ea.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==
+null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));EditorUi.windowed&&1E3<=m&&(b(this,!0),this.formatWindow.window.setVisible(!0));var F=this,N=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var K=document.createElement("div");K.className="geMenubarContainer";var J=null,ea=new Menubar(F,K);F.statusContainer=F.createStatusContainer();
+F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.cursor="default";var da=F.hideCurrentMenu;F.hideCurrentMenu=function(){da.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var ca=F.descriptorChanged;F.descriptorChanged=function(){ca.apply(this,arguments);var ja=F.getCurrentFile();if(null!=ja&&null!=ja.getTitle()){var pa=ja.getMode();"google"==pa?pa="googleDrive":"github"==pa?pa="gitHub":"gitlab"==pa?pa="gitLab":"onedrive"==
pa&&(pa="oneDrive");pa=mxResources.get(pa);K.setAttribute("title",ja.getTitle()+(null!=pa?" ("+pa+")":""))}else K.removeAttribute("title")};F.setStatusText(F.editor.getStatus());K.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="display:flex;justify-content:flex-end;padding-right:10px;gap:6px;white-space:nowrap;background-color:inherit;align-items:center;min-width:0;margin-left:auto;";K.appendChild(F.buttonContainer);F.menubarContainer=
-F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var X=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;
+F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className="geTabContainer geTabItem";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;visibility:hidden;";z=F.diagramContainer.parentNode;C=document.createElement("div");C.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="47px";var W=Editor.addBoxImage;if(null!=F.hoverIcons){var ba=F.hoverIcons.update;
F.hoverIcons.update=function(){N.freehand.isDrawing()||ba.apply(this,arguments)}}if(null!=N.freehand){var ha=N.freehand.createStyle;N.freehand.createStyle=function(ja){return ha.apply(this,arguments)+"sketch=0;"}}F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));F.setStatusText(F.editor.getStatus());var ma=F.menus.get("viewZoom");if(null!=ma){var Y=function(ja){if(mxEvent.isAltDown(ja))F.hideCurrentMenu(),F.actions.get("customZoom").funct(),
-mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),J=F.actions.get("redo"),U=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",J.funct,null,mxResources.get("redo")+" ("+J.shortcut+")",J,Editor.redoImage),T=f("",Y,!0,mxResources.get("fit")+
-" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var W=ca.addMenu("100%",ma.funct);W.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");W.className="geTabItem";W.style.height=F.tabContainerHeight+"px";W.style.position="absolute";W.style.display="0"!=urlParams.pages?"flex":"none";W.style.alignItems="center";W.style.justifyContent=
-"center";W.style.paddingRight="11px";W.style.whiteSpace="nowrap";W.style.overflow="hidden";W.style.fontSize="11px";W.style.width="51px";W.style.right="0px";W.style.bottom="0px";W.style.boxSizing="content-box";W.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";W.style.backgroundPosition="right 6px top 15px";W.style.backgroundRepeat="no-repeat";W.style.backgroundSize="10px";W.style.zIndex="1";C.appendChild(W);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,
-function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(W);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(W.style.visibility=this.tabContainer.style.visibility,
+mxEvent.consume(ja);else if("geMenuItem"==mxEvent.getSource(ja).className||mxEvent.isShiftDown(ja))F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ja)},la=F.actions.get("zoomIn"),Z=F.actions.get("zoomOut"),k=F.actions.get("resetView"),A=F.actions.get("undo"),I=F.actions.get("redo"),T=f("",A.funct,null,mxResources.get("undo")+" ("+A.shortcut+")",A,Editor.undoImage),P=f("",I.funct,null,mxResources.get("redo")+" ("+I.shortcut+")",I,Editor.redoImage),U=f("",Y,!0,mxResources.get("fit")+
+" ("+Editor.ctrlKey+"+H)",k,Editor.zoomFitImage);K.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";var X=ea.addMenu("100%",ma.funct);X.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");X.className="geTabItem";X.style.height=F.tabContainerHeight+"px";X.style.position="absolute";X.style.display="0"!=urlParams.pages?"flex":"none";X.style.alignItems="center";X.style.justifyContent=
+"center";X.style.paddingRight="11px";X.style.whiteSpace="nowrap";X.style.overflow="hidden";X.style.fontSize="11px";X.style.width="51px";X.style.right="0px";X.style.bottom="0px";X.style.boxSizing="content-box";X.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";X.style.backgroundPosition="right 6px top 15px";X.style.backgroundRepeat="no-repeat";X.style.backgroundSize="10px";X.style.zIndex="1";C.appendChild(X);(function(ja){mxEvent.addListener(ja,"click",Y);var pa=mxUtils.bind(this,
+function(sa,qa,wa){ja.innerText="";mxUtils.write(ja,Math.round(100*F.editor.graph.view.scale*(null!=wa?wa:1))+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,pa);F.editor.addListener("resetGraphView",pa);F.editor.addListener("pageSelected",pa);F.editor.graph.addListener("zoomPreview",mxUtils.bind(this,function(sa,qa){pa(sa,qa,qa.getProperty("factor"))}))})(X);var aa=F.setGraphEnabled;F.setGraphEnabled=function(){aa.apply(this,arguments);null!=this.tabContainer&&(X.style.visibility=this.tabContainer.style.visibility,
this.diagramContainer.style.bottom="0"!=urlParams.pages&&"hidden"!=this.tabContainer.style.visibility?this.tabContainerHeight+"px":"0px")}}C.appendChild(K);C.appendChild(F.diagramContainer);z.appendChild(C);F.updateTabContainer();!EditorUi.windowed&&1E3<=m&&b(this,!0);C.appendChild(F.tabContainer);t();F.addListener("lockedChanged",t);mxEvent.addListener(window,"resize",function(){t();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&
F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.chatWindow&&F.menus.chatWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()})}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,g,m,u,p,B){this.file=b;this.id=e;this.content=g;this.modifiedDate=m;this.createdDate=u;this.isResolved=p;this.user=B;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,g,m,u){e()};DrawioComment.prototype.editComment=function(b,e,g){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,g,m,u){this.id=b;this.email=e;this.displayName=g;this.pictureUrl=m;this.locale=u};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naccounts=Accounts\naction=Action\nactualSize=Actual Size\nadaptiveColors=Adaptive Colors\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddToScratchpad=Add to Scratchpad\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nsmartTemplate=Smart Template\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\nanimations=Animations\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\nappearance=Appearance\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\naskMeAnything=Ask me anything\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramLanguage=Diagram Language\ndiagramType=Diagram type\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndisabled=Disabled\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborate=Collaborate\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateBlankDiagram=Create Blank Diagram\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteAll=Delete all\ndeleteColumn=Delete column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndescribeYourDiagram=Describe your diagram\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexplore=Explore\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowAnimation=Flow Animation\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatWebp=WebP\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhighContrast=High Contrast\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nimproveContrast=Improve Contrast\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://www.drawio.com/doc/faq/license-drawio-confluence-jira-cloud">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlight=Light\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlanguageCode=Language Code\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlocked=Locked\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodern=Modern\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nmyDrive=My Drive\nmyFiles=My Files\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageTabs=Page Tabs\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\npresentationMode=Presentation Mode\nprint=Print\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nprocessForHiringNewEmployee=Process for hiring a new employee\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nrequirementDiagram=Requirement Diagram\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save As\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectedPage=Selected Page\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nsequenceDiagram=Sequence Diagram\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nsettings=Settings\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsaveItToGoogleDriveToCollaborate=You\'ll need to save "{1}" to Google Drive before you can collaborate.\nsaveToGoogleDrive=Save to Google Drive\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click or drag and drop shapes. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsmoothing=Smoothing\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstateDiagram=State Diagram\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswap=Swap\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunassigned=Unassigned\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nunknownUser=Unknown user\nupdateExistingDrawing=Update existing drawing\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseBlackAndWhite=Use black and white\nuseCurrentSettings=Use current settings\nuseOffline=Use Offline\nuserDefined=User-defined\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwhere=Where\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\ncopyAsText=Copy as Text\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfFileTooBigErr=File size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration.\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\nconfAHugeInstances=Very Large Instances\nconfAHugeInstancesDesc=If this instance includes 100,000+ pages, it is faster to request the current instance pages list from Atlassian. Please contact our support for more details.\nchoosePageIDsFile=Choose current page IDs csv file\nchooseDrawioPsgesFile=Choose pages with draw.io diagrams csv file\nprivate=Private\ndiagramTooLarge=The diagram is too large, please reduce its size and try again.\nselectAdminUsers=Select Admin Users\nxyzTeam={1} Team\naddTeamTitle=Adding a new draw.io Team\naddTeamInst1=To create a new draw.io Team, you need to create a new Atlassian group with "drawio-" prefix (e.g, a group named "drawio-marketing").\naddTeamInst2=Then, configure which team member can edit/add configuration, templates, and libraries from this page.\ndrawioTeams=draw.io Teams\nmembers=Members\nadminEditors=Admins/Editors\nallowAll=Allow all\nnoTeams=No teams found\nerrorLoadingTeams=Error Loading Teams\nnoTeamMembers=No team members found\nerrLoadTMembers=Error loading team members\nerrCreateTeamPage=Error creating team "{1}" page in "draw.io Configuration" space, please check you have the required permissions.\ngotoConfigPage=Please create the space from draw.io "Configuration" page.\nnoAdminsSelected=No admins/editors selected\nerrCreateConfigFile=Error creating "configuration.json" file, please check you have the required permissions.\nerrSetPageRestr=Error setting page restrictions\nnotAdmin4Team=You are not an admin for this team\nconfigUpdated=Configuration updated, restart the editor if you want to work with last configuration.\noutOfDateRevisionAlert=You are editing a historical revision of the diagram, please review the revision and open it to replace the latest version. Or close and overwrite/merge later.\nconfAErrFaqs=There are {1} error(s), the following instructions may help fixing most of the cases. (Please download the log for future references)\nconfA403ErrFaq=There are ({1}) 403 error(s). The current users must have add (write) permissions on all pages and attachments. Even admins sometimes are not allowed to write to some pages via page restrictions\nconfA404ErrFaq=There are ({1}) 404 error(s). The attachment/page is not found. This is due to improper migration or the diagram file (an attachment of the page) is deleted.\nconfA500ErrFaq=There are ({1}) 500 error(s). An internal server error in Confluence Cloud. Such errors are due to overloading the server and usually fixed by retrying the process.\nconfAOtherErrFaq=There are ({1}) other error(s). Please check the error description. If the description is not clear, please contact our support.\nconfAReplaceBaseUrl=Replace Base URL in diagram links when no page ID mapping is found\ndrawSvgPrev=draw.io SVG preview\ngoogleFonts=Google Fonts\ndiagDupl=Duplicate Diagram Detected\ndiagDuplMsg=This diagram is used in multiple places, which can result in unexpected results when edited. We\'ve created an independent copy. Please open the editor again.\ndiagDuplNoEditMsg=This diagram is used in multiple places. Please edit it within its own page.\nconfCloudMigConfirm=Warning: This process will edit many pages and diagrams, so it is recommended to stop the Synchrony service during the process. Do you want to proceed?\nconfCloudMigNotice=In the Cloud instance, please add linkAdjustments to draw.io configuration as follows {1}. Without this configuration, links in diagrams pointing to Confluence pages will not work.\nconfALogsPageDesc=This page contains logs of draw.io long running services as attachments\nconfEditOnlyInPageEditor=Can only be edited within Confluence page editor\nconfEvalWarn=Evaluation License - Not for production use\notherUsersEditing=Other user(s) are editing this diagram\nfirstTimeGD=First time to access this file?\ndrawioGDAppNotInstalled=draw.io Google Drive app is not installed, please install it first\nConfDC415Error=Saving drafts is blocked. If you have "Attachment Checker for Confluence" app, please update to the latest version.\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
@@ -4231,23 +4233,23 @@ GraphViewer.prototype.showLayers=function(b,e){var g=this.graphConfig.layers;g=n
H<B;H++)S=b.getChildAt(b.root,H),b.setVisible(S,p[S.id]||!1)}else for(H=0;H<B;H++)b.setVisible(b.getChildAt(b.root,H),e.isVisible(e.getChildAt(e.root,H)))}finally{b.endUpdate()}p=!0}return p};
GraphViewer.prototype.addToolbar=function(){var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.display="flex";e.style.alignItems="center";e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";e.style.whiteSpace="nowrap";e.style.textAlign="left";e.style.zIndex=
this.toolbarZIndex;e.style.backgroundColor="light-dark(#eeeeee, "+GraphViewer.darkBackgroundColor+")";e.style.height=this.toolbarHeight+"px";var g=mxUtils.bind(this,function(){this.isDarkMode()?(e.classList.add("geDarkMode"),e.style.colorScheme="dark"):(e.classList.remove("geDarkMode"),e.style.colorScheme="light")});this.addListener("darkModeChanged",g);this.toolbar=e;g();if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");
-mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ea||200)}),B=mxUtils.bind(this,function(ea){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display=
-"";mxUtils.setOpacity(e,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ea){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ea){B(100);mxEvent.consume(ea)}));mxEvent.addListener(e,"mouseleave",
-mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,X){this.startX=X.getGraphX();this.startY=X.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ea,X){},mouseUp:function(ea,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<
-S&&Math.abs(this.startX-X.getGraphX())<S&&Math.abs(this.startY-X.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ea,X,ba,ha){ea=this.createToolbarButton(ea,X,ba,ha);e.appendChild(ea);G++;return ea}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=
+mxUtils.setOpacity(e,30);var m=null,u=null,p=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,0);m=null;u=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";u=null}),100)}),ca||200)}),B=mxUtils.bind(this,function(ca){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);e.style.display=
+"";mxUtils.setOpacity(e,ca||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||(B(30),p())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":"mousemove",function(ca){mxEvent.consume(ca)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(ca){B(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(ca){B(100);mxEvent.consume(ca)}));mxEvent.addListener(e,"mouseleave",
+mxUtils.bind(this,function(ca){mxEvent.isTouchEvent(ca)||B(30)}));var H=this.graph,S=H.getTolerance();H.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ca,W){this.startX=W.getGraphX();this.startY=W.getGraphY();this.scrollLeft=H.container.scrollLeft;this.scrollTop=H.container.scrollTop},mouseMove:function(ca,W){},mouseUp:function(ca,W){mxEvent.isTouchEvent(W.getEvent())&&Math.abs(this.scrollLeft-H.container.scrollLeft)<S&&Math.abs(this.scrollTop-H.container.scrollTop)<
+S&&Math.abs(this.startX-W.getGraphX())<S&&Math.abs(this.startY-W.getGraphY())<S&&(0<parseFloat(e.style.opacity||0)?p():B(30))}})}g=this.toolbarItems;for(var G=0,O=mxUtils.bind(this,function(ca,W,ba,ha){ca=this.createToolbarButton(ca,W,ba,ha);e.appendChild(ca);G++;return ca}),R=this.graph.getModel(),c=null,f=null,l=null,t=null,z=0;z<g.length;z++){var C=g[z];if("pages"==C){t=b.ownerDocument.createElement("div");t.style.display="inline-flex";t.style.position="relative";t.style.alignItems="center";t.style.padding=
"4px";t.style.fontFamily=GraphViewer.cssFontFamily;t.style.fontSize="12px";t.style.cursor="default";t.style.color="light-dark(#000000, #ffffff)";mxUtils.setOpacity(t,70);var F=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");F.style.borderRightStyle="none";F.style.paddingLeft="0px";F.style.paddingRight="0px";e.appendChild(t);var N=O(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,
mxResources.get("nextPage")||"Next Page");N.style.paddingLeft="0px";N.style.paddingRight="0px";C=mxUtils.bind(this,function(){t.innerText="";mxUtils.write(t,this.currentPage+1+" / "+this.diagrams.length);t.style.display=1<this.diagrams.length?"inline-flex":"none";F.style.display=t.style.display;N.style.display=t.style.display});this.addListener("graphChanged",C);C()}else if("zoom"==C)this.zoomEnabled&&(O(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||
-"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ea){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,
+"Zoom Out"),O(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),O(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==C){if(this.layersEnabled){var K=O(mxUtils.bind(this,function(ca){if(null!=c)c.parentNode.removeChild(c),c=null;else{c=this.graph.createLayersDialog(mxUtils.bind(this,
function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ba=this.graph.getGraphBounds(),ha=this.graph.view;0>ba.x||0>ba.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale}):null!=this.graph.originalViewState&&0<ba.x/ha.scale+this.graph.originalViewState.translate.x-ha.translate.x&&0<ba.y/ha.scale+this.graph.originalViewState.translate.y-ha.translate.y&&(ha.setTranslate(this.graph.originalViewState.translate.x,
-this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ea=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=
-this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var X=mxUtils.getDocumentScrollOrigin(document);c.style.left=X.x+ea.left-1+"px";c.style.top=X.y+ea.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":
-"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var I=O(mxUtils.bind(this,function(ea){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,
-f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ea=I.getBoundingClientRect();var X=mxUtils.getDocumentScrollOrigin(document);
-l.style.left=X.x+ea.left-1+"px";l.style.top=X.y+ea.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));I.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,
-function(){try{this.showLightbox()}catch(ea){alert(ea.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",
-g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ca=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?
-"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ea=b.getBoundingClientRect(),X=mxUtils.getScrollOrigin(document.body);X="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-X.x,top:-X.y};ea={left:ea.left-X.left,top:ea.top-X.top,bottom:ea.bottom-X.top,right:ea.right-X.left};e.style.left=ea.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ea.bottom-1+"px":"inline"!=
-this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ea.top+1+"px"):e.style.top=ea.top+"px";"1px solid transparent"==ca&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ca});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=
+this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:ha.translate.clone(),scale:ha.scale})}}));mxEvent.addListener(c,"mouseleave",function(){c.parentNode.removeChild(c);c=null});ca=K.getBoundingClientRect();c.style.width="140px";c.style.padding="2px 0px 2px 0px";c.style.border="1px solid #d0d0d0";c.style.backgroundColor="#eee";c.style.fontFamily=GraphViewer.cssFontFamily;c.style.fontSize="11px";c.style.overflowY="auto";c.style.maxHeight=
+this.graph.container.clientHeight-this.toolbarHeight-10+"px";c.style.zIndex=this.toolbarZIndex+1;c.style.color="#000";mxUtils.setOpacity(c,85);var W=mxUtils.getDocumentScrollOrigin(document);c.style.left=W.x+ca.left-1+"px";c.style.top=W.y+ca.bottom-2+"px";this.isDarkMode()&&(c.style.filter="invert(93%) hue-rotate(180deg)");document.body.appendChild(c)}}),Editor.layersImage,mxResources.get("layers")||"Layers");R.addListener(mxEvent.CHANGE,function(){K.style.display=1<R.getChildCount(R.root)?"inline-flex":
+"none"});K.style.display=1<R.getChildCount(R.root)?"inline-flex":"none"}}else if("tags"==C){if(this.tagsEnabled){var J=O(mxUtils.bind(this,function(ca){null==f&&(f=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),f.div.getElementsByTagName("div")[0].style.position="",f.div.style.maxHeight="160px",f.div.style.maxWidth="120px",f.div.style.padding="2px",f.div.style.overflow="auto",f.div.style.height="auto",f.div.style.position="fixed",f.div.style.fontFamily=GraphViewer.cssFontFamily,
+f.div.style.fontSize="11px",f.div.style.backgroundColor="#eee",f.div.style.color="#000",f.div.style.border="1px solid #d0d0d0",f.div.style.zIndex=this.toolbarZIndex+1,this.isDarkMode()&&(f.div.style.filter="invert(93%) hue-rotate(180deg)"),mxUtils.setOpacity(f.div,85));if(null!=l)l.parentNode.removeChild(l),l=null;else{l=f.div;l.style.position="absolute";mxEvent.addListener(l,"mouseleave",function(){null!=l&&(l.parentNode.removeChild(l),l=null)});ca=J.getBoundingClientRect();var W=mxUtils.getDocumentScrollOrigin(document);
+l.style.left=W.x+ca.left-1+"px";l.style.top=W.y+ca.bottom-2+"px";document.body.appendChild(l);f.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");R.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none";null!=l&&0==this.graph.getAllTags().length&&(l.parentNode.removeChild(l),l=null)}));J.style.display=0<this.graph.getAllTags().length?"inline-flex":"none"}}else"lightbox"==C?this.lightboxEnabled&&O(mxUtils.bind(this,
+function(){try{this.showLightbox()}catch(ca){alert(ca.message)}}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&(C=this.graphConfig["toolbar-buttons"][C],null!=C&&(C.elem=O(null==C.enabled||C.enabled?C.handler:function(){},C.image,C.title,C.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*G);null!=this.graphConfig.title&&(g=b.ownerDocument.createElement("div"),g.style.display="inline-flex",
+g.style.position="relative",g.style.alignItems="center",g.style.padding="6px",g.style.fontFamily=GraphViewer.cssFontFamily,g.style.fontSize="12px",g.style.cursor="default",g.style.color="light-dark(#000000, #ffffff)",g.setAttribute("title",this.graphConfig.titleTooltip||this.graphConfig.title),mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),e.appendChild(g),this.filename=g);this.minToolbarWidth=34*G;var ea=b.style.border,da=mxUtils.bind(this,function(){e.style.width="inline"==this.graphConfig["toolbar-position"]?
+"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";e.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ca=b.getBoundingClientRect(),W=mxUtils.getScrollOrigin(document.body);W="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-W.x,top:-W.y};ca={left:ca.left-W.left,top:ca.top-W.top,bottom:ca.bottom-W.top,right:ca.right-W.left};e.style.left=ca.left+"px";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=ca.bottom-1+"px":"inline"!=
+this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=ca.top+1+"px"):e.style.top=ca.top+"px";"1px solid transparent"==ea&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var ba=mxUtils.bind(this,function(){null!=e.parentNode&&e.parentNode.removeChild(e);null!=l&&(l.parentNode.removeChild(l),l=null);null!=c&&(c.parentNode.removeChild(c),c=null);b.style.border=ea});mxEvent.addListener(document,"mousemove",function(ha){for(ha=mxEvent.getSource(ha);null!=
ha;){if(ha==b||ha==e||ha==c||ha==l)return;ha=ha.parentNode}ba()});mxEvent.addListener(document.body,"mouseleave",function(ha){ba()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",da):da();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=e.parentNode&&da()})).observe(b)};
GraphViewer.prototype.createToolbarButton=function(b,e,g,m){var u=document.createElement("div");u.style.borderRight="1px solid #d0d0d0";u.style.display="inline-flex";u.style.alignItems="center";u.style.padding="6px";mxEvent.addListener(u,"click",b);null!=g&&u.setAttribute("title",g);b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",e);b.style.width="18px";b.className="geAdaptiveAsset";null==m||m?(mxEvent.addListener(u,"mouseenter",function(){u.style.backgroundColor=
"light-dark(#dddddd,#333333)"}),mxEvent.addListener(u,"mouseleave",function(){u.style.backgroundColor="transparent"}),mxUtils.setOpacity(b,60),u.style.cursor="pointer"):mxUtils.setOpacity(u,30);u.appendChild(b);return u};
@@ -4279,7 +4281,7 @@ GraphViewer.getCss=function(){return[".geDarkMode img {\n\tfilter: invert(1);\n}
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,g){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var m=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;m.open("GET",b);m.onload=function(){e(null!=m.getText?m.getText():m.responseText)};m.onerror=g;m.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeObserver=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(g){return window.setTimeout(g,20)},e=function(g,m){function u(){this.q=[];this.add=function(t){this.q.push(t)};var f,l;this.call=function(){f=0;for(l=this.q.length;f<l;f++)this.q[f].call()}}function p(f,l){return f.currentStyle?f.currentStyle[l]:window.getComputedStyle?window.getComputedStyle(f,null).getPropertyValue(l):f.style[l]}function B(f,l){if(!f.resizedAttached)f.resizedAttached=
new u,f.resizedAttached.add(l);else if(f.resizedAttached){f.resizedAttached.add(l);return}f.resizeSensor=document.createElement("div");f.resizeSensor.className="resize-sensor";f.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";f.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var I,ca,da,ea;l=function(){if((da=f.offsetWidth)!=I||(ea=f.offsetHeight)!=ca)N=!0,I=da,ca=ea;F()};var X=function(ba,
-ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};X(t,"scroll",l);X(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===
+f.appendChild(f.resizeSensor);"static"==p(f,"position")&&(f.style.position="relative");var t=f.resizeSensor.childNodes[0],z=t.childNodes[0],C=f.resizeSensor.childNodes[1],F=function(){z.style.width="100000px";z.style.height="100000px";t.scrollLeft=1E5;t.scrollTop=1E5;C.scrollLeft=1E5;C.scrollTop=1E5};F();var N=!1,K=function(){f.resizedAttached&&(N&&(f.resizedAttached.call(),N=!1),b(K))};b(K);var J,ea,da,ca;l=function(){if((da=f.offsetWidth)!=J||(ca=f.offsetHeight)!=ea)N=!0,J=da,ea=ca;F()};var W=function(ba,
+ha,ma){ba.attachEvent?ba.attachEvent("on"+ha,ma):ba.addEventListener(ha,ma)};W(t,"scroll",l);W(C,"scroll",l)}var H=function(){GraphViewer.resizeSensorEnabled&&m()};if(GraphViewer.useResizeObserver&&"undefined"!==typeof ResizeObserver){var S=null,G=!1;(new ResizeObserver(function(){G||(null!=S&&window.clearTimeout(S),S=window.setTimeout(function(){G=!0;H();S=null;G=!1},200))})).observe(g)}else{var O=Object.prototype.toString.call(g),R="[object Array]"===O||"[object NodeList]"===O||"[object HTMLCollection]"===
O||"undefined"!==typeof jQuery&&g instanceof jQuery||"undefined"!==typeof Elements&&g instanceof Elements;if(R){O=0;for(var c=g.length;O<c;O++)B(g[O],H)}else B(g,H);this.detach=function(){if(R)for(var f=0,l=g.length;f<l;f++)e.detach(g[f]);else e.detach(g)}}};e.detach=function(g){g.resizeSensor&&(g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached)};window.ResizeSensor=e})();
(function(){Editor.initMath();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 44a7dcbc1..e11d1e209 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"1048a7c368b56f257962aa4a4ee3b41d"},{url:"js/extensions.min.js",revision:"e51d47ff2e4145099305d6e282337166"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"72461550c97b806c59914f8b8abd2fd0"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"5324b1040e93e7e271c98060c2ef3993"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"c3215554d29cc3f5df885cab999563c3"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"e8411c6155dd6e4cc118a8d439cf4e50"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"781ebdd3dda1d88c31eb00da02f872ef"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"73927d303703a329ff06d681553e993d"},{url:"resources/dia_am.txt",revision:"8d60c82458b57bb9ccc7b0c4f6ed3f79"},{url:"resources/dia_ar.txt",revision:"e278657437cf14eeedbb3b641d3ba8c0"},{url:"resources/dia_bg.txt",revision:"61c2ef14ee768be21fcb22b1928f7cac"},{url:"resources/dia_bn.txt",revision:"45e3683c1150ad2e139f42fedaf9e7aa"},{url:"resources/dia_bs.txt",revision:"ed33364ad4282d0e29775ca2e2f351e0"},{url:"resources/dia_ca.txt",revision:"101dbe73020d8471a5208da4d8ae247e"},{url:"resources/dia_cs.txt",revision:"ba2fd4196222285218549625600a530f"},{url:"resources/dia_da.txt",revision:"b3eb739977ead9876a8afe0103ad7e36"},{url:"resources/dia_de.txt",revision:"fd7945d51201ff95e51d082750c67c39"},{url:"resources/dia_el.txt",revision:"faa7d843ef32aba9b9f11e367ca362d5"},{url:"resources/dia_eo.txt",revision:"619ff072153d5897b7184ee0fe925f18"},{url:"resources/dia_es.txt",revision:"1feb3c63ee76afc71ebec607c8a9347a"},{url:"resources/dia_et.txt",revision:"67482775f1ff0d1b2cb31f6226c519d3"},{url:"resources/dia_eu.txt",revision:"a7dce4832af9f1d0b4e5f5bf189ef328"},{url:"resources/dia_fa.txt",revision:"743a891d016470e8e0a3651be32fb3c5"},{url:"resources/dia_fi.txt",revision:"771de2b3741f25b4114e51c93ce1a866"},{url:"resources/dia_fil.txt",revision:"637b4984bb64580b4ef61e28ef7ca664"},{url:"resources/dia_fr.txt",revision:"ad7e62eb41228b929489d9427d206e82"},{url:"resources/dia_gl.txt",revision:"a89e3f7e7cb3b6867d3e74eb949894dd"},{url:"resources/dia_gu.txt",revision:"769be61a373049c5d3b358201f1acb65"},{url:"resources/dia_he.txt",revision:"238e53f20884ef57b1a9c06bd800b9ef"},{url:"resources/dia_hi.txt",revision:"755e1872b614c9a5b27c5459062c8320"},{url:"resources/dia_hr.txt",revision:"adf6788e96b0e3f0029cbae30a4faefb"},{url:"resources/dia_hu.txt",revision:"c645a78fdda2843acd6aa9d9bf60a6e8"},{url:"resources/dia_id.txt",revision:"9da16676fc1b33c61b4a025a352dc916"},{url:"resources/dia_it.txt",revision:"57b0f8eb2319f99f96b79507966f4e6f"},{url:"resources/dia_ja.txt",revision:"b4b10c93e53b13dbd3e407532813b9e0"},{url:"resources/dia_kn.txt",revision:"7cbbba0381a1a6cdeade3bc28ac01962"},{url:"resources/dia_ko.txt",revision:"943b020ff0430e9f81fe3e1875423b7d"},{url:"resources/dia_lt.txt",revision:"94aff34cd118d39d79abacf2a16aea7d"},{url:"resources/dia_lv.txt",revision:"325ed2d9ffa2ddc493d9ed10d46007ad"},{url:"resources/dia_ml.txt",revision:"fc666763d3fbff227411defda23b1942"},{url:"resources/dia_mr.txt",revision:"e8746ae5b0123155bdd837ae7f01b5f5"},{url:"resources/dia_ms.txt",revision:"e1600b30e6517d4dc4a7002ce675c641"},{url:"resources/dia_my.txt",revision:"4acfe58eb8f47895f188af8bfd33659c"},{url:"resources/dia_nl.txt",revision:"e9512982f5d9e89015435ee50d577bbc"},{url:"resources/dia_no.txt",revision:"6f0812d787ab931475343320d2547158"},{url:"resources/dia_pl.txt",revision:"3c7d08a5fefc693e6b6b4521a3c0a6cc"},{url:"resources/dia_pt-br.txt",revision:"5d7431a638a268dfedd3bc7f463e17d6"},{url:"resources/dia_pt.txt",revision:"981210fd60e7fd0831fcd6d26ca26f74"},{url:"resources/dia_ro.txt",revision:"1d77510ecd2b1b1c26640dfe77e00f48"},{url:"resources/dia_ru.txt",revision:"4c2d2f96df120afc4c3b3c58d0bc6ebc"},{url:"resources/dia_si.txt",revision:"2db82ba649f3ab7d578a73b247b06c4f"},{url:"resources/dia_sk.txt",revision:"4b9033183a2c90ccf0f75136fd7b14b0"},{url:"resources/dia_sl.txt",revision:"c27148e1c9480a35642162595480ff1f"},{url:"resources/dia_sr.txt",revision:"ef3562ada2e69e5d33609d58a677b6db"},{url:"resources/dia_sv.txt",revision:"7357682c42f6d47729b6b1784aaa5e9b"},{url:"resources/dia_sw.txt",revision:"377dd914bd645c2348e342bf55306439"},{url:"resources/dia_ta.txt",revision:"00ce65e244e159a2dcb93b9829a2e603"},{url:"resources/dia_te.txt",revision:"8aaca1c42eb1c027a77138f0fccc85c7"},{url:"resources/dia_th.txt",revision:"c2be3eae6995b41ba466651629c69143"},{url:"resources/dia_tr.txt",revision:"9571764eb899cc108c6fb2631d694ca3"},{url:"resources/dia_uk.txt",revision:"76e4f285ac8c648d3b3fbc6ab59aad17"},{url:"resources/dia_vi.txt",revision:"ced105b1a1ea57902c88fdd36ab041c0"},{url:"resources/dia_zh-tw.txt",revision:"ce0a47eca469dbb93e8c4f26aba7ea73"},{url:"resources/dia_zh.txt",revision:"a69a22b12a4ced3f62285b2521355755"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",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",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){let e,i={};const r=(r,a)=>(r=new URL(r+".js",a).href,i[r]||new Promise((i=>{if("document"in self){const e=document.createElement("script");e.src=r,e.onload=i,document.head.appendChild(e)}else e=r,importScripts(r),i()})).then((()=>{let e=i[r];if(!e)throw new Error(`Module ${r} didn’t register its module`);return e})));self.define=(a,c)=>{const s=e||("document"in self?document.currentScript.src:"")||location.href;if(i[s])return;let d={};const o=e=>r(e,s),f={module:{uri:s},exports:d,require:o};i[s]=Promise.all(a.map((e=>f[e]||o(e)))).then((e=>(c(...e),d)))}}define(["./workbox-72a83b64"],(function(e){"use strict";self.skipWaiting(),e.precacheAndRoute([{url:"js/app.min.js",revision:"b2b7e40d452b5707a1a9d984a0a0542b"},{url:"js/extensions.min.js",revision:"b7348adb16856a4c46cf5d37f1925fe1"},{url:"js/orgchart.min.js",revision:"619d8c4dab47b81868916df31f55478b"},{url:"js/stencils.min.js",revision:"f760278d924467fb1d2289448c73fe27"},{url:"js/shapes-14-6-5.min.js",revision:"71913a30c93bc9aff182a3a2b3da1a21"},{url:"js/math-print.js",revision:"cf64f6a493a8cb5079f2b70813e478d7"},{url:"index.html",revision:"57fe6012597666439de3e76c9bb681c1"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"shortcuts.svg",revision:"2381dd779ce6cfee954042a7f784c7e6"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"1c4b010eb053bfb9aed1caee8a3d3689"},{url:"styles/atlas.css",revision:"05873c4bba51f571b1da549a967ea06c"},{url:"styles/dark.css",revision:"99dc5495d36d5ebaddababefde083c8c"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"4695f3bb1fac6fb6f049d44b78a14e63"},{url:"connect/jira/editor-1-3-3.html",revision:"41dc8af9576b47f359cff19fff7a41c2"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"4836f5e4308abe57830e441518364f23"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"abed474e47c0c41a5ad2366b4828f77a"},{url:"connect/jira/viewerPanel.js",revision:"75f816c208d0c621e3066a97ff0ee6cf"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"c41221a9a51ff293f05ed13c7b142e5c"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"d3269625ce04b7a277b779ff175957d0"},{url:"connect/jira/fullscreen-viewer.js",revision:"8eceb2fe587296dd11f9c8f6eae34c20"},{url:"plugins/connectJira.js",revision:"c4cb6b60234b04b2c8bc09e555746615"},{url:"plugins/cConf-comments.js",revision:"8af574bd1ae86be37b83b094a5011a4f"},{url:"plugins/cConf-1-4-8.js",revision:"5324b1040e93e7e271c98060c2ef3993"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"261a7494161cee976ecfb110ac7571d2"},{url:"connect/new_common/cac.js",revision:"740dce44cf53499f476ee8edc37d09a0"},{url:"connect/gdrive_common/gac.js",revision:"3bb38a5d9186a896ed04808e921ef888"},{url:"connect/onedrive_common/ac.js",revision:"5fb6ff1a73f54a9086b7a7e1f613b8ed"},{url:"connect/confluence/viewer-init.js",revision:"b82e366bf57ecced9435c2a8ba9cb9b9"},{url:"connect/confluence/viewer.js",revision:"6542434cf3df5c60163e2767678f1bfc"},{url:"connect/confluence/viewer-1-4-42.html",revision:"69c1bca25fd4889bf832e8441c972268"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"4ad77ae3f08c19eddac932b2fa8c7068"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"30ff609b31d4a8c38da6c28e555947ea"},{url:"connect/confluence/includeDiagram.html",revision:"9613fec05b19ddef081ca6e9d8b057bf"},{url:"connect/confluence/macro-editor.js",revision:"03a8dcfc69612b44b6e75e6926a956fc"},{url:"math/es5/startup.js",revision:"dc7130cdc866593293dbb5dde11ceb40"},{url:"math/es5/core.js",revision:"f71bc0bfb7d2ac8261747f97a5d47dd4"},{url:"math/es5/ui/safe.js",revision:"8c1fcfee7c879588ad409edcdd9cce53"},{url:"math/es5/output/svg.js",revision:"4f55967d16197ebb01b86356d8ab179a"},{url:"math/es5/input/tex.js",revision:"5c4f470da2ccb1acf85041fcecd6fff6"},{url:"math/es5/input/asciimath.js",revision:"c2d4076dd8e26d509bfe3a378e71cfa7"},{url:"math/es5/output/svg/fonts/tex.js",revision:"6eab785a3788ea805bd2b552d1f0aab8"},{url:"resources/dia.txt",revision:"73927d303703a329ff06d681553e993d"},{url:"resources/dia_am.txt",revision:"8d60c82458b57bb9ccc7b0c4f6ed3f79"},{url:"resources/dia_ar.txt",revision:"e278657437cf14eeedbb3b641d3ba8c0"},{url:"resources/dia_bg.txt",revision:"61c2ef14ee768be21fcb22b1928f7cac"},{url:"resources/dia_bn.txt",revision:"45e3683c1150ad2e139f42fedaf9e7aa"},{url:"resources/dia_bs.txt",revision:"ed33364ad4282d0e29775ca2e2f351e0"},{url:"resources/dia_ca.txt",revision:"101dbe73020d8471a5208da4d8ae247e"},{url:"resources/dia_cs.txt",revision:"ba2fd4196222285218549625600a530f"},{url:"resources/dia_da.txt",revision:"b3eb739977ead9876a8afe0103ad7e36"},{url:"resources/dia_de.txt",revision:"fd7945d51201ff95e51d082750c67c39"},{url:"resources/dia_el.txt",revision:"faa7d843ef32aba9b9f11e367ca362d5"},{url:"resources/dia_eo.txt",revision:"619ff072153d5897b7184ee0fe925f18"},{url:"resources/dia_es.txt",revision:"1feb3c63ee76afc71ebec607c8a9347a"},{url:"resources/dia_et.txt",revision:"67482775f1ff0d1b2cb31f6226c519d3"},{url:"resources/dia_eu.txt",revision:"a7dce4832af9f1d0b4e5f5bf189ef328"},{url:"resources/dia_fa.txt",revision:"743a891d016470e8e0a3651be32fb3c5"},{url:"resources/dia_fi.txt",revision:"771de2b3741f25b4114e51c93ce1a866"},{url:"resources/dia_fil.txt",revision:"637b4984bb64580b4ef61e28ef7ca664"},{url:"resources/dia_fr.txt",revision:"ad7e62eb41228b929489d9427d206e82"},{url:"resources/dia_gl.txt",revision:"a89e3f7e7cb3b6867d3e74eb949894dd"},{url:"resources/dia_gu.txt",revision:"769be61a373049c5d3b358201f1acb65"},{url:"resources/dia_he.txt",revision:"238e53f20884ef57b1a9c06bd800b9ef"},{url:"resources/dia_hi.txt",revision:"755e1872b614c9a5b27c5459062c8320"},{url:"resources/dia_hr.txt",revision:"adf6788e96b0e3f0029cbae30a4faefb"},{url:"resources/dia_hu.txt",revision:"c645a78fdda2843acd6aa9d9bf60a6e8"},{url:"resources/dia_id.txt",revision:"9da16676fc1b33c61b4a025a352dc916"},{url:"resources/dia_it.txt",revision:"57b0f8eb2319f99f96b79507966f4e6f"},{url:"resources/dia_ja.txt",revision:"b4b10c93e53b13dbd3e407532813b9e0"},{url:"resources/dia_kn.txt",revision:"7cbbba0381a1a6cdeade3bc28ac01962"},{url:"resources/dia_ko.txt",revision:"943b020ff0430e9f81fe3e1875423b7d"},{url:"resources/dia_lt.txt",revision:"94aff34cd118d39d79abacf2a16aea7d"},{url:"resources/dia_lv.txt",revision:"325ed2d9ffa2ddc493d9ed10d46007ad"},{url:"resources/dia_ml.txt",revision:"fc666763d3fbff227411defda23b1942"},{url:"resources/dia_mr.txt",revision:"e8746ae5b0123155bdd837ae7f01b5f5"},{url:"resources/dia_ms.txt",revision:"e1600b30e6517d4dc4a7002ce675c641"},{url:"resources/dia_my.txt",revision:"4acfe58eb8f47895f188af8bfd33659c"},{url:"resources/dia_nl.txt",revision:"e9512982f5d9e89015435ee50d577bbc"},{url:"resources/dia_no.txt",revision:"6f0812d787ab931475343320d2547158"},{url:"resources/dia_pl.txt",revision:"3c7d08a5fefc693e6b6b4521a3c0a6cc"},{url:"resources/dia_pt-br.txt",revision:"5d7431a638a268dfedd3bc7f463e17d6"},{url:"resources/dia_pt.txt",revision:"981210fd60e7fd0831fcd6d26ca26f74"},{url:"resources/dia_ro.txt",revision:"1d77510ecd2b1b1c26640dfe77e00f48"},{url:"resources/dia_ru.txt",revision:"4c2d2f96df120afc4c3b3c58d0bc6ebc"},{url:"resources/dia_si.txt",revision:"2db82ba649f3ab7d578a73b247b06c4f"},{url:"resources/dia_sk.txt",revision:"4b9033183a2c90ccf0f75136fd7b14b0"},{url:"resources/dia_sl.txt",revision:"c27148e1c9480a35642162595480ff1f"},{url:"resources/dia_sr.txt",revision:"ef3562ada2e69e5d33609d58a677b6db"},{url:"resources/dia_sv.txt",revision:"7357682c42f6d47729b6b1784aaa5e9b"},{url:"resources/dia_sw.txt",revision:"377dd914bd645c2348e342bf55306439"},{url:"resources/dia_ta.txt",revision:"00ce65e244e159a2dcb93b9829a2e603"},{url:"resources/dia_te.txt",revision:"8aaca1c42eb1c027a77138f0fccc85c7"},{url:"resources/dia_th.txt",revision:"c2be3eae6995b41ba466651629c69143"},{url:"resources/dia_tr.txt",revision:"9571764eb899cc108c6fb2631d694ca3"},{url:"resources/dia_uk.txt",revision:"76e4f285ac8c648d3b3fbc6ab59aad17"},{url:"resources/dia_vi.txt",revision:"ced105b1a1ea57902c88fdd36ab041c0"},{url:"resources/dia_zh-tw.txt",revision:"ce0a47eca469dbb93e8c4f26aba7ea73"},{url:"resources/dia_zh.txt",revision:"a69a22b12a4ced3f62285b2521355755"},{url:"favicon.ico",revision:"83014b0f32b6c7b15b66cf3c6d6d7c16"},{url:"images/manifest.json",revision:"38d3a7e4b63e8175f0aab6f03e000f07"},{url:"images/logo.png",revision:"e4e0d092abdb1e668b5ec41a7fe0713c"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"732c29e21332a926318a7005d21ec450"},{url:"images/icon-192-maskable.png",revision:"47e006d0ce4a35eb5beaa97f0c2bfed0"},{url:"images/icon-192.png",revision:"d022403d52435d76afec82c4e24a17ef"},{url:"images/icon-512-maskable.png",revision:"cf152feeb01fb21f3148a71a3540266e"},{url:"images/icon-512.png",revision:"a3a0df7e7a385244b74073f81ecc45de"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",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",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"7985b4d1692766a7db52cbdd10893ad9"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index 554a0f3d2..86a924e80 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/70f3901391db98ea82806b046cf93579/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"1048a7c368b56f257962aa4a4ee3b41d\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"e51d47ff2e4145099305d6e282337166\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"72461550c97b806c59914f8b8abd2fd0\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5324b1040e93e7e271c98060c2ef3993\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"c3215554d29cc3f5df885cab999563c3\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"e8411c6155dd6e4cc118a8d439cf4e50\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"781ebdd3dda1d88c31eb00da02f872ef\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"73927d303703a329ff06d681553e993d\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"8d60c82458b57bb9ccc7b0c4f6ed3f79\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e278657437cf14eeedbb3b641d3ba8c0\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"61c2ef14ee768be21fcb22b1928f7cac\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"45e3683c1150ad2e139f42fedaf9e7aa\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"ed33364ad4282d0e29775ca2e2f351e0\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"101dbe73020d8471a5208da4d8ae247e\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"ba2fd4196222285218549625600a530f\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"b3eb739977ead9876a8afe0103ad7e36\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"fd7945d51201ff95e51d082750c67c39\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"faa7d843ef32aba9b9f11e367ca362d5\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"619ff072153d5897b7184ee0fe925f18\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"1feb3c63ee76afc71ebec607c8a9347a\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"67482775f1ff0d1b2cb31f6226c519d3\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"a7dce4832af9f1d0b4e5f5bf189ef328\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"743a891d016470e8e0a3651be32fb3c5\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"771de2b3741f25b4114e51c93ce1a866\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"637b4984bb64580b4ef61e28ef7ca664\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ad7e62eb41228b929489d9427d206e82\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"a89e3f7e7cb3b6867d3e74eb949894dd\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"769be61a373049c5d3b358201f1acb65\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"238e53f20884ef57b1a9c06bd800b9ef\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"755e1872b614c9a5b27c5459062c8320\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"adf6788e96b0e3f0029cbae30a4faefb\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"c645a78fdda2843acd6aa9d9bf60a6e8\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9da16676fc1b33c61b4a025a352dc916\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57b0f8eb2319f99f96b79507966f4e6f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"b4b10c93e53b13dbd3e407532813b9e0\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7cbbba0381a1a6cdeade3bc28ac01962\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"943b020ff0430e9f81fe3e1875423b7d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"94aff34cd118d39d79abacf2a16aea7d\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"325ed2d9ffa2ddc493d9ed10d46007ad\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"fc666763d3fbff227411defda23b1942\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"e8746ae5b0123155bdd837ae7f01b5f5\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"e1600b30e6517d4dc4a7002ce675c641\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"4acfe58eb8f47895f188af8bfd33659c\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"e9512982f5d9e89015435ee50d577bbc\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"6f0812d787ab931475343320d2547158\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"3c7d08a5fefc693e6b6b4521a3c0a6cc\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"5d7431a638a268dfedd3bc7f463e17d6\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"981210fd60e7fd0831fcd6d26ca26f74\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"1d77510ecd2b1b1c26640dfe77e00f48\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4c2d2f96df120afc4c3b3c58d0bc6ebc\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2db82ba649f3ab7d578a73b247b06c4f\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"4b9033183a2c90ccf0f75136fd7b14b0\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"c27148e1c9480a35642162595480ff1f\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef3562ada2e69e5d33609d58a677b6db\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"7357682c42f6d47729b6b1784aaa5e9b\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"377dd914bd645c2348e342bf55306439\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"00ce65e244e159a2dcb93b9829a2e603\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"8aaca1c42eb1c027a77138f0fccc85c7\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"c2be3eae6995b41ba466651629c69143\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"9571764eb899cc108c6fb2631d694ca3\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"76e4f285ac8c648d3b3fbc6ab59aad17\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"ced105b1a1ea57902c88fdd36ab041c0\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"ce0a47eca469dbb93e8c4f26aba7ea73\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"a69a22b12a4ced3f62285b2521355755\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../private/var/folders/5p/vxfp3wpj4slfjt2m12dxyp9c0000gn/T/927160d1865e9fd38f7bf89cfd489e3f/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/homebrew/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.skipWaiting();\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"b2b7e40d452b5707a1a9d984a0a0542b\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"b7348adb16856a4c46cf5d37f1925fe1\"\n },\n {\n \"url\": \"js/orgchart.min.js\",\n \"revision\": \"619d8c4dab47b81868916df31f55478b\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"f760278d924467fb1d2289448c73fe27\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"71913a30c93bc9aff182a3a2b3da1a21\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"cf64f6a493a8cb5079f2b70813e478d7\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"57fe6012597666439de3e76c9bb681c1\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"shortcuts.svg\",\n \"revision\": \"2381dd779ce6cfee954042a7f784c7e6\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"1c4b010eb053bfb9aed1caee8a3d3689\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"05873c4bba51f571b1da549a967ea06c\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"99dc5495d36d5ebaddababefde083c8c\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"4695f3bb1fac6fb6f049d44b78a14e63\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"41dc8af9576b47f359cff19fff7a41c2\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"4836f5e4308abe57830e441518364f23\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"abed474e47c0c41a5ad2366b4828f77a\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"75f816c208d0c621e3066a97ff0ee6cf\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"c41221a9a51ff293f05ed13c7b142e5c\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"d3269625ce04b7a277b779ff175957d0\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"8eceb2fe587296dd11f9c8f6eae34c20\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"c4cb6b60234b04b2c8bc09e555746615\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"8af574bd1ae86be37b83b094a5011a4f\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"5324b1040e93e7e271c98060c2ef3993\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"261a7494161cee976ecfb110ac7571d2\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"740dce44cf53499f476ee8edc37d09a0\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"3bb38a5d9186a896ed04808e921ef888\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"5fb6ff1a73f54a9086b7a7e1f613b8ed\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"b82e366bf57ecced9435c2a8ba9cb9b9\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"6542434cf3df5c60163e2767678f1bfc\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"69c1bca25fd4889bf832e8441c972268\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"4ad77ae3f08c19eddac932b2fa8c7068\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"30ff609b31d4a8c38da6c28e555947ea\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"9613fec05b19ddef081ca6e9d8b057bf\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"03a8dcfc69612b44b6e75e6926a956fc\"\n },\n {\n \"url\": \"math/es5/startup.js\",\n \"revision\": \"dc7130cdc866593293dbb5dde11ceb40\"\n },\n {\n \"url\": \"math/es5/core.js\",\n \"revision\": \"f71bc0bfb7d2ac8261747f97a5d47dd4\"\n },\n {\n \"url\": \"math/es5/ui/safe.js\",\n \"revision\": \"8c1fcfee7c879588ad409edcdd9cce53\"\n },\n {\n \"url\": \"math/es5/output/svg.js\",\n \"revision\": \"4f55967d16197ebb01b86356d8ab179a\"\n },\n {\n \"url\": \"math/es5/input/tex.js\",\n \"revision\": \"5c4f470da2ccb1acf85041fcecd6fff6\"\n },\n {\n \"url\": \"math/es5/input/asciimath.js\",\n \"revision\": \"c2d4076dd8e26d509bfe3a378e71cfa7\"\n },\n {\n \"url\": \"math/es5/output/svg/fonts/tex.js\",\n \"revision\": \"6eab785a3788ea805bd2b552d1f0aab8\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"73927d303703a329ff06d681553e993d\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"8d60c82458b57bb9ccc7b0c4f6ed3f79\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"e278657437cf14eeedbb3b641d3ba8c0\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"61c2ef14ee768be21fcb22b1928f7cac\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"45e3683c1150ad2e139f42fedaf9e7aa\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"ed33364ad4282d0e29775ca2e2f351e0\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"101dbe73020d8471a5208da4d8ae247e\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"ba2fd4196222285218549625600a530f\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"b3eb739977ead9876a8afe0103ad7e36\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"fd7945d51201ff95e51d082750c67c39\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"faa7d843ef32aba9b9f11e367ca362d5\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"619ff072153d5897b7184ee0fe925f18\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"1feb3c63ee76afc71ebec607c8a9347a\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"67482775f1ff0d1b2cb31f6226c519d3\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"a7dce4832af9f1d0b4e5f5bf189ef328\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"743a891d016470e8e0a3651be32fb3c5\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"771de2b3741f25b4114e51c93ce1a866\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"637b4984bb64580b4ef61e28ef7ca664\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ad7e62eb41228b929489d9427d206e82\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"a89e3f7e7cb3b6867d3e74eb949894dd\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"769be61a373049c5d3b358201f1acb65\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"238e53f20884ef57b1a9c06bd800b9ef\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"755e1872b614c9a5b27c5459062c8320\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"adf6788e96b0e3f0029cbae30a4faefb\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"c645a78fdda2843acd6aa9d9bf60a6e8\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"9da16676fc1b33c61b4a025a352dc916\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"57b0f8eb2319f99f96b79507966f4e6f\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"b4b10c93e53b13dbd3e407532813b9e0\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7cbbba0381a1a6cdeade3bc28ac01962\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"943b020ff0430e9f81fe3e1875423b7d\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"94aff34cd118d39d79abacf2a16aea7d\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"325ed2d9ffa2ddc493d9ed10d46007ad\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"fc666763d3fbff227411defda23b1942\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"e8746ae5b0123155bdd837ae7f01b5f5\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"e1600b30e6517d4dc4a7002ce675c641\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"4acfe58eb8f47895f188af8bfd33659c\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"e9512982f5d9e89015435ee50d577bbc\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"6f0812d787ab931475343320d2547158\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"3c7d08a5fefc693e6b6b4521a3c0a6cc\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"5d7431a638a268dfedd3bc7f463e17d6\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"981210fd60e7fd0831fcd6d26ca26f74\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"1d77510ecd2b1b1c26640dfe77e00f48\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"4c2d2f96df120afc4c3b3c58d0bc6ebc\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2db82ba649f3ab7d578a73b247b06c4f\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"4b9033183a2c90ccf0f75136fd7b14b0\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"c27148e1c9480a35642162595480ff1f\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"ef3562ada2e69e5d33609d58a677b6db\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"7357682c42f6d47729b6b1784aaa5e9b\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"377dd914bd645c2348e342bf55306439\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"00ce65e244e159a2dcb93b9829a2e603\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"8aaca1c42eb1c027a77138f0fccc85c7\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"c2be3eae6995b41ba466651629c69143\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"9571764eb899cc108c6fb2631d694ca3\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"76e4f285ac8c648d3b3fbc6ab59aad17\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"ced105b1a1ea57902c88fdd36ab041c0\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"ce0a47eca469dbb93e8c4f26aba7ea73\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"a69a22b12a4ced3f62285b2521355755\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"83014b0f32b6c7b15b66cf3c6d6d7c16\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"38d3a7e4b63e8175f0aab6f03e000f07\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"e4e0d092abdb1e668b5ec41a7fe0713c\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"732c29e21332a926318a7005d21ec450\"\n },\n {\n \"url\": \"images/icon-192-maskable.png\",\n \"revision\": \"47e006d0ce4a35eb5beaa97f0c2bfed0\"\n },\n {\n \"url\": \"images/icon-192.png\",\n \"revision\": \"d022403d52435d76afec82c4e24a17ef\"\n },\n {\n \"url\": \"images/icon-512-maskable.png\",\n \"revision\": \"cf152feeb01fb21f3148a71a3540266e\"\n },\n {\n \"url\": \"images/icon-512.png\",\n \"revision\": \"a3a0df7e7a385244b74073f81ecc45de\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"7985b4d1692766a7db52cbdd10893ad9\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"0nBAmBAA,KAAKC,cAULC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,qBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,aACKC,SAAA,oCAEd,CACED,IAAO,YACKC,SAAA,oCAEd,CACED,IAAO,gBACKC,SAAA,oCAEd,CACED,IAAO,8CACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,uCACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,2CACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,oCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,wCACKC,SAAA,oCAEd,CACED,IAAO,4CACKC,SAAA,oCAEd,CACED,IAAO,6CACKC,SAAA,oCAEd,CACED,IAAO,yCACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,mCACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,cACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,oBACKC,SAAA,oCAEd,CACED,IAAO,wBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,0BACKC,SAAA,oCAEd,CACED,IAAO,qCACKC,SAAA,oCAEd,CACED,IAAO,gCACKC,SAAA,oCAEd,CACED,IAAO,iCACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,sCACKC,SAAA,oCAEd,CACED,IAAO,6BACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,mBACKC,SAAA,oCAEd,CACED,IAAO,kBACKC,SAAA,oCAEd,CACED,IAAO,uBACKC,SAAA,oCAEd,CACED,IAAO,sBACKC,SAAA,oCAEd,CACED,IAAO,yBACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,8BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,+BACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,kCACKC,SAAA,oCAEd,CACED,IAAO,4BACKC,SAAA,oCAEd,CACED,IAAO,2BACKC,SAAA,qCAEb,CACDC,4BAA+B,CAAC"}
\ No newline at end of file